乌云(WooYun.org)历史漏洞查询---http://wy.zone.ci/
乌云 Drops 文章在线浏览--------http://drop.zone.ci/
2014-08-26: 细节已通知厂商并且等待厂商处理中 2014-08-31: 厂商主动忽略漏洞,细节向第三方安全合作伙伴开放 2014-10-25: 细节向核心白帽子及相关领域专家公开 2014-11-04: 细节向普通白帽子公开 2014-11-14: 细节向实习白帽子公开 2014-11-21: 细节向公众公开
YiDacms 最新版SQL注入漏洞二处
易达CMS 企业建站系统当前最新版本是:YidaCms X3.2(20140718)版文件/Yidacms/user/user_message.asp第一处SQL注入:
yidacms_email = request("yidacms_email")if yidacms_email = "x" thenemail = trim(request.form("email"))if shuaiweb_useremail = email then response.write "<script language=javascript> alert('不能自已给自已发消息!');history.go(-1);</script>" response.endend ifset rs=server.createobject("adodb.recordset")sql="select * from shuaiweb_user where shuaiweb_useremail='"&trim(request.form("email"))&"' ORDER BY ID ASC"response.write(sql) rs.open sql,dbok,1,1if rs.eof then response.write "<script language=javascript> alert('没有这位会员,请重新输入会员账户!');history.go(-1);</script>" response.endend if%>
直接将email带入SQL注入,导致sql注入第二处SQL注入:
<form id="form2" name="form2" method="post" action="?yidacms_email=r"><table width="98%" border="1" cellpadding="10" cellspacing="0" bordercolor="#cccccc" style="border-collapse:collapse; margin-top:40px;"align="center"> <tr> <td>接收账户 : <%=email%><input type="hidden" name="shuaiweb_email" value="<%=email%>"/><input type="hidden" name="shuaiweb_emailt" value="<%=shuaiweb_useremail%>"/></td> </tr> <tr> <td><textarea name="shuaiweb_emailcontent" id="content" style="width:100%;height:200px;visibility:hidden;"></textarea></td> </tr> <tr> <td> <input type="submit" name="Submit2" value="发 送" style=" background:URL(../template/user/images/30.gif); width:66px; height:26px; border:0px; color:#FFFFFF;" /></td> </tr></table></form><%end ifif request("yidacms_email") = "r" then set rs=server.createobject("adodb.recordset") sql="select * from shuaiweb_usermessage" rs.open sql,dbok,3,2 rs.addnew rs("shuaiweb_email")=filter_Str(trim(request.form("shuaiweb_email"))) rs("shuaiweb_emailt")=filter_Str(trim(request.form("shuaiweb_emailt"))) rs("shuaiweb_emailcontent")=filter_Str(trim(request.form("shuaiweb_emailcontent"))) 'rs("shuaiweb_userzhuangtai")=trim(request.form("shuaiweb_userzhuangtai")) 'rs("shuaiweb_useradmin")=trim(request.form("shuaiweb_useradmin")) rs("time")=Now () rs("shuaiweb_yuedu")=0 rs.update response.write "<script language=javascript> alert('发送成功!');location.replace('user_message.asp?email=email');</script>" rs.Close set rs=nothingend if%></body>
在update时,shuaiweb_userzhuangtai和shuaiweb_useradmin没有使用全局过滤filter_Str函数,导致SQL注入。
第一处SQL注入证明:这里我们打印一下SQL语句。
存在此用户,email显示在了接收账户处
用户不存在,无法发送信息第二处就不在证明了,发送信息时,shuaiweb_userzhuangtai和shuaiweb_useradmin存在注入。
不管全局有没有用,既然用了就全部用上,在进入数据库的参数上都加上全局过滤先。
危害等级:无影响厂商忽略
忽略时间:2014-11-21 19:08
暂无