
这是一个 Docker 化的应用程序,存在 Spring4Shell 漏洞(CVE-2022-22965)。
这是一个存在 Spring4Shell 漏洞(CVE-2022-22965)的 Docker 化应用程序。war 包的完整 Java 源代码已提供且可修改,每次构建 Docker 镜像时都会重新构建 war 包。构建好的 WAR 包随后会由 Tomcat 加载。这个应用程序没有什么特别之处,它只是一个基于 Spring 教程 的简单 hello world。
详情:https://www.lunasec.io/docs/blog/spring-rce-vulnerabilities
docker build . -t spring4shell && docker run -p 8080:8080 spring4shell
python exploit.py --url "http://localhost:8080/helloworld/greeting"
cmd GET 参数以执行你的命令。(默认位于 http://localhost:8080/shell.jsp)
已修复! 在撰写本文时,每次利用之间必须重启容器(可能只是 Tomcat)。我正在积极尝试解决此问题。
重新运行该漏洞利用程序将创建一个额外的产物文件 {old_filename}_.jsp。
欢迎通过 PR/私信 @Rezn0k 提出改进建议!