Ruby on Rails Database Configuration File - Detect
ID: rails-database-config
Severity: high
Author: pdteam,geeknik
Tags: config,exposure,rails
Description
Section titled “Description”Ruby on Rails database configuration file was detected, which may contain database credentials.
YAML Source
Section titled “YAML Source”id: rails-database-config
info: name: Ruby on Rails Database Configuration File - Detect author: pdteam,geeknik severity: high description: Ruby on Rails database configuration file was detected, which may contain database credentials. reference: https://guides.rubyonrails.org/configuring.html#configuring-a-database classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N cvss-score: 7.5 cwe-id: CWE-200 metadata: max-request: 1 tags: config,exposure,rails
http: - method: GET path: - "{{BaseURL}}/config/database.yml"
matchers-condition: and matchers: - type: word words: - "adapter:" - "database:" - "production:" condition: and part: body
- type: status status: - 200# digest: 490a00463044022005e9f38517ec2b080c12cf58a690aca90f45c99b6b9f7b85ca9aac608678961d02204dca2e51868b9c24be642f2e81921d3fc48b1e3245b941f4a3774de9ebfe2d38:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "http/exposures/configs/rails-database-config.yaml"