The issue
Request Filtering is a built-in security feature that was introduced in Internet Information Services (IIS) 7.0. This can be used to block specific verbs like "Trace".When request filtering blocks an HTTP request, IIS 7 will return an HTTP 404 error to the client and log the HTTP status with a unique substatus that identifies the reason that the request was denied. Verb Denied.
HTTP Substatus | Description |
404.5 | URL Sequence Denied |
404.6 | Verb Denied |
404.7 | File Extension Denied |
404.8 | Hidden Namespace |
404.1 | Request Header Too Long |
404.11 | URL Double Escaped |
404.12 | URL Has High Bit Chars |
404.13 | Content Length Too Large |
404.14 | URL Too Long |
404.15 | Query String Too Long |
404.18 | Query String Sequence Denied |
404.19 | Denied by Filtering Rule |
How to block
To block specific verbs, all you need to do is modify your web.config and under <system.webServer> à <security> add the following:<requestFiltering>
<verbs applyToWebDAV="false">
<add verb="TRACE" allowed="false" />
</verbs>
</requestFiltering>
OR
Step 1: Open IIS Manager
Step 2: Navigate to site & look for "Request
Filtering"
Step 3: Navigate to HTTP Verbs & Deny TRACE
Verification of the issue (when bound to 443 over https)
Here we will attempt to check if the HTTP Trace method has been disabled on IIS.
- To complete this step you will need a machine with openssl.
- You will need to log into the machine from step a using putty or an equivalent terminal.
- Create a connection to the secure server via openssl using s_client
openssl s_client -connect dev.server.supportpoint.com:443 -servername dev.server.supportpoint.com -host dev.server.supportpoint.com -port 443 - Next mimic a TRACE connection
TRACE / HTTP/1.0
Connection: dev.server.supportpoint.com - As you can notice here, the result returned is 404.
- Check the IIS Access Logs for 404.6 (When request filtering blocks an HTTP request, IIS 7 will return an HTTP 404 error to the client and log the HTTP status with a unique substatus that identifies the reason that the request was denied. In our case, 404.6 is Verb Denied)
- Find the Application Id
- Go to the IIS Manager
- Right-click your site à Manage Website à Advanced Settings
- Your ID is an integer value
- Navigate to logs directory & open last modified log file
- Go to %SystemDrive%\inetpub\logs\LogFiles
- Then find the folder based on your Application ID.
- If your ID is 1, then go to W3SVC1.
- If your ID is 2, then go to W3SVC2.
- … and so on
- Open the Last Modifed Log file
- Search the log file for your TRACE request.
- You should now be able to see that the error logged is 404.6
No comments:
Post a Comment