ecshopsafety.php,ecshop 后台注入

测试版本是v3.0.0 RELEASE 20160518。由于全局包含了一个文件require_once(dirname(__FILE__) . '/safety.php');

然而这个正则还无法绕过$args_arr=array(

'xss'=>"[\\'\\\"\\;\\*\\].*\\bon[a-zA-Z]{3,15}[\\s\\r\\n\\v\\f]*\\=|\\b(?:expression)\\(|\\

'other'=>"\\.\\.[\\\\\\/].*\\%00([^0-9a-fA-F]|$)|%00[\\'\\\"\\.]");

所以请算起相当的鸡肋了。

漏洞文件admin/shophelp.phpif ($_REQUEST['act'] == 'update')

{

/* 权限判断 */

admin_priv('shophelp_manage');

/* 检查重名 */

if ($_POST['title'] != $_POST['old_title'] )

{

$exc_article->is_only('title', $_POST['title'], $_LANG['articlename_exist'], $_POST['id']);

}

/* 更新 */

if ($exc_article->edit("title = '$_POST[title]', cat_id = '$_POST[cat_id]', article_type = '$_POST[article_type]', content = '$_POST[FCKeditor1]'", $_POST['id']))

{

/* 清除缓存 */

clear_cache_files();

$link[0]['text'] = $_LANG['back_list'];

$link[0]['href'] = 'shophelp.php?act=list_article&cat_id='.$_POST['cat_id'];

sys_msg(sprintf($_LANG['articleedit_succeed'], $_POST['title']), 0, $link);

admin_log($_POST['title'], 'edit', 'shophelp');

}

}

只是需要post进去的title跟old_title不一致,就进入了is_only的处理,继续跟下函数is_only

admin\includes\cls_exchange.phpfunction is_only($col, $name, $id = 0, $where='')

{

$sql = 'SELECT COUNT(*) FROM ' .$this->table. " WHERE $col = '$name'";

$sql .= empty($id) ? '' : ' AND ' . $this->id . " <> '$id'";

$sql .= empty($where) ? '' : ' AND ' .$where;

return ($this->db->getOne($sql) == 0);

}

对其中对$id没有做任何处理,直接就导致了注入。好吧,其实采用这个函数的都存在这个问题

1-3-1024x382.jpg

1-2-1024x246.png

查看执行的语句

1-2-1024x247.jpg

仔细查看了下,发现updatexml貌似没有在其中,所以还是可以继续出内容的

1-5-1024x227.png

2.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值