Data
You will learn about getting a foothold through a CVE, cracking custom hashes & privileged docker containers
Last updated
Was this helpful?
You will learn about getting a foothold through a CVE, cracking custom hashes & privileged docker containers
Last updated
Was this helpful?
IP 10.10.103.22
Nmap scan reveals 2 ports 22 SSH 3000 an HTTP server running Grafana
With Gobuster we find a signup page
But in this instance user signup is disabled
It's a Sqlite database, it has usernames and salted password hashes.
With this exploit we can only see the file but when saving it, it gives problems
So we use curl to directly get the db without using the script
Now that we converted the hashes we can run hashcat
boris:beautiful1
The other password does not seem to be crackable with rockyou
Now we login with SSH as user boris
We get the first flag and we can immediately see a possible privesc vector
We can only interact with containers but not list them
So since the Grafana instance is probably running in a container we can list the hostname using the LFI
e6ff5b1cbc85
We are now root in the container
Now we can directly mount the host filesystem on the container and get the flag
This instance of Grafana is vulnerable to CVE-2021-43798 We can read the /var/lib/grafana/grafana.db
file containing the Grafana passwords
We now have the hashed password and the salt with this we can now convert the hashes in a hashcat compatible format