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

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