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
sysadmin
using recovered credentials.Escalated privileges via the
disk
group by accessing root's SSH key throughdebugfs
.
π§΅ Let's Unpack
Enumeration
Open Ports:
22/tcp
β OpenSSH 8.2p13000/tcp
β Grafana login redirect9090/tcp
β Prometheus (Go-based HTTP API)
Initial Foothold
π Target: Grafana (port 3000)
πͺͺ 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
sysadmin
was indisk
group.Device
/dev/sda1
hadrw
permission for thedisk
group:
𧬠Exploitation Steps:
Retrieved rootβs private key.
SSH'd into the box as root.
Last updated
Was this helpful?