良精微博IIS解析上传漏洞
By.joken's、wdlei
本人技术有限,和朋友发掘此漏洞,大牛飘过。
近日,站长下载站上的良精微博程序又更新了。
更新时间为2010年7月13日,更新了皮肤和修改了上传漏洞,但依旧存在漏洞问题。
漏洞文件:UpFileForm.asp
代码:
可以自行定义上传目录。
继续往下看代码,来到action的文件中看下
../UpFileSave.asp
保存目录代码部分:
SaveToPath=Upload.form("SaveToPath") '文件保存目录,此目录必须为程序可读写
if SaveToPath="" then
SaveToPath="../"
end if
'在目录后加(/)
if right(SaveToPath,1)"/" then
SaveToPath=SaveToPath&"/"
end if
for each FormName in Upload.file '列出所有上传了的文件
set file=Upload.file(FormName) '生成一个文件对象
if file.Filesize
response.write "请先选择您要上传的文件,返回 !"
response.end
end if
FileExt=lcase(File.FileExt)
if CheckFileExt(FileEXT)=false then
response.write "文件格式不允许上传,返回 !"
response.end
end if
randomize timer
RanNum=int(9000*rnd)+1000
Filename=SaveToPath&year(now)&"."&month(now)&"."&day(now)&"_"&hour(now)&"."&minute(now)&"."&Second(now)&"_"&RanNum&"."&fileExt
if file.FileSize>0 then '如果 FileSize > 0 说明有文件数据
Result=file.SaveToFile(Server.mappath(FileName)) '保存文件
为对所提交的目录名进行检查和过滤,导致漏洞产生。
利用如下:
上传地址如:http://t.itf4.com/uploadfile/x.asp/2010.7.17_9.33.58_5882.jpg
附两张图:
留言评论(旧系统):
文章来源于lcx.cc:【转载】良精微博IIS解析上传漏洞
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论