Layer 2 network protocol exploitation framework for attacking STP, CDP, DTP, VTP, HSRP, and other switching and routing protocols.
yersinia -I {interface} ๐ interface โ eth0 yersinia -I {interface} Sandbox: execFile · Timeout: 86400s
security.attack.stp security.attack.cdp security.attack.dtp security.attack.vtp security.attack.hsrp security.attack.dot1q security.attack.dot1x security.exploit.layer2 security.spoof.protocol | Name | Type | Required | Default | Description | Aliases |
|---|---|---|---|---|---|
interface | string | Yes | - | Network interface to use | -I |
gui | boolean | No | - | Launch graphical (GTK) interface | -G |
daemon | boolean | No | - | Run in daemon mode (background) | -d |
interactive | boolean | No | - | Interactive curses-based text mode | -i |
show-networks | boolean | No | - | List available network interfaces | -s |
log | file | No | - | Log output to file | -l |
verbose | boolean | No | - | Verbose mode | -v |
help | boolean | No | - | Show help and exit | -h |
stp-attack | string | No | - | STP attack type (conf, root, bpdu) | stp |
cdp-spoof | string | No | - | CDP packet injection | cdp |
dtp-attack | string | No | - | DTP trunk negotiation attack | dtp |
vtp-attack | string | No | - | VTP domain attack | vtp |
Inputs
network.interface Network interface for sending layer 2 frames
Outputs
network.attack.stp STP topology change attack
network.spoof.cdp CDP packet injection
network.attack.vlan VLAN hopping via DTP
network_trafficraw_socket_accessnetwork_traffic Produces
network.attack.stpnetwork.spoof.cdpnetwork.attack.vlanConsumes
network.interface| Resource | Value |
|---|---|
| CPU | low |
| Memory | 32 MB |
| Network | low |
| Disk I/O | low |
Launch interactive mode on eth0
yersinia -I eth0 -i Launch GTK GUI for point-and-click attacks
yersinia -I eth0 -G Show available network interfaces
yersinia -s STP root role attack (become root bridge)
yersinia stp -attack 2 CDP flooding attack
yersinia cdp -attack 1 DTP trunk negotiation โ enable trunking
yersinia dtp -attack 1 VTP domain takeover
yersinia vtp -attack 1 Run in daemon mode with logging
yersinia -I eth0 -d -l /tmp/yersinia.log Yersinia is a framework for exploiting weaknesses in layer 2 network protocols. It implements attacks against STP (Spanning Tree Protocol), CDP (Cisco Discovery Protocol), DTP (Dynamic Trunking Protocol), VTP (VLAN Trunking Protocol), HSRP (Hot Standby Router Protocol), 802.1Q, and 802.1X.
| Protocol | Attacks |
|---|---|
| STP | BPDU floods, topology changes, root bridge hijacking |
| CDP | Device advertisement floods, fake device injection |
| DTP | Trunk negotiation, VLAN hopping |
| VTP | Domain takeover, configuration revision bumps |
| HSRP | Router impersonation, DoS |
| 802.1Q | Double-tagging VLAN hopping |
| 802.1X | EAPOL flooding, authentication bypass |
Yersinia offers three interfaces: interactive text mode (-i) for keyboard-driven attacks, GTK mode (-G) for mouse-driven point-and-click, and daemon mode (-d) for scripted headless operation.