本帖最后由 MoR03r 于 2018-8-22 23:16 编辑
CMS:新秀企业网站系统PHP版 1.1 beta6过程:
首先用Seay源代码审计看了一下
然后跟了一下,在admin/module/file/deal.php 第69~71行这里发现没有对数据以及文件名进行任何过滤
跟进post函数,位置为include/function.php 第198~201行,从上一步获取两个参数,第二个参数没有使用默认的strict,而是no_filter
function post($val,$filter = 'strict')
{
return $filter(isset($_POST[$val])?$_POST[$val]:'');
}no_filter函数
function no_filter($str)
{
if(get_magic_quotes_gpc())
{
$str = stripslashes($str);
}
return $str;
}既然没有做任何过滤,那就任意写文件咯 后台->文件管理->语言设置->en-us 修改->随便选一个文件点击修改,然后开启burp抓包
直接修改其中的path和lang_text
访问shell地址http://localhost/languages/en-us/admin/fuck.php
即可getshell
|