id: cql-native-transport

info:
  name: CQL Native Transport Detect
  author: pussycat0x
  severity: info
  description: |
    Native transport requests (NTR) are any requests made via the CQL Native Protocol. CQL Native Protocol is the way the Cassandra driver communicates with the server.
  metadata:
    verified: true
    max-request: 1
    shodan-query: cassandra
  tags: network,cassandra,cql,detect,detection,tcp
tcp:
  - inputs:
      - data: "/n"
      - data: "/n"
      - data: "/n"
      - data: "/n"
      - data: "/n"
      - data: "/n"
      - data: "/n"
      - data: "/n"

    host:
      - "{{Hostname}}"
    port: 9042

    matchers:
      - type: word
        words:
          - "valid or unsupported protocol"

    extractors:
      - type: regex
        regex:
          - "protocol version: ([0-9]+)"
# digest: 4a0a00473045022100990bdcfe0a21fed2a7531605cd32058d224aa581be7b670940516469168c51ce02207e34a4506b22213a8c44a6755bdcd3b14e37896d6c9e307566817de974d81f81:922c64590222798bb761d5b6d8e72950