Documentation
¶
Overview ¶
Package krbroast assembles the hashcat crack line for the two dominant offline Kerberos credential attacks, from a captured KDC response:
- AS-REP roast (hashcat -m 18200): an AS-REP for a user with "do not require Kerberos preauth" set leaks the enc-part encrypted with the user's password-derived key. Line: $krb5asrep$23$user@REALM:checksum$edata
- Kerberoast (hashcat -m 13100): a TGS-REP's service ticket enc-part is encrypted with the service account's password-derived key. Line: $krb5tgs$23$*user$REALM$spn*$checksum$edata
kerberos_decode surfaces the pieces (the AS-REP/TGS-REP enc-part, the service ticket's enc-part + SPN); this closes the capture→crackable-hash gap by emitting the ready-to-crack line, exactly as netntlm_hashcat does for NTLM. The RC4 (etype 23) cipher is checksum(16) ‖ edata; that split is what hashcat expects. Pure offline transform; no network or device.
Wrap-vs-native judgement ¶
Native. It reuses the in-tree internal/kerberos AS-REP/TGS-REP + Ticket decoder and does a length split + string format. There is nothing to wrap.
Verifiable / no confidently-wrong output ¶
The line FORMAT is the canonical hashcat / impacket one; the cipher split is anchored to hand-built, spec-conformant AS-REP and TGS-REP DERs with known enc-parts (the EncryptedData parse itself is the same one verified against an impacket-built Ticket). Both encryption families are handled, matching impacket's GetUserSPNs / GetNPUsers exactly:
- RC4 (etype 23): cipher = checksum(16) ‖ edata. Kerberoast -m 13100, AS-REP roast -m 18200.
- AES (etype 17/18): cipher = edata ‖ checksum(12) (the checksum is the LAST 12 bytes). Kerberoast -m 19600 (AES128) / -m 19700 (AES256); the SPN is `*`-wrapped alone and ':' → '~'. AES AS-REP roast has no standard hashcat mode and is flagged for John the Ripper.
A non-AS-REP/TGS-REP message, or any other etype, errors rather than emitting a mis-split line.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct {
Attack string `json:"attack"` // "AS-REP roast" / "Kerberoast"
HashcatMode int `json:"hashcat_mode"` // 18200 / 13100
Principal string `json:"principal,omitempty"`
SPN string `json:"spn,omitempty"`
Realm string `json:"realm,omitempty"`
Line string `json:"crack_line"`
Note string `json:"note,omitempty"`
}
Result is the assembled crack line.