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-Apache-Log4j2-JNDI-Lookup — Educational analysis of CVE-2021-44228 (Log4Shell): root cause, JNDI injection attack flow, patch diffs, detection rules, IoCs, and remediation guidance. | Kitploit
Tools/GitHubGitHub/certbn/cve-2021-44228-apache-log4j2-jndi-lookup
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityThreat IntelligencePapers & ResearchLearning & EducationIncident ResponseLabs & Practice
GitHubcertbn/cve-2021-44228-apache-log4j2-jndi-lookup

CVE-2021-44228-Apache-Log4j2-JNDI-Lookup

Educational analysis of CVE-2021-44228 (Log4Shell): root cause, JNDI injection attack flow, patch diffs, detection rules, IoCs, and remediation guidance.

View Repository
14 days 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.

    960
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    554
  • 3

    redforge

    cybersecurity91/redforge

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

    349
  • 4

    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.

    343
  • 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.

    323
  • 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.

    295

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2021-44228: Apache Log4j2 JNDI Lookup 원격 코드 실행 (Log4Shell)

CVSS Type KEV

📌 TL;DR

  • A flaw in Apache Log4j2 (log4j-core) that interprets ${jndi:...} lookup syntax within log messages and connects to external JNDI endpoints such as LDAP.
  • If an attacker controls just one value that gets logged (an HTTP header, an input field, etc.), remote code execution (RCE) without authentication is possible.
  • CVSS 10.0, listed in CISA KEV, confirmed exploitation in ransomware campaigns → upgrade immediately to 2.17.1 or later (or the latest security release for the corresponding Java line).

📋 Basic Information

ItemDetails
CVE IDCVE-2021-44228 (alias: Log4Shell, GHSA-jfh8-c2jp-5v3q)
Disclosure date2021-12-10 (NVD publication date)
Affected product/versionsApache Log4j2 log4j-core 2.0-beta9 ~ 2.15.0 (excluding security releases 2.12.2, 2.12.3, 2.3.1)
Patched versionsInitial fix: 2.15.0 (Java 8), 2.12.2 (Java 7), 2.3.1 (Java 6)
Recommended: 2.17.1 (Java 8+), 2.12.4 (Java 7), 2.3.2 (Java 6) — includes fixes for follow-up CVEs
CVSS v3.110.0 (Critical) — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CVSS v4.0Vector CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H (per GitLab Advisory DB. NVD's official v4 score has not been confirmed)
CWECWE-20 (Improper Input Validation), CWE-400 (Uncontrolled Resource Consumption), CWE-502 (Deserialization of Untrusted Data) — per the CVE record
Known exploitationExploitation confirmed. Listed in CISA KEV (added 2021-12-10, remediation deadline 2021-12-24), confirmed use in ransomware campaigns

Note: This vulnerability is limited to log4j-core; if only log4j-api is used, or in the case of Log4j 1.x, log4net, or log4cxx, they are not affected by this CVE. (Log4j 1.x has separate vulnerabilities such as CVE-2021-4104)

Related Follow-up CVEs

CVEDetailsFixed version
CVE-2021-45046Incompleteness of the 2.15.0 fix (bypassable under certain non-default configurations), CVSS 9.02.16.0 / 2.12.2
CVE-2021-45105DoS due to infinite recursion of self-referential lookups, CVSS 7.52.17.0 / 2.12.3
CVE-2021-44832RCE via JDBC Appender by an attacker with permission to modify configuration files2.17.1 / 2.12.4 / 2.3.2

🔍 Root Cause Analysis

What

Log4j2 supports Lookup syntax of the form ${prefix:name} in configuration and log messages. In vulnerable versions, this substitution is applied by default even to the body of log messages (including user input), and one of the lookup types, jndi:, looks up arbitrary remote endpoints via JNDI (Java Naming and Directory Interface).

Why

Untrusted input passes through three consecutive stages of "unintended trust."

  1. Data is interpreted like code — Strings (data) written to logs are evaluated as expressions by the lookup engine. (The default value of formatMsgNoLookups is false)
  2. No destination restriction — JndiManager calls InitialContext.lookup() without protocol or host restrictions, connecting to an external LDAP/RMI server specified by the attacker.
  3. Trusting returned objects — If the LDAP response returns a remote class reference (Reference) or a serialized object, the JVM loads/deserializes it and code may be executed. (Whether remote class loading is possible depends on the JDK version and configuration, but deserialization gadget paths remain, so it cannot be asserted that newer JDKs are safe)

How — Call Flow

The following is a summary flow for understanding the behavior and is not the complete actual source code.

Logger.info("User-Agent: " + userAgent)
  └─ PatternLayout → MessagePatternConverter.format()
       └─ 메시지 내 "${" 발견 시 StrSubstitutor.replace() 호출   ← 사용자 입력이 표현식으로 평가
            └─ Interpolator → JndiLookup.lookup("jndi:...")
                 └─ JndiManager.lookup(name)
                      └─ InitialContext.lookup(name)             ← 제한 없는 원격 조회
                           └─ 원격 LDAP 응답 객체 로딩/역직렬화 → 코드 실행

Patch diff comparison (Before / After)

2.15.0 — Commit d82b47c (LOG4J2-3201): Restrict JNDI access targets

log4j-core/src/main/java/org/apache/logging/log4j/core/net/JndiManager.java

 public class JndiManager extends AbstractManager {
+    public static final String ALLOWED_HOSTS = "allowedLdapHosts";
+    public static final String ALLOWED_CLASSES = "allowedLdapClasses";
+    public static final String ALLOWED_PROTOCOLS = "allowedJndiProtocols";
 ...
     public JndiManager createManager(final String name, final Properties data) {
+        // 허용 호스트/클래스/프로토콜 목록 구성 (기본: java, ldap, ldaps / localhost 계열)
+        addAll(classes, allowedClasses, permanentAllowedClasses, ALLOWED_CLASSES, data);
+        addAll(protocols, allowedProtocols, permanentAllowedProtocols, ALLOWED_PROTOCOLS, data);
         try {
-            return new JndiManager(name, new InitialContext(data));
+            return new JndiManager(name, new InitialDirContext(data), allowedHosts, allowedClasses,
+                    allowedProtocols);
CategoryBefore (≤2.14.1)After (2.15.0)
Allowed protocolsNo restrictionBy default, only java, ldap, ldaps allowed
Allowed LDAP hostsNo restrictionBy default, only localhost allowed (extendable via log4j2.allowedLdapHosts)
Deserialization classesNo restrictionBy default, only Java primitive classes allowed (log4j2.allowedLdapClasses)
Message LookupEnabled by defaultChanged to disabled by default

Limitations of 2.15.0 → 2.16.0 / 2.17.x

  • The host allowlist in 2.15.0 was reported to be bypassable due to parsing discrepancies between java.net.URI and JNDI's internal URI parser (e.g., handling of #) (GHSL-2021-1054). This led to CVE-2021-45046.
  • 2.16.0: Removed the message Lookup feature itself and disabled JNDI functionality by default (explicitly enabled only via log4j2.enableJndi* properties).
  • 2.17.0 / 2.17.1: Additional fixes for recursive Lookup DoS (CVE-2021-45105) and RCE via JDBC Appender (CVE-2021-44832).

→ Conclusion: 2.15.0 is an incomplete fix, so it should not be used as a baseline version for operations.

⚔️ Attack Scenarios

Prerequisites

ConditionDetails
AuthenticationNot required (PR:N)
User interactionNot required (UI:N)
Network positionRemote. Only requires attacker input to reach a logging path (internal systems can also suffer secondary damage through the log pipeline)
Target conditionUses vulnerable version of log4j-core + attacker-controlled string is recorded in logs
Additional conditionCompleting RCE requires outbound LDAP/RMI/DNS communication from the target server (even if only DNS is allowed, detection and information exfiltration are possible)

Step-by-Step Flow

sequenceDiagram
    autonumber
    participant A as 공격자
    participant V as 취약 애플리케이션<br/>(Log4j2 ≤ 2.14.1)
    participant L as 공격자 제어<br/>LDAP 서버
    participant H as 공격자 제어<br/>HTTP 서버

    A->>V: 로그에 기록될 필드(헤더·입력값 등)에<br/>JNDI Lookup 구문 삽입
    V->>V: 요청 처리 중 해당 값을 로그로 기록
    V->>V: Log4j가 메시지 내 Lookup 구문 평가
    V->>L: JNDI(LDAP) 조회 요청 (아웃바운드)
    L-->>V: 원격 클래스 참조 또는 직렬화 객체 응답
    V->>H: (원격 클래스 로딩 가능 환경) 클래스 파일 요청
    H-->>V: 악성 클래스 전달
    V->>V: 애플리케이션 권한으로 코드 실행
    V-->>A: 리버스 셸·웹셸·마이너 설치 등 후속 행위
Download Tool