pentesting, updated

VLAN hopping

Escape a restricted VLAN by abusing dynamic trunking or 802.1Q double-tagging.

Goal

Reach a VLAN you are not supposed to have Layer 2 access to, from a port that is misconfigured to allow trunk negotiation.

How to test

yersinia -G                               # GUI, includes a DTP (Dynamic Trunking Protocol) attack
# or manually negotiate trunking with a crafted DTP frame, then tag traffic for the target VLAN
modprobe 8021q
vconfig add eth0 20                        # create a tagged sub-interface for VLAN 20
dhclient eth0.20

What to look for

A switch port that responds to DTP and successfully negotiates trunk mode, after which traffic tagged for any VLAN is reachable.

Notes

Requires physical or logical access to a switch port — common in office network segments, rare on hardened data-center equipment with DTP disabled by default.

§ home
~/knubertus/home/
1,1 Top