Xato has release an interesting paper on the relevance of the IIS hardening document that were release by NSA. Once again it proves that you should not rely on a single source of information, if you do, then ensure that it is right. The documents from NSA still provides a very good basis but they are not the only resource in securing your IIS server.
Click on Read More below for the full story.
Last week the National Security Agency (NSA) released a series of documents on the subject of Windows 2000 security. Since we at Xato (www.xato.net) focus so much on IIS security, we were anxious to see what the world's most elite intelligence agency had to share. As we dove into the IIS document we were quite disappointed with what we found. Instead of discovering a wealth of information in these recently unclassified documents, we found a largely inadequate and sometimes incorrect security guide.
The NSA, according to Executive Order 12333, has a twofold mission. The first of these is to "...achieve information assurance for information
infrastructures critical to U.S. national security interests." It is the
biggest spender in the U.S. government and is considered the most secret government agency. But has the NSA lost its technological edge in the battlefield of internet security?
With billion dollar budgets, we would expect the NSA to be able to give this author of this document the resources to properly research and produce a report worthy of their agency. Some may say we are being too critical of this paper and perhaps if it came from anyone else we would not bother with this commentary. BUT THIS IS THE NSA. We would expect (and want) them to at least be better than us.
This commentary only covers the IIS document, as we have not yet had a chance (and are somewhat afraid) to review the rest. Overall, we found the document to be of fair quality but we noted some significant problems. Here are some examples:
On page 4 of the document (page 20 in the PDF) there is a "...list of
services that are not required for most installations of IIS 5.0..." For the
most part we agreed with the list but we felt there are a number of other
services that should not be enabled on an IIS web server. Some of these are the Fax Service, Internet Connection Sharing, Telnet, and NetMeeting Remote Desktop Sharing to name a few. We also wanted to note that disabling Logical Disk Manager prevents disk management from the Computer Management MMC and disabling Plug and Play can cause some very slow Windows startup times. Service configuration on an IIS server is very important (and takes much research and practice to get right) but the NSA document was very incomplete on this subject.
On page 8 (page 24 in the PDF) Table 1 shows some recommended NTFS and IIS permissions. There are several things we disagree with here. First, we noticed right away that it mentions using .cmd files in executable directories. For a number of reasons, it is best practice to not put any batch files in a web directory. Next, we noticed that it recommends giving script and executable directories "Read & Script" permissions. Read permissions are not required or advised and this recommendation contradicts Chapter 4, which states several times not to assign read permissions to the scripts directory. We questioned some of the other permissions but until we fully test our suspicions, we will not comment further on this.
On page 12 (page 28 in the PDF) it talks about securing the IIS metabase. We felt that an entire page devoted to protecting the metabase (which is already very well protected by default) is sending people in the wrong direction. If someone has enough rights to stop the IIS service and replace the metabase file, you mostly likely have much more to be concerned about than your metabase getting modified. Later in the paragraph it says "To reinforce access control to this file, it is recommended that this file be hidden from unauthorized users. Moving or renaming the file can accomplish this security measure." We found that disturbing as it is attempting to establish the hiding of the file as a security measure. If someone has enough access to modify the metabase file, they certainly have enough access to open the registry and view the key (which btw, is incorrect in the document, there is no space) to discover where the metabase is located. We have no idea why the NSA would make such a ridiculous recommendation and we
certainly hope that they are not protecting their own servers in such a
manner. We found several other security-through-obscurity recommendations throughout the document. We realize that obscurity has played a big role in the success of the NSA but it just doesn't work when it comes to internet security.
On pages 5 and 30 (pages 21 and 46 in the PDF) it mentions removing the Log On As Batch Job and Access This Computer From The Network permissions for the IUSR account. This is simply bad advice because if you have the Allow IIS to Control Password option checked (which is checked by default), you will need the Access This Computer From The Network privilege. This privilege is required because authentication is delegated to IISSUBA.DLL, which uses a network logon to authenticate. Conversely, if you have that option unchecked, you will need the Logon Locally privilege.
On page 38 (page 54 in the PDF) it is talking about the Application
Configuration settings in the IIS MMC snap-in. The documents states that "Discussions in this document focus on the security relevant settings, which are limited to the App Options and Process Options dialog boxes..." This sentence implies that he App Mappings tab in the Application Configuration dialog box is not relevant to security. However, many IIS vulnerabilities (especially the most interesting ones) are attacks on default extension mappings in IIS. Extensions such as .htr, .htw, .idc, .idq, and .printer should not be mapped on a production web server unless that server actually makes use of those extensions. To their credit, they do mention script mappings somewhat in Chapter 4 (although hiding the metabase got more coverage) but we felt that this is a serious security issue and that App Mappings should be considered "security relevant settings."
We found numerous other contradictions, omissions, and poor recommendations in the document leading us to the conclusion that it should NOT be used as the basis for securing an IIS web server. Certainly it contains some valuable information but it should only be used as a supplement to the many other documents and books available. Frankly it scares us that the agency commissioned to protect the United States has produced such a poor document. We hope that this is not the best work our tax dollars can produce. We also hope that other government agencies do not rely on this document alone to
protect themselves. It is bad enough that so many corporate IT personnel are completely incompetent, but to see such poor work coming from the NSA makes us wonder who can really protect us. We write this in hopes that an agency that has an annual electric bill exceeding $21 million will redirect some of that energy into producing some more impressive security knowledge. Perhaps even do some research on their own and produce some new knowledge
that we haven't all seen before. After all, you are the NSA.
Part of the reason we are so bothered by this security guide is because
security advice has a tendency to propagate through other security
documents. These recommendations will be blindly recommended by others and eventually we have these recommendations and no one is really sure why we have them. I would bet that the recommendation to hide the metabase appears in IIS security documents for years to come. The security community over the years has developed a collective knowledge of security practices. Every new document that is produced contributes to that knowledge, even if that knowledge is flawed. An agency with as much influence as the NSA should
certainly be more careful with the knowledge they share.
.sozni