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
|
2021-04-06 06:46:11 +00:00
|
|
|
tags: netrc,config,exposure
|
2021-04-01 23:04:42 +00:00
|
|
|
|
|
|
|
requests:
|
|
|
|
- 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
|
|
|
|
- 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])?)*\\.?"
|
|
|
|
- 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])?)*\\.?"
|
2022-07-26 13:45:11 +00:00
|
|
|
|
|
|
|
# Enhanced by mp on 2022/07/15
|