id: development-logs

info:
  name: Discover development log files
  author: geeknik
  severity: info
  description: Development log file was exposed.
  metadata:
    max-request: 3
  tags: logs,exposure,rails,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/log/development.log"
      - "{{BaseURL}}/logs/development.log"
      - "{{BaseURL}}/development.log"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "Connecting to database specified by database.yml"
          - "Started GET"
        condition: or

      - type: word
        words:
          - "DEPRECATION WARNING"
          - "CREATE TABLE"
        condition: or

      - type: word
        part: header
        words:
          - "text/html"
        negative: true

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        name: last_modified
        part: header
        regex:
          - 'Last-Modified:.*'
# digest: 4a0a00473045022100ffa7c358bd4adbe8e317ba0c8e6829b1fe40ff7899057996368cbdf005e16dbb022037fc6f2d1ab429dc7e60aa10ce875327768bf990b9b1d7ba29271af7b6d36d01:922c64590222798bb761d5b6d8e72950