id: symfony-debug

info:
  name: Symfony Debug Mode
  author: organiccrap,pdteam
  severity: high
  description: A Symfony installations 'debug' interface is enabled, allowing the disclosure and possible execution of arbitrary code.
  reference:
    - https://github.com/synacktiv/eos
  classification:
    cpe: cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 4
    vendor: sensiolabs
    product: symfony
    shodan-query: http.html:"symfony Profiler"
  tags: symfony,debug,misconfig,vuln

http:
  - method: GET
    path:
      - '{{BaseURL}}'
      - "{{BaseURL}}/admin_dev.php"
      - "{{BaseURL}}/index_dev.php"
      - "{{BaseURL}}/app_dev.php"

    stop-at-first-match: true

    matchers-condition: or
    matchers:
      - type: word
        part: header
        words:
          - 'x-debug-token-link:'
          - '/_profiler/'
        condition: and
        case-insensitive: true

      - type: word
        part: body
        words:
          - 'debug mode</a> is enabled.'
          - 'id="sfWebDebugSymfony"'
        condition: or
# digest: 490a00463044022070e20cfa4cb6d9ea2460026b40503b935e1cbe07dc01c3627a6bbf8cc03bd4b1022065688e1d800e94c4945b9b0c704e82b0ae5a4aca5411aca22e9091c7a47df6fe:922c64590222798bb761d5b6d8e72950