AD Testing Methodology
Network-Level Attacks
This is problematic, maybe move this into the 'Red Teaming' area and focus upon moving within AD here
Network Scanning
Ranging from passive to active measures:
attacking AD features
attacking vulnerabilities common in AD
- zero logon (2020)
- EternalBlue
- windows/smb/ms17_010_psexec
post AD-compromise
get local admin
Lateral Movement
- Kerberos Delegation
- LAPS
- gMSA
- certificate services
- mssql
- KrbRelayUp
- CI CD pipelines
- Hybrid Identities
- attack SCCM, https://github.com/subat0mik/Misconfiguration-Manager
token impersonation
-
delegation token vs. impersonate token
-
delegation is used for logging into a machine or RDP
-
impersonate are for non-interactive use
-
tool: incognito
-
meterpreter: load incognito, list_tokens -u, impersonate
-
Invoke-Mimikatz … to dump LSA
-
example
- meterpreter → smbexec
- load incogonito
- list_tokens -u → try to get into a domain admin
- rev2self (to get back to the original user)
- load kiwi
- dump stuff, dcsync, etc.
-
e.g., for dump stuff (when domain admin) - access denied: must be domain admin
- use exploit/windows/smb/psexec
- take care of x86/x64
- sysinfo, hashdump
- load incognito
- list_tokens -u
- impersonate_token domain\user
- use exploit/windows/smb/psexec
restricted groups and ACLs
add myself to the machineadmins:
attacking systems
- kerberoasting
- AS-REP
- print nightmare (2021)
- ADCS and PetitPotam NTLM Relay into Golden Ticket
- 7_exploiting AD services
cross-domain/forests attacks
- domain trust objects
- direction of trust is inverse to the “direction of access”
- if domain a trusts domain b, users from domain b can access resources in domain a
- parent-child trust is always two-way transitive
- tree-root trust is always two-way transitive
- external trust: one-way or two-way, nontransitive
- forest trust: one-way or two-way, nontransitive
- repeat this for all found domains and trusts
The following should list more, use to double-check: