| 关键词: Name Nav Cookies 漏洞 News Big rs Small 文件 UserCookie |
摘自论坛:http://bbs.7747.net/read.php?tid=86785 Web Site:http://hi.baidu.com/linkhack 小系统 安全真的不杂样 不小心发现几个洞洞 官网居然是一个婚纱网。。 这么不专业 难怪有漏洞啦 漏洞还不少、、 1.注入 注入在这套系统来说 还是挺多的。 连在index里面都有 我们看看数据库连接文件conn.asp <% dim conn,db,connstr,username_guest,username db="data/s@df#%$sd32435&#rw.mdb" connstr="DBQ="+server.MapPath(""&db&"")+";DefaultDir=;driver={Microsoft Access driver (*.mdb)};" On Error Resume Next set conn=server.CreateObject("adodb.connection") conn.open connstr sub CloseConn() conn.Close() Set conn = Nothing end sub %> <% if Request.Cookies("UserCookie")("username")<>"" and Request.Cookies("UserCookie")("password")<>"" then Response.Cookies("admin_username")=Request.Cookies("UserCookie")("username") else Request.Cookies("UserCookie")("username")="" Request.Cookies("UserCookie")("password")="" end if %> 加了容错 防止了别人爆库 但是这里居然用cookies来读取username和password ,而且都是单纯的检测是否为空 然后就开门。。 2.鸡肋的防注入 我们来看看他们所谓的防注入文件 system.asp: <% sub myFunction(num,num_a,height,link,Nav_Name,Big_Name,Small_Name,Kind) set rs=server.CreateObject("adodb.recordset") page=clng(request("page")) if num<>"" and Nav_Name<>"" and Big_Name<>"" and Small_Name<>"" and Kind<>"" then sql="select * from News where Nav_Name='"&Nav_Name&"' and Big_Name='"&Big_Name&"' and Small_Name='"&Small_Name&"' and kind='"&kind&"' order by News_ID desc" else if num<>"" and Nav_Name<>"" and Big_Name<>"" and Small_Name<>"" then sql="select * from News where Nav_Name='"&Nav_Name&"' and Big_Name='"&Big_Name&"' and Small_Name='"&Small_Name&"' order by News_ID desc" else if num<>"" and Nav_Name<>"" and Big_Name<>"" then sql="select * from News where Nav_Name='"&Nav_Name&"' and Big_Name='"&Big_Name&"' order by News_ID desc" else if num<>"" and Nav_Name<>"" then sql="select * from News where Nav_Name='"&Nav_Name&"' order by News_ID desc" else end if end if end if end if rs.open sql,conn,1,1 。。。。。以下省略无用代码 哈 看到代码之后 都会纳闷 为什么那个程序员总是喜欢判断是否为空。。 只要不为空 都全部放行 包括那些危险字符。 那好吧 union一个来玩玩。。 3. email_db.asp文件存在漏洞,可以注入绕过: <!--#include file="inc/conn.asp"--> <% bt=Request.Form("bt") nr=Request.Form("nr") xm=Request.Form("xm") dh=Request.Form("dh") yj=Request.Form("yj") if bt<>"" and nr<>"" and xm<>"" then set rs=server.CreateObject("adodb.recordset") sql="select * from Guest" rs.open sql,conn,1,3 rs.AddNew rs("title")=bt rs("user_name")=xm rs("content")=nr rs("tel")=dh rs("email")=yj rs("add_date")=Date rs("add_time")=time rs.Update rs.close set rs=Nothing end if Response.Redirect("email.asp") %> 都是没有经过任何过滤 连管理员喜欢用的招式——判断是否为空 也没用上。 防注入没有包含进去,不过加不加还是会那样子的。。这里貌似是直接取得信息 然后跳到email。asp这个文件。 因为我这里不架设环境 所以就没去看哈 4.跨站 刚刚看得时候我也吓到了 我也没想到我居然能挖到跨站的洞。 因为这个系统太宽松了 洞出在email。asp这个文件上面 这个貌似是一个留言的。代码如下: <td height="30" colspan="2" align="center" valign="middle" bgcolor="#f7f7f7">发表留言</td> </tr> <script language="JavaScript" type="text/JavaScript"> function checkall() { if (document.form1.bt.value=="") { alert("留言标题不能为空!"); document.form1.bt.focus(); return false; } if (document.form1.nr.value=="") { alert("留言内容不能为空!"); document.form1.nr.focus(); return false; } if (document.form1.xm.value=="") { alert("你的姓名不能为空!"); document.form1.xm.focus(); return false; } } </script> 用js脚本验证的 、 也就是说很有可能是在本地验证的,哈 各位大牛都会利用我就不JJYY了,加个跨站代码去 他还是会帮我们乖乖提交 因为他只判断是否为空(这管理员爱干的事) 拿shell方面 我看了一下 发现他们用的是fckeditor 如果运气好 2003解析漏洞也能配合着用。 其他不说了 上传方面 我太菜了 没办法发现那个是不是漏洞。 哈 因为那里限制死了上传格式: Forum_upload="RAR|ZIP|SWF|JPG|PNG|GIF|DOC|TXT|CHM|PDF|ACE|MP3|WMA|WMV|MIDI| AVI|RM|RA|RMVB|MOV|XLS" 貌似没啥好利用 看到这句那么经典的语句。。 报告完毕。。 有错漏 记得指出! |
|
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系
[邮箱地址] 删除
|