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

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: 4a0a00473045022042e6668bf6bc5f1a5d2c69807bf65da40564d51f1cf6202a4fb2ec29758952cb022100f2bac9b8cbc62bbf33fe1306f55908888a00638c7ccfd26be581fb3df02286c6:922c64590222798bb761d5b6d8e72950