id: config-json

info:
  name: Configuration File - Detect
  author: geeknik
  severity: medium
  description: Multiple configuration files were detected.
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
    cvss-score: 5.3
    cwe-id: CWE-200
  metadata:
    verified: true
    max-request: 4
    github-query: filename:config.json
  tags: config,exposure,files,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/config/default.json"
      - "{{BaseURL}}/config.json"
      - "{{BaseURL}}/config/config.json"
      - "{{BaseURL}}/credentials/config.json"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        words:
          - '"api_keys":'
          - '"aws":'
          - '"server":'
          - '"users":'
          - '"password":'
          - '"user"'
          - '"path":'
        condition: or

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

      - type: status
        status:
          - 200
# digest: 4a0a00473045022068e0abaa65b733cc45599ff5dbeeb95002afe718061ad4e6d5cc78eeb45216070221008aa5a4294adf5f7e123cf804faae5a64c34ea0ae8dafa113dcc44c876cfa7abf:922c64590222798bb761d5b6d8e72950