id: production-logs

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

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

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

      - type: status
        status:
          - 200

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

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