Windows IIS server hardening checklist
General
Accounts
Files and Directories
Shares
Ports
Registry
Auditing and Logging
Sites and Virtual Directories
Script Mappings
ISAPI Filters
IIS Metabase
Server Certificates
Machine.config
General
1. Do not connect an IIS Server to the Internet until it is fully hardened.
2. Place the server in a physically secure location.
3. Do not install the IIS server on a domain controller.
4. Do not install a printer.
5. Use two network interfaces in the server -- one for admin and one for the network.
6. Install service packs, patches and hot fixes.
7. Run IISLockdown run on the server.
8. Install and configure URLScan.
9. Secure remote administration of the server and configure for encryption, low session time-outs and account lockouts.
10. Disable unnecessary Windows services.
11. Ensure services are running with least-privileged accounts.
12. Disable FTP, SMTP and NNTP services if they are not required.
13. Disable Telnet service.
14. Disable ASP.NET state service if not used by your applications.
15. Disable webDAV if not used by the application, or secure it if it is required. (See How To: Create a secure webDAV Publishing Directory at support.microsoft.com.)
16. Do not install Data Access Components unless specifically needed.
17. Do not install the HTML version of the Internet Services Manager.
18. Do not install the MS Index Server unless required.
19. Do not install the MS FrontPage Server extensions unless required.
20. Harden TCP/IP stack.
21. Disable NetBIOS and SMB (closing ports 137, 138, 139 and 445).
22. Reconfigure Recycle Bin and Page file system data policies.
23. Secure CMOS settings.
24. Secure physical media (floppy drive, CD-ROM drive and so on).
Accounts
1. Remove unused accounts from the server.
2. Disable Windows Guest account.
3. Rename Administrator account and set a strong password.
4. Disable IUSR_MACHINE account if it is not used by the application.
5. Create a custom least-privileged anonymous account if applications require anonymous access.
6. Do not give the anonymous account write access to Web content directories or allow it to execute command-line tools.
7. If you host multiple Web applications, configure a separate anonymous user account for each one.
8. Configure ASP.NET process account for least privilege. (This only applies if you are not using the default ASP.NET account, which is a least-privileged account.)
9. Enforce strong account and password policies for the server.
10. Restrict remote logons. (The "Access this computer from the network" user-right is removed from the Everyone group.)
11. Do not share accounts among administrators.
12. Disable Null sessions (anonymous logons).
13. Require approval for account delegation.
14. Do not allow users and administrators to share accounts.
15. Do not create more than two accounts in the Administrators group.
16. Require administrators to log on locally or secure the remote administration solution.
Files and Directories
1. Use multiple disks or partition volumes and do not install the Web server home directory on the same volume as the operating system folders.
2. Contain files and directories on NTFS volumes.
3. Put Web site content on a non-system NTFS volume.
4. Create a new site and disable the default site.
5. Put log files on a non-system NTFS volume but not on the same volume where the Web site content resides.
6. Restrict the Everyone group (no access to \WINNT\system32 or Web directories).
7. Ensure Web site root directory has deny write ACE for anonymous Internet accounts.
8. Ensure content directories have deny write ACE for anonymous Internet accounts.
9. Remove remote IIS administration application (\WINNT\System32%#92;Inetsrv\IISAdmin).
10. Remove resource kit tools, utilities and SDKs.
11. Remove sample applications (\WINNT\Help\IISHelp, \Inetpub\IISSamples).
12. Remove IP address in header for Content-Location.
Shares
1. Remove all unnecessary shares (including default administration shares).
2. Restrict access to required shares (the Everyone group does not have access).
3. Remove Administrative shares (C$ and Admin$) if they are not required (Microsoft Management Server (SMS) and Microsoft Operations Manager (MOM) require these shares).
Ports
1. Restrict Internet-facing interfaces to port 80 (and 443 if SSL is used).
2. Run IISLockdown run on the server.
Registry
1. Restrict remote registry access.
2. Secure SAM (HKLM\System\CurrentControlSet\Control\LSA\NoLMHash). This applies only to standalone servers.
Auditing and Logging
1. Audit failed logon attempts.
2. Relocate and secure IIS log files.
3. Configure log files with an appropriate file size depending on the application security requirement.
4. Regularly archive and analyze log files.
5. Audit access to the Metabase.bin file.
6. Configure IIS for W3C Extended log file format auditing.
7. Read How to use SQL Server to analyze Web logs at support.microsoft.com
Sites and Virtual Directories
1. Put Web sites on a non-system partition.
2. Disable "Parent paths" setting.
3. Remove potentially dangerous virtual directories including IISSamples, IISAdmin, IISHelp and Scripts.
4. Remove or secure MSADC virtual directory (RDS).
5. Do not grant included directories Read Web permission.
6. Restrict Write and Execute Web permissions for anonymous accounts in virtual directories.
7. Ensure there is script source access only on folders that support content authoring.
8. Ensure there is write access only on folders that support content authoring and these folders are configured for authentication (and SSL encryption, if required).
9. Remove FrontPage Server Extensions (FPSE) if not used. If FPSE are used, update and restrict access to them.
10. Remove the IIS Internet Printing virtual directory.
Script Mappings
1. Map extensions not used by the application to 404.dll (.idq, .htw, .ida, .shtml, .shtm, .stm, idc, .htr, .printer).
2. Map unnecessary ASP.NET file type extensions to "HttpForbiddenHandler" in Machine.config.
ISAPI Filters
1. Remove from the server unnecessary or unused ISAPI filters.
IIS Metabase
2. Restrict access to the metabase by using NTFS permissions (%systemroot%\system32\inetsrv\metabase.bin).
3. Restrict IIS banner information (Disable IP address in content location).
Server Certificates
1. Ensure certificate date ranges are valid.
2. Only use certificates for their intended purpose (For example, the server certificate is not used for e-mail).
3. Ensure the certificate's public key is valid, all the way to a trusted root authority.
4. Confirm that the certificate has not been revoked.
Machine.config
1. Map protected resources to HttpForbiddenHandler.
2. Remove unused HttpModules.
3. Disable tracing.
4. Turn off debug compiles.
No comments:
Post a Comment