You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functiontelnetReceived(success,data){$("#panel_content").show();if(!success){alert("get data failed");return;}}functiontelnetSaveApply(){vartest=telnetTestFields();if(test==true){varlight=document.getElementById('light');varfade=document.getElementById('fade');light.style.display='block';fade.style.display='block';vartelnetJSON=telnetPrepareJSON();settelnetInfo(telnetJSON,function(success,error_desc){if(!success)alert(_(error_desc));else{$("#panel_content").hide();light.style.display='none';fade.style.display='none';popUpWindow('./cgi-bin/submit.cgi','350,350,500,300');gettelnetInfo(telnetReceived);}});}}functionpopUpWindow(URLStr,left,top,width,height){varpopUpWin=0;if(popUpWin){if(!popUpWin.closed)popUpWin.close();}popUpWin=open(URLStr,'popUpWin','toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');}functiontelnetTestFields(){returntrue;}functiontelnetPrepareJSON(){vartelnetData=newObject();telnetData.InputCmd=$("#order").val();vartelnetJSON=newObject();telnetJSON.TELNET=telnetData;returntelnetData;}
起因
用amule下片时,一直提示我是low ID,太欺负人了,不行,我要弄到high ID. google一圈,说是要开端口映射,这又需要用超级账号登陆电信光猫。这个超级账号密码,电信是不会告诉你的,只能自己破解了。
google一下一堆的破解电信光猫的文章,一般大致过程:
开启telnet
但是, 我手上这个HG261G有点头疼,它直接禁止了telnet, 不能被这一点点困难吓倒。
随便看看,发现 http://192.168.1.1/cgi-bin/, http://192.168.1.1/js/, http://192.168.1.1/html/ 这些目录是可以list出来的,那些js文件还可以打开看看,cgi脚本就不行了,那是在服务器端执行的。
浏览cgi脚本,发现有几个文件比较可能是突破口:
再看看js/目录,找几个文件看看,就可以发现这些脚本怎么传参数了。比喻你看js/telnet.js:
这就是说给/cgi-bin/telnet.js POST一个
InputCmd
参数就好了,就能执行了?具体的应该是一个json:
用curl测试一下:
可以打开 http://192.168.1.1/cgi-bin/telnet_output.log 看看结果。
。。。
成功开启telnet后,悲剧的发现root密码不是admin.他们更新了!
用useradmin, 密码K36Sa(印在光猫上的)可以登录telnet.
找到telnet的root密码
浏览/etc/passwd文件发现,有两个账号root, telecomadmin是我感兴趣的,就去找了john这个破解工具,开始暴力破解了。
既然
useradmin
的密码是K36Sa
, 那我就大胆猜测root, telecomadmin的密码也是5位的,就给john配了个MASK:[a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9]
,开工:
./run/john --users=telecomadmin --mask --format=aix-smd5 passwd
john记得下载社区改进版。
用了10多个小时,终于破解了root密码: hg2x0.
用root密码找到telecomadmin密码
后记
发现还能这么玩:
再打开 http://192.168.1.1/cgi-bin/telnet_output.log
The text was updated successfully, but these errors were encountered: