linuxFanatastic

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 sysadmin using recovered credentials.

  • Escalated privileges via the disk group by accessing root's SSH key through debugfs.


🧵 Let's Unpack


Enumeration

sudo nmap -sV -sC -p- -Pn 192.168.229.181 --open

Open Ports:

  • 22/tcp → OpenSSH 8.2p1

  • 3000/tcp → Grafana login redirect

  • 9090/tcp → Prometheus (Go-based HTTP API)


Initial Foothold

🔍 Target: Grafana (port 3000)

🪪 Accessed sensitive files:

circle-check

🔐 Password decryption using AES-256

✅ Credentials:

  • Username: sysadmin

  • Password: SuperS....


Privilege Escalation

🛠 Technique: Abusing disk group membership

  • sysadmin was in disk group.

  • Device /dev/sda1 had rw permission for the disk group:

🧬 Exploitation Steps:

  • Retrieved root’s private key.

  • SSH'd into the box as root.

Last updated