What Is AD?
It is a directory service based on protocols such as LDAP and X.500, used for centralized management of users, computers, resources, policies, and more. The many services in AD often have misconfigurations and exploitable vulnerabilities.
Why Attack AD
- Common objectives in penetration tests:
- Escalate privileges to Domain Admin.
- Access specific resources (databases, email, files).
- Compromise entire domains or trusted domains.
- Real-world scenarios:
- Kerberoasting: Retrieve and crack TGS tickets.
- Password Spraying: Try common passwords while respecting lockout policies.
- Exploiting trust relationships: Use nested memberships to move laterally between domains.
Main Tools and Approaches
Enumeration
Tools: BloodHound, Kerbrute, Responder, enum4linux, native commands (PowerShell, Sysinternals).
Common Attacks
- Kerberoasting: Exploit SPNs to obtain service account password hashes.
- Password Spraying: Try weak passwords across large sets of users.
- Responder: Capture NetNTLMv2 hashes on misconfigured networks.
- Pass-the-Hash/Ticket: Use captured hashes or tickets to authenticate without passwords.
Workflow
- Initial access: scan exposed services (SMB, LDAP, RDP), enumerate users and policies with enum4linux.
- AD enumeration: map relationships and privileges with BloodHound; find SPNs with GetUserSPNs.
- Targeted attacks: crack hashes (Hashcat, John); lateral movement with Pass-the-Ticket / Pass-the-Hash.
- Privilege escalation: permissions in key groups (Domain Admins, Enterprise Admins); trust relationships between domains.
- Final objectives: compromise domain controllers; extract credentials (DCSync, SAM/LSASS dumping).
In This Module