Skip to content

Commit fac608b

Browse files
Move Poc info up
1 parent d9d19cb commit fac608b

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ The naming of this flaw is based on the similarities to the infamous Log4j LOG4S
1818

1919
- CVE-2022-22965
2020

21+
## Poc
22+
23+
Found intresting poc here : https://github.com/craig/SpringCore0day/blob/main/exp.py [^1]. & https://twitter.com/vxunderground/status/1509170582469943303
24+
25+
https://github.com/reznok/Spring4Shell-POC - Docker, POC
26+
27+
* clone sample repo from https://spring.io/guides/gs/handling-form-submission/
28+
* you can skip right to the gs-handling-form-submission/complete directory, no need to follow the tutorial
29+
* modify it so that you can build a war file (https://www.baeldung.com/spring-boot-war-tomcat-deploy). build war file :)
30+
* install tomcat9 + java 11 (i did it on ubuntu 20.04 via apt-get)
31+
* deploy the war file
32+
* update the PoC (https://share.vx-underground.org/) to write the tomcatwar.jsp file to webapps/handling-form-submission instead of webapps/ROOT
33+
* run PoC (ignore the URL it gives you for the webshell): python3 exp.py --url http://your.ip.here:8080/handling-form-submission-complete/greeting
34+
* you should see the "tomcatwar.jsp" file now in webapps/handling-form-submission
35+
* hit http://your.ip.here:8080/handling-form-submission/tomcatwar.jsp?pwd=j&cmd=id to see the results
36+
2137
## Mitigations
2238

2339
!!(The following mitigations are only theoretical as nothing has been confirmed)!!
@@ -52,21 +68,6 @@ find . -name spring-beans*.jar
5268
```
5369

5470

55-
56-
## Poc
57-
58-
Found intresting poc here : https://github.com/craig/SpringCore0day/blob/main/exp.py [^1]. & https://twitter.com/vxunderground/status/1509170582469943303
59-
60-
* clone sample repo from https://spring.io/guides/gs/handling-form-submission/
61-
* you can skip right to the gs-handling-form-submission/complete directory, no need to follow the tutorial
62-
* modify it so that you can build a war file (https://www.baeldung.com/spring-boot-war-tomcat-deploy). build war file :)
63-
* install tomcat9 + java 11 (i did it on ubuntu 20.04 via apt-get)
64-
* deploy the war file
65-
* update the PoC (https://share.vx-underground.org/) to write the tomcatwar.jsp file to webapps/handling-form-submission instead of webapps/ROOT
66-
* run PoC (ignore the URL it gives you for the webshell): python3 exp.py --url http://your.ip.here:8080/handling-form-submission-complete/greeting
67-
* you should see the "tomcatwar.jsp" file now in webapps/handling-form-submission
68-
* hit http://your.ip.here:8080/handling-form-submission/tomcatwar.jsp?pwd=j&cmd=id to see the results
69-
7071
WIP :=)
7172

7273
[^1]: POC, translated fron this repository.

0 commit comments

Comments
 (0)