黑客风云——风云网络
设为首页 加入收藏 我要投稿 网站地图

您现在的位置: 黑客风云 >> 黑客文章 >> 黑客进阶 >> 脚本入侵 >> 正文
·没有路由密码权限时的鸽08-23·上网安全 Vista自我防范10-11
·让濒临崩溃的Windows XP10-11·有备无患,快速自制救急10-11
·要你好看!Windows看图工10-11·空间赞助网提供不同类型10-11
·讨论net.exe和net1.exe的10-10·让3389远程桌面传输更通10-10
·巧妙入侵渗透赌博站10-10·Aspx空间扫权限工具10-10
·Windows2003最新提权工具10-10·易淘乐提供100M免费全能10-10
·系统开机密码忘了不着急10-09·中意网络提供免费100M免10-09
·与众不同 Windows XP开始10-08·让桌面图标翻跟斗 在XP上10-08
·上海宽元站长资助计划-提10-08·个性化Windows XP的任务10-07
·趣盘提供3G免费网络硬盘10-07·秀山热线提供200MB免费全10-07
·一次艰辛的提权过程10-06·成功入侵IT大卖场的渗透10-06
·mysqlhack- MYSQL利用工10-06·lanker一句话PHP后门客户10-06
·WIXI提供3G免费多媒体网10-06·新人网络提供100M/ftp免10-06
·如何利用QQ带来高流量10-05·UuShare提供免费网络文件10-05
[推荐]joekoe CMS 4.0 两个漏洞(上传漏洞+注入)
      ★★★★★

joekoe CMS 4.0 两个漏洞(上传漏洞+注入)

文章整理发布:黑客风云 文章来源:www.05112.com 更新时间:2007-7-26 9:54:28

乔客(joekoe) CMS 4.0 的2个高危漏洞
前段时间读了读乔客,发现在乔客4.0版本中存在两个高危漏洞,一个上传漏洞,可以随意上传任意文件,包括ASP,另一个是SQL注入,甚至还有返回错误信息,可怕啊

上传漏洞:
看\common\include\web.upload.asp 中的代码

以下是引用片段:
sub doPageLoad()
if APP_STATUS="close" then
 treeData.addItem "_status","error.message"
 treeData.addItem "_message","网站暂时因关闭维护中!请稍候..."
 exit sub
end if
up.doInit()
if not upConfig.isInit then
 treeData.addItem "_status","error.message"
 treeData.addItem "_message","上传文件的参数不正确!"
else
 doPageLoadUser()
 select case upConfig.channel
 case "forum"
 upConfig.setSaveDir(upConfig.getSaveDir&(left

(ops.time.toConvertString("",10),6)&DIR_SEPARATOR))
 upConfig.filename=""
 case "user.face"
 upConfig.filename="face_"&upConfig.userid
 upConfig.setSaveDir("face"&DIR_SEPARATOR)
 upConfig.filetype="gif"
 case "blog.logo"
 upConfig.setSaveDir("blog"&DIR_SEPARATOR)
 upConfig.filetype="gif"
 case else
 if instr(upConfig.channel,".")>0 then
 upConfig.setSaveDir(mid(upConfig.channel,1,instr

(upConfig.channel,".")-1)&DIR_SEPARATOR)
 end if
 if instr(upConfig.fileinput,"url")>0 then
 upConfig.filetype="affix"
 end if
 end select
 if len(upConfig.getSaveDir())<3 then
 treeData.addItem "_status","error.message"
 treeData.addItem "_message","上传文件的参数不正确!"
 exit sub
 end if
 
 if 1=1 then
 upConfig.setData "zoom.channel.width",120
 upConfig.setData "zoom.channel.height",90
 end if
 
 upConfig.setBaseDir(DIR_ROOT&DIR_UPLOAD)
 upConfig.setBasePath(opsDirPath(DIR_ROOT&DIR_UPLOAD))
 upConfig.setBaseURL(URL_UPLOAD)
 up.doLoad()
end if
end sub

这段代码通过channel判断是否给上传类型赋值,如果channel不等于forum、user.face、blog.logo的时候判断fileinput是否包含url,如果不包含,upConfig.filetype就不赋值,继续往下看

以下是引用片段:
if up.isPost() then
 call doParseUploadData()
 treeData.addItem "_status","succeed"
 dim tmpFormMode,tmpFileValue,tmpThumbValue
 tmpFormMode="set"
 if upConfig.channel="user.face" then
 tmpLinkMode="no"
 tmpFileValue="#"&up.getFileInfo("filename")
 else
 tmpFileValue=up.getFileInfo("file.path")
 select case upConfig.filetype
 case "file"
 tmpLinkMode="no"
 'tmpFileValue=up.getFileInfo("file.path")
 case "pic","spic","pics","affix","gif","jpg","jpeg","bmp","png"
 tmpLinkMode="no"
 tmpThumbValue=up.getFileInfo("thumb.path")
 case else
 tmpLinkMode="again"
 tmpFormMode="append"
 dim tmpFileType:tmpFileType=lcase(up.getFileInfo("filetype"))
 select case tmpFileType
 case "gif","jpg","jpeg","bmp","png"
 tmpFileValue=""
 case "swf"
 tmpFileValue="[flash=350,250]upload/"&up.getFileInfo

("file.path")&"[/flash]"
 case else
 tmpFileValue="[download="&tmpFileType&"]upload_download.asp?

id="&upConfig.fileid&"[/download]"
 end select
 end select
 end if
 treeData.addItem "_form.mode",tmpFormMode
 treeData.addItem "_form.filevalue",tmpFileValue
 treeData.addItem "_form.thumbvalue",tmpThumbValue
 end if

 这段代码判断upConfig.filetype,然后定义上传文件的后缀名,只要之前upConfig.filetype没被赋值,且不是gif,jpg,jpeg,bmp,png,swf,就tmpFileValue="[download="&tmpFileType&"]upload_download.asp?id="&upConfig.fileid&"[/download]",看到这个,大家眼睛都放光了,根据用户的定义来判断上传类型,就好比问一个要偷东西的人:“你是贼么?”,这段代码也太XX了,估计之前也有不少人读出来了,只不过没公开而已
 

[1] [2] 下一页

文章录入:cainiaowang    责任编辑:cainiaowang 
【字体:
Copyright @2006 黑客风云 ●业务联系:QQ 联系怪人 联系奇人 Email:给怪人发邮件 给奇人发邮件
ICP备案:冀06009886