vins villaplana - seguridad en capa de enlace [rootedcon 2011]
TRANSCRIPT
![Page 2: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/2.jpg)
Introducción
¿Qué entendemos por capa de enlace?
¿Por qué es importante?
¿Seguridad? ¿En qué afecta?
![Page 3: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/3.jpg)
Introducción
![Page 4: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/4.jpg)
Erase una vez…
Topologías simples
Anillo Estrella Bus Malla
![Page 5: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/5.jpg)
Erase una vez…
Vicios.
![Page 6: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/6.jpg)
Erase una vez…
Multiples direccionamientos lógicos
![Page 7: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/7.jpg)
Erase una vez…interface Vlan1234
ip address 10.0.0.254 255.255.255.0 secondary
ip address 10.139.15.1 255.255.255.252 secondary
ip address 10.139.15.5 255.255.255.252 secondary
ip address 10.139.15.9 255.255.255.252 secondary
ip address 10.139.15.13 255.255.255.252 secondary
ip address 172.1.28.2 255.255.255.224 secondary
ip address 172.1.28.34 255.255.255.224 secondary
ip address 172.1.28.130 255.255.255.128 secondary
ip address 10.100.15.2 255.255.255.0
standby 1 ip 10.100.15.3
standby 1 priority 99
standby 2 ip 172.1.28.3
standby 2 priority 99
standby 3 ip 172.1.28.35
standby 3 priority 101
standby 3 preempt
standby 4 ip 172.1.28.131
standby 4 priority 99
![Page 8: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/8.jpg)
Erase una vez…
Tráfico heterogéneo
![Page 9: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/9.jpg)
Erase una vez…
Protocolos mal configurados
![Page 10: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/10.jpg)
Erase una vez…
Multiples direccionamientos lógicos
Tráfico heterogéneo
Protocolos mal configurados
![Page 11: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/11.jpg)
Hoy día…
Evolución de las topologías
Anillo Estrella Bus Malla
![Page 12: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/12.jpg)
Hoy día…
Topologías
complejas
• Conectividad heterogénea
• Distanciamiento físico y lógico
• Demasiada conmutación
![Page 13: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/13.jpg)
Hoy día…
• Especialización del hardware
• Ampliación de funcionalidades
![Page 14: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/14.jpg)
Riesgos y amenazas
Clasificación
• Implementación
• Diseño de protocolo
![Page 15: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/15.jpg)
ARP
Inconvenientes
• Mensajes anónimos
• ARPs gratuitos
• Inundación de Vlan
• Respuestas ARP unicast
![Page 16: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/16.jpg)
ARP
Ataques
• Denegación de Servicio
• Espiar tráfico
• Ataques MITM
• Robar puertos
![Page 17: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/17.jpg)
ARP
Soluciones
• Activar ip arp inspection
• Activar port security
• Activar macsec
• Cifrar tráfico
• Modo PARANOIC
![Page 18: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/18.jpg)
STP
Inconvenientes
• Menajes anónimos
• No hay chequeos
• Convergencia lenta
• No hay balanceo de carga
![Page 19: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/19.jpg)
STP
Ataques
• Denegación de Servicio
• Bypass de equipos
• Ataques MITM
• Espiar tráfico
![Page 20: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/20.jpg)
STP
Soluciones
• Activar bpdu / root / loop guard
• Activar portfast
•Limitar broadcasts
• Activar etherchannel guard
• Activar bpdu filtering
![Page 21: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/21.jpg)
VTP
Inconvenientes
• Menajes anónimos
• No hay chequeos
![Page 22: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/22.jpg)
VTP
Ataques
• Denegación de Servicio
• Reconfigurar Vlanes de otros switches
• Crear, borrar, modificar Vlanes
![Page 23: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/23.jpg)
VTP
Soluciones
• Activar hashing md5
• En entornos pequeños, no usar VTP
![Page 24: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/24.jpg)
DHCP
Inconvenientes
• Cualquiera puede ser servidor DHCP
• Sin cifrar
![Page 25: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/25.jpg)
DHCP
Ataques
• Denegación de Servicio
• Levantar un servidor DHCP
• Forzar un cambio de IP
![Page 26: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/26.jpg)
DHCP
Soluciones
• Filtrar por mac
• Activar ip dhcp snooping
![Page 27: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/27.jpg)
Redundancia
Inconvenientes
• Falsas apariencias
• MACs cantosas
HSRP: 00-00-0c-07-ac-xxVRRP/CARP: 00-00-5e-00-01-xx
![Page 28: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/28.jpg)
Redundancia
Ataques
• Denegación de Servicio
• Forzar equipo activo / master
![Page 29: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/29.jpg)
Redundancia
Soluciones
• ¿Cifrar? ¿IPSEC? ¿Autenticar?
• Cambiar MAC
• Controlar el acceso al medio
• Activar 802.1x
![Page 30: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/30.jpg)
DTP / Vlan Tagging
Inconvenientes
• DTP activo por defecto
• No descarta tags
![Page 31: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/31.jpg)
DTP / Vlan Tagging
Ataques
• Crear trunks
• Saltar de VLAN
![Page 32: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/32.jpg)
DTP / Vlan Tagging
Soluciones
• Desactivar negociación DTP
• Activar VRF
• Desactivar puertos sin uso
• ¡No usar vlan 1 para nada!
![Page 33: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/33.jpg)
CDP
Inconvenientes
• Menajes anónimos
• Sin cifrar
![Page 34: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/34.jpg)
CDP
Ataques
• Obtención de información
• Crear dispositivos virtuales
• DoS (B.O. Fx)
![Page 35: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/35.jpg)
CDP
Soluciones
• Desactivar CDP
• Limitar CDP a redes de gestión
![Page 36: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/36.jpg)
802.1x / EAP
Inconvenientes
• Gran despliegue de infraestructura
• Solo autentica al iniciar la conexión
• Implementación limitada
• Afecta a la estabilidad de la red
![Page 37: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/37.jpg)
802.1x / EAP
Ataques
• Denegación de Servicio
• EAP-LEAP
• Shadow host
![Page 38: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/38.jpg)
802.1x / EAP
Soluciones
• EAP-PEAP o EAP-TTLS
• Cisco MAB
• OpenSEA
![Page 39: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/39.jpg)
PVLAN
![Page 40: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/40.jpg)
MPLS / VRF
Inconvenientes
• Ninguno.
![Page 41: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/41.jpg)
MPLS / VRF
Ataques
• Revelación de etiquetas o rutas
• Protocolos externos
• Inyección de etiquetas
• Modificación de rutas
![Page 42: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/42.jpg)
MPLS / VRF
Soluciones
• Configuración adecuada
![Page 43: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/43.jpg)
Cisco IOS
Inconvenientes
• Arquitectura rudi
• Imagen firmware
• Código inseguro
• Ejecución de código
![Page 44: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/44.jpg)
Cisco IOS
Ataques
• Cambiar configuración
• Ganar acceso privilegiado (enable)
• Infectar otros equipos
• Matar procesos (autenticación, logging)
![Page 45: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/45.jpg)
Cisco IOS
Soluciones
• Evitar obsolescencia
• Gestión proactiva de la plataforma
• Controlar imagen exterior
![Page 46: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/46.jpg)
Ruegos y preguntas
![Page 47: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/47.jpg)
Despedida
• Agradecimientos
![Page 48: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/48.jpg)
Anexo I :: Referencias
• Documentación técnica
Securing Layer 2 in LAN (Altunbasak, Krasser, Owen, Grimminger, Huth y Sokol)
http://users.ece.gatech.edu/~owen/Research/Conference%20Publications/altunbasak_ICN2005.pdf
A Survey of BGP Security Issues and Solutions (T. Farley, P. McDaniel y Kevin Butler)
http://www.cs.purdue.edu/homes/ninghui/readings/TruSe_fall04/td-5ugj33.pdf
Secure Use of VLANs: An @stake Security Assessment
http://www.cisco.com/warp/public/cc/pd/si/casi/ca6000/tech/stake_wp.pdf
![Page 49: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/49.jpg)
Anexo I :: Referencias
• Documentación técnica
Fun with Ethernet switches (Sean Connery)
http://www.blackhat.com/presentations/bh-usa-02/bh-us-02-convery-switches.pdf
ARP Vulnerabilities (Mike Beekey)
http://www.blackhat.com/presentations/bh-usa-01/MikeBeekey/bh-usa-01-Mike-Beekey.ppt
Protecting your IP network infrastructure (Nicolas Fischbach y Sebastien Lacoste-Seris)
http://www.blackhat.com/presentations/bh-europe-01/fischbach/bh-europe-01-fischbach.ppt
![Page 50: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/50.jpg)
Anexo I :: Referencias
• Documentación técnica
Understanding, Preventing, and Defending Against Layer 2 Attacks (Yusuf Bhaiji)
http://www.cisco.com/web/ME/exposaudi2009/assets/docs/layer2_attacks_and_mitigation_t.pdf
Cisco IOS Shellcode And. Exploitation Techniques (Michael Lynn)
http://www.jwdt.com/~paysan/lynn-cisco.pdf
Killing the myth of Cisco IOS rootkits (Sebastian Muñiz)
http://eusecwest.com/esw08/esw08-muniz.pdf
![Page 51: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/51.jpg)
Anexo I :: Referencias
• Herramientas
Mausezahn (Herbert Haas)
http://www.perihel.at/sec/mz
Yersinia (Slayer y Tomac)
http://www.yersinia.net
Taranis (Jonathan Wilkins)
http://www.bitland.net/taranis
Hunt (Pavel Krauz)
http://packetstorm.securify.com/sniffers/hunt/indexsize.shtml
![Page 52: Vins Villaplana - Seguridad en capa de enlace [RootedCON 2011]](https://reader034.vdocuments.mx/reader034/viewer/2022052622/559746481a28ab68078b4571/html5/thumbnails/52.jpg)
Anexo I :: Referencias
• Herramientas
Ettercap (Alor y Naga)
http://ettercap.sf.net
Guillermo Marro, Seclab
SToP y storm
Dsniff (Dug Song)
http://monkey.org/~dugsong/dsniff
irm-mpls-tools
http://www.irmplc.com/researchlab/tools