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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2021-44228 PoC — Apache Log4j2 JNDI features do not protect against attacker controlled LDAP and other JNDI related endpoints

Source
Associated Vulnerability
Title:Apache Log4j2 JNDI features do not protect against attacker controlled LDAP and other JNDI related endpoints (CVE-2021-44228)
Description:Apache Log4j2 2.0-beta9 through 2.15.0 (excluding security releases 2.12.2, 2.12.3, and 2.3.1) JNDI features used in configuration, log messages, and parameters do not protect against attacker controlled LDAP and other JNDI related endpoints. An attacker who can control log messages or log message parameters can execute arbitrary code loaded from LDAP servers when message lookup substitution is enabled. From log4j 2.15.0, this behavior has been disabled by default. From version 2.16.0 (along with 2.12.2, 2.12.3, and 2.3.1), this functionality has been completely removed. Note that this vulnerability is specific to log4j-core and does not affect log4net, log4cxx, or other Apache Logging Services projects.
Description
A simple Log4j PoC written in Go
Readme
# CVE-2021-44228 PoC (Log4Shell)

⚠️ **Disclaimer:**  
This tool is intended for **educational purposes, security research, and controlled test environments only.**  
Using it against systems without explicit permission is **illegal** and entirely the responsibility of the user.

---

## 📌 Description

This project contains a simple **Proof-of-Concept (PoC)** exploit for **Apache Log4j2 (CVE-2021-44228)** vulnerability.  
The PoC sends a specially crafted HTTP header with a JNDI LDAP payload to the target.  
If the target is vulnerable, it will send a **callback** to the specified `LHOST` address.

---

## 🚀 Usage

### 1️⃣ Build
```bash
go build -o exploit exploit.go
```

### 2️⃣ Run
```bash
sudo ./exploit -r "http://<TARGET_URL>/?search=test" -l <LOCAL_IP>
```
- `-r` → Target URL (endpoint of the vulnerable application)  
- `-l` → Your callback listener IP address (the machine running the PoC)

---

## 🛠️ Example

Using the provided Docker vulnerable app:
```bash
# Run vulnerable app
docker run --rm --network host ghcr.io/christophetd/log4shell-vulnerable-app

# Run exploit
sudo ./exploit -r "http://127.0.0.1:8080/?search=test" -l 127.0.0.1
```
Expected output:
```
[*] Callback started on 1389
[*] Payload sent! HTTP Status: 200
[*] Callback from 127.0.0.1:56789, target is VULNERABLE
```

---

## ⚠️ Disclaimer

This software is provided for **educational and authorized security testing only**.  
The author is **not responsible for any misuse** of this tool.  
Do not use it against systems you do not own or do not have explicit permission to test.
File Snapshot

[4.0K] /data/pocs/25f666ddeb0c4ac404f5e2fa5d6d5779c91070e4 ├── [1.0K] LICENSE ├── [1021] poc.go └── [1.6K] README.md 0 directories, 3 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →