Documentation
¶
Index ¶
- Constants
- func DetectCassandra(conn net.Conn, timeout time.Duration) (cassandraMetadata, bool, error)
- type CassandraPlugin
- func (p *CassandraPlugin) Name() string
- func (p *CassandraPlugin) PortPriority(port uint16) bool
- func (p *CassandraPlugin) Priority() int
- func (p *CassandraPlugin) Run(conn net.Conn, timeout time.Duration, target plugins.Target) (*plugins.Service, error)
- func (p *CassandraPlugin) Type() plugins.Protocol
Constants ¶
View Source
const ( OP_OPTIONS = 0x05 OP_SUPPORTED = 0x06 )
CQL protocol opcodes
View Source
const ( PROTOCOL_V4_REQUEST = 0x04 PROTOCOL_V4_RESPONSE = 0x84 PROTOCOL_V5_REQUEST = 0x05 PROTOCOL_V5_RESPONSE = 0x85 PROTOCOL_V6_REQUEST = 0x06 PROTOCOL_V6_RESPONSE = 0x86 )
Protocol version bytes
View Source
const CASSANDRA = "cassandra"
Variables ¶
This section is empty.
Functions ¶
func DetectCassandra ¶
DetectCassandra performs Cassandra fingerprinting using CQL OPTIONS/SUPPORTED handshake.
Detection Strategy:
- DETECTION PHASE: Send OPTIONS, validate SUPPORTED response structure
- ENRICHMENT PHASE: Parse multimap, extract version markers, build CPE
Parameters:
- conn: Network connection to Cassandra server
- timeout: Timeout for network operations
Returns:
- cassandraMetadata: Enriched metadata (version, product, CPE)
- bool: true if Cassandra detected
- error: Error details if detection failed
Types ¶
type CassandraPlugin ¶
type CassandraPlugin struct{}
func (*CassandraPlugin) Name ¶
func (p *CassandraPlugin) Name() string
Name returns the protocol name.
func (*CassandraPlugin) PortPriority ¶
func (p *CassandraPlugin) PortPriority(port uint16) bool
PortPriority returns true if the port is the default Cassandra CQL port (9042).
func (*CassandraPlugin) Priority ¶
func (p *CassandraPlugin) Priority() int
Priority returns the plugin execution priority. 100 = standard priority (run after high-priority protocols like SSH, before HTTP)
func (*CassandraPlugin) Run ¶
func (p *CassandraPlugin) Run(conn net.Conn, timeout time.Duration, target plugins.Target) (*plugins.Service, error)
Run implements the Plugin interface for Cassandra fingerprinting.
Returns:
- *plugins.Service: Service metadata with CPE, or nil if not Cassandra
- error: Error details, or nil
func (*CassandraPlugin) Type ¶
func (p *CassandraPlugin) Type() plugins.Protocol
Type returns the protocol type (TCP).
Click to show internal directories.
Click to hide internal directories.