ecshop csrf getshell

- AV AC AU C I A
发布: 2025-04-13
修订: 2025-04-13

### 简要描述: 吐槽下ecshop后台安全性真的太弱了。。前台组合xss来猥琐的让管理员后台getshell ### 详细说明: 0x0后台getshell 在includes/cls_template.php fetch函数 ``` /** * 处理模板文件 * * @access public * @param string $filename * @param sting $cache_id * * @return sring */ function fetch($filename, $cache_id = '') { if (!$this->_seterror) { error_reporting(E_ALL ^ E_NOTICE); } $this->_seterror++; //若$filename以str:开头则执行下面的语句 if (strncmp($filename,'str:', 4) == 0) { $out = $this->_eval($this->fetch_str(substr($filename, 4))); } ``` 可以看到如果$filename以"str:"开头那么就调用_eval()函数执行"str:"后面的代码, 不过在执行之前系统调用fetch_str函数进行字符查找和替换。 _eval(): ``` function _eval($content) { ob_start(); eval('?' . '>' . trim($content)); $content = ob_get_contents(); ob_end_clean(); return $content; } ``` ``` /** * 处理字符串函数 * * @access public * @param string $source * * @return string */ function fetch_str($source) { if (!defined('ECS_ADMIN')) { $source = $this->smarty_prefilter_preCompile($source); } $source =...

0%
暂无可用Exp或PoC
当前有0条受影响产品信息