关联漏洞
介绍
# Log4j CVE-2021-44228
## Solutions
Think about if you actually really require Log4j2 Core. Most likely, your own code (or some 3rd-party library you depend on) only need Log4j's Logging API façade - but can log to another back-end. You could therefore simply completely exclude the [`org.apache.logging.log4j:log4j-core`](https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core) dependency.
Use one of several available _"Logging API Bridges"_ to connect (only) `log4j-api` with another Logging Implementation back-end:
1. Log4j2-SLF4j-Logback using [log4j-to-slf4j](https://logging.apache.org/log4j/2.x/log4j-to-slf4j/)
2. [Log4j2-to-JUL](https://github.com/apache/logging-log4j2/tree/release-2.x/log4j-to-jul) from [LOG4J2-3282](https://issues.apache.org/jira/browse/LOG4J2-3282) by me, as https://github.com/vorburger/Learning-Log4j2 illustrates.
This makes particular sense if you, or your Cloud Provider, has existing infrastructure for the respective back-end:
* [Google Cloud Logging Logback Appender](https://cloud.google.com/logging/docs/setup/java#logback_appender_for), see [on GitHub](https://github.com/googleapis/java-logging-logback#about-cloud-logging-logback-appender), also [with Spring Framework integration](https://github.com/GoogleCloudPlatform/spring-cloud-gcp/tree/main/spring-cloud-gcp-starters/spring-cloud-gcp-starter-logging)
## Background
* https://logging.apache.org/log4j/2.x/security.html
* https://github.com/advisories/GHSA-jfh8-c2jp-5v3q
* https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228
## Detection & Scanning, Attack Surface
* https://github.com/github/codeql/pull/7354
* https://github.com/google/tsunami-security-scanner-plugins/issues/219
* https://github.com/YfryTchsGD/Log4jAttackSurface (with [Memes](https://github.com/YfryTchsGD/Log4jAttackSurface/blob/master/pages/MEME.md))
## Mitigations
* https://github.com/apache/logging-log4j2/pull/608
* https://spring.io/blog/2021/12/10/log4j2-vulnerability-and-spring-boot
* https://community.openhab.org/t/openhab-and-the-log4j-security-vulnerability/129901
* https://github.com/vorburger/MariaDB4j/issues/509
## Exploit
* https://www.lunasec.io/docs/blog/log4j-zero-day/#exploit-steps
文件快照
[4.0K] /data/pocs/c702b964c7164b93636c2426bb30d714bbb942e6
└── [2.2K] README.md
0 directories, 1 file
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。