id: phpcli-stack-trace

info:
  name: PHP CLI Server Stack Trace
  author: DhiyaneshDk
  severity: info
  classification:
    cpe: cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: php
    product: php
    shodan-query: The requested resource <code class="url">
  tags: misconfig,phpcli,intrusive

http:
  - method: GET
    path:
      - '{{BaseURL}}/{{randstr}}.php'

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - '<code.*>/{{randstr}}.php.* this server.'
          - '404 Not Found'
          - '<h1>Not Found</h1>'
        condition: and

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

      - type: status
        status:
          - 404
# digest: 4a0a0047304502204acc8413ca9e3c9a27c860fef378149585893e7031dab97b6e8fc0e7483026db0221009ce4750e9421e3b948b3c6b96b607c6cfb42aea952e007d46947ba5552e8b63e:922c64590222798bb761d5b6d8e72950