Situational Awareness
After gaining elevated access in an AD environment, orient yourself before moving laterally or collecting credentials. Understand what you have, what you can reach, and what trust relationships exist that extend your access beyond the current domain.
Confirm current access level
Domain and forest trusts
Trusts extend your access beyond the current domain. A bidirectional trust means you can potentially move into the trusted domain with the right credentials.
name: dev.corp.local trustDirection: 3 (Bidirectional) trustAttributes: 8 (Transitive) name: partner.local trustDirection: 2 (Outbound)
trustDirection: 3 (bidirectional) and trustAttributes: 8 (transitive) is the most useful: accounts from the trusted domain can reach resources in both directions. See Domain Trust Abuse for exploitation.
Active sessions and logged-in users
Knowing who is currently authenticated on which host tells you where high-value credentials are in memory and where to move next.
SMB 10.10.10.20 445 WS01 [+] Logged on users SMB 10.10.10.20 445 WS01 CORP\Administrator - Active SMB 10.10.10.20 445 WS01 CORP\jsmith - Active
A Domain Admin with an active session on a workstation means their credentials are in LSASS memory on that host. If you can reach the host and have local admin, dumping LSASS gives you their hash or ticket. See Windows Token and Credential Harvesting.
Domain controller discovery
References
-
BloodyAD (GitHub)github.com/CravateRouge/bloodyAD (opens in new tab)
get writable, get search trust enumeration reference
-
NetExec / nxc (GitHub)github.com/Pennyw0rth/NetExec (opens in new tab)
sessions, loggedon-users, dc-list, enum_trusts modules
-
PowerSploit / PowerView (GitHub)github.com/PowerShellMafia/PowerSploit (opens in new tab)
Get-DomainTrust, Find-DomainUserLocation, Get-NetSession reference
Was this helpful?
Your feedback helps improve this page.