You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found intresting poc here : https://github.com/craig/SpringCore0day/blob/main/exp.py[^1]. & https://twitter.com/vxunderground/status/1509170582469943303
An example of a vulnerable Tomcat application + server.
8
+
9
+
War files built from /spring-war folder. (It is recommended to build your own war files but i have provided one based on <https://spring.io/guides/gs/handling-form-submission/>)
10
+
11
+
### Build
12
+
13
+
Building the docker version of the vunurable application, you can build your own war files.
14
+
15
+
### Building your own war file
16
+
17
+
You can use the provided spring-form.war or build your own
18
+
19
+
#### Prerequisites (Only if building your own war files)
20
+
21
+
- Java
22
+
- Java JDK (I have only tested with JDK 18)
23
+
-[Maven](https://maven.apache.org/install.html)
24
+
25
+
```sh
26
+
cd spring-war
27
+
mvn clean package
28
+
cd target
29
+
mv spring-form.war ../../ # Linux move the war file to vunerable-tomcat
30
+
move spring-form.war ../../ # Windows
31
+
cd ../../
32
+
```
33
+
34
+
### Building and starting the docker container
35
+
36
+
```sh
37
+
docker build -t vulnerable-tomcat .
38
+
docker run -it --rm -p 8888:8080 vulnerable-tomcat
39
+
```
40
+
41
+
Wait about 20 seconds for the server to start. Then run the exploit script.
docker run ghcr.io/bobtheshoplifter/spring4shell-poc:main --url http://<dockerip>:8888/spring-form/greeting
48
+
```
49
+
50
+
## Example (Manual/Old)
51
+
52
+
Found intresting poc here : <https://github.com/craig/SpringCore0day/blob/main/exp.py>[^1]. & <https://twitter.com/vxunderground/status/1509170582469943303>
0 commit comments