nuclei-templates/http/exposures/files/secrets-file.yaml

53 lines
1.3 KiB
YAML

id: ruby-secrets-file
info:
name: Ruby on Rails secrets.yml File Exposure
author: DhiyaneshDK
severity: high
description: Ruby on Rails internal secret file is exposed.
reference: https://www.exploit-db.com/ghdb/6283
classification:
cpe: cpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:*
metadata:
verified: true
max-request: 4
vendor: rubyonrails
product: rails
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: 4a0a00473045022100cc9a7d0e0ad64c770d0f536ffbf6dfc2eac9fb06e3c326355e81e9f0be5798e00220353436dbf897d4d89fc3e568bc1af7a364b428c25225fd0f901d947f23841cae:922c64590222798bb761d5b6d8e72950