Fanatastic
Privilege Escalation via disk group → Access to /dev/sda using debugfs
Summary
Discovered Grafana dashboard on port 3000 vulnerable to path traversal (CVE-2021-43798).
Retrieved sensitive files including private SSH keys and Grafana database.
Decrypted the encrypted password stored in the Grafana DB using its
secret_key.Logged in as
sysadminusing recovered credentials.Escalated privileges via the
diskgroup by accessing root's SSH key throughdebugfs.
🧵 Let's Unpack
Enumeration
sudo nmap -sV -sC -p- -Pn 192.168.229.181 --openOpen Ports:
22/tcp→ OpenSSH 8.2p13000/tcp→ Grafana login redirect9090/tcp→ Prometheus (Go-based HTTP API)
Initial Foothold
🔍 Target: Grafana (port 3000)
Vulnerability: Path Traversal – CVE-2021-43798
🪪 Accessed sensitive files:
💡 Reading password
Note: Data sources store passwords and basic auth passwords in secureJsonData encrypted (AES-256 in CFB mode) by default.
🔐 Password decryption using AES-256
Used script from exploit repo to decrypt the stored base64 password.
✅ Credentials:
Username: sysadminPassword: SuperS....
Privilege Escalation
🛠 Technique: Abusing disk group membership
sysadminwas indiskgroup.Device
/dev/sda1hadrwpermission for thediskgroup:
🧬 Exploitation Steps:
Retrieved root’s private key.
SSH'd into the box as root.
Last updated