Active Directory: practice machines and key commands
By Daniel Dayan ยท Updated
Active Directory is the identity backbone of most Windows networks, and attacking it is the core of many labs and exams. The usual flow is to get any valid domain credential, enumerate users, groups, computers, ACLs and certificate templates, then chain misconfigurations toward Domain Admin. BloodHound turns that enumeration into a graph so you can see the shortest path, for example a user with GenericAll over a group that can reset a service account password. Common stepping stones are Kerberoasting, AS-REP roasting, password reuse, ACL abuse, delegation and weak AD CS templates. Finish with DCSync or a dump of NTDS.dit to prove impact. Always note which account you hold and what it can touch, because AD paths are about relationships rather than single exploits. The machines below use these ideas in practice.
Key commands
Placeholders in braces, such as {TARGET_IP}, are values you fill in for your target.
SharpHound AD Collector Execution
Collect all Active Directory objects, trusts, ACLs, and sessions into zip archive.
.\SharpHound.exe -c All,GPOLocalGroup --zipfilename htb_ad.zipPowerView Domain & User Recon
Import PowerView and list domain controllers, domain users, and admin groups.
powershell -ep bypass
Import-Module .\PowerView.ps1
Get-DomainUser -SPN | select samaccountname,serviceprincipalname
Get-DomainGroupMember -Identity "Domain Admins"NetExec / CrackMapExec Domain Sweep
Check SMB credentials validity, local admin status (Pwn3d!), and password policies.
nxc smb {TARGET_IP} -u {USER} -p "{PASSWORD}" --sharesImpacket SecretsDump (NTDS.dit & SAM Dumps)
DCSync entire domain credentials directly over RPC using domain admin account.
impacket-secretsdump {DOMAIN}/{USER}:{PASSWORD}@{TARGET_IP} -just-dc-ntlmCertipy AD CS Vulnerable Template Enumeration
Find vulnerable Active Directory Certificate Services templates (ESC1-ESC13).
certipy find -u {USER}@{DOMAIN} -p "{PASSWORD}" -dc-ip {TARGET_IP} -vulnerable -stdoutEvil-WinRM Remote PowerShell Access
Connect to Windows target over WinRM port 5985 with credentials or Pass-The-Hash.
evil-winrm -i {TARGET_IP} -u {USER} -p "{PASSWORD}" -s /opt/scripts
Keep going
- Methodology: Phase 06: Internal System & Network Reconnaissance
- Cheatsheet: Windows & Active Directory
Active Directory machines (21)
20 Windows, 1 Linux.
Listed when a machine has a catalog tag that is one of: active directory, activedirectory, ad, bloodhound, sharphound, domain admin, domain controller, dcsync, gpo, gpo abuse, laps, powerview, neo4j, tier model, ad cs, adcs, esc1, certipy, secretsdump. Capital letters, hyphens and underscores are ignored, and the tags that matched come first in each row.
Active Directory at a glance
- By platform: 15 Hack The Box, 6 TryHackMe.
- On these practice lists: HTB Active Directory (19), OSCP (13), CRTO (10), CPTS (9), Unofficial IppSec CPTS (7), OSEP (7).
- Tags that most often appear alongside it: AS-REP Roasting (5), Kerberoasting (4), Kerberos (4), MSSQL (2), Password-Spraying (2), Pivoting (2).
Easy (4)
| Machine | Platform | OS |
|---|---|---|
| EscapeTwo IppSec | HTB | Windows |
| Forest IppSec | HTB | Windows |
| Sauna IppSec | HTB | Windows |
| VulnNet: Roasted | THM | Windows |
Medium (11)
| Machine | Platform | OS |
|---|---|---|
| Administrator IppSec | HTB | Windows |
| Attacktive Directory | THM | Windows |
| Cascade IppSec | HTB | Windows |
| Intelligence IppSec | HTB | Windows |
| Manager IppSec | HTB | Windows |
| Monteverde IppSec | HTB | Windows |
| Only4You | HTB | Linux |
| Querier IppSec | HTB | Windows |
| Resolute IppSec | HTB | Windows |
| Scrambled IppSec | HTB | Windows |
| VulnNet: Active (Retired) | THM | Windows |
Hard (5)
| Machine | Platform | OS |
|---|---|---|
| Blackfield IppSec | HTB | Windows |
| Enterprise | THM | Windows |
| Flight | HTB | Windows |
| Ledger | THM | Windows |
| Reset | THM | Windows |
Insane (1)
| Machine | Platform | OS |
|---|---|---|
| Sizzle IppSec | HTB | Windows |
Related techniques
Related guides: HTB Pro Labs guide, HTB CPTS exam guide, TJ Null OSCP list, OSCP exam scoring and time budget.
Practise it, then track it.
Log every box and the commands you used in ZeroBox.