UltraTech

Task 1: Deploy the machine

Deploy the machine

No answer needed

Task 2: It's enumeration time!

Which software is using the port 8081?

  • First, let's run a simple nmap scan to see the open ports.

  • Now we can run another nmap scan on only the ports that are open.

  • There are four open ports:

Port
Service

21

ftp

22

ssh

8081

http (node.js)

31331

http (apache)

  • The service running on port 8081 is Node.js.

Answer

Which other non-standard port is used?

  • 31331 is the other non-standard port.

Answer

Which software using this port?

  • The software on port 31331 is Apache.

Answer

Which GNU/Linux distribution seems to be used?

  • The GNU/Linux distribution is Ubuntu.

Answer

The software using the port 8081 is a REST api, how many of its routes are used by the web application?

  • We can see that two routes are being used by the application.

Answer

Task 3: Let the fun begin

There is a database lying around, what is its filename?

  • We can brute force the web pages on the 8081 port using gobuster.

  • Let's go to the /ping page.

  • So we are expected to provide a parameter and we haven't done that we get the errors.

  • Let's try providing an IP address.

  • So the application executes the ping command with the IP we provide.

  • Let's see if it executes a command that we provide.

  • It does and we get the server name.

Answer

What is the first user's password hash?

  • We can read the passwords from the database using cat.

  • We get two password hashes, one of r00t user and one of admin user.

Username
Password hash

r00t

f357a0c52799563c7c7b76c1e7543a32

admin

0d0ea5111e3c1def594c1684e3b9be84

Answer

What is the password associated with this hash?

  • Let's use hash-identifier to identify the hash type.

  • We can now crack the hash using john.

Answer

Task 4: The root of all evil

What are the first 9 characters of the root user's private SSH key?

  • We can try logging in through SSH using the r00t user and n100906 password.

  • Let's check what sudo commands the r00t user can run.

  • Looks like we will have to find another way.

  • If we run id, we can see that we are part of the docker group.

  • Let's check the containers present.

  • We can see that there is a bash container.

  • We can find an exploit for it on GTFOBins.

  • We are now the root user.

  • Let's check the contents of the root directory.

  • The private key is has to be inside the .ssh directory.

  • Let's verify the fact.

  • We can now cat out the private key.

Answer

Last updated

Was this helpful?