A fast, multithreaded scanner written in Go for detecting exposed and vulnerable eval-stdin.php endpoints in PHPUnit (CVE-2017-9841). Supports scanning across multiple domains with parallel execution and automatic protocol detection.
CVE-2017-9841 is a critical remote code execution (RCE) vulnerability in PHPUnit, caused by the public exposure of the
eval-stdin.phpscript.
Attackers can execute arbitrary PHP code on the server by sending crafted input to this endpoint.
Affected versions:
- PHPUnit ≤ 4.8.28
- PHPUnit ≤ 5.6.2
Common vulnerable path:
/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
- ✅ Detects exposed
eval-stdin.phpfiles using multiple common paths - ✅ Automatically detects HTTP/HTTPS protocol
- ✅ High-speed multithreaded scanning via
-tflag - ✅ Clean, categorized output to result files
- ✅ No third-party dependencies — just Go
go run PHPUnit_GoScan.go -l list.txt -t 20Or use precompiled binaries:
chmod +x PHPUnit_GoScan_amd64_linux
./PHPUnit_GoScan_amd64_linux -l list.txt -t 20PHPUnit_GoScan_amd64_windows.exe -l list.txt -t 20| Flag | Description |
|---|---|
-l |
Path to input file with one domain per line |
-t |
Number of concurrent threads (default: 10, recommended: 20) |
Example domain list:
example.com
http://target.org
https://vulnerable.site/
testdomain.net
- Supports raw domains and full URLs
- Automatically adds protocol if missing
The scanner checks for the following common vulnerable paths:
/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
/phpunit/phpunit/src/Util/PHP/eval-stdin.php
/phpunit/src/Util/PHP/eval-stdin.php
You can customize these in the PHPUnit_PayloadList section of the Go source file.
After scanning, results are written to:
| File Name | Description |
|---|---|
Domain_Online.txt |
Domains that responded with HTTP 200 |
PHPUnit_Injected.txt |
Domains confirmed vulnerable to CVE-2017-9841 |
[1/100] [Domain Online] ==> https://target.com
[1/100] [PHPUnit == PWNED] ==> https://target.com/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
[5/100] [Domain Offline] ==> http://dead.site
[6/100] [Fail Injection] ==> https://clean.site
| Platform | File Name |
|---|---|
| Linux | PHPUnit_GoScan_amd64_linux |
| Windows | PHPUnit_GoScan_amd64_windows.exe |
🛠 On Linux:
Runchmod +x PHPUnit_GoScan_amd64_linuxbefore executing.
This tool is for educational and authorized security testing only.
Do not scan domains you do not own or lack permission to test.
Unauthorized use may be illegal and punishable under applicable laws.
Developed by DRCrypter.ru
Telegram: @drcrypterd0tru
GitHub: @drcrypterdotru
MIT License — Free to use, modify, and distribute.
Links:
