3306 - Mysql
Connect
Local
mysql -u root # Connect to root without password
mysql -u root -p # A password will be asked (check someone)Remote
mysql -h <Hostname> -u root
mysql -h <Hostname> -u root@localhostExternal Enumeration
Some of the enumeration actions require valid credentials
nmap -sV -p 3306 --script mysql-audit,mysql-databases,mysql-dump-hashes,mysql-empty-password,mysql-enum,mysql-info,mysql-query,mysql-users,mysql-variables,mysql-vuln-cve2012-2122 <IP>
msf> use auxiliary/scanner/mysql/mysql_version
msf> use auxiliary/scanner/mysql/mysql_authbypass_hashdump
msf> use auxiliary/scanner/mysql/mysql_hashdump #Creds
msf> use auxiliary/admin/mysql/mysql_enum #Creds
msf> use auxiliary/scanner/mysql/mysql_schemadump #Creds
msf> use exploit/windows/mysql/mysql_start_up #Execute commands Windows, CredsBrute Force
Write any binary data:
Commands
MySQL Permissions Enumeration
You can see in the docs the meaning of each privilege: https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html
Last updated
Was this helpful?