PISA Pakistan β€” Community CERT

← βš™οΈ Red Team Fundamentals (Ethical)

19. Active Directory Attacks: Kerberos Exploitation, Golden Tickets, and Domain Persistence

⏱ 12 min

Active Directory Architecture and Attack Surface

Active Directory (AD) serves as the central identity and access management system for most Pakistani organizationsβ€”government ministries, banks, telecom operators, and corporations rely on AD for user authentication, resource access, and Group Policy enforcement. A compromised AD environment grants attackers domain dominance, enabling lateral movement, data exfiltration, and persistent access.

This lesson covers advanced AD attacks aligned with MITRE ATT&CK tactics, focusing on techniques frequently observed in real-world breaches targeting Pakistani entities.

Key AD Components:

  • Domain Controllers (DCs): Authenticates users, stores AD database (NTDS.dit)
  • Kerberos Protocol: Default authentication protocol in Windows environments
  • LDAP: Directory query protocol
  • Group Policy Objects (GPOs): Centralized configuration management

Kerberos Authentication Attacks

Kerberos, while designed to eliminate password transmission, introduces specific attack vectors:

Kerberoasting

Technique: Request TGS (Ticket Granting Service) tickets for service accounts with SPNs (Service Principal Names), then crack offline.

Tools: GetUserSPNs.py (Impacket), Rubeus, Mimikatz

Practical Steps:

GetUserSPNs.py -dc-ip 192.168.1.10 DOMAIN/user
Request-SPNTicket -SPN "MSSQLSvc/dbserver.corp.pk"

Pakistani Context: Healthcare portals, government service applications, and banking backend services often run with high-privilege service accounts vulnerable to Kerberoasting.

AS-REP Roasting

Technique: Request AS (Authentication Service) responses for accounts with Do not require Kerberos preauthentication enabled, then crack the encrypted blob offline.

GetNPUsers.py -dc-ip 192.168.1.10 DOMAIN/ -request

Golden Ticket Attack

Technique: Forge Kerberos TGT (Ticket Granting Ticket) using the KRBTGT account hash, granting eternal domain admin access.

Requirements:

  1. Extract KRBTGT NTLM hash via DCSync or LSASS dump
  2. Forge TGT with arbitrary privileges and extended lifetime
  3. Use Mimikatz or Impacket ticketer
mimikatz # lsadump::dcsync /domain:corp.pk /user:krbtgt
mimikatz # kerberos::golden /domain:corp.pk /sid:S-1-5-21-xxx /krbtgt:hash /user:Administrator /ticket:golden.kirbi

Silver Ticket Attack

Forge TGS tickets for specific services using service account hashes, maintaining persistence without touching KRBTGT.

Domain Persistence Techniques

DCSync Attack

Technique: Simulate a DC to replicate password hashes from the domain database.

mimikatz # lsadump::dcsync /domain:corp.pk /all

Detection Challenge: Legitimate DCs perform DCSync regularly; distinguish malicious replication via timing and source patterns.

Skeleton Key Malware

Inject a master password into LSASS to allow access with any password while maintaining legitimate credentials.

Golden-GPO Persistence

Modify Group Policy Objects to create scheduled tasks or registry run keys on targeted machines.

Attacking Active Directory: Lab Walkthrough

Lab Setup:

  • Attacker Machine: Kali Linux with Impacket, Responder, Mimikatz
  • Target Environment: Vulnerable AD lab (TryHackMe Academy, PentesterLab, or isolated corporate lab)

Attack Chain Example:

  1. Initial Access: Phishing via spoofed NADRA notification email
  2. Credential Dumping: Extract credentials from LSASS with Mimikatz
  3. Lateral Movement: Use Pass-the-Hash to reach Domain Controller
  4. Domain Dominance: DCSync to obtain KRBTGT hash, forge Golden Ticket
  5. Persistence: Create malicious GPO or modify existing one

Detection Engineering: Defensive Correlations

Sigma Rules for AD Attack Detection:

title: Kerberoasting Attempt
detection:
  selection:
    EventID: 4769
    TicketOptions: '0x408000'
    ServiceName: '*'
  condition: selection

ELK/Splunk Monitoring:

  • Unusual TGT requests without prior TGS requests
  • Service account login from non-standard workstations
  • LDAP queries from single accounts enumerating all users

Purple Team Integration: Coordinate with blue teams to validate detection rules against simulated attacks.

Pakistani Compliance Considerations

The National Database and Registration Authority (NADRA) and State Bank of Pakistan (SBP) mandate strict access controls for identity and financial systems. Red team assessments must:

  • Coordinate with NCCIA 1799 for incident response coordination
  • Follow PTA guidelines when testing telecom AD infrastructure
  • Document all AD attack techniques in final reporting

Takeaway Action

Today: Review your organization's service accounts. Identify accounts with SPNs and assess whether preauthentication is required. Implement monitoring for anomalous TGS requests using Windows Event Log 4769.

← PrevNext β†’