Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2017-9841 — phpunit-shell | CVE_2017-9841 | Kitploit
工具/GitHubGitHub/p1ckzi/cve-2017-9841
Payload生成漏洞分析漏洞利用Web应用程序漏洞利用渗透测试远程访问工具
GitHubp1ckzi/cve-2017-9841

CVE-2017-9841

phpunit-shell | CVE_2017-9841

查看仓库
314年前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

phpunit-shell ⭐

一个简单的 Python3 脚本,用于利用 CVE-2017-9841。

漏洞利用 - CVE-2017-9841 ❗

简单脚本,利用 PHPUnit 4.8.28 之前版本和 5.6.3 之前 5.x 版本中存在的远程代码执行漏洞。向目标发送带有用户输入系统命令的 POST 请求。
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9841。


先决条件 ✔

  • python3
  • Python3 的 requests 模块和 bs4 模块。可以通过以下命令安装:
root@kitploit:~
pip3 install requests bs4

用法 ℹ

在确认目标运行着 phpunit 后:

root@kitploit:~
chmod +x phpunit-shell
./phpunit-shell -h

或

root@kitploit:~
python3 phpunit-shell -h

-h 或 --help 选项会显示如何运行脚本,并附有几个示例。
有两个位置参数和几个可选参数。

root@kitploit:~
usage: phpunit-shell.py [-h] [-a] [-n] address

phpunit-shell.py exploits an RCE vulnerability in
applications running PHPUnit before 4.8.28 and 5.x before 5.6.3.

positional arguments:
  address           ip/hostname, port, sub-directories to the vulnerable eval-stdin.php file.

optional arguments:
  -h, --help        show this help message and exit
  -a, --accessible  turns off features which may negatively affect screen readers
  -n, --no-colour   removes colour output

example:
        phpunit-shell.py 10.10.10.10/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php

--accessible 参数:

默认情况下,phpunit-shell 以彩色打印并带一些额外格式到终端输出,但这对于使用屏幕阅读器的用户来说并不总是有帮助。使用 --accessible 参数将禁止在终端输出花哨的格式和颜色。它也会禁用 ASCII 艺术。


局限性 ⚠

该脚本无法假设目标系统或运行漏洞应用程序的用户/服务的限制。也就是说,这不是一个完整的 shell,因此无法切换目录,较长的命令也可能无法执行。
它更像一个简单快速的半成品 shell 🐢,旨在作为进一步利用的入口——最终获得完整 shell、提权等等…… 👍

该脚本还对请求设置了 30 秒的超时,可以通过编辑脚本来更改或完全关闭。
默认使用 PHP 代码 'shell_exec',但如果用户希望,也可以更改,例如改用 'system'。

备注 📝

该脚本主要是为了练习创建一个简单的 Python 脚本来利用 CVE-2017-9841 并加速后续利用。


致谢 👍

https://skerritt.blog/a11y/ - 无障碍实现。

下载工具