
Il s'agit d'une application dockerisée vulnérable à la vulnérabilité Spring4Shell (CVE-2022-22965).
Il s'agit d'une application dockerisée vulnérable à la vulnérabilité Spring4Shell (CVE-2022-22965). Le code source Java complet du war est fourni et modifiable ; le war sera reconstruit à chaque construction de l'image docker. Le WAR construit sera ensuite chargé par Tomcat. Cette application n'a rien de particulier, c'est un simple hello world basé sur les tutoriels Spring.
Détails : https://www.lunasec.io/docs/blog/spring-rce-vulnerabilities
docker build . -t spring4shell && docker run -p 8080:8080 spring4shell
python exploit.py --url "http://localhost:8080/helloworld/greeting"
cmd pour vos commandes. (http://localhost:8080/shell.jsp par défaut)
Corrigé ! Au moment de la rédaction, le conteneur (peut-être seulement Tomcat) doit être redémarré entre chaque exploitation. Je travaille activement à résoudre ce problème.
Réexécuter l'exploit créera un fichier artefact supplémentaire nommé {old_filename}_.jsp.
Les PR/DM à @Rezn0k sont les bienvenus pour des améliorations !