https://github.com/aancw/spring4shell-poc-rs
Spring 4 Shell PoC script writted in Rust
https://github.com/aancw/spring4shell-poc-rs
rustlang spring4shell
Last synced: 12 months ago
JSON representation
Spring 4 Shell PoC script writted in Rust
- Host: GitHub
- URL: https://github.com/aancw/spring4shell-poc-rs
- Owner: aancw
- License: mit
- Created: 2022-03-31T06:07:34.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-01T15:17:35.000Z (almost 4 years ago)
- Last Synced: 2025-02-14T23:17:04.122Z (about 1 year ago)
- Topics: rustlang, spring4shell
- Language: Rust
- Homepage:
- Size: 15.9 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring4shell PoC Script
Interactive Spring4Shell PoC attack script written in Rust
## Requirements
- Rust
- Docker
## Features
- war file deployer
- interactive web shell
## Vulnerable Products
- JDK version 9.0+
- Spring framework and derivative framework spring-beans-*.jar exists
## Building the Lab
- Install docker
- Git clone lab repo and then build
```bash
git clone https://github.com/aancw/Spring4shell-poc-lab
cd Spring4shell-poc-lab
sh deploy.sh
```
- Wait until container is up
- Happy hacking!
## Checking Affected System
- For JDK version, you can use
```bash
java -version
```
- To check if you are using Spring framework or derivative. Do a global search after "spring-beans-.jar" and "spring.jar"
```bash
find . -name spring-beans*.jar
$ root@aa3b00479589:/usr/local/tomcat# find . -name spring-beans*.jar
./webapps/spring_app/WEB-INF/lib/spring-beans-5.2.3.RELEASE.jar
```
## Detail Informations
- https://www.cyberkendra.com/2022/03/springshell-rce-0-day-vulnerability.html
- https://www.springcloud.io/post/2022-03/spring-0day-vulnerability/#gsc.tab=0
- https://www.praetorian.com/blog/spring-core-jdk9-rce/
## Spring Patch
- https://github.com/spring-projects/spring-framework/commit/7f7fb58dd0dae86d22268a4b59ac7c72a6c22529
## Acknowledgment
- https://github.com/Retrospected/spring-rce-poc
- https://github.com/craig/SpringCore0day
- https://github.com/BobTheShoplifter/Spring4Shell-POC