sablog是国内安全研究人员写的一款blog程序,但是代码中有一点瑕疵导致可能被获取管理员权限:)
问题出在wap/index.php里的652行左右
------------
$hash = getuserhash($user['userid'], $user['username'], $user['password'], $user['logincount']+1);
$DB->query("delete FROM {$db_prefix}sessions where uid='".$user['userid']."' or lastactivity+3600<'$timestamp' or hash='$hash'");
$DB->query("insert INTO {$db_prefix}sessions (hash,uid,groupid,ipaddress,agent,lastactivity) VALUES ('$hash', '".$user['userid']."', '".$user['groupid']."', '$onlineip', '".$_SERVER['HTTP_USER_AGENT']."', '$timestamp')");
-------------
注意_SERVER变量是直接入库的,存在一个insert类型的注射,我们通过这个漏洞测试过了官方,顺利拿到了所有权限,呵呵.
SA-Blog 1.6
过虑_SERVER变量
官方补丁<a href="http://www.sablog.net/blog/archives/318/" target="_blank">http://www.sablog.net/blog/archives/318/</a>
暂无评论