MySql Enumeration

Raghav
3 min readSep 29, 2021

ls -al /usr/share/nmap/scripts/ | grep -e “ftp”
ls -al /usr/share/nmap/scripts/ | grep -e “http”
ls -al /usr/share/nmap/scripts/ | grep -e “smb”
ls -al /usr/share/nmap/scripts/ | grep -e “telnet”
ls -al /usr/share/nmap/scripts/ | grep -e “smtp”
ls -al /usr/share/nmap/scripts/ | grep -e “ssl”
ls -al /usr/share/nmap/scripts/ | grep -e “tls”
ls -al /usr/share/nmap/scripts/ | grep -e “dns”
ls -al /usr/share/nmap/scripts/ | grep -e “mysql”

📌 mysql-brute

📌 mysql-databases

📌 mysql-dump-hashes

📌 mysql-empty-password

📌 mysql-enum

📌 mysql-users

📌 mysql-query

Nmap –script mysql-brute ip address:

Performs password guessing against MySQL.

Nmap –script mysql-databases ip address:

Attempts to list all databases on a MySQL server.

Nmap –script mysql-dump-hashes ip address:

Dumps the password hashes from an MySQL server in a format suitable for cracking by tools such as John the Ripper. Appropriate DB privileges (root) are required. The username and password arguments take precedence over credentials discovered by the mysql-brute and mysql-empty-password scripts.

Nmap –script mysql-empty-password ip address:

Checks for MySQL servers with an empty password for root or anonymous.

Nmap –script mysql-enum ip address:

Performs valid-user enumeration against MySQL server using a bug discovered and published by Kingcope Server version 5.x are susceptible to an user enumeration attack due to different messages during login when using old authentication mechanism from versions 4.x and earlier.

Nmap –script mysql-users ip address:

Attempts to list all users on a MySQL server.

Nmap –script mysql-query ip address:

Runs a query against a MySQL database and returns the results as a table.

Nmap –script mysql-info ip address:

Attempts to list all information about MySQL server.

Nmap –script mysql-variables ip address:

Attempts to list all the variables in MySQL server.

--

--