Kiba
THM writeup for exploiting Kibana RCE
Target Details
Target IP: 10.10.252.150
Scan Target
Run Usual Nmap scan command
Nmap didn't captured other open ports. since we know the room is related to kibana, we can search for it kibana port. After quick search, We can find that kibana runs on port: 5601
Hosted Services Summary
22
Open SSH service
80
Apache Web Server
5601
Kibana
Navigating Kibana
Visit Kibana Dashboard hosted on http://10.10.252.150:5601
We're logged in as default user. and Management tab seems interesting.
Navigate to management tab
Searching for Kibana Vulnerabilities and Exploits
Search for kibana exploits on your favorite search engine
Found vulnerability with RCE details hosted on tenable.
On Reading Analysis we find that P{REDACTED} P{REDACTION} vulnerability was exploited to gain reverse shell.
Exploiting Kibana RCE Vuln
Exploit Script link can also be found on the tenable page.
Clone Github repo
To use the script with python3 change
content.data
->content.data.decode('utf-8')
Start netcat listener to catch Reverse Shell.
Run exploit
Now, we've successfully received reverse shell on our machine
Capturing Flags
Get user.txt flag
On quickly searching for how to get capabilities list ubuntu. I found the useful command. Execute on captured shell.
.hackmeplease
is providing us hint that we need to usepython3
binary. On researching cap_setuid+ep permission allows to set uid.If we set uid to 0 using python they we'll be able to run python commands and spawn a shell. python
os
module can be used to set uid.
Read root flag
Last updated