Awesome-POC/Web应用漏洞/Grafana mysql 后台任意文件读取漏洞 CVE-2019-19499.md
2024-11-06 14:10:36 +08:00

40 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Grafana mysql 后台任意文件读取漏洞 CVE-2019-19499
## 漏洞描述
Grafana 是一个用于分析、监控和数据可视化的开源应用程序。数以千计的公司使用 Grafana包括 PayPal、eBay 和 Intel 等主要代表。通过登录后台设置Mysql可以读取服务器中的任意文件
## 漏洞影响
```
Grafana < 6.4.4
```
## 环境搭建
```
docker pull grafana/grafana:6.4.3
docker run -d --name=grafana -p 3000:3000 grafana/grafana:6.4.3
```
## 漏洞复现
登录后台 admin/admin, 添加数据源 Mysql
![](images/202205241454997.png)
[修复漏洞参考](https://github.com/grafana/grafana/pull/20192/files)
![](images/202205241454796.png)
修复部分为 database数据库名的用户可控部分由于 allowAllFiles=true 参数可以禁用对 LOCAL INFILE 请求的保护再通过之前有关Mysql任意文件读取的漏洞即可获取服务器中的任意文件
![](images/202205241454909.png)
再创建一个恶意Mysql https://github.com/allyshka/Rogue-MySql-Server
![](images/202205241455919.png)
执行 Save 即可读取文件
![](images/202205241455467.png)