## https://sploitus.com/exploit?id=KITPLOIT:TOOLS-GITHUB-STRAWHATASIF-LOG4J-TEST
## 展示 CVE-2021-44228 的简单示例
### 说明
* 为了重现此问题,我从 SpringBoot 中移除了日志传递依赖。
* 取而代之,我引入了 `spring-boot-starter-log4j2`
* `spring-boot-starter-log4j2` 引入了 `log4j-core`,它存在远程代码执行(RCE)漏洞。
### 运行 API
* 在终端中运行命令 `./gradlew clean build bootRun` **或者**
* 右键点击 `Log4TestApplication.java` 并选择 `运行`。
### 传入 JNDI 值会发生什么?
* 由于我们解析到一个不存在的站点,我们会得到一个 `ConnectException`。
* 但是,想象一下如果这是一个真实的恶意服务器会怎么样!

### 可能的修复?
* **如果你使用 MAVEN** \- https://github.com/strawhatasif/log4j-test/tree/maven-variant
* 位于 https://github.com/strawhatasif/log4j-test/tree/strategic-fix。
### 参考资料:
* https://www.lunasec.io/docs/blog/log4j-zero-day/
* https://www.bleepingcomputer.com/news/security/new-zero-day-exploit-for-log4j-java-library-is-an-enterprise-nightmare/
* https://www.fastly.com/blog/digging-deeper-into-log4shell-0day-rce-exploit-found-in-log4j