Planning

Machine Information

As is common in real life pentests, you will start the Planning box with credentials for the following account: admin / 0D5oT70Fq13EvB5r

Recon

Nmap

First, recon the ip with nmap and get the ports open -->

nmap -p- --open -sCV 10.10.11.68 -oG allPorts
#################################################
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 9.6p1 Ubuntu 3ubuntu13.11 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   256 62:ff:f6:d4:57:88:05:ad:f4:d3:de:5b:9b:f8:50:f1 (ECDSA)
|_  256 4c:ce:7d:5c:fb:2d:a0:9e:9f:bd:f5:5c:5e:61:50:8a (ED25519)
80/tcp open  http    nginx 1.24.0 (Ubuntu)
|_http-title: Did not follow redirect to http://planning.htb/
|_http-server-header: nginx/1.24.0 (Ubuntu)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

In :80 are basic virtual hostin planning.htb

Web

course.php & enroll.php

JUM... strange... try with subdomains -->

Subdomains Enum

Add it into /etc/hosts

Hack the Box give us a commend with a username and passwod = admin / 0D5oT70Fq13EvB5r

Grafana v11.0.0

Exploit

Nice! With the IP we can see we are inside docker, so... we need scape with it -->

Docker Scape

Inside the file #env we can see credentials -->

enzo:RioTecRANDEntANT!

SSH Conecction

Root Flag

We can see a interal local port running to 8000, maybe web interface, do ssh tunneling -->

SSH Tunneling

With it, i go to the browser and search 127.0.0.1:8000. We can see a Basic Login Panel -->

Im going to search same one credential insede the host with the session of enzo, and i found a crendential into /var/www/web --->

root:EXTRapHY

Im going another to the website :8000 and login with this crendentials.. but nothing... Search more -->

Password = P4ssw0rdS0pRi0T3c

Try to login into the web site :8000 -->

root : P4ssw0rdS0pRi0T3c

We can create a new "Job" and set a command -->

Before execute, we can go to /tmp/ and see bash, and excute bash -p to get root -->

Last updated