2020-11-26 20:53:23 +00:00
|
|
|
id: server-private-keys
|
|
|
|
|
|
|
|
info:
|
|
|
|
name: Detect Private SSH and TLS Keys
|
|
|
|
author: geeknik
|
|
|
|
severity: high
|
|
|
|
requests:
|
|
|
|
- method: GET
|
|
|
|
path:
|
|
|
|
- "{{BaseURL}}/host.key"
|
|
|
|
- "{{BaseURL}}/www.key"
|
|
|
|
- "{{BaseURL}}/private-key"
|
|
|
|
- "{{BaseURL}}/privatekey.key"
|
|
|
|
- "{{BaseURL}}/server.key"
|
|
|
|
- "{{BaseURL}}/my.key"
|
|
|
|
- "{{BaseURL}}/key.pem"
|
|
|
|
- "{{BaseURL}}/id_rsa"
|
|
|
|
- "{{BaseURL}}/id_dsa"
|
|
|
|
- "{{BaseURL}}/.ssh/id_rsa"
|
|
|
|
- "{{BaseURL}}/.ssh/id_dsa"
|
|
|
|
- "{{BaseURL}}/{{Hostname}}.key"
|
|
|
|
- "{{BaseURL}}/{{Hostname}}.pem"
|
|
|
|
|
|
|
|
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"
|
2020-11-26 20:53:23 +00:00
|
|
|
condition: or
|
|
|
|
|
|
|
|
- type: status
|
|
|
|
status:
|
|
|
|
- 200
|