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. πŸ›
  • -l logfile β€” Save the current session to the file logfile. If logfile exists, the data will be appended at the end.
  • -c conffile β€” 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:

  • -version version β€” BPDU version (0 STP, 2 RSTP, 3 MSTP)
  • -type type β€” BPDU type (Configuration, TCN)
  • -flags flags β€” BPDU Flags
  • -id id β€” BPDU ID
  • -cost pathcost β€” BPDU root path cost
  • -rootid id β€” BPDU Root ID
  • -bridgeid id β€” BPDU Bridge ID
  • -portid id β€” BPDU Port ID
  • -message secs β€” BPDU Message Age
  • -max-age secs β€” BPDU Max Age (default is 20)
  • -hello secs β€” BPDU Hello Time (default is 2)
  • -forward secs β€” BPDU Forward Delay
  • -source hw_addr β€” Source MAC address
  • -dest hw_addr β€” Destination MAC address
  • -interface iface β€” Set network interface to use
  • -attack attack β€” 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:

  • -source hw_addr β€” MAC Source Address
  • -dest hw_addr β€” MAC Destination Address
  • -v version β€” CDP Version
  • -ttl ttl β€” Time To Live
  • -devid id β€” Device ID
  • -address address β€” Device Address
  • -port id β€” Device Port
  • -capability cap β€” Device Capabilities
  • -version version β€” Device IOS Version
  • -duplex 0|1 β€” Device Duplex Configuration
  • -platform platform β€” Device Platform
  • -ipprefix ip β€” Device IP Prefix
  • -phello hello β€” Device Protocol Hello
  • -mtu mtu β€” Device MTU
  • -vtp_mgm_dom domain β€” Device VTP Management Domain
  • -native_vlan vlan β€” Device Native VLAN
  • -voip_vlan_r req β€” Device VoIP VLAN Reply
  • -voip_vlan_q query β€” Device VoIP VLAN Query
  • -t_bitmap bitmap β€” Device Trust Bitmap
  • -untrust_cos cos β€” Device Untrusted CoS
  • -system_name name β€” Device System Name
  • -system_oid oid β€” Device System ObjectID
  • -mgm_address address β€” Device Management Address
  • -location location β€” Device Location
  • -attack attack β€” Attack to launch

πŸ“ Hot Standby Router Protocol (HSRP)

  • -source hw_addr β€” Source MAC address
  • -dest hw_addr β€” Destination MAC address
  • -interface iface β€” Set network interface to use
  • -attack attack β€” Attack to launch
  • -source hw_addr β€” Source MAC address
  • -dest hw_addr β€” Destination MAC address
  • -interface iface β€” Set network interface to use
  • -attack attack β€” Attack to launch

πŸ’œ VLAN Trunking Protocol (VTP)

  • -source hw_addr β€” Source MAC address
  • -dest hw_addr β€” Destination MAC address
  • -interface iface β€” Set network interface to use
  • -attack attack β€” Attack to launch

🫢 Dynamic Host Configuration Protocol (DHCP)

  • -source hw_addr β€” Source MAC address
  • -dest hw_addr β€” Destination MAC address
  • -interface iface β€” Set network interface to use
  • -attack attack β€” Attack to launch

🌸 IEEE 802.1Q

  • -source hw_addr β€” Source MAC address
  • -dest hw_addr β€” Destination MAC address
  • -interface iface β€” Set network interface to use
  • -attack attack β€” Attack to launch

⭐ Dynamic Trunking Protocol (DTP)

  • -source hw_addr β€” Source MAC address
  • -dest hw_addr β€” Destination MAC address
  • -interface iface β€” Set network interface to use
  • -attack attack β€” Attack to launch

πŸŽ€ IEEE 802.1X

  • -version arg β€” Version
  • -type arg β€” xxxx
  • -eapcode arg β€” xxxx
  • -eapid arg β€” xxxx
  • -eaptype arg β€” xxxx
  • -eapinfo arg β€” xxx
  • -interface arg β€” xxxx
  • -source hw_addr β€” Source MAC address
  • -dest hw_addr β€” Destination MAC address
  • -interface iface β€” Set network interface to use
  • -attack attack β€” Attack to launch

πŸ”₯ MultiProtocol Label Switching (MPLS)

  • -source hw_addr β€” Source MAC address
  • -dest hw_addr β€” Destination MAC address
  • -interface iface β€” Set network interface to use
  • -attack attack β€” Attack to launch
  • -label1 arg β€” Set MPLS Label
  • -exp1 arg β€” Set MPLS Experimental bits
  • -bottom1 arg β€” Set MPLS Bottom Of Stack flag
  • -ttl1 arg β€” Set MPLS Time To Live
  • -label2 arg β€” Set MPLS Label (second header)
  • -exp2 arg β€” Set MPLS Experimental bits (second header)
  • -bottom2 arg β€” Set MPLS Bottom Of Stack flag (second header)
  • -ttl2 arg β€” Set MPLS Time To Live (second header)
  • -ipsource ipv4 β€” Source IP
  • -portsource port β€” Source TCP/UDP port
  • -ipdest ipv4 β€” Destination IP
  • -portdest port β€” Destination TCP/UDP port
  • -payload ASCII β€” ASCII IP payload

πŸ’₯ ATTACKS πŸ’₯

🌳 Attacks Implemented in STP

  • 0: NONDOS attack sending conf BPDU
  • 1: NONDOS attack sending tcn BPDU
  • 2: DOS attack sending conf BPDUs
  • 3: DOS attack sending tcn BPDUs
  • 4: NONDOS attack Claiming Root Role
  • 5: NONDOS attack Claiming Other Role
  • 6: DOS attack Claiming Root Role with MiTM

πŸ¦‹ Attacks Implemented in CDP

  • 0: NONDOS attack sending CDP packet
  • 1: DOS attack flooding CDP table
  • 2: NONDOS attack Setting up a virtual device

πŸ“ Attacks Implemented in HSRP

  • 0: NONDOS attack sending raw HSRP packet
  • 1: NONDOS attack becoming ACTIVE router
  • 2: NONDOS attack becoming ACTIVE router (MITM)

🫢 Attacks Implemented in DHCP

  • 0: NONDOS attack sending RAW packet
  • 1: DOS attack sending DISCOVER packet
  • 2: NONDOS attack creating DHCP rogue server
  • 3: DOS attack sending RELEASE packet

⭐ Attacks Implemented in DTP

  • 0: NONDOS attack sending DTP packet
  • 1: NONDOS attack enabling trunking

🌸 Attacks Implemented in 802.1Q

  • 0: NONDOS attack sending 802.1Q packet
  • 1: NONDOS attack sending 802.1Q double enc. packet
  • 2: DOS attack sending 802.1Q arp poisoning

πŸ’œ Attacks Implemented in VTP

  • 0: NONDOS attack sending VTP packet
  • 1: DOS attack deleting all VTP vlans
  • 2: DOS attack deleting one vlan
  • 3: NONDOS attack adding one vlan
  • 4: DOS attack crashing Catalyst

πŸŽ€ Attacks Implemented in 802.1X

  • 0: NONDOS attack sending 802.1X packet
  • 1: NONDOS attack Mitm 802.1X with 2 interfaces

πŸ”₯ Attacks Implemented in MPLS

  • 0: NONDOS attack sending TCP MPLS packet
  • 1: NONDOS attack sending TCP MPLS with double header
  • 2: NONDOS attack sending UDP MPLS packet
  • 3: NONDOS attack sending UDP MPLS with double header
  • 4: NONDOS attack sending ICMP MPLS packet
  • 5: 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 0x3000 to eth1:
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 eth0 interface with MAC address 66: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)


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 πŸ’–βœ¨