2022-07-04 19:11:27 +00:00
|
|
|
id: ruby-secrets-file
|
2022-07-04 19:09:01 +00:00
|
|
|
|
|
|
|
info:
|
2022-07-04 19:11:27 +00:00
|
|
|
name: Ruby on Rails secrets.yml File Exposure
|
2022-07-04 19:09:01 +00:00
|
|
|
author: DhiyaneshDK
|
|
|
|
severity: high
|
|
|
|
reference: https://www.exploit-db.com/ghdb/6283
|
|
|
|
metadata:
|
2023-04-28 08:11:21 +00:00
|
|
|
max-request: 4
|
2022-07-05 04:24:33 +00:00
|
|
|
verified: true
|
2022-09-08 22:39:14 +00:00
|
|
|
google-query: intitle:"index of" "secrets.yml"
|
2023-06-30 22:14:21 +00:00
|
|
|
tags: cloud,devops,files,exposure,misconfig
|
2022-07-04 19:09:01 +00:00
|
|
|
|
2023-04-27 04:28:59 +00:00
|
|
|
http:
|
2022-07-04 19:09:01 +00:00
|
|
|
- method: GET
|
|
|
|
path:
|
|
|
|
- "{{BaseURL}}/secrets.yml"
|
|
|
|
- "{{BaseURL}}/config/secrets.yml"
|
|
|
|
- "{{BaseURL}}/test/config/secrets.yml"
|
|
|
|
- "{{BaseURL}}/redmine/config/secrets.yml"
|
|
|
|
|
|
|
|
stop-at-first-match: true
|
|
|
|
matchers-condition: and
|
|
|
|
matchers:
|
2022-07-05 04:07:53 +00:00
|
|
|
- type: regex
|
|
|
|
regex:
|
|
|
|
- 'secret_key_base: ([a-z0-9]+)'
|
|
|
|
|
2022-07-04 19:09:01 +00:00
|
|
|
- type: word
|
2022-07-05 04:07:53 +00:00
|
|
|
part: header
|
2022-07-04 19:09:01 +00:00
|
|
|
words:
|
2022-07-05 04:07:53 +00:00
|
|
|
- "application/json"
|
|
|
|
- "text/html"
|
|
|
|
negative: true
|
|
|
|
condition: and
|
2022-07-04 19:09:01 +00:00
|
|
|
|
|
|
|
- type: status
|
|
|
|
status:
|
|
|
|
- 200
|
2022-07-05 04:07:53 +00:00
|
|
|
|
|
|
|
extractors:
|
|
|
|
- type: regex
|
|
|
|
part: body
|
|
|
|
group: 1
|
|
|
|
regex:
|
|
|
|
- 'secret_key_base: ([a-z0-9]+)'
|