id: ssh-known-hosts

info:
  name: SSH Known Hosts File - Detect
  author: geeknik
  severity: info
  description: SSH known hosts file was detected.
  reference:
    - https://datacadamia.com/ssh/known_hosts
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cvss-score: 0
    cwe-id: CWE-200
  metadata:
    max-request: 2
  tags: config,exposure,ssh,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/.ssh/known_hosts"
      - "{{BaseURL}}/.ssh/known_hosts.old"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "ssh-dss"
          - "ssh-ed25519"
          - "ssh-rsa"
          - "ecdsa-sha2-nistp256"
        condition: or

      - type: status
        status:
          - 200
# digest: 4a0a00473045022071762478af5eea67224481c2407a4f0426c75ef45c419f6aa112e28115264594022100f0c04ca52a5d5c6208f9a830be3cf61f03e4b34f5813bb91b9e62e06517e2611:922c64590222798bb761d5b6d8e72950