id: php-user-ini-disclosure

info:
  name: Php User.ini Disclosure
  author: dhiyaneshDk
  severity: medium
  description: PHP user.ini file is exposed.
  reference:
    - https://github.com/detectify/ugly-duckling/blob/master/modules/crowdsourced/php-user-ini-disclosure.json
  metadata:
    max-request: 2
  tags: exposure,config,files

http:
  - method: GET
    path:
      - "{{BaseURL}}/user.ini"
      - "{{BaseURL}}/.user.ini"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "assert"
          - "highlight"
          - "opcache"
          - "mssql"
          - "oci8"
          - "agent"
        part: body
        condition: and

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