id: aspx-debug-mode

info:
  name: ASP.NET Debugging Enabled
  author: dhiyaneshDk
  severity: info
  reference:
    - https://portswigger.net/kb/issues/00100800_asp-net-debugging-enabled
  metadata:
    max-request: 1
  tags: debug,misconfig,vuln

http:
  - raw:
      - |
        DEBUG /Foobar-debug.aspx HTTP/1.1
        Host: {{Hostname}}
        Command: stop-debug
        Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
        Content-Length: 2

    matchers:
      - type: dsl
        dsl:
          - 'len(body) == 2'
          - 'regex("^OK$", body)'
          - 'status_code == 200'
        condition: and
# digest: 4a0a0047304502210080517b9e213435cd034a1224af183644a7bb31ad59bf8ddcdb3e2c8f36a5184b0220507e34fc10c0ce14b9e1ad23f5ab19f245fd410df85a5ab8097a146200036159:922c64590222798bb761d5b6d8e72950