发布日期:2011-03.15
发布作者:路人甲
影响版本:W78CMS V2.8.6
官方网站:http://www.w78cms.com/
漏洞类型:SQL注射
漏洞描述:W78CMS企业网站管理系统 v2.7.6 UTF-8 存在搜索型注入问题
漏洞分析:
文件so.asp
22行起
<% t=request.QueryString("t") key=request.QueryString("key") if t="" then Response.Write("<script>alert('请选择要搜索的栏目!');history.back();</script>") Response.End() end if if key="" then Response.Write("<script>alert('请输入关键词!');history.back();</script>") Response.End() end if set rs=server.createobject("adodb.recordset") if t=1 then exec="select * from [news] where title like '%"&key&"%' order by id desc " elseif t=2 then exec="select * from [Products] where title like '%"&key&"%' order by id desc " else exec="select * from [download] where title like '%"&key&"%' order by id desc " end if if t=4 then exec="select * from [anli] where title like '%"&key&"%' order by id desc " end if rs.open exec,conn,1,1 if rs.eof then response.Write " 没有搜索到相关内容!" else
明显针对key无过滤,直接代入数据库查询,导致注入问题。
漏洞证明:/so.asp?t=1&key=[sql]
修复方案:作者在很多文件中都包含了防注入文件sql.asp 以及w78_sql.asp文件 但很多地方却没有使用其中的防注入函数,另w78_sql.asp防注入文件缺少对cookis提交的过滤。
标签分类: SQL 注入