id: rackup-config-ru

info:
  name: Rackup Configuration - Detect
  author: DhiyaneshDk
  severity: info
  description: Rackup configuration information was detected.
  reference:
    - https://raw.githubusercontent.com/maurosoria/dirsearch/master/db/dicc.txt
    - https://learn.co/lessons/config-ru-tutorial
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cvss-score: 0
    cwe-id: CWE-200
  metadata:
    verified: true
    max-request: 1
    shodan-query: html:"config.ru"
  tags: exposure,files,config,rackup,vuln

http:
  - method: GET
    path:
      - '{{BaseURL}}/config.ru'

    matchers-condition: or
    matchers:
      - type: word
        part: body
        words:
          - "run Rails.application"
          - "/config/environment"
        condition: and

      - type: word
        part: body
        words:
          - "Bundler.require"
          - "require 'rubygems'"
        condition: and
# digest: 4b0a0048304602210088bf947bd379d1e9ec229508ceed490c0c75198ad51a11a26f7ba0a6db4d9ac6022100ec5c0a24404a775151e694a3332cd03643f06c39ac570726332de02f36d4be1e:922c64590222798bb761d5b6d8e72950