id: ssh-authorized-keys

info:
  name: SSH Authorized Keys File - Detect
  author: geeknik,0x_Akoko
  severity: medium
  description: |
    SSH authorized keys file was detected.
  reference:
    - https://www.ssh.com/academy/ssh/authorized-key
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
    cvss-score: 5.3
    cwe-id: CWE-200
  metadata:
    max-request: 2
  tags: config,exposure,ssh,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/.ssh/authorized_keys"
      - "{{BaseURL}}/_/.ssh/authorized_keys"
      - "{{BaseURL}}/authorized_keys"
      - "{{BaseURL}}/.authorized_keys"

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

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