[ < ] Homepage

Gift | HackMyVM

Description: A really easy VM. That's a gift! :)

Difficulty: Easy

Download: Gift - sml

1. Target IP Identification

Let's start by identifying the IP address of the target machine within our local network.


sudo arp-scan --localnet

We will get results similar to this:
Sudo-arp scan

Figure 1: Identifying the target via ARP scan.

The results show our neighbouring network devices. The first 24 bits of a MAC addresses represent the Organizationally Unique Identifier (OUI) which identifies the hardware manufacturer.
This confirms the setup. I have two VMs running - My Kali attacker machine and the target. But which is the target machine?
nmap [IP1] [IP2] # MAC addresses with OUI as '08:00'
nmap-scan

Figure 2: Identifying the target machine via Nmap scan.

The scan results show only one of them has open services. That is our target machine.

2. Nmap enumeration

Now, let's enumerate our target machine for more information on those open services. nmap -sV -sS [IP]
detailed-nmap

Figure 3: Identifying the open services via Nmap scan.

The results show two ports open.
sV - shows the service version its running on (Used for identifying exploits in older software)
Let's visit the http port:
Web-interface-msg

Figure 4: HTTP web-interface

"Don't Overthink. Really, Its simple."

Inspecting the page source also reveals a hidden comment: <!-- Trust me -->

3. Directory Fuzzing & Logic

I used dirb for a quick directory enumeration. The results didn't give anything.
dirb-results

Figure 5: Directory enumeration results

Eventually, I thought there was an hidden word from the capitalised letters "DORI" which could be a SSH username or password. However, bruteforcing SSH with it didn't give any results.

Then, I used Hydra to perform a wordlist attack against the root account.

4. SSH bruteforce with Hydra

hydra -l root -P /usr/share/wordlists/rockyou.txt [IP] ssh
final

Figure 6: Root password cracked

I used rockyou.txt as the wordlist.
The password for root is simple
As the web suggested, directly and literally, it's simple.

By logging in as root via SSH, I gained full access to the machine. Since, we're already root, we can access both the user and root passwords.

final

Figure 7: Logged in as root via SSH

Thank you for reading.
- EXIT -