YERSINIA(8)
πΈ NAME πΈ
yersinia β A Framework for layer 2 attacks π
(yes bestie, this is the YERSINIA(8) manual page, and we're gonna get you fluent in it, no cap)
β¨ SYNOPSIS β¨
yersinia [-hVGIDd] [-l logfile] [-c conffile] protocol [-M]
[protocol_options]
π DESCRIPTION π
okay so yersinia is a whole framework for performing layer 2 attacks. Like, that's its job. And the protocols it currently has implemented? Buckle up, because the list is giving:
- Spanning Tree Protocol (STP)
- VLAN Trunking Protocol (VTP)
- Hot Standby Router Protocol (HSRP)
- Dynamic Trunking Protocol (DTP)
- IEEE 802.1Q
- IEEE 802.1X
- Cisco Discovery Protocol (CDP)
- Dynamic Host Configuration Protocol (DHCP)
- Inter-Switch Link Protocol (ISL)
- MultiProtocol Label Switching (MPLS)
Some of the attacks it implements will cause a DoS in a network, others will help you perform any other more advanced attack, and some do both. Also β and this is kinda iconic β some of them are being released to the public for the very first time, because there just isn't any public implementation out there otherwise. π«Ά
Yersinia will definitely help both pen-testers and network administrators in their daily tasks.
Some of the mentioned attacks are DoS attacks, so TAKE CARE about what you're doing because you can convert your network into an UNSTABLE one. π fr fr, read that twice.
A lot of examples are given in this page's EXAMPLES section, showing a real and useful program execution. π
π OPTIONS π
-h,--helpβ Help screen. β¨-V,--Versionβ Program version.-Gβ Start a graphical GTK session. πΌοΈ-I,--interactiveβ Start an interactive ncurses session. π»-D,--daemonβ Start the network listener for remote admin (Cisco CLI emulation).-dβ Enable debug messages. π-llogfile β Save the current session to the file logfile. If logfile exists, the data will be appended at the end.-cconffile β Read/write configuration variables from/to conffile.-Mβ Disable MAC spoofing. π
π PROTOCOLS π
The following protocols are implemented in yersinia current version:
- Spanning Tree Protocol (STP and RSTP)
- Cisco Discovery Protocol (CDP)
- Hot Standby Router Protocol (HSRP)
- Dynamic Host Configuration Protocol (DHCP)
- Dynamic Trunking Protocol (DTP)
- IEEE 802.1Q
- VLAN Trunking Protocol (VTP)
- Inter-Switch Link Protocol (ISL)
- IEEE 802.1X
- MultiProtocol Label Switching (MPLS)
π PROTOCOLS OPTIONS π
π³ Spanning Tree Protocol (STP)
STP is a link management protocol that provides path redundancy while preventing undesirable loops in the network. The supported options are:
-versionversion β BPDU version (0STP,2RSTP,3MSTP)-typetype β BPDU type (Configuration, TCN)-flagsflags β BPDU Flags-idid β BPDU ID-costpathcost β BPDU root path cost-rootidid β BPDU Root ID-bridgeidid β BPDU Bridge ID-portidid β BPDU Port ID-messagesecs β BPDU Message Age-max-agesecs β BPDU Max Age (default is20)-hellosecs β BPDU Hello Time (default is2)-forwardsecs β BPDU Forward Delay-sourcehw_addr β Source MAC address-desthw_addr β Destination MAC address-interfaceiface β Set network interface to use-attackattack β Attack to launch
π¦ Cisco Discovery Protocol (CDP)
CDP is a Cisco propietary Protocol which main aim is to let Cisco devices to communicate to each other about their device settings and protocol configurations. The supported options are:
-sourcehw_addr β MAC Source Address-desthw_addr β MAC Destination Address-vversion β CDP Version-ttlttl β Time To Live-devidid β Device ID-addressaddress β Device Address-portid β Device Port-capabilitycap β Device Capabilities-versionversion β Device IOS Version-duplex0|1β Device Duplex Configuration-platformplatform β Device Platform-ipprefixip β Device IP Prefix-phellohello β Device Protocol Hello-mtumtu β Device MTU-vtp_mgm_domdomain β Device VTP Management Domain-native_vlanvlan β Device Native VLAN-voip_vlan_rreq β Device VoIP VLAN Reply-voip_vlan_qquery β Device VoIP VLAN Query-t_bitmapbitmap β Device Trust Bitmap-untrust_coscos β Device Untrusted CoS-system_namename β Device System Name-system_oidoid β Device System ObjectID-mgm_addressaddress β Device Management Address-locationlocation β Device Location-attackattack β Attack to launch
π Hot Standby Router Protocol (HSRP)
-sourcehw_addr β Source MAC address-desthw_addr β Destination MAC address-interfaceiface β Set network interface to use-attackattack β Attack to launch
π§ Inter-Switch Link Protocol (ISL)
-sourcehw_addr β Source MAC address-desthw_addr β Destination MAC address-interfaceiface β Set network interface to use-attackattack β Attack to launch
π VLAN Trunking Protocol (VTP)
-sourcehw_addr β Source MAC address-desthw_addr β Destination MAC address-interfaceiface β Set network interface to use-attackattack β Attack to launch
π«Ά Dynamic Host Configuration Protocol (DHCP)
-sourcehw_addr β Source MAC address-desthw_addr β Destination MAC address-interfaceiface β Set network interface to use-attackattack β Attack to launch
πΈ IEEE 802.1Q
-sourcehw_addr β Source MAC address-desthw_addr β Destination MAC address-interfaceiface β Set network interface to use-attackattack β Attack to launch
β Dynamic Trunking Protocol (DTP)
-sourcehw_addr β Source MAC address-desthw_addr β Destination MAC address-interfaceiface β Set network interface to use-attackattack β Attack to launch
π IEEE 802.1X
-versionarg β Version-typearg β xxxx-eapcodearg β xxxx-eapidarg β xxxx-eaptypearg β xxxx-eapinfoarg β xxx-interfacearg β xxxx-sourcehw_addr β Source MAC address-desthw_addr β Destination MAC address-interfaceiface β Set network interface to use-attackattack β Attack to launch
π₯ MultiProtocol Label Switching (MPLS)
-sourcehw_addr β Source MAC address-desthw_addr β Destination MAC address-interfaceiface β Set network interface to use-attackattack β Attack to launch-label1arg β Set MPLS Label-exp1arg β Set MPLS Experimental bits-bottom1arg β Set MPLS Bottom Of Stack flag-ttl1arg β Set MPLS Time To Live-label2arg β Set MPLS Label (second header)-exp2arg β Set MPLS Experimental bits (second header)-bottom2arg β Set MPLS Bottom Of Stack flag (second header)-ttl2arg β Set MPLS Time To Live (second header)-ipsourceipv4 β Source IP-portsourceport β Source TCP/UDP port-ipdestipv4 β Destination IP-portdestport β Destination TCP/UDP port-payloadASCII β ASCII IP payload
π₯ ATTACKS π₯
π³ Attacks Implemented in STP
0: NONDOS attack sending conf BPDU1: NONDOS attack sending tcn BPDU2: DOS attack sending conf BPDUs3: DOS attack sending tcn BPDUs4: NONDOS attack Claiming Root Role5: NONDOS attack Claiming Other Role6: DOS attack Claiming Root Role with MiTM
π¦ Attacks Implemented in CDP
0: NONDOS attack sending CDP packet1: DOS attack flooding CDP table2: NONDOS attack Setting up a virtual device
π Attacks Implemented in HSRP
0: NONDOS attack sending raw HSRP packet1: NONDOS attack becoming ACTIVE router2: NONDOS attack becoming ACTIVE router (MITM)
π«Ά Attacks Implemented in DHCP
0: NONDOS attack sending RAW packet1: DOS attack sending DISCOVER packet2: NONDOS attack creating DHCP rogue server3: DOS attack sending RELEASE packet
β Attacks Implemented in DTP
0: NONDOS attack sending DTP packet1: NONDOS attack enabling trunking
πΈ Attacks Implemented in 802.1Q
0: NONDOS attack sending 802.1Q packet1: NONDOS attack sending 802.1Q double enc. packet2: DOS attack sending 802.1Q arp poisoning
π Attacks Implemented in VTP
0: NONDOS attack sending VTP packet1: DOS attack deleting all VTP vlans2: DOS attack deleting one vlan3: NONDOS attack adding one vlan4: DOS attack crashing Catalyst
π Attacks Implemented in 802.1X
0: NONDOS attack sending 802.1X packet1: NONDOS attack Mitm 802.1X with 2 interfaces
π₯ Attacks Implemented in MPLS
0: NONDOS attack sending TCP MPLS packet1: NONDOS attack sending TCP MPLS with double header2: NONDOS attack sending UDP MPLS packet3: NONDOS attack sending UDP MPLS with double header4: NONDOS attack sending ICMP MPLS packet5: NONDOS attack sending ICMP MPLS with double header
π§ Attacks Implemented in ISL
- None at the moment π
πΌοΈ GTK GUI πΌοΈ
The GTK GUI (-G) is a GTK graphical interface with all of the yersinia powerful features and a professional 'look and feel'. β¨ it's giving main character energy, honestly.
π» NCURSES GUI π»
The ncurses GUI (-I) is a ncurses (or curses) based console where the user can take advantage of yersinia powerful features.
Press 'h' to display the Help Screen and enjoy your session :) π
π NETWORK DAEMON π
The Network Daemon (-D) is a telnet based server (ala Cisco mode) that listens by default in port 12000/tcp waiting for incoming telnet connections.
It supports a CLI similar to a Cisco device where the user (once authenticated) can display different settings and can launch attacks without having yersinia running in her own machine (specially useful for Windows users). π«Ά
π EXAMPLES π
okay bestie, this is the part where we actually do stuff π three little real-world runs to copy-paste and vibe with:
- Send a Rapid Spanning-Tree BPDU with port role designated, port state agreement, learning and port id
0x3000toeth1:
yersinia stp -attack 0 -version 2 -flags 5c -portid 3000 -interface eth1
- Start a Spanning-Tree nonDoS root claiming attack in the first nonloopback interface (keep in mind that this kind of attack will use the first BPDU on the network interface to fill in the BPDU fields properly):
yersinia stp -attack 4
- Start a Spanning-Tree DoS attack sending TCN BPDUs in the
eth0interface with MAC address66:66:66:66:66:66:
yersinia stp -attack 3 -source 66:66:66:66:66:66
β¨ SEE ALSO β¨
The README file contains more in-depth documentation about the attacks. π (yes, actually go read it, it's giving required reading, no cap)
π COPYRIGHT π
Yersinia is Copyright (c)
π BUGS π
Lots
fr fr. that's literally the whole note. "Lots". iconic honestly π
π AUTHORS π
- Alfredo Andres Omella
<aandreswork@hotmail.com> - David Barroso Berrueta
<tomac@yersinia.net>
and that's the whole page bestie, you ate that π«Ά this was Yersinia v0.8, with that date stamp $Date: 2017/08/23 08:10:00 $ riding along in the footer, all wrapped up as YERSINIA(8) β go forth and be the main character of your own network πβ¨
π¦ where this page comes from
- alpine 3.24: yersinia-doc 0.8.2-r6 Β· GPL-2.0-or-later
- debian bookworm: yersinia 0.8.2-2.1+b1
- nixos 26.05: yersinia-unstable 2022-11-20
- nixpkgs unstable: yersinia-unstable 2022-11-20
- ubuntu jammy: yersinia 0.8.2-2.1build1
- ubuntu noble: yersinia 0.8.2-2.2build2
- ubuntu questing: yersinia 0.8.2-2.2build2
- ubuntu resolute: yersinia 0.8.2-2.3
- ubuntu stonking: yersinia 0.8.2-2.4 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms