一、 漏洞 CVE-2017-9841 基础信息
漏洞信息
                                        # N/A

## 漏洞概述
PHPUnit中的`eval-stdin.php`文件存在一处远程代码执行漏洞,攻击者可以通过POST数据注入PHP代码来利用此漏洞。

## 影响版本
- PHPUnit 4.8.0 到 4.8.27
- PHPUnit 5.x 到 5.6.2

## 漏洞细节
攻击者可以通过向`/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php`文件发送以`<?php`开头的POST数据,注入并执行任意PHP代码。漏洞主要影响那些暴露了`/vendor`文件夹的站点。

## 影响
此类漏洞允许远程攻击者执行任意PHP代码,可能导致数据泄露、服务器控制权滥用等严重后果。
                                        
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
N/A
来源:美国国家漏洞数据库 NVD
漏洞描述信息
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP code via HTTP POST data beginning with a "<?php " substring, as demonstrated by an attack on a site with an exposed /vendor folder, i.e., external access to the /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php URI.
来源:美国国家漏洞数据库 NVD
CVSS信息
N/A
来源:美国国家漏洞数据库 NVD
漏洞类别
N/A
来源:美国国家漏洞数据库 NVD
漏洞标题
PHPUnit 安全漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
TYPO3是瑞士TYPO3协会维护的一套免费开源的内容管理系统。PHPUnit是其中的一个基于PHP的测试框架。 PHPUnit 4.8.28之前的版本和5.6.3之前的5.x版本中的Util/PHP/eval-stdin.php文件存在安全漏洞。远程攻击者可通过发送以‘<?php’字符串开头的HTTP POST数据利用该漏洞执行任意PHP代码。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
代码注入
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2017-9841 的公开POC
# POC 描述 源链接 神龙链接
1 CVE-2017-9841 detector script https://github.com/mbrasile/CVE-2017-9841 POC详情
2 Tool to try multiple paths for PHPunit RCE CVE-2017-9841 https://github.com/RandomRobbieBF/phpunit-brute POC详情
3 None https://github.com/cyberharsh/Php-unit-CVE-2017-9841 POC详情
4 (CVE-2017-9841) PHPUnit_eval-stdin_php Remote Code Execution https://github.com/ludy-dev/PHPUnit_eval-stdin_RCE POC详情
5 Masscanner for Laravel phpunit RCE CVE-2017-9841 https://github.com/incogbyte/laravel-phpunit-rce-masscaner POC详情
6 RCE exploit for PHP Unit 5.6.2 https://github.com/akr3ch/CVE-2017-9841 POC详情
7 phpunit-shell | CVE_2017-9841 https://github.com/p1ckzi/CVE-2017-9841 POC详情
8 CVE-2017-9841批量扫描及利用脚本。PHPUnit是其中的一个基于PHP的测试框架。 PHPUnit 4.8.28之前的版本和5.6.3之前的5.x版本中的Util/PHP/eval-stdin.php文件存在安全漏洞。远程攻击者可通过发送以‘<?php’字符串开头的HTTP POST数据利用该漏洞执行任意PHP代码。 https://github.com/jax7sec/CVE-2017-9841 POC详情
9 None https://github.com/yoloskr/CVE-2017-9841-Scan POC详情
10 Automated Exploit for CVE-2017-9841 (eval-stdin.php vulnerable file) https://github.com/mileticluka1/eval-stdin POC详情
11 None https://github.com/Jhonsonwannaa/CVE-2017-9841- POC详情
12 PHPunit Checker CVE-2017-9841 By MrMad https://github.com/MadExploits/PHPunit-Exploit POC详情
13 A Tool for scanning CVE-2017-9841 with multithread https://github.com/MrG3P5/CVE-2017-9841 POC详情
14 PHPUnit RCE https://github.com/Chocapikk/CVE-2017-9841 POC详情
15 None https://github.com/omgdomgd/CVE-2017-9841-Scan POC详情
16 None https://github.com/dream434/CVE-2017-9841- POC详情
17 CVE-2017-9841 https://github.com/dream434/CVE-2017-9841 POC详情
18 PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP code via HTTP POST data beginning with a "<?php " substring via Util/PHP/eval-stdin.php , as demonstrated by an attack on a site with an exposed /vendor folder, i.e., external access to the /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php URI. https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2017/CVE-2017-9841.yaml POC详情
19 None https://github.com/Threekiii/Awesome-POC/blob/master/%E5%BC%80%E5%8F%91%E6%A1%86%E6%9E%B6%E6%BC%8F%E6%B4%9E/PHPUnit%20eval-stdin.php%20%E8%BF%9C%E7%A8%8B%E5%91%BD%E4%BB%A4%E6%89%A7%E8%A1%8C%E6%BC%8F%E6%B4%9E%20CVE-2017-9841.md POC详情
20 None https://github.com/chaitin/xray-plugins/blob/main/poc/manual/phpunit-cve-2017-9841-rce.yml POC详情
21 https://github.com/vulhub/vulhub/blob/master/phpunit/CVE-2017-9841/README.md POC详情
三、漏洞 CVE-2017-9841 的情报信息