I’m looking for details on the DEBUG HTTP verb.
It’s clear to me that this is used for remote debugging – though I’m not even sure if it’s for IIS or ASP.NET…
If I want to access this interface directly – i.e. not through Visual Studio, but sending these commands manually – what do I need to know? What are the commands for it?
I’m also interested in misuse cases, if you have any information on that…
Just for completeness, consolidating here the answers from what-is-the-non-standard-http-verb-debug-used-for-in-asp-net-iis: (thanks @Mark, @Jørn).
http://support.microsoft.com/kb/937523
The
DEBUGverb is used to start/stop remote debugging sessions. More specifically, aDEBUGrequest can contain a Command header with valuestart-debugandstop-debug, but the actual debugging is done via an RPC protocol.It uses Windows authentication, and DCOM to actually do the debugging though (obviously, if you’re allowing RPC traffic, then you’ve got bigger problems) or of any exploits. UrlScan does block it by default, though.
However, poking an ASP.NET website with the
DEBUGrequests can be used to reveal if the web.config has<compilation debug="true">. The test can be performed with telnet, WFetch or similar, by sending a request like this:Depending on whether debugging is enabled or not, you will get either
200 OKor403 Forbidden.It is generally accepted that you should never have
<compilation debug="true"/>in a production environment, as it has serious implications on the performance of the website. I am not sure if having debugging enabled opens any new attack vectors, unless RPC traffic is enabled as well, in which case you have more serious problems anyway.