root💀d4rk5id3:~#

Hack. Eat. Sleep. Repeat!!!

View on GitHub

Monitoring

Recon

portcsanning

as usual we begin with a portscan using the following command:

nmap -sV -sC -P0 <HOST>

Alt text

so from the result of our scan we can see that we have several ports open on our target system.

now since we have both port 80 and 443 runnng an apache web server lets navigate to the webpage and see what we have.

Alt text

we can see a button which says Click the link below to get started using Nagios XI.. once we do that we can now see a login page load up.

Alt text

so i tried out some various default login creds but they didnt seem to work.

well, lets try to use search for an exploit of some sort on using the searchsploit utility.

Alt text

we can load up metasploit using the following command:

msfconsole

search nagios

Alt text

use exploit/linux/http/nagios_xi_plugins_check_plugin_authenticated_rce

Alt text

now we have gained a meterpreter shell let’s drop into a regular shell.

command: shell

to upgrade to a better abd stable shell we use the following command:

python -c "import pty; pty.spawn('/bin/bash')"

Alt text

luckly we gained access as the root user. to locate the flag we navigate to /root directory and then read the flag using the following command:

cd /root

cat proof.txt

Alt text