Sequel
Last updated
Last updated
In this Box we are going to break into a machine running SQL server. SQL is a relational database and stored user information in rows and columes. Usually, SQL data contains PII, PHI, or sensitive data that we can gather. Other databases can store user information such as passwords.
To start, lets scan the machine for services.
nmap -sV -sC 10.129.95.232
We see the MySQL service running on port 3306, this is for managing SQL databases.
Make sure to install the SQL service so we can begin to communicate with the server.
sudo apt update && sudo apt install mysql*
It is normal best practice to try to login with default credentials
mysql -h 10.129.95.232 -u root --skip-ssl
Looks like we had some luck and were able to login with default credentials.
Run show databases to see the available databases
HTB looks interesting, type USE htb; to being writing commands to the database.
SHOW tables;
SELECT * FROM config;
We have now successfully changed and loaded the database, we can run a couple other commands to find information. Refer to this link for help with SQL commands.