# VLAN Hopping, Kerberoasting & SMB ADMIN$ Without Locking Out AD

> **FrameAssembly v3.3.0** · Operational Playbook (SecOps, Firewalls & IDS) · Canonical URL: https://frameassembly-lang.dev/use-cases/network-pentesting-pcap

Check if your SOC and NDR sensors actually wake up—without getting your jump box quarantined by EDR or locking out the CEO.

- **Category:** SecOps, Firewalls & IDS
- **Capture Filename:** `pentest_lateral_audit.frasm` (15 Ethernet frames)
- **Protocols Exercised:** `qinq`, `icmp`, `tcp`, `kerberos`, `ldap`, `smb`

## Operational Problem

Firing live Impacket, Responder, or CrackMapExec on a Tuesday afternoon is a great way to lock out production service accounts, get your laptop quarantined by EDR in 4 seconds, or drown the SOC in angry alerts.

When you just want to verify whether your switches drop double-tagged VLAN-hopping frames or whether your NDR sensor spots RC4 Kerberoasting + SMB2 ADMIN$ lateral movement, running live offensive tools on prod subnets is overkill.

And hand-rolling ASN.1 DER Kerberos TGS-REQ structures, BER-encoded LDAPv3 SPN filters, and UTF-16LE SMB2 tree-connects in raw Python bytes is a weekend you will never get back.

## Scenario & Topology: User VLAN 10 -> Server VLAN 20 Purple-Team Wake-Up Check

- **Topology:** `Jump Box (10.20.5.101, VLAN 10) -> Switch / Firewall -> Domain Controller (10.20.1.10) & File Server (10.20.1.50)`

In 15 surgical packets—zero background chatter—you test four classics: (1) an 802.1ad double-tagged VLAN-hopping probe (outer VLAN 10 -> inner VLAN 20); (2) a lit-up TCP Xmas tree scan (fin + psh + urg) against RDP 3389; (3) an RC4-HMAC (etype 23) Kerberoast TGS-REQ for "mssqlsvc/sql01.corp.local" + stateful LDAP SPN search; and (4) an SMB2 "\\10.20.1.50\ADMIN$" mount attempt slapped down with STATUS_ACCESS_DENIED (0xc0000022).

## FrameAssembly Workflow

Packs 15 frames covering an 802.1ad QinQ VLAN-hop, TCP Xmas scan, Kerberos RC4 TGS-REQ/REP, stateful LDAP SPN search, and SMB2 ADMIN$ rejection.

### Adapt It for Your Network

1. Point jump_box, corp_dc, and file_srv at the IPs/MACs in your test segment.
2. Swap the qinq outer/inner VLAN IDs, Kerberos realm/sname, LDAP filter, or SMB share string.
3. Compile -> feed into suricata -r / zeek -r offline, or replay onto your SPAN/trunk port with tcpreplay.

## Runnable Capture Specification (`pentest_lateral_audit.frasm`)

```frameassembly
host jump_box { ip 10.20.5.101 mac 00:50:56:20:05:65 }
host corp_dc  { ip 10.20.1.10  mac 00:50:56:20:01:0a }
host file_srv { ip 10.20.1.50  mac 00:50:56:20:01:32 }

flow l2_vlan_hop_and_stealth_scan(box, srv) {
    // 1. 802.1ad double-tagged VLAN-hopping probe (outer VLAN 10 -> inner VLAN 20)
    box -> srv qinq 10 innervlan 20 icmp echorequest id 404 seq 1 payload "VLAN_HOP_AUDIT" wait 2ms

    // 2. Stealth TCP Xmas scan (FIN + PSH + URG) against RDP port 3389
    box -> srv tcp fin psh urg srcport 59100 dstport 3389 win 1024 urgent 1 wait 5ms
}

flow ad_kerberoast_and_smb_lateral(box, dc, srv) {
    // 3. RC4-HMAC (etype 23) Kerberoast TGS-REQ + stateful LDAP SPN enumeration
    box -> dc kerberos tgsreq realm "CORP.LOCAL" cname "svc_audit" sname "mssqlsvc/sql01.corp.local" etype 23 wait 2ms
    box <- dc kerberos tgsrep realm "CORP.LOCAL" cname "svc_audit" sname "mssqlsvc/sql01.corp.local" etype 23 wait 2ms
    box -> dc tcp syn srcport 51389 dstport 389 win 64240 mss 1460 wait 1ms
    box <- dc tcp syn ack win 64240 mss 1460 wait 1ms
    box -> dc tcp ack wait 1ms
    box -> dc ldap searchreq msgid 2 basedn "dc=corp,dc=local" filter "(servicePrincipalName=*)" wait 2ms
    box <- dc ldap searchdone msgid 2 resultcode 0 wait 2ms

    // 4. SMB2 lateral-movement probe to ADMIN$ share on TCP 445
    box -> srv tcp syn srcport 51445 dstport 445 win 64240 mss 1460 wait 1ms
    box <- srv tcp syn ack win 64240 mss 1460 wait 1ms
    box -> srv tcp ack wait 1ms
    box -> srv smb negotiate msgid 0 wait 1ms
    box -> srv smb treeconnect msgid 1 sessionid 0x0001000000000001 share "\\\\10.20.1.50\\ADMIN$" wait 2ms
    box <- srv smb treeconnect msgid 1 sessionid 0x0001000000000001 treeid 1 status 0xc0000022 wait 1ms
}

compile {
    l2_vlan_hop_and_stealth_scan(jump_box, file_srv)
    ad_kerberoast_and_smb_lateral(jump_box, corp_dc, file_srv)
}
```

## Equivalent CLI Commands

```bash
# 1. Preview all 15 frames (QinQ, Xmas TCP, Kerberos, LDAP, SMB2) in terminal
frameassembly show pentest_lateral_audit.frasm

# 2. Compile to .pcap and inspect Kerberos SPN, LDAP filter, and SMB2 share in tshark
frameassembly pentest_lateral_audit.frasm pentest_lateral_audit.pcap
tshark -r pentest_lateral_audit.pcap

# 3. Validate NDR / IDS detections offline or replay onto an isolated test SPAN port
suricata -r pentest_lateral_audit.pcap -k none -l ./suricata_pentest/
zeek -C -r pentest_lateral_audit.pcap
```

## Protocol Reference Links

- [`qinq` — IEEE 802.1ad Provider Bridge Double VLAN Tagging (S-Tag + C-Tag)](https://frameassembly-lang.dev/docs/protocols/qinq) ([Raw .md](https://frameassembly-lang.dev/docs/protocols/qinq.md))
- [`icmp` — Internet Control Message Protocol v4 & Dual-Stack ICMPv6](https://frameassembly-lang.dev/docs/protocols/icmp) ([Raw .md](https://frameassembly-lang.dev/docs/protocols/icmp.md))
- [`tcp` — Transmission Control Protocol & RFC 7323 Options](https://frameassembly-lang.dev/docs/protocols/tcp) ([Raw .md](https://frameassembly-lang.dev/docs/protocols/tcp.md))
- [`kerberos` — Kerberos Network Authentication Service v5 (Active Directory)](https://frameassembly-lang.dev/docs/protocols/kerberos) ([Raw .md](https://frameassembly-lang.dev/docs/protocols/kerberos.md))
- [`ldap` — Lightweight Directory Access Protocol v3 (ASN.1 BER)](https://frameassembly-lang.dev/docs/protocols/ldap) ([Raw .md](https://frameassembly-lang.dev/docs/protocols/ldap.md))
- [`smb` — Server Message Block SMB2 & SMB3 File Sharing](https://frameassembly-lang.dev/docs/protocols/smb) ([Raw .md](https://frameassembly-lang.dev/docs/protocols/smb.md))
