-
Book Overview & Buying
-
Table Of Contents
Nmap: Network Exploration and Security Auditing Cookbook - Second Edition
By :
MySQL servers support storing multiple databases per instance. As system administrators with legitimate access or penetration testers who just compromised the server, we can list the available databases using Nmap. This is especially useful when we don't have a MySQL client at our disposal to quickly check what kind of information is stored in the database.
This recipe teaches how to use Nmap NSE to list databases in a MySQL server.
Open a terminal and enter the following command:
$ nmap -p3306 --script mysql-databases --script-args mysqluser= <user>,mysqlpass=<password> <target>The databases should be listed under the script results:
3306/tcp open mysql | mysql-databases: | information_schema | temp | websec | ids |_ crm
The argument -p3306 --script mysql-databases --script-args mysqluser=<user>,mysqlpass=<password> tells Nmap to attempt a connection to the MySQL server...
Change the font size
Change margin width
Change background colour