眾所周知,log4j 漏洞已經出現。我們如何才能在我們自己的專案中縮小這種差距?我們有機會在 gradle 上推送一個版本嗎?
uj5u.com熱心網友回復:
我自己的解決方案來幫助
constraints{
implementation("org.apache.logging.log4j:log4j-core"){
version{
strictly("[2.15,3[")
prefer("2.15.0")
}
because("CVE-2021-44228 : Log4j is vulnerable to remote code execution")
}
}
uj5u.com熱心網友回復:
這是我們在 spring-boot 專案中使用的解決方案,我們使用以下enforcedPlatform方法管理依賴項:
dependencies {
api(enforcedPlatform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")) {
exclude(group: "org.apache.logging.log4j")
}
api(platform("org.apache.logging.log4j:log4j-bom:2.15.0")) {
because "https://nvd.nist.gov/vuln/detail/CVE-2021-44228"
}
}
這被設計為就地,直到我們能夠升級到一個 Spring Boot 版本,該版本本身會引入固定版本。
uj5u.com熱心網友回復:
警告:截至 2021-12-16,該執行緒中的其他答案已過時。不要直接使用其他答案。
log4j v2.15.0 不再被視為此漏洞的有效補救措施。有關更多資訊,請參閱https://logging.apache.org/log4j/2.x/security.html
cntl f為了2.15- 截屏
更多資源
- https://www.reddit.com/r/blueteamsec/comments/rd38z9/log4j_0day_being_exploited/
- 這個有很多有用的資訊,包括檢測器、更多的資源鏈接、非常容易理解的修復步驟等等
- https://www.cisa.gov/uscert/apache-log4j-vulnerability-guidance
- https://github.com/cisagov/log4j-affected-db
- https://logging.apache.org/log4j/2.x/security.html
- https://www.reddit.com/r/blueteamsec/comments/rd38z9/log4j_0day_being_exploited/
遵循這些資源中的指導......它可能會改變,但是
截至 2021-12-16
基本上是
- 如果可能,洗掉 log4j-core JAR 檔案
- 從兩臺跑步機立即修復和
- 在您的源代碼/源代碼管理檔案中,以防止未來的構建/發布/部署覆寫更改
- 如果這是不可能的(由于依賴性),請升級它們
- 如果你運行的是 Java8,那么你可以升級到 log4j 2.16.0
- 如果您運行的是較早版本的 Java,則可以升級到 log4j 2.12.2
- 同樣,這些更改必須同時發生在運行機器和代碼中
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/384498.html
