SSL/SSH/TLS/JWT Keys - Detect
ID: server-private-keys
Severity: high
Author: geeknik,R12W4N,j4vaovo,VulnSCOUT
Tags: config,exposure
Description
Section titled “Description”Private SSL, SSH, TLS, and JWT keys were detected.
YAML Source
Section titled “YAML Source”id: server-private-keys
info: name: SSL/SSH/TLS/JWT Keys - Detect author: geeknik,R12W4N,j4vaovo,VulnSCOUT severity: high description: Private SSL, SSH, TLS, and JWT keys were detected. classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N cvss-score: 7.5 cwe-id: CWE-200 metadata: max-request: 47 tags: config,exposure
http: - method: GET path: - "{{BaseURL}}{{paths}}" payloads: paths: - "/localhost.key" - "/host.key" - "/www.key" - "/private-key" - "/privatekey.key" - "/server.key" - "/my.key" - "/key.pem" - "/ssl/localhost.key" - "/ssl/{{Hostname}}.key" - "/id_rsa" - "/id_dsa" - "/id_rsa_1024" - "/id_rsa_2048" - "/id_rsa_3072" - "/id_rsa_4096" - "/id_ed25519" - "/.ssh/id_rsa" - "/.ssh/id_dsa" - "/.ssh/id_rsa_1024" - "/.ssh/id_rsa_2048" - "/.ssh/id_rsa_3072" - "/.ssh/id_rsa_4096" - "/.ssh/id_ed25519" - "/{{Hostname}}.key" - "/{{Hostname}}.pem" - "/config/jwt/private.pem" - "/jwt/private.pem" - "/var/jwt/private.pem" - "/private.pem" - "/ssl.txt" - "/ssl_key.txt" - "/certificates/{{Host}}.pfx" - "/certificates/{{Host}}.p12" - "/ssl/{{Host}}.pem" - "/ssl/{{Host}}_key.txt" - "/cert/{{Host}}_key.txt" - "/cert/{{RDN}}_key.txt" - "/cert/{{Host}}.txt" - "/ssl/private/{{Host}}_key.pem" - "/certs/{{Host}}_private.key" - "/certs/{{Host}}.key" - "/certificates/{{Host}}_priv.pem" - "/certificates/{{Host}}_privkey.pem" - "/certs/{{Host}}.pem" - "/private/{{Host}}.key" - "/keys/{{Host}}.pem"
stop-at-first-match: true
matchers-condition: and matchers: - type: word words: - "BEGIN OPENSSH PRIVATE KEY" - "BEGIN PRIVATE KEY" - "BEGIN RSA PRIVATE KEY" - "BEGIN DSA PRIVATE KEY" - "BEGIN EC PRIVATE KEY" - "BEGIN PGP PRIVATE KEY BLOCK" - "BEGIN ENCRYPTED PRIVATE KEY" condition: or
- type: status status: - 200
- type: dsl dsl: - '!contains(body, "<html")' - '!contains(body, "<HTML")' condition: and# digest: 4a0a00473045022100ced2e5a42986241dfa78f951fe0e33c37989dc8397706a903b0e3d426ce53ddf022067d0b94245939c4df3ce1b99df7282476eae59fc89f664fa1d1d2e6a8cef80bc:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "http/exposures/configs/server-private-keys.yaml"