top of page

HTB Academy: "Footprinting Lab - Hard" Walkthrough

ree

Enumeration

Let's run a UDP and TCP nmap scan against the target host:

ree

Here we see that SNMP is open, as well as SSH, POP3, and IMAP.


SNMP

Let's use onesixtyone to brute-force community strings for the SNMP service:

ree

onesixtyone returns "backup" as the community string. Let's now use that to get the MIB and see if there are any useful strings in it.


ree

A couple of lines down we find some credentials:

ree

We can now use these credentials to pivot into the mail services available on the system.


IMAPS

First we use openssl to establish a connection to the IMAPS service:

ree

Then we login using Tom's credentials:

ree

From here, let's list the available mailboxes:

ree

Let's take a look in the Inbox:

ree

There's one message in the inbox. Let's fetch the message body and see what the contents is:

ree

There's an SSH key in the body of the message. We can probably use this to access the system over SSH. Copy the body of the message into a local file on your host. Make sure to chmod 600 the file so that it has restrictive enough permissions and SSH doesn't give you a hard time.

ree

SSH

Let's use the ssh key to try and access the system:

ree

From here, start enumerating as thoroughly as possible. The goal of the exercise is to find the password for the HTB user.


If we run an ls -la in tom's home folder, we can see that there is a hidden .mysql_history file here.

ree

Catting it shows us a set of mysql queries:

ree

Let's check if mysql is running on the system:

ree

Connect to the mysql instance using tom's user and the password you found in the SNMP data:

ree

Repeat the commands you found in the .mysql_history file:

ree

The HTB user's password will be found in that output. Happy hacking!

©2025 by Corgi Corp. Proudly created with Wix.com

bottom of page