使用这个搭建好的环境:
https://github.com/motikan2010/CVE-2020-5398
直接运行(设置代理,不然很慢会失败)
./gradlew -DsocksProxyHost=127.0.0.1 -DsocksProxyPort=1080 bootrun
使用";
闭合响应中Content-Disposition
头的filename
字段,使得在浏览器中下载的时候保存为任意文件名,并且可控制后缀(默认Spring会加上这个.txt
?)
注:攻击的对象是客户端,而不是服务端!
参考
- https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/reflected-file-download-a-new-web-attack-vector/
- https://securitylab.github.com/research/rfd-spring-mvc-CVE-2020-5398
- https://github.com/motikan2010/CVE-2020-5398