2021-04-01 23:04:42 +00:00
|
|
|
id: netrc
|
|
|
|
|
|
|
|
info:
|
2022-07-26 13:45:11 +00:00
|
|
|
name: Netrc - Config File Discovery
|
2021-04-01 23:04:42 +00:00
|
|
|
author: geeknik
|
|
|
|
severity: high
|
2022-07-26 13:45:11 +00:00
|
|
|
description: Netrc configuration file was discovered.
|
2022-04-22 10:38:41 +00:00
|
|
|
reference:
|
|
|
|
- https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html
|
2023-04-28 08:11:21 +00:00
|
|
|
metadata:
|
|
|
|
max-request: 2
|
2023-10-14 11:27:55 +00:00
|
|
|
tags: netrc,config,exposure
|
2021-04-01 23:04:42 +00:00
|
|
|
|
2023-04-27 04:28:59 +00:00
|
|
|
http:
|
2021-04-01 23:04:42 +00:00
|
|
|
- method: GET
|
|
|
|
path:
|
|
|
|
- "{{BaseURL}}/.netrc"
|
2021-05-19 12:43:28 +00:00
|
|
|
- "{{BaseURL}}/_netrc"
|
2021-04-01 23:04:42 +00:00
|
|
|
|
|
|
|
matchers-condition: and
|
|
|
|
matchers:
|
|
|
|
- type: status
|
|
|
|
status:
|
|
|
|
- 200
|
2023-10-14 11:27:55 +00:00
|
|
|
|
2021-04-01 23:04:42 +00:00
|
|
|
- type: regex
|
|
|
|
regex:
|
|
|
|
- "machine [0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\\.?"
|
2023-10-14 11:27:55 +00:00
|
|
|
|
2021-04-01 23:04:42 +00:00
|
|
|
- type: word
|
|
|
|
words:
|
|
|
|
- "login "
|
|
|
|
- "password "
|
|
|
|
condition: and
|
|
|
|
|
|
|
|
extractors:
|
|
|
|
- type: regex
|
|
|
|
part: body
|
|
|
|
regex:
|
|
|
|
- "machine [0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\\.?"
|
2023-10-20 11:41:13 +00:00
|
|
|
|
|
|
|
# digest: 490a00463044022072f3810d5161d773a7e963bf1431f25dc27b0af216a44b5d3ebc90f6bbc4b9f402207701413414bce54d3da7716463e173f5192dfe85efd4dcaa10f91901a398163e:922c64590222798bb761d5b6d8e72950
|