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,vuln

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