Nmap mysql-info NSE Script
This page contains detailed information about how to use the mysql-info NSE script. For list of all NSE scripts, visit the Nmap NSE Library.
Select: |
---|
Script Overview
Script source code: https://github.com/nmap/nmap/tree/master/scripts/mysql-info.nse
Script categories: default, discovery, safe
Target service / protocol: mysql
Target network port(s): 3306
List of CVEs: -
Script Description
The mysql-info.nse script connects to a MySQL server and prints information such as the protocol and version numbers, thread ID, status, capabilities, and the password salt.
If service detection is performed and the server appears to be blocking our host or is blocked because of too many connections, then this script isn't run (see the portrule).
Mysql-info NSE Script Arguments
The mysql-info.nse script does not have any arguments.
Mysql-info NSE Script Example Usage
Here's an example of how to use the mysql-info.nse script:
nmap --script=mysql-info <target>
Mysql-info NSE Script Example Output
Here's a sample output from the mysql-info.nse script:
3306/tcp open mysql
| mysql-info:
| Protocol: 10
| Version: 5.0.51a-3ubuntu5.1
| Thread ID: 7
| Capabilities flags: 40968
| Some Capabilities: ConnectWithDatabase, SupportsTransactions, Support41Auth
| Status: Autocommit
|_ Salt: bYyt\NQ/4V6IN+*3`imj
Mysql-info NSE Script Example XML Output
Here's a sample XML output from the mysql-info.nse script produced by providing the -oX <file>
Nmap option:
<elem key="Protocol">10</elem>
<elem key="Version">5.0.51a-3ubuntu5.1</elem>
<elem key="Thread ID">7</elem>
<elem key="Capabilities flags">40968</elem>
<table key="Some Capabilities">
<elem>ConnectWithDatabase</elem>
<elem>SupportsTransactions</elem>
<elem>Support41Auth</elem>
</table>
<elem key="Status">Autocommit</elem>
<elem key="Salt">bYyt\NQ/4V6IN+*3`imj</elem>
Author
- Kris Katterjohn
References
- https://nmap.org/nsedoc/scripts/mysql-info.html
- https://github.com/nmap/nmap/tree/master/scripts/mysql-info.nse
See Also
Related NSE scripts to the mysql-info.nse script:
- mysql-audit.nse
- mysql-brute.nse
- mysql-databases.nse
- mysql-dump-hashes.nse
- mysql-empty-password.nse
- mysql-enum.nse
- mysql-query.nse
- mysql-users.nse
- mysql-variables.nse
- mysql-vuln-cve2012-2122.nse
Visit Nmap NSE Library for more scripts.
The mysql-info.nse script may fail with the following error messages. Check for the possible causes by using the code snippets highlighted below found in the script source code. This can often times help in identifying the root cause of the problem.
error connecting: %s
Here is a relevant code snippet related to the "error connecting: %s" error message:
76: local socket = nmap.new_socket()
77:
78: local status, err = socket:connect(host, port)
79:
80: if not status then
81: stdnse.debug1("error connecting: %s", err)
82: return nil
83: end
84:
85: local status, info = mysql.receiveGreeting(socket)
86:
MySQL error: %s
Here is a relevant code snippet related to the "MySQL error: %s" error message:
83: end
84:
85: local status, info = mysql.receiveGreeting(socket)
86:
87: if not status then
88: stdnse.debug1("MySQL error: %s", info)
89: output["MySQL Error"] = info
90: if nmap.verbosity() > 1 then
91: return output
92: else
93: return nil
MySQL Error
Here is a relevant code snippet related to the "MySQL Error" error message:
84:
85: local status, info = mysql.receiveGreeting(socket)
86:
87: if not status then
88: stdnse.debug1("MySQL error: %s", info)
89: output["MySQL Error"] = info
90: if nmap.verbosity() > 1 then
91: return output
92: else
93: return nil
94: end
Version
This page has been created based on Nmap version 7.92.
Go back to menu.