kerberosKerberos Network Authentication Service v5 (Active Directory)Active Directory Tickets & RC4 Kerberoasting (pc <-> dc kerberos Port 88)
What It Does on the Wire
Trigger SOC Kerberoasting rules (tgsreq + sname "MSSQLSvc/..." + etype 23) without firing offensive tools at a real Domain Controller — add transport tcp and the compiler prepends the 4-byte RFC 4120 TCP record length automatically.
Kerberos v5 (kerberos, RFC 4120) is the core ticket-granting authentication protocol in Microsoft Active Directory and enterprise Linux realms on port 88. kerberos defaults to UDP port 88, and adding transport tcp switches to TCP port 88—automatically prepending the mandatory 4-byte RFC 4120 big-endian record-length header used by Windows Domain Controllers when tickets carry large PAC group memberships.
FrameAssembly encodes full ASN.1 DER Kerberos v5 (pvno 5) messages for asreq, asrep, tgsreq, tgsrep, and krberror with customizable realm, client principal (cname), service SPN (sname), and encryption type (etype, such as 18 for AES256 or 23 for RC4-HMAC).
Test Kerberoasting (etype 23 RC4 Downgrade) NDR & Suricata Rules
Generate a tgsreq requesting sname "MSSQLSvc/sql01.corp.internal:1433" with etype 23 (rc4-hmac) so SOC teams can validate Kerberoasting alerts without running offensive tools against a live Domain Controller.
Validate AS-REP Roasting & Username Enumeration (krberror) Detections
Simulate bursts of asreq and krberror packets across workstation VLANs to verify Zeek kerberos.log and CrowdStrike/Defender/NDR identity detections.
Domain Controller Firewall Checks (UDP 88 + TCP 88)
Verify branch-to-DC firewall rules allow both UDP 88 and transport tcp port 88 so users in many AD security groups do not fail login when Kerberos switches to TCP.
Minimal Quickstart (kerberos_quickstart.frasm)
Hit Preview Packets to compile in-browser and eyeball timestamps + wire byte lengths, or ship it straight to the Playground.
host domain_pc { ip 10.10.20.45 }host ad_dc01 { ip 10.10.0.10 }compile { domain_pc -> ad_dc01 kerberos asreq realm "CORP.INTERNAL" cname "jdoe" sname "krbtgt/CORP.INTERNAL" etype 18 wait 2ms domain_pc <- ad_dc01 kerberos asrep realm "CORP.INTERNAL" cname "jdoe" etype 18}What the Compiler Calculates So You Don't Have To
- Encodes valid ASN.1 DER RFC 4120
APPLICATIONtags (10AS-REQ,11AS-REP,12TGS-REQ,13TGS-REP,30KRB-ERROR) withpvno = 5. - Splits slash-separated SPNs like
"MSSQLSvc/db01.corp.internal:1433"into multi-componentPrincipalNameASN.1 sequences automatically. - Prepends the 4-byte RFC 4120 §7.2.2 TCP record-mark length automatically whenever
transport tcpis specified.
AES256 TGT Login Over TCP 88 + RC4 (etype 23) Kerberoasting Detection Lab
Models a normal Windows workstation obtaining an AES256 TGT over TCP port 88, followed by an RC4 (etype 23) tgsreq/tgsrep SPN ticket request to trigger SOC Kerberoasting signatures.
host wkstn_14 { ip 172.16.20.14 }host dc01_ad { ip 172.16.1.10 }compile { // 1. Normal Active Directory TGT exchange over TCP port 88 (etype 18 = AES256) wkstn_14 -> dc01_ad tcp syn srcport 53088 dstport 88 win 65535 mss 1460 wait 1ms wkstn_14 <- dc01_ad tcp syn ack win 65535 mss 1460 wait 1ms wkstn_14 -> dc01_ad tcp ack wait 1ms wkstn_14 -> dc01_ad kerberos asreq realm "CORP.INTERNAL" cname "alice" sname "krbtgt/CORP.INTERNAL" etype 18 transport tcp wait 2ms wkstn_14 <- dc01_ad kerberos asrep realm "CORP.INTERNAL" cname "alice" etype 18 transport tcp wait 5ms // 2. Suspicious RC4-HMAC (etype 23) Service Ticket Request for SQL SPN (Kerberoasting test) wkstn_14 -> dc01_ad kerberos tgsreq realm "CORP.INTERNAL" cname "alice" sname "MSSQLSvc/db-prod.corp.internal:1433" etype 23 transport tcp wait 2ms wkstn_14 <- dc01_ad kerberos tgsrep realm "CORP.INTERNAL" cname "alice" sname "MSSQLSvc/db-prod.corp.internal:1433" etype 23 transport tcp}# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show kerberos_ad_detection_lab.frasm
# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly kerberos_ad_detection_lab.frasm kerberos_ad_detection_lab.pcap
frameassembly kerberos_ad_detection_lab.frasm kerberos_ad_detection_lab.pcapng
# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse kerberos_ad_detection_lab.pcap kerberos_ad_detection_lab_edited.frasmAll kerberos Keywords & Header Options
Every sub-keyword and header option is lowercase [a-z0-9]+ with zero underscores — mix and match them in any order after kerberos:
src_host -> dst_host kerberos [asreq | asrep | tgsreq | tgsrep | krberror] [realm "<text>"] [cname "<text>"] [sname "<text>"] [etype <number>] [transport <udp|tcp>]| Keyword / Option | Accepted Value | Default | Effect on Packet |
|---|---|---|---|
| asreq | asrep | tgsreq | tgsrep | krberror | Kerberos v5 message type | asreq (msg-type 10) | Selects Authentication Service Request/Reply (10/11), Ticket-Granting Service Request/Reply (12/13), or Error (30). |
| realm "<text>" | Quoted uppercase Kerberos realm (e.g. "CORP.INTERNAL") | "EXAMPLE.COM" | Encodes the Realm GeneralString inside the ASN.1 DER body. |
| cname "<text>" | sname "<text>" | Quoted Client Principal Name or Service Principal Name (SPN) | cname "alice", sname "krbtgt/EXAMPLE.COM" | Encodes PrincipalName components in KDC-REQ-BODY / KDC-REP. |
| etype <number> | RFC 3961 encryption ID (18 AES256, 17 AES128, 23 RC4-HMAC; negative vendor IDs allowed) | 18 (aes256-cts-hmac-sha1-96) | Sets the requested or encrypted-part etype integer. |
| transport <udp|tcp> | udp or tcp | udp | Switches between UDP 88 and TCP 88 (with 4-byte RFC 4120 TCP length prefix). |
Cross-Layer Wrappers Valid with kerberos
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
12 options
Cross-Layer Wrappers Valid with kerberos
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
| Option | Range / Format | Default | Effect on Packet |
|---|---|---|---|
| wait <number><ns|us|ms|s|m> | Time gap (ns, us, ms, s, m) | 10ms | Advances the packet timestamp clock after sending this packet and before the next packet (wait 0ns sends back-to-back). |
| payload "<text>" | hexpayload "<hex>" | Quoted text or hex bytes (choose one) | Omitted | Appends or overrides raw payload bytes ("deadbeef" or "de:ad:be:ef") and updates packet lengths and checksums. |
| srcmac <mac> | dstmac <mac> | Colon, hyphen, or Cisco dot MAC | Host MAC / RFC multicast MAC | Overrides the 14-byte Ethernet II source or destination MAC address for this single packet. |
| vlan <0..4095> [pcp <0..7>] [dei <0|1>] | VLAN ID 0..4095, PCP 0..7, DEI 0..1 | Untagged | Wraps the packet in an IEEE 802.1Q VLAN tag (0x8100) with optional 802.1p QoS priority. |
| qinq <0..4095> [innervlan <0..4095>] | Outer S-VLAN 0..4095, Inner C-VLAN 0..4095 | Untagged (innervlan 1 when qinq is set) | Double-tags the packet with outer IEEE 802.1ad S-Tag (0x88a8) plus inner IEEE 802.1Q C-Tag (0x8100). |
| mpls <0..1048575> [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>] | Label 0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255 | Unlabeled (at most 1 mpls tag per packet) | Inserts a 32-bit MPLS label header (0x8847) ahead of the Layer 3 header. |
| ttl <0..255> [dscp <0..63>] [ecn <0..3>] | TTL/Hop Limit 0..255, DSCP 0..63, ECN 0..3 | ttl 64, dscp 0, ecn 0 | Sets IPv4 TTL or IPv6 Hop Limit plus DiffServ (DSCP) and ECN QoS markings. |
| ipid <0..65535> [df] [mf] [fragoffset <0..8191>] | IPv4 ID, DF/MF flags, fragment offset 0..8191 | ipid 1, flags 0, fragoffset 0 | Sets IPv4 Identification, Do-Not-Fragment (df), More-Fragments (mf), and fragment offset (ignored over IPv6). |
| flowlabel <0..1048575> | 20-bit IPv6 Flow Label (0..1048575) | 0 | Sets the 20-bit IPv6 Flow Label for ECMP routing tests (ignored when running over IPv4 hosts). |
| srcport <0..65535> | dstport <0..65535> | Port number 0..65535 | srcport 49152 (remembered), UDP 88 (or TCP 88 via transport tcp) | Overrides source or destination port and remembers the port pair automatically on <- replies. |
| transport <tcp|udp> | tcp or udp (supported on 9 dual-L4 protocols) | transport udp | Switches Layer 4 transport between TCP (psh ack + length framing where required) and UDP. |
| seq <number> | acknum <number> | win <0..65535> | syn | ack | psh | fin | rst | TCP sequence/ack numbers, window size, flags & RFC 7323 options | psh ack, win 65535, automatic TCP seq/acknum | When using TCP (transport tcp or default TCP): overrides automatic TCP sequence tracking, flags, or mss/wscale/sackperm/tsval/tsecr. |
Gotchas & Quick Fixes
No Hyphens in asreq, asrep, tgsreq, tgsrep, or krberror
domain_pc -> ad_dc01 kerberos tgs-req etype 23domain_pc -> ad_dc01 kerberos tgsreq etype 23Write Kerberos message types as single lowercase words without hyphens.