Sequel Machine - Hack The Box - Writeup

sequel 1.png

Recon

We start to ping the machine to look up the TTL to identifiy if is a linux machine or a Windows Machine

Pasted image 20230426221106.png

the TTL is near of 64 so is a Linux Machine.

We launch a nmap scan to identify the open ports on the machine:

Pasted image 20230426221342.png

The nmap scan shows the port 3306 Open usually port 3306 running SQL let's try with some basic scripts on nmap.

Pasted image 20230426222136.png

Look, we found some interesting information the port 3306 running a database of MYSQL on mariadb.

Connection

Try to connect to databse without password :

Pasted image 20230426222457.png

And success:

Pasted image 20230426222559.png

You can type help and look some utils commands:

Pasted image 20230426222646.png

Lists the databases on it with show databases; remember to close the query with ;

Pasted image 20230426222951.png

Move to htb database:

Pasted image 20230426223030.png

List the tables on htb database:

Pasted image 20230426223136.png

Get the flag

You can show all the content of a table with * :

Pasted image 20230426223559.png

And congrats! You have pwned Sequel Machine.