id: rsyncd-service-detect

info:
  name: Rsyncd Service - Detect
  author: vsh00t,geeknik
  severity: info
  description: |
    Rsyncd service was detected.
  reference:
    - https://linux.die.net/man/1/rsync
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cwe-id: CWE-200
  metadata:
    max-request: 1
  tags: network,rsyncd,detect,detection,tcp

tcp:
  - inputs:
      - data: "?\r\n"

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

    matchers:
      - type: word
        words:
          - "RSYNCD: "
          - "ERROR: protocol startup error"
        condition: and

    extractors:
      - type: regex
        regex:
          - 'RSYNCD: \d\d.\d'
# digest: 4a0a004730450221008e2c2c67488c7f4108acabe8c976ddbdbef9b166d5c0a2a7fff885a6a04929c402207849703ad9eb08d7e941b6fa0f192b3fd90d39cdf019ab721a0054b4b5d70aea:922c64590222798bb761d5b6d8e72950