UrlScan.ini配置文件

微软给了我们一个很好的工具用来使IIS安全的运行,这个工具是iislockdown,里面有个工具UrlScan,下面是它的配置文件

[options]
UseAllowVerbs=1 ; 若为1,则使用[AllowVerbs]部分定义的方法,否则使用[DenyVerbs]部分定义的方法
UseAllowExtensions=0 ; 若为1,则使用[AllowExtensions]部分定义的扩展名,否则使用[DenyExtensions]部分定义的扩展名
NormalizeUrlBeforeScan=1 ; if 1, canonicalize URL before processing
VerifyNormalization=1 ; if 1, canonicalize URL twice and reject request if a change occurs
AllowHighBitCharacters=0 ; if 1, allow high bit (ie. UTF8 or MBCS) characters in URL
AllowDotInPath=0 ; if 1, allow dots that are not file extensions
RemoveServerHeader=0 ; 若为1,则移除IIS的server标头
EnableLogging=1 ; 若为1,则开启urlscan日志功能
PerProcessLogging=0 ; if 1, the UrlScan.log filename will contain a PID (ie. UrlScan.123.log)
AllowLateScanning=0 ; 若为1,则urlscan以低优先级启动
PerDayLogging=1 ; 若为1,则UrlScan将以UrlScan.010101.log这样每日的形式生成日志
RejectResponseUrl= ; UrlScan将发送拒绝请求到指定的URL,默认是/<Rejected-by-UrlScan>
UseFastPathReject=0 ; 若为1,则UrlScan将不会使用上面的RejectResponseUrl或允许IIS记录该请求

; If RemoveServerHeader is 0, then AlternateServerName can be
; used to specify a replacement for IIS's built in 'Server' header
;则RemoveServerHeader = 0,则可以使用下面字符串替换IIS的server头部
AlternateServerName=

[AllowVerbs]

;IIS中一般支持的方法
;当上面的 UseAllowVerbs = 1 时下面的才有效
;

GET
HEAD
POST

[DenyVerbs]

;
;当使用WebDAV发布内容到IIS 服务器上时,下面的方法将会使用
;当上面的 UseAllowVerbs = 0 时下面的才有效
;

PROPFIND
PROPPATCH
MKCOL
DELETE
PUT
COPY
MOVE
LOCK
UNLOCK
OPTIONS
SEARCH

[DenyHeaders]

;
; 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:

[AllowExtensions]

;
;允许使用的扩展名
;当上面的 UseAllowExtensions = 1 时有效
;

.asp
.cer
.cdx
.asa
.htm
.html
.txt
.jpg
.jpeg
.gif

;.idq
;.htw
;.ida
;.idc
;.shtm
;.shtml
;.stm
;.htr
;.printer
[DenyExtensions]

;
;不允许使用的扩展名
;当上面的 UseAllowExtensions = 0 时有效
;

; 阻止可执行文件的执行
.exe
.bat
.cmd
.com

; 阻止比较少用的脚本
.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
.shtm ; Maps to ssinc.dll, for Server Side Includes
.shtml ; Maps to ssinc.dll, for Server Side Includes
.stm ; Maps to ssinc.dll, for Server Side Includes
.printer ; Maps to msw3prt.dll, for Internet Printing Services

; 组织对各类静态文件的讨论,可以加入.mdb、.inc等后缀
.ini ; Configuration files
.log ; Log files
.pol ; Policy files
.dat ; Configuration files

;.asp
;.cer
;.cdx
;.asa
[DenyUrlSequences]
.. ; 不允许目录遍历
./ ; Don't allow trailing dot on a directory name
\ ; 不允许反斜杠出现在URL中
: ; Don't allow alternate stream access
% ; Don't allow escaping after normalization
& ; 在单一的请求上不允许多个CGI进程运行

XeonWell Studio