Technical instruction - IIS security settings
Prevent directory traversal
Make sure that the short file name is not allowed on the server. This is achieved by editing the registry.
Search regedit in windows server
Go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
Find key NtfsDisable8dot3NameCreation
Double click to set the value to 1
This will prohibit hackers to do directory traversal with short file name.
Set IIS URL filtering
Set up IIS to filter URLs on forbidden characters.
Open IIS- Double click request filtering.
Add deny sequence (eg. tilde, backslash etc) for the url
Denying Specific File Extensions in Request Filtering
Open IIS Manager:
Launch IIS Manager and navigate to the site or server where you want to apply the restriction.
Access Request Filtering:
Double-click on Request Filtering in the features view.
Add a Deny Rule:
In the right-hand panel, click Edit Feature Settings.
Under the File Name Extensions tab:
Click Deny File Name Extension in the right-hand panel.
Enter the file extension (e.g.,
.exe
,.bat
,.cmd
).Click OK to apply.
Repeat for Additional Extensions:
Repeat the process to deny other file extensions as needed.
IIS error pages not to display error information
Go to the error pages - double click
For the error code click edit feature code and then check custom error pages instead of detail error page and select the custom error page location.