设为首页 收藏本站 联系我们 网站导航
讲到WEB暴力破解通过大家都会用小榕的溯雪,但并不是所有WEB破解溯雪都是应付自如的(不要说我说小榕他老人家的坏话),最近因为工作的关系,碰到一个网管型设备的WEBPORTAL需要做WEB破解,看看HTML的源码:
… <script language=javascript> function login_send() { var f, p, page, url, option; f = document.form_login.forced_in.value; u = document.form_login.username.value; p = document.form_login.passwd.value; pg = document.form_login.page.value; url = "atm_login?username="+u+"&passwd="+p+"&forced_in="+f+"&page="+pg; option = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,favorites=no,resizable=no,left=230,width=520,top=120,height=300"; window.open(url, ’_blank’, option); } </script> … <form name=’form_login’ action=’__Javascript:login_send();’> <input type=’hidden’ name=’forced_in’ value=’false’><input type=’hidden’ name=page value=’’><input type=’hidden’ name=’redirect_portal_ip’ value=’’> <tr height=25%><td colspan=’2’><img src=’images/login-men.gif’ width=’177’ height=’22’></td> <td width=’27%’ rowspan=’4’><img src=’images/l-hand.gif’ width=’148’ height=’141’></td></tr> <tr height=25%><td width=’28%’ class=’inputlabel’>Username:</td> <td width=’45%’><input name=’username’ type=’text’ value=’’ style=’width:120px’ class=’inputbox’></td></tr> <tr height=25%><td class=’inputlabel’>Password:</td> <td><input type=’password’ name=’passwd’ value=’’ style=’width:120px’ class=’inputbox’></td></tr> <tr height=25%><td> </td> <td><input type=image src=images/login-go.gif width=’71’ height=’22’></td></tr> </from> …
看来是因为调用了javascript的关系吧… 怎么办?就这样放弃吗?这也大可不必,调出wvs(Acunetix Web Vulnerability Scanner,相信都不少同志都用过它吧?我用的是4.0,目前最新的版本是5.x),选择它的HTTP fuzzer功能:
然后怎么使用它呢?我整理了一下流程(其实和溯雪的原理差不多,不过可能需要更深入的了解HTTP的相关知识): 定义HTTP请求(Request)-》定义暴破运算参数(Add generator)-》插入暴破运算参数(Insert into request)-》定义成功触发特征(Fuzzer Filters)-》扫描(Start) 下面讲将具体实操,首先我们从目标的HTML代码可以看到,其实登陆过程是通过POST的四个参数[–两个隐藏参数(forced_in与page)与两个提交参数(username与passwd)]至本页的login_send函数,然后再通过GET atm_login这个页面提交认证数据。因此在使用wvs fuzzer前我们首先需要定义提交HTTP请求的内容,具体如: GET http://xxx.xxx.xxx.xxx/ atm_login?username=alex&passwd=demon&forced_in=false&page= HTTP/1.1 User-Agent: WVS/4.0 Accept: */* 下面是加入暴破运算参数至HTTP请求内容中,基于我们本次的目标是帐号(username字段)与密码(passwd字段),因此需要定义两个运算参数,本例中我打算让username进行暴力破解,而passwd则进行字典破解。 废话少说,先建立一个基于暴力破解的username运算参数:点击“Add generator”-》“Random string generator”后得到:
在“String length”中填入值的长度,我这里选择5;“Character set”中输入可能需要用到的字符,我这里选择26个小写字母;选择“Allow repetitions”—允许重复使用各字符。
版权所有 2007 黑客防线 廊(公)备13100138000530号