-
urlscan.ini中文示意
;此文件仅供学习,不要复制到%windir%\system32\inetsrv\urlscan下直接用,可能会出问题,因为ini文件内好像不支持中文字符!
[options] ; 此节描述常规 URLScan 选项UseAllowVerbs=1 ; 默认情况下,此选项设置为 1。如果将此选项设置为 1,则 URLScan 仅允许那些使用 [AllowVerbs] 节中列出的谓词的 HTTP 请求。URLScan 禁止任何不使用这些谓词的请求。如果将此选项设置为 0,则 URLScan 忽略 [AllowVerbs] 节,相反仅禁止那些使用 [DenyVerbs] 节中列出的谓词的请求。
UseAllowExtensions=0 ; 默认情况下,此选项设置为 0。如果将此选项设置为 0,则 URLScan 禁止对 [DenyExtensions] 节中列出的文件扩展名的请求,但允许对任何其他文件扩展名的请求。如果将此选项设置为 1,则 URLScan 仅允许对带 [AllowExtensions] 节中列出的扩展名的文件的请求,而禁止对任何其他文件的请求。
NormalizeUrlBeforeScan=1 ; IIS 收到用 URL 编码的请求。这表示某些字符可能被替换为百分号 (%) 后跟特定的数字。例如,%20 对应于一个空格,因此,对 http://myserver/My%20Dir/My%20File.htm 的请求与对 http://myserver/My Dir/My File.htm 的请求是相同的。标准化就是对 URL 编码请求进行解码的过程。默认情况下,此选项设置为 1。如果将 NormalizeUrlBeforeScan 选项设置为 1,则 URLScan 分析已解码的请求。如果将此选项设置为 0,则 URLScan 分析未解码的请求。将此选项设置为 0 会影响 URLScan 禁止某种攻击的能力。
VerifyNormalization=1 ; 由于百分号 (%) 本身可以是 URL 编码的,所以攻击者可以向服务器提交一个精心制作的、基本上是双重编码的请求。如果发生这种情况,IIS 可能会接受本应视作无效而拒绝的请求。默认情况下,此选项设置为 1。如果将 VerifyNormalization 选项设置为 1,则 URLScan 将对 URL 执行两次标准化。如果第一次标准化后的 URL 与第二次标准化后的 URL 不同,URLScan 将拒绝该请求。这样就可以防止那些依赖双重编码请求的攻击。
AllowHighBitCharacters=1 ; 默认情况下,此选项设置为 0。如果将此选项设置为 0,则 URLScan 拒绝任何包含非 ASCII 字符的请求。这样可以防止某些类型的攻击,但同时可能也会禁止对某些合法文件的请求,如带有非英文名的文件。
AllowDotInPath=0 ; 默认情况下,此选项设置为 0。如果将此选项设置为 0,则 URLScan 拒绝所有包含多个句点 (.) 的请求。这样可以防止通过将安全的文件扩展名放入 URL 的路径信息或查询字符串部分,以达到伪装请求中的危险文件扩展名的企图。例如,如果将此选项设置为 1,则 URLScan 可能允许对 http://servername/BadFile.exe/SafeFile.htm 的请求,因为它认为这是对 HTML 页的请求,但实际上这是一个对可执行 (.exe) 文件的请求,而该文件的名称在 PATH_INFO 区域中显示为 HTML 页的名称。如果将此选项设置为 0,URLScan 可能还会拒绝对包含句点的目录的请求。
RemoveServerHeader=1 ; 默认情况下,Web 服务器返回一个标头,其中指出了 Web 服务器在所有响应中运行的 Web 服务器软件。这会增加服务器遭受攻击的可能性,因为攻击者可以确定服务器正在运行 IIS,于是便攻击已知的 IIS 问题,而不是试图使用为其他 Web 服务器设计的攻击手段来攻击 IIS 服务器。默认情况下,此选项设置为 0。如果将 RemoveServerHeader 选项设置为 1,可以防止您的服务器发送将其标识为 IIS 服务器的标头。如果将 RemoveServerHeader 设置为 0,则仍发送此标头。
EnableLogging=1 ; 默认情况下,URLScan 在 %WINDIR%\System32\Inetsrv\URLScan 中保留所有被禁止的请求的完整日志。如果不希望保留此日志,可将 EnableLogging 设置为 0。
PerProcessLogging=1 ; 默认情况下,此选项设置为 0。如果将此选项设置为 1,URLScan 将为承载 URLScan.dll 的每个进程创建一个单独的日志。如果将此选项设置为 0,所有进程将记录到同一个文件中。
AllowLateScanning=0 ; 默认情况下,此选项设置为 0。如果将此选项设置为 0,则 URLScan 作为高优先级筛选器运行,这表示它先于服务器上安装的所有其他 Internet 服务器应用程序编程接口 (ISAPI) 筛选器执行。如果将此选项设置为 1,则 URLScan 作为低优先级筛选器运行,以便其他筛选器可以在 URLScan 进行任何分析之前修改 URL。FrontPage Server Extensions (FPSE) 要求将此选项设置为 1。
PerDayLogging=1 ; 默认情况下,此选项设置为 1。如果将该值设置为 1,则 URLScan 每天创建一个新的日志文件。每个日志文件的名称都是 Urlscan.MMDDYY.log,其中 MMDDYY 是日志文件的日期。如果将该值设置为 0,则所有日志记录都保存在同一个文件中,与日期无关。
UseFastPathReject=0 ; 默认情况下,此选项设置为 0。如果将此选项设置为 1,则 URLScan 忽略 RejectResponseUrl 设置并立即向浏览器返回 404 错误信息。这比处理 RejectResponseUrl 要快,但它允许的日志记录选项没有那么多。如果将此选项设置为 0,则 URLScan 使用 RejectResponseUrl 设置来处理请求。
LogLongUrls=0 ; If 1, then up to 128K per request can be logged.
; If 0, then only 1k is allowed.;
; If UseFastPathReject is 0, then UrlScan will send
; rejected requests to the URL specified by RejectResponseUrl.
; If not specified, ‘/‘ will be used.
; 此选项指定在 URLScan 禁止请求时运行的文件的虚拟路径。这允许您自定义针对被禁止的请求发送给客户机的响应。必须将 RejectResponseUrl 指定为相应文件的虚拟路径,如 /Path/To/RejectResponseHandler.asp。可以指定 URLScan 通常禁止的文件,如 Active Server Pages (ASP) 页。还可以从该页指定以下服务器变量:
; ● HTTP_URLSCAN_STATUS_HEADER:此变量指定请求被禁止的原因。
; ● HTTP_URLSCAN_ORIGINAL_VERB:此变量指定被禁止的请求中的原始谓词(例如 GET、POST、HEAD 或 DEBUG)。
; ● HTTP_URLSCAN_ORIGINAL_URL:此变量指定被禁止的请求中的原始 URL。
; 如果将 RejectResponseUrl 设置为特殊值 /~*,则 URLScan 使用“仅日志记录”模式。这允许 IIS 为所有请求提供服务,但它会在 URLScan 日志中为所有通常被禁止的请求添加相应的项。这在需要测试 URLScan.ini 文件时很有用。; 如果没有指定 RejectResponseUrl 的值,则 URLScan 使用默认值 /
。 RejectResponseUrl=
;
; LoggingDirectory can be used to specify the directory where the
; log file will be created. This value should be the absolute path
; (ie. c:\some\path). If not specified, then UrlScan will create
; the log in the same directory where the UrlScan.dll file is located.
;LoggingDirectory=C:\WINDOWS\system32\inetsrv\urlscan\logs
;
; If RemoveServerHeader is 0, then AlternateServerName can be
; used to specify a replacement for IIS’s built in ‘Server’ header
; 如果将 RemoveServerHeader 设置为 0,可以在 AlternateServerName 选项中指定一个字符串以指定将在服务器标头中传回的内容。如果将 RemoveServerHeader 设置为 1,则此选项将被忽略。AlternateServerName=
[RequestLimits]
;
; The entries in this section impose limits on the length
; of allowed parts of requests reaching the server.
;
; It is possible to impose a limit on the length of the
; value of a specific request header by prepending “Max-” to the
; name of the header. For example, the following entry would
; impose a limit of 100 bytes to the value of the
; ‘Content-Type’ header:
;
; Max-Content-Type=100
;
; To list a header and not specify a maximum value, use 0
; (ie. ‘Max-User-Agent=0′). Also, any headers not listed
; in this section will not be checked for length limits.
;
; There are 3 special case limits:
;
; – MaxAllowedContentLength specifies the maximum allowed
; numeric value of the Content-Length request header. For
; example, setting this to 1000 would cause any request
; with a content length that exceeds 1000 to be rejected.
; The default is 30000000.
;
; – MaxUrl specifies the maximum length of the request URL,
; not including the query string. The default is 260 (which
; is equivalent to MAX_PATH).
;
; – MaxQueryString specifies the maximum length of the query
; string. The default is 2048.
;; 以下三行注掉的是默认配置
;MaxAllowedContentLength=30000000
;MaxUrl=260
;MaxQueryString=2048; 此段落中的条目对到达服务器的允许的请求部分的长度进行限制。
MaxAllowedContentLength=2000000000
MaxUrl=16384
MaxQueryString=4096[AllowVerbs]
;
; The verbs (aka HTTP methods) listed here are those commonly
; processed by a typical IIS server.
;
; Note that these entries are effective if “UseAllowVerbs=1″
; is set in the [Options] section above.
;GET
HEAD
POST[DenyVerbs]
;
; The verbs (aka HTTP methods) listed here are used for publishing
; content to an IIS server via WebDAV.
;
; Note that these entries are effective if “UseAllowVerbs=0″
; is set in the [Options] section above.
;PROPFIND
PROPPATCH
MKCOL
DELETE
PUT
COPY
MOVE
LOCK
UNLOCK
OPTIONS
SEARCH[DenyHeaders]
; 此节列出 HTTP 请求中不允许的 HTTP 标头。如果 HTTP 请求中包含此节中列出的 HTTP 标头之一,URLScan 将拒绝该请求。
; The following request headers alter processing of a
; request by causing the server to process the request
; as if it were intended to be a WebDAV request, instead
; of a request to retrieve a resource.
;Translate:
If:
Lock-Token:
Transfer-Encoding:[AllowExtensions]
; 此节定义 URLScan 允许的文件扩展名。
; Extensions listed here are commonly used on a typical IIS server.
;
; Note that these entries are effective if “UseAllowExtensions=1″
; is set in the [Options] section above.
;.htm
.html
.txt
.jpg
.jpeg
.gif[DenyExtensions]
; 此节定义 URLScan 拒绝的文件扩展名。
; Extensions listed here either run code directly on the server,
; are processed as scripts, or are static files that are
; generally not intended to be served out.
;
; Note that these entries are effective if “UseAllowExtensions=0″
; is set in the [Options] section above.
;
; Also note that ASP scripts are denied with the below
; settings. If you wish to enable ASP, remove the
; following extensions from this list:
; .asp
; .cer
; .cdx
; .asa
;; Deny ASP requests
.cer
.cdx; Deny executables that could run on the server
.exe
.bat
.cmd
.com; Deny infrequently used scripts
.htw ; Maps to webhits.dll, part of Index Server
.ida ; Maps to idq.dll, part of Index Server
.idq ; Maps to idq.dll, part of Index Server
.htr ; Maps to ism.dll, a legacy administrative tool
.idc ; Maps to httpodbc.dll, a legacy database access tool
.printer ; Maps to msw3prt.dll, for Internet Printing Services; Deny various static files
.ini ; Configuration files
.log ; Log files
.pol ; Policy files
.dat ; Configuration files[DenyUrlSequences]
; 此节列出 HTTP 请求中不允许的字符串。URLScan 拒绝那些包含此节中出现的字符串的 HTTP 请求。
.. ; Don’t allow directory traversals
./ ; Don’t allow trailing dot on a directory name
\ ; Don’t allow backslashes in URL
: ; Don’t allow alternate stream access
% ; Don’t allow escaping after normalization
& ; Don’t allow multiple CGI processes to run on a single request