Log4Shell Exploitation Guide
Enumerate Log4Shell
Use Wireshark to catch the information (Follow > TCP Stream)
Method #1 Manual Way
Install Dependencies
Creating the Malicious Java Class
RCE.java
Compile the Payload
Setting Up the JNDI Exploit Server
Clone and Build marshalsec
marshalsec
Start the LDAP Server
Reverse Shell Payload
Create a file X
with the following payload:
Exploiting Log4Shell
Send the malicious JNDI lookup string:
Notes
Replace
KALIIP
with your attacker's machine IP.Ensure the target application is vulnerable to Log4Shell (e.g., using Log4j versions ≤ 2.14.1).
The payload downloads and executes a remote shell script to establish a reverse shell.
Example:
Got Reverse Shell
Method #2 ysoserial-modified
Last updated