Sequel targets a MariaDB instance — a fully open-source MySQL fork — exposed on the network with a root account that has no password. Unlike the web-layer SQL injection in Appointment, this machine teaches direct database access: connecting to the database server itself via its client, navigating schemas, and querying tables to extract data. It's a critical finding that skips the application layer entirely.
| Skill | Why it matters |
|---|---|
| Identifying MySQL / MariaDB with Nmap | Port 3306 is a high-value target in any network assessment |
| Connecting without credentials | Passwordless root access to a database server is a maximum-severity finding |
| SQL navigation (SHOW, USE, SELECT) | The essential commands for manually enumerating any relational database |
| Database schema reconnaissance | Mapping tables before querying reveals where credentials and sensitive data live |
What you're seeing: MariaDB on the standard MySQL port 3306. The banner exposes the exact version — MariaDB 10.3.27. The word "unauthorized" in Nmap's output simply means it connected to get the banner before authentication; the server is still accessible.
Use the mysql client. The -h flag specifies the remote host, -u root sets the username, and -p without a value prompts for a password — just hit Enter.
| Command | What it does |
|---|---|
| SHOW DATABASES; | List all databases on the server |
| USE <db>; | Switch to a specific database |
| SHOW TABLES; | List all tables in the current database |
| DESCRIBE <table>; | Show column names and types |
| SELECT * FROM <table>; | Return all rows from a table |
| SELECT * FROM <table> LIMIT 10; | Return first 10 rows only |
| SELECT user,password FROM mysql.user; | Dump database user hashes |
| SELECT @@version; | Get the database version |
| SELECT @@datadir; | Get the data directory path |
| SHOW GRANTS FOR 'root'@'%'; | Check privileges for a user |
If the MySQL user has the FILE privilege, you can read and write files on the underlying OS — a path to webshell upload or credential theft.
Direct database access bypasses all application-layer controls. Once you're in the MySQL shell as root, you're reading the raw data every application on that server is built on top of.
| Concept | Real-world relevance |
|---|---|
| Port 3306 on the network perimeter | MySQL/MariaDB should never be accessible from outside the application server — always flag external exposure as critical |
| Root with no password | A common misconfiguration in development environments that gets deployed to production |
| mysql.user table | Always check this — it contains password hashes for all database users, which may be reused elsewhere |
| FILE privilege = partial RCE | Combined with a writable web root, SQL access becomes code execution |
