security enabled verified high v1.0.0

Yersinia

Layer 2 network protocol exploitation framework for attacking STP, CDP, DTP, VTP, HSRP, and other switching and routing protocols.

📋 Live Preview
yersinia -I {interface}
๐ŸŒ interface โ†’ eth0
yersinia -I {interface}

Sandbox: execFile · Timeout: 86400s

Capabilities

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

Parameters

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

Contract

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

Side effects: network_trafficraw_socket_accessnetwork_traffic

Workflow Edges

Produces

network.attack.stpnetwork.spoof.cdpnetwork.attack.vlan

Consumes

network.interface

Resource Profile

ResourceValue
CPUlow
Memory32 MB
Networklow
Disk I/Olow

Examples

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

Documentation

Yersinia โ€” Layer 2 Protocol Exploitation Framework

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

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

Operational Modes

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.

Related Tools

ettercapbettercapmacof

References