The idea
Garrow Port Authority fences its contractor ports into VLAN 10, the dock yard, and runs its berth machinery on VLAN 20. Nothing routes between them, so from a yard port the control relay cannot be reached. But the trunk between the two switches carries VLAN 10 as its native (untagged) VLAN — and that is a door. In double-tagging, Sunniva sends a frame wearing two 802.1Q tags: an outer tag for VLAN 10 and an inner tag for VLAN 20. The yard switch strips the outer tag and, because VLAN 10 is the trunk's native, forwards the frame untagged — exposing the inner tag, which the control switch reads and delivers into VLAN 20. The jump is one-way: her berth command lands, but no reply finds its way back.
Steps
-
Fenced into the yard
Sunniva's laptop is on a contractor port in VLAN 10. The berth-control relay lives at
10.0.20.10in VLAN 20. From the yard there is no route to it — confirm the fence is really there before trying to climb it.sunniva:~# ip -4 -o addr show eth0 | grep -oE 'inet 10[0-9.]+' sunniva:~# ping -c1 -W2 10.0.20.10 2>&1 || echo CONTROL-BLOCKED
-
Stack two tags
The trunk between the switches carries VLAN 10 as its native VLAN — frames in VLAN 10 cross it untagged. Sunniva builds a frame with two stacked tags and sends it from her yard port:
- outer tag VLAN 10 — the trunk's native VLAN. The yard switch pops it and, because it is the native, sends the frame out the trunk untagged, discarding nothing of what is left.
- inner tag VLAN 20 — now the outermost tag on the wire. The control switch reads it and delivers the frame into VLAN 20.
The payload is a berth command addressed to the relay. One access port, one crafted frame, no reply expected.
sunniva:~# sudo python3 -c 'from scapy.all import Ether,Dot1Q,IP,UDP,sendp,get_if_hwaddr,conf; conf.verb=0; p=Ether(src=get_if_hwaddr("eth0"),dst="ff:ff:ff:ff:ff:ff")/Dot1Q(vlan=10)/Dot1Q(vlan=20)/IP(src="10.0.20.66",dst="10.0.20.10")/UDP(sport=4444,dport=4444)/b"GARROW-BERTH-OPEN-5521"; sendp(p, iface="eth0", count=8, inter=0.25); print("sent")' -
The frame crossed the fence
The berth-control relay logs every datagram it receives on
/opt/relay/received.log. Read it: Sunniva's command is there, delivered into VLAN 20 from a yard port that has no route to it.berthRelay:~# cat /opt/relay/received.log
-
Take the yard VLAN off the native
The jump worked for one reason: the trunk's native VLAN was the contractor VLAN 10, so a frame tagged 10 crossed untagged and exposed its inner tag. Close the door — move the native to a dead, unused VLAN so VLAN 10 egresses the trunk tagged. Now the attacker's outer tag survives, the inner tag is never exposed, and a re-sent double-tagged frame is delivered into VLAN 10, not VLAN 20. Then the defender's checklist:
- Never use a data VLAN as a trunk's native VLAN — set the native to a dedicated, unused VLAN that carries no hosts, so stripping it exposes nothing useful.
- Drop tagged frames on access ports — a contractor port has no business sending an 802.1Q tag at all; reject it at ingress.
- Prune every VLAN off a trunk that does not need to cross it, so even an exposed inner tag has nowhere to go.
Running this against a system whose owner has not authorised you in writing is an offence under laws like the UK Computer Misuse Act and the United States' CFAA — the engagement letter is what makes it a test and not a crime.
yardSwitch:~# bridge vlan del dev controlSwitch vid 10; bridge vlan add dev controlSwitch vid 10; bridge vlan add dev controlSwitch vid 999 pvid untagged; echo 'native VLAN moved to a dead VLAN' yardSwitch:~# bridge vlan show dev controlSwitch sunniva:~# sudo python3 -c 'from scapy.all import Ether,Dot1Q,IP,UDP,sendp,get_if_hwaddr,conf; conf.verb=0; p=Ether(src=get_if_hwaddr("eth0"),dst="ff:ff:ff:ff:ff:ff")/Dot1Q(vlan=10)/Dot1Q(vlan=20)/IP(src="10.0.20.66",dst="10.0.20.10")/UDP(sport=4444,dport=4444)/b"GARROW-BERTH-OPEN-9183"; sendp(p, iface="eth0", count=8, inter=0.25); print("sent")' berthRelay:~# sleep 1; cat /opt/relay/received.log
Run these steps on real machines