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
Test case to check if the Log4Shell/CVE-2021-44228 hotfix will raise any unexpected exceptions
Readme
Log4Shell Hotfix Side Effect Test Case
======================================

I wanted to know if any `ClassNotFoundException` or similar unexpected
exception is raised when one applies the CVE-2021-44228 aka Log4Shell
hotfix as recommended [here](https://logging.apache.org/log4j/2.x/security.html#Fixed_in_Log4j_2.16.0).

Result: It looks like no exception is bubbling up.

To test this execute the following commands:
```
./gradlew clean installDist
env JAVA_OPTS=-Xmx64M ./build/install/log4shell-hotfix-side-effect/bin/log4shell-hotfix-side-effect
```

It will log a bunch of messages and timings and there should be no exceptions.

If the log4j jar file is not patched properly there should be a measurable
delay between the messages (or you might even get an RCE, YMMV).
File Snapshot

[4.0K] /data/pocs/9fda486651458c6bc6550a83e962c242f04f8d42 ├── [ 821] build.gradle ├── [4.0K] gradle │   └── [4.0K] wrapper │   ├── [ 54K] gradle-wrapper.jar │   └── [ 202] gradle-wrapper.properties ├── [5.2K] gradlew ├── [2.2K] gradlew.bat ├── [ 779] README.md └── [4.0K] src └── [4.0K] main └── [4.0K] java └── [4.0K] de └── [4.0K] silpion └── [4.0K] log4shell └── [4.0K] hotfix └── [4.0K] side └── [4.0K] effect ├── [1.8K] Log.java └── [3.4K] Main.java 11 directories, 8 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 →