id: xampp-phpinfo-detect

info:
  name: XAMPP PHP info Page - Detect
  author: pussycat0x
  severity: low
  description: |
    XAMPPHPinfo page was detected. The output of the phpinfo() command can reveal sensitive and detailed PHP environment information.
  remediation: Remove PHP Info pages from publicly accessible sites, or restrict access to authorized users only.
  metadata:
    verified: true
    shodan-query: http.title:"XAMPP"
  tags: config,exposure,phpinfo,vuln,xampp

http:
  - method: GET
    path:
      - "{{BaseURL}}{{paths}}"
    payloads:
      paths:
        - "/phpinfo.php"
        - "/dashboard/phpinfo.php"

    host-redirects: true
    max-redirects: 2

    stop-at-first-match: true
    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "PHP Extension"
          - "PHP Version"
          - "xampp"
        condition: and

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '>PHP Version <\/td><td class="v">([0-9.]+)'
# digest: 4a0a00473045022045ef35d9aa8540499ccb8b870e91f2e871c4981407245e079db8967ed134e317022100bbf28089108107eb3cc0bce87195fc203e1c105e6e36bf5076f684b780b5fba0:922c64590222798bb761d5b6d8e72950