OBlog是国内多用户博客使用度最多最广的多用户博客解决方案。 漏洞文件:api/API_Response.asp 打开api/API_Response.asp看开头处<pre>=================省略部分代码============================ if request.querystring("syskey")<>"" then syskey=lcase(request.querystring("syskey")) username=oblog.filt_badstr(trim(request("username"))) if chksyskey then dim truepassword truepassword = rndpassword(16) if request.querystring("password")<>"" then password=trim(request("password")) cookiedate=trim(request("savecookie")) if cookiedate="0" or cookiedate="" then cookiedate="1" oblog.savecookie username,truepassword,cookiedate oblog.execute ("update oblog_user set truepassword = '"&truepassword&"' where username = '"&username&"' and password = '"&password&"'") else call logoutuser() end if end if else =================省略部分代码============================...
OBlog是国内多用户博客使用度最多最广的多用户博客解决方案。 漏洞文件:api/API_Response.asp 打开api/API_Response.asp看开头处<pre>=================省略部分代码============================ if request.querystring("syskey")<>"" then syskey=lcase(request.querystring("syskey")) username=oblog.filt_badstr(trim(request("username"))) if chksyskey then dim truepassword truepassword = rndpassword(16) if request.querystring("password")<>"" then password=trim(request("password")) cookiedate=trim(request("savecookie")) if cookiedate="0" or cookiedate="" then cookiedate="1" oblog.savecookie username,truepassword,cookiedate oblog.execute ("update oblog_user set truepassword = '"&truepassword&"' where username = '"&username&"' and password = '"&password&"'") else call logoutuser() end if end if else =================省略部分代码============================ </pre>因password没经过任何过滤就进SQL语句了,并且是update语句,所以只适用于SQL版.要执行这条语句还必须通过chksyskey,在同文件的稍微下面就能看到chksyskey的代码验证提交信息的合法性,目前oblogmd5文件为16位,只能验证提交的位数再判定(考虑新版本增加参数)sebug_code_se]function chksyskey() chksyskey=true syskey=lcase(syskey) if len(syskey)=32 then if mid(syskey,9,16)<>md5(username&oblog_key) then errmsg=("安全码验证未通过!") founderr=true chksyskey=false end if elseif len(syskey)=16 then if syskey<>md5(username&oblog_key) then errmsg=("安全码验证未通过!") founderr=true chksyskey=false end if else errmsg=("安全码不合法!") founderr=true chksyskey=false end if end function[/sebug_code_se]这里有点小小的问题就是chksyskey貌似已经初始化为true了 以为不用管 不过到最后测试还是失败 所以必须自己构造合适的syskey才能使 chksyskey=true syskey是直接request过来的 构造也很简单 只要提交的syskey等于 你所提交的用户名+oblog_key的MD5值 chksyskey就等于true 大家要看明白可能需要一点点ASP的基础。 syskey的值必须跟提交的用户名相对应,oblog_key的值在api/Api_Config.asp里默认是API_TEST Oblog 4.5 oblog ---------- 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: <a href=http://down.oblog.cn/oblog4/patch/Oblog45_Final_Patch0619.rar target=_blank>http://down.oblog.cn/oblog4/patch/Oblog45_Final_Patch0619.rar</a>