Nmap cassandra-info NSE Script
This page contains detailed information about how to use the cassandra-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/cassandra-info.nse
Script categories: default, discovery, safe
Target service / protocol: cassandra
Target network port(s): 9160
List of CVEs: -
Script Description
The cassandra-info.nse script attempts to get basic info and server status from a Cassandra database.
For more information about Cassandra, see:
Cassandra-info NSE Script Arguments
This is a full list of arguments supported by the cassandra-info.nse script:
creds.globalCredentials to be returned by Credentials.getCredentials regardless of the service.
creds.[service]Credentials to be returned by Credentials.getCredentials for [service]. E.g. creds.http=admin:password
- - -
To use these script arguments, add them to the Nmap command line using the --script-args arg1=value,[arg2=value,..]
syntax. For example:
nmap --script=cassandra-info --script-args creds.global=value,creds.\[service]=value <target>
Cassandra-info NSE Script Example Usage
Here's an example of how to use the cassandra-info.nse script:
nmap -p 9160 <ip> --script=cassandra-info
Cassandra-info NSE Script Example Output
Here's a sample output from the cassandra-info.nse script:
PORT STATE SERVICE REASON
9160/tcp open cassandra syn-ack
| cassandra-info:
| Cluster name: Test Cluster
|_ Version: 19.10.0
Cassandra-info NSE Script Example XML Output
Here's a sample XML output from the cassandra-info.nse script produced by providing the -oX <file>
Nmap option:
<elem key="Cluster name">Test Cluster</elem>
<elem key="Version">19.10.0</elem>
Author
- Vlatko Kosturjak
References
- https://nmap.org/nsedoc/scripts/cassandra-info.html
- https://github.com/nmap/nmap/tree/master/scripts/cassandra-info.nse
- http://cassandra.apache.org/
See Also
Related NSE scripts to the cassandra-info.nse script:
Visit Nmap NSE Library for more scripts.
The cassandra-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 getting cluster name:
Here is a relevant code snippet related to the "Error getting cluster name: " error message:
70: end
71: port.service = ps
72:
73: local status, val = cassandra.describe_cluster_name(socket,cassinc)
74: if (not(status)) then
75: return "Error getting cluster name: " .. val
76: end
77: cassinc = cassinc + 1
78: port.version.name ='cassandra'
79: port.version.product='Cassandra'
80: port.version.name_confidence = 10
Error getting version:
Here is a relevant code snippet related to the "Error getting version: " error message:
81: nmap.set_port_version(host,port)
82: results["Cluster name"] = val
83:
84: local status, val = cassandra.describe_version(socket,cassinc)
85: if (not(status)) then
86: return "Error getting version: " .. val
87: end
88: cassinc = cassinc + 1
89: port.version.product='Cassandra ('..val..')'
90: nmap.set_port_version(host,port)
91: results["Version"] = val
Version
This page has been created based on Nmap version 7.92.
Go back to menu.