NetGear DG632是美国网件(NetGear)公司的一个老款的家用ADSL路由器。 Netgear DG632路由器在80端口上运行了一个Web接口,允许管理员登录并管理设备的设置。到这个Web接口的认证是由/cgi-bin/中名为webcm的脚本处理的,该脚本根据用户的认证情况重新定向到相关页面。 webcm脚本处理用户认证并尝试通过以下javascript加载indextop.htm。indextop.htm页面要求执行HTTP基础认证。 --- <script language="javascript" type="text/javascript"> function loadnext() { //document.forms[0].target.value="top"; document.forms[0].submit(); //top.location.href="../cgi-bin/webcm?nextpage=../html/indextop.htm"; }</script></head> <body bgcolor="#ffffff" onload="loadnext()" > Loading file ... <form method="POST" action="../cgi-bin/webcm" id="uiPostForm"> <input type="hidden" name="nextpage" value="../html/indextop.htm" id="uiGetNext"> </form> --- 如果提供了默认admin用户的有效用户名,脚本就会继续加载indextop.htm页面并基于隐藏字段加载其他帧;如果用户认证失败,就会返回到"../cgi-bin/webcm"。攻击者可以绕过webcm脚本,无需认证直接访问特定的文件。 正常使用: http://TARGET_IP/cgi-bin/webcm?nextpage=../html/stattbl.htm 这会要求用户进行认证,如果认证详情未知就会拒绝对这个文件的访问。使用以下URL就可以无需提供任何凭据便访问同一stattbl.htm文件: http://TARGET_IP/html/stattbl.htm
NetGear DG632是美国网件(NetGear)公司的一个老款的家用ADSL路由器。 Netgear DG632路由器在80端口上运行了一个Web接口,允许管理员登录并管理设备的设置。到这个Web接口的认证是由/cgi-bin/中名为webcm的脚本处理的,该脚本根据用户的认证情况重新定向到相关页面。 webcm脚本处理用户认证并尝试通过以下javascript加载indextop.htm。indextop.htm页面要求执行HTTP基础认证。 --- <script language="javascript" type="text/javascript"> function loadnext() { //document.forms[0].target.value="top"; document.forms[0].submit(); //top.location.href="../cgi-bin/webcm?nextpage=../html/indextop.htm"; }</script></head> <body bgcolor="#ffffff" onload="loadnext()" > Loading file ... <form method="POST" action="../cgi-bin/webcm" id="uiPostForm"> <input type="hidden" name="nextpage" value="../html/indextop.htm" id="uiGetNext"> </form> --- 如果提供了默认admin用户的有效用户名,脚本就会继续加载indextop.htm页面并基于隐藏字段加载其他帧;如果用户认证失败,就会返回到"../cgi-bin/webcm"。攻击者可以绕过webcm脚本,无需认证直接访问特定的文件。 正常使用: http://TARGET_IP/cgi-bin/webcm?nextpage=../html/stattbl.htm 这会要求用户进行认证,如果认证详情未知就会拒绝对这个文件的访问。使用以下URL就可以无需提供任何凭据便访问同一stattbl.htm文件: http://TARGET_IP/html/stattbl.htm