当前位置: 代码网 > 服务器>网络安全>漏洞分析 > BBSXP2008存在后台注射漏洞

BBSXP2008存在后台注射漏洞

2008年10月08日 漏洞分析 我要评论
BBSXP2008存在后台注射漏洞 测试系统:BBSXP2008 ACCESS版本 目前为最新版安全综述:BBSXP为一款简单的ASP SQL与ACCESS开发的多风格论坛 目前最新版本为BBSXP2008漏洞描述:Manage.asp文件的... 08-10-08

测试系统:
bbsxp2008 access版本 目前为最新版 安全综述:
bbsxp为一款简单的asp sql与access开发的多风格论坛 目前最新版本为bbsxp2008
漏洞描述:
manage.asp文件的threadid没有经过任何过滤便放入sql语句中执行 导致注射漏洞发生 漏洞代码:
<%
if cookieusername=empty then error("您还未<a href=""javascript:bbsxp_modal.open('login.asp',380,170);"">登录</a>论坛") if request_method <> "post" then error("<li>提交方式错误!</li><li>您本次使用的是"& request_method&"提交方式!</li>") forumid=requestint("forumid")
threadid=request("threadid") // 
if isnumeric(threadid) then
threadid=int(threadid) //这里虽然进行数字型判断 但是我们有办法直接跳出这里 继续执行下面的sql语句
forumid=execute("select forumid from ["&tableprefix&"threads] where threadid="&threadid&"")(0)
end if
if bestrole<>1 then
moderated=execute("select moderated from ["&tableprefix&"forums] where forumid="&forumid&" ")(0)
%><!-- #include file="utility/forumpermissions.asp" --><%
end if
if bestrole=1 and forumid<1 then
forumidsql=""
else
forumidsql=" and forumid="&forumid&""
end if
select case request("menu")
case "top"
if bestrole = 1 then
for each ho in request("threadid")
ho=int(ho)
execute("update ["&tableprefix&"threads] set threadtop=2,stickydate=dateadd("&sqlchar&"yyyy"&sqlchar&", 3, "&sqlnowstring&") where threadid="&ho&forumidsql&"")
next
succtitle="批量公告主题,主题id:"&request("threadid")&""
else
error("您的权限不够")
end if
case "untop"
if bestrole = 1 then
for each ho in request("threadid")
ho=int(ho)
execute("update ["&tableprefix&"threads] set threadtop=0,stickydate="&sqlnowstring&" where threadid="&ho&forumidsql&"")
next
succtitle="批量取消公告,主题id:"&request("threadid")&""
else
error("您的权限不够")
end if
....这里省略部分代码
next
updatethreadstatic(threadid)
succtitle="批量删除帖子,帖子id:"&request.form("postid")&"" case "undelpost"
for each ho in request.form("postid")
ho=int(ho)
rs.open "select * from ["&tableprefix&"posts] where threadid="&threadid&" and postid="&ho&"",conn,1,3
if not rs.eof then
rs("visible")=1
rs.update
if rs("parentid")=0 then execute("update ["&tableprefix&"threads] set visible=1 where threadid="&rs("threadid")&"")
end if
rs.close
next
updatethreadstatic(threadid)
succtitle="批量还原帖子,帖子id:"&request.form("postid")&"" '''''''''''''''''''''''''''''''''''帖子管理 end''''''''''''''''''''''''''''''''''
end select
if succtitle="" then error("无效指令") log(""&succtitle&"")
message="<li>"&succtitle&"</li>"
succeed message,""
%> 第231行到第235行代码如下
rs.open "select * from ["&tableprefix&"posts] where threadid="&threadid&" and postid="&ho&"",conn,1,3
if not rs.eof then
rs("visible")=2
rs.update
if rs("parentid")=0 then execute("update ["&tableprefix&"threads] set visible=2 where threadid="&rs("threadid")&"") 可以看到threadid,没有经过任何过滤变放入查询 导致漏洞发生 测试方法:
可以看到文件头限制了只能进行post提交方式,所以直接在ie进行测试是不允许的。使用ws抓包用nc提交就可以了。

(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com