Grafana
Discovery
# Default port
# 3000 - HTTP
# Nmap fingerprint
nmap -sC -sV TARGET -p 3000
# http-title: Grafana
# Requested resource was /login
# Version disclosure in footer
# "Open Source v8.0.0 (41f0542c1e)"
# Check robots.txt
curl http://TARGET:3000/robots.txt
# Disallow: /Version Detection via API
CVE-2024-9264 - DuckDB SQL Injection (Authenticated RCE)
Exploitation
Getting Shell Without nc
Exfiltrating grafana.db via Base64
CVE-2021-43798 - Arbitrary File Read / LFI
Exploitation
Manual Exploitation
High-Value Files to Target
Download Grafana Database
Extracting Credentials from grafana.db
Direct SQLite Query
User Table Schema
Handling Corrupted Database
Cracking Grafana Password Hashes
Using grafana2hashcat
Cracking with Hashcat
Post-Exploitation
Data Sources
API Keys
Credential Reuse
Grafana Running in Docker
Default Credentials
Username
Password
Useful Paths
Path
Description
Last updated