使用這個搭建好的環境:
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