50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
id: ruby-secrets-file
|
|
|
|
info:
|
|
name: Ruby on Rails secrets.yml File Exposure
|
|
author: DhiyaneshDK
|
|
severity: high
|
|
reference: https://www.exploit-db.com/ghdb/6283
|
|
metadata:
|
|
verified: true
|
|
max-request: 4
|
|
google-query: intitle:"index of" "secrets.yml"
|
|
tags: cloud,devops,files,exposure,misconfig
|
|
|
|
http:
|
|
- 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:
|
|
- type: regex
|
|
regex:
|
|
- 'secret_key_base: ([a-z0-9]+)'
|
|
|
|
- type: word
|
|
part: header
|
|
words:
|
|
- "application/json"
|
|
- "text/html"
|
|
negative: true
|
|
condition: and
|
|
|
|
- type: status
|
|
status:
|
|
- 200
|
|
|
|
extractors:
|
|
- type: regex
|
|
part: body
|
|
group: 1
|
|
regex:
|
|
- 'secret_key_base: ([a-z0-9]+)'
|
|
|
|
# digest: 4a0a0047304502204ef290ed70b84eb8ddb34735722127ff9cc5bafa0d66ca69098b6a0ca795b26f022100f4303f5ff8dda7ed6d6e3f2a111770cf5c2197e08ac6cb713a0da4542fa6c33c:922c64590222798bb761d5b6d8e72950
|