Sequel - Hack The Box
Introduction
In this machine we are taking advantage of misconfigured MariaDB server credentials.
Reconnaissance
- Connectivity
ping -c1 10.129.235.41
- Nmap
nmap -sS --open -p- --min-rate 5000 -vvv -n -Pn 10.129.235.41
- Check MySQL version with nmap
nmap -sV -sC -p3306 10.129.235.41
Exploitation
mysql -h 10.129.235.41 -u root --ssl=OFF
Tasks
- During our scan, which port do we find serving MySQL
3306
- What community-developed MySQL version is the target running?
MariaDB
- When using the MySQL command line client, what switch do we need to use in order to specify a login username?
-u
- Which username allows us to log into this MariaDB instance without providing a password?
root
- In SQL, what symbol can we use to specify within the query that we want to display everything inside a table?
*
- In SQL, what symbol do we need to end each query with?
;
- There are three databases in this MySQL instance that are common across all MySQL instances. What is the name of the fourth that’s unique to this host?
htb
- Submit root flag
7b4bec00d1a39e3dd4e021ec3d915da8