2020-11-26 20:53:23 +00:00
|
|
|
id: server-private-keys
|
|
|
|
|
|
|
|
info:
|
2023-02-23 21:01:53 +00:00
|
|
|
name: SSL/SSH/TLS/JWT Keys - Detect
|
2023-07-27 20:06:42 +00:00
|
|
|
author: geeknik,R12W4N,j4vaovo
|
2020-11-26 20:53:23 +00:00
|
|
|
severity: high
|
2023-10-14 11:27:55 +00:00
|
|
|
description: Private SSL, SSH, TLS, and JWT keys were detected.
|
2023-03-02 20:01:42 +00:00
|
|
|
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
|
2023-04-28 08:11:21 +00:00
|
|
|
metadata:
|
2023-07-27 20:06:42 +00:00
|
|
|
max-request: 45
|
2023-10-14 11:27:55 +00:00
|
|
|
tags: config,exposure
|
2021-04-02 13:10:33 +00:00
|
|
|
|
2023-04-27 04:28:59 +00:00
|
|
|
http:
|
2020-11-26 20:53:23 +00:00
|
|
|
- method: GET
|
|
|
|
path:
|
2021-04-07 03:19:34 +00:00
|
|
|
- "{{BaseURL}}/localhost.key"
|
2020-11-26 20:53:23 +00:00
|
|
|
- "{{BaseURL}}/host.key"
|
|
|
|
- "{{BaseURL}}/www.key"
|
|
|
|
- "{{BaseURL}}/private-key"
|
|
|
|
- "{{BaseURL}}/privatekey.key"
|
|
|
|
- "{{BaseURL}}/server.key"
|
|
|
|
- "{{BaseURL}}/my.key"
|
|
|
|
- "{{BaseURL}}/key.pem"
|
2021-05-03 01:57:02 +00:00
|
|
|
- "{{BaseURL}}/ssl/localhost.key"
|
|
|
|
- "{{BaseURL}}/ssl/{{Hostname}}.key"
|
2020-11-26 20:53:23 +00:00
|
|
|
- "{{BaseURL}}/id_rsa"
|
|
|
|
- "{{BaseURL}}/id_dsa"
|
2023-07-27 20:06:42 +00:00
|
|
|
- "{{BaseURL}}/id_rsa_1024"
|
|
|
|
- "{{BaseURL}}/id_rsa_2048"
|
|
|
|
- "{{BaseURL}}/id_rsa_3072"
|
|
|
|
- "{{BaseURL}}/id_rsa_4096"
|
2020-11-26 20:53:23 +00:00
|
|
|
- "{{BaseURL}}/.ssh/id_rsa"
|
|
|
|
- "{{BaseURL}}/.ssh/id_dsa"
|
2023-07-27 20:06:42 +00:00
|
|
|
- "{{BaseURL}}/.ssh/id_rsa_1024"
|
|
|
|
- "{{BaseURL}}/.ssh/id_rsa_2048"
|
|
|
|
- "{{BaseURL}}/.ssh/id_rsa_3072"
|
|
|
|
- "{{BaseURL}}/.ssh/id_rsa_4096"
|
2020-11-26 20:53:23 +00:00
|
|
|
- "{{BaseURL}}/{{Hostname}}.key"
|
|
|
|
- "{{BaseURL}}/{{Hostname}}.pem"
|
2021-06-08 00:04:02 +00:00
|
|
|
- "{{BaseURL}}/config/jwt/private.pem"
|
|
|
|
- "{{BaseURL}}/jwt/private.pem"
|
2021-06-08 00:06:01 +00:00
|
|
|
- "{{BaseURL}}/var/jwt/private.pem"
|
2021-06-08 00:04:02 +00:00
|
|
|
- "{{BaseURL}}/private.pem"
|
2023-02-15 10:57:11 +00:00
|
|
|
- "{{BaseURL}}/ssl.txt"
|
|
|
|
- "{{BaseURL}}/ssl_key.txt"
|
|
|
|
- "{{BaseURL}}/certificates/{{Host}}.pfx"
|
|
|
|
- "{{BaseURL}}/certificates/{{Host}}.p12"
|
|
|
|
- "{{BaseURL}}/ssl/{{Host}}.pem"
|
|
|
|
- "{{BaseURL}}/ssl/{{Host}}_key.txt"
|
|
|
|
- "{{BaseURL}}/cert/{{Host}}_key.txt"
|
|
|
|
- "{{BaseURL}}/cert/{{RDN}}_key.txt"
|
|
|
|
- "{{BaseURL}}/cert/{{Host}}.txt"
|
|
|
|
- "{{BaseURL}}/ssl/private/{{Host}}_key.pem"
|
|
|
|
- "{{BaseURL}}/certs/{{Host}}_private.key"
|
|
|
|
- "{{BaseURL}}/certs/{{Host}}.key"
|
|
|
|
- "{{BaseURL}}/certificates/{{Host}}_priv.pem"
|
|
|
|
- "{{BaseURL}}/certificates/{{Host}}_privkey.pem"
|
|
|
|
- "{{BaseURL}}/certs/{{Host}}.pem"
|
|
|
|
- "{{BaseURL}}/private/{{Host}}.key"
|
|
|
|
- "{{BaseURL}}/keys/{{Host}}.pem"
|
2020-11-26 20:53:23 +00:00
|
|
|
|
2023-02-15 10:58:33 +00:00
|
|
|
stop-at-first-match: true
|
2023-10-14 11:27:55 +00:00
|
|
|
|
2020-11-26 20:53:23 +00:00
|
|
|
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"
|
2021-01-04 20:48:46 +00:00
|
|
|
- "BEGIN PGP PRIVATE KEY BLOCK"
|
2023-02-15 10:57:11 +00:00
|
|
|
- "BEGIN ENCRYPTED PRIVATE KEY"
|
2020-11-26 20:53:23 +00:00
|
|
|
condition: or
|
|
|
|
|
|
|
|
- type: status
|
|
|
|
status:
|
|
|
|
- 200
|
2021-06-29 21:56:01 +00:00
|
|
|
|
|
|
|
- type: dsl
|
|
|
|
dsl:
|
|
|
|
- '!contains(body_2, "<html")'
|
|
|
|
- '!contains(body_2, "<HTML")'
|
2022-01-04 19:34:16 +00:00
|
|
|
condition: and
|
2023-10-20 11:41:13 +00:00
|
|
|
|
|
|
|
# digest: 4a0a00473045022100f0fe086601280b8808e18ebc1acb6af486fc73c97655bd56fe359cd0330ff9c2022046e6a8cf26accbb12a34b8e6d338e945d4466f35d880d618c3a6929394fc2203:922c64590222798bb761d5b6d8e72950
|