Product Security Team
This article lists recommendations and best practices for securing servers on the web running Microsoft Windows Server 2003 and Macromedia ColdFusion MX 7. This is not a comprehensive host-hardening guide for Windows 2003. Instead, this article describes a variety of security-hardening settings that you should implement to enhance the security of ColdFusion MX 7 running on IIS 6.0 servers that host HTML content within a corporate intranet. To ensure that the ColdFusion application servers stay secure, however, you should also implement security monitoring, detection, and response procedures.
I wrote this article primarily for consultants, security specialists, systems architects, and IT professionals who are responsible for planning application or infrastructure development and deployment of ColdFusion MX 7 running on IIS 6.0. These roles include the following common job descriptions:
To read this article from a conceptual point of view, you do not need to download and install ColdFusion MX 7. However, to implement the recommended security settings while reading along, you must download and install ColdFusion MX 7.
Network security vulnerabilities are among the first threats to any Internet- or intranet-facing application server. This section deals with the process of hardening hosts on the network against these vulnerabilities. It addresses network segmentation, TCP/IP stack hardening, and the use of firewalls for host protection.
| Standard | Place ColdFusion servers within a demilitarized zone (DMZ). |
|---|---|
| Description | Segmentation should exist in at least two levels for web servers. Separate the external network from the DMZ that contains the web servers, which in turn must be separated from the internal network. Use firewalls to implement the layers of separation. Categorize and control the traffic that passes through each network layer to ensure that only the absolute minimum of required data is allowed. |
| Standard | Use Network Address Translation (NAT) with RFC 1918 private IP addresses on ColdFusion application servers. |
| Description | Assign private IP addresses (10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16) to make it more difficult for an attacker to route traffic to and from a NAT'd internal host through the Internet. |
| Standard | Use a firewall to protect exposed network perimeters. |
| Description | Use the following criteria to select a firewall solution:
|
| Standard | Do not use default listening ports for databases (Oracle – 1521, MS SQL – 1433) |
| Description | See the database documentation. |
By configuring many of the Windows 2003 systemwide settings through the Group Policy Objects, you do not have to configure Registry settings manually for servers on the same domain. However, you should install web servers as stand-alone servers, not as members of the organization's domain. Using stand-alone servers potentially limits the scope of a security breach to a single computer. To apply policy changes to multiple servers, use either scripts or a DMZ-only domain.
| Standard | Install only necessary IIS services. |
|---|---|
| Description | Service vulnerabilities are used by attackers to compromise systems. The more services that are installed on the server, the more vulnerabilities that may be exploited. IIS has the option to install WWW Service, IIS Admin, FTP, NNTP, and SMTP. FTP and NNTP should not be installed on a dedicated ColdFusion server. Also, if no application needs the ability to send and receive e-mail locally, SMTP should not be installed. |
| Standard | Install all necessary security patches in Windows 2003. |
| Description | There is an increased risk that an unauthorized user may gain access to the application server if vendor security patches and upgrades are not applied in a timely fashion. Test patches before applying them to production servers. Create policy and procedures to check for and install patches on a regular basis. |
| Standard | Apply the High Security Member Server Baseline Policy (MBSP). |
| Description | Download the Windows Server 2003 Security Guide. The guide includes three policy templates; one is the High Security template. Apply only the High Security template to the IIS server prior to installing ColdFusion. After applying the template, you must modify the following settings to allow IIS to run properly: Under User Rights Assignments:
Under System Services:
|
| Standard | Change or remove the web server banner. |
| Description | Modifying the IIS banner has some potential benefits if automated attack scripts that launch exploits against a server are based on the banner. Changing the banner obscures the kind of web server that the attacker is connected to. To remove the banner, set the following Registry key: HLM\SYSTEM\CurrentControlSet\Services\HTTP\Parameters\DisableServerHeader to 1 |
| Standard | Place IIS content on a dedicated NTFS disk partition. |
| Description | Disk segmentation is a process of keeping specific data on your server on separate physical disks for added security. Arranging data in this way reduces the risk of directory traversal attacks. Move the IIS inetpub or wwwroot directory to a partition different from the system (contains system32 directory) or boot partition. |
| Standard | Install and configure virus protection software. |
| Description | Virus scanners can identify infected files by scanning for a signature or watching for anomalous behavior. Scanners keep their virus signatures in a file, which is usually stored on the local hard drive. Because new viruses are discovered often, you should frequently update this file for the virus scanner to identify all current viruses. |
| Standard | Use Network Time Protocol (NTP) in a secure fashion. |
| Description | For forensic analysis, keep accurate time on ColdFusion servers. Use NTP to synchronize the time on all systems that are connected directly to the Internet. Figure 1 shows how to configure Internet time in Windows Server 2003 to time.nist.gov.
Figure 1. Configuring Internet time in Windows Server 2003 |
Now that you have hardened Windows 2003, you can install ColdFusion on the server. Whether you are new to ColdFusion or a seasoned veteran, the installation process is straightforward. Remember that this article describes installing ColdFusion MX 7 on IIS 6.0 only.
Even before running the application installer, it is important to check the integrity of the installer and server. Maintain best practices throughout the entire installation process to ensure a secure deployment.
| Standard | Log in with the least privileges. |
|---|---|
| Description | Log in to your computer using an account that is not in the Administrators group, and use the Run As command to run the ColdFusion installer. |
| Standard | Do not download or run ColdFusion from sources you distrust. |
| Description | Malicious programs can contain code to violate security in several ways, including data theft, modification and deletion, and denial of service. |
During installation many options are available that can either increase or decrease the security posture of ColdFusion. This section describes guiding principles to increase the security of your installed ColdFusion server on IIS.
| Standard | Do not enable RDS. |
|---|---|
| Description | Macromedia does not recommend enabling RDS for production servers. For more information, see "Disable RDS in production environment." If RDS is required for your organization, create a strong RDS password. |
| Standard | Use strong RDS and ColdFusion Administrator passwords. |
| Description | Ensure that passwords are not easily guessable (for example, words in a dictionary or variations of the user name); do not pertain directly to a user's family or personal interests; and contain both letters and numbers. Passwords for normal system users are a minimum of six characters. Passwords for privileged users are a minimum of eight characters. If your organization uses a stronger password policy than this one, by all means continue using those guidelines. |
| Standard | Place ColdFusion content on a dedicated NTFS disk partition. |
| Description | Disk segmentation is a process that keeps specific data on your server on separate physical disks for added security. Arranging data in this way reduces the risk of directory traversal attacks. Move ColdFusion content directory to a partition different from the system partition, which contains the system32 directory, or boot partition. |
| Standard | Disable unnecessary sub-components |
| Description | Three sub-component options are available with the ColdFusion installer:
|
The following section describes in detail the different tasks recommended to harden your installed ColdFusion MX 7 server. ColdFusion is highly customizable and can work in many different environments. Even though some of the recommendations may not fit your organization's needs, it is important to understand the security implications of improperly configuring a public web server.
The following recommended settings apply to the ColdFusion server outside of the Administrative web application (cfide\administrator). To reduce the security risks to the server, apply these setting immediately after installing ColdFusion.
| Standard | Install necessary security patches for ColdFusion. |
|---|---|
| Description | There is an increased risk that an unauthorized user may gain access to the application server if vendor security patches and upgrades are not applied in a timely fashion. Test patches before applying them to production servers to ensure compatibility and availability of ColdFusion applications. In addition, create policies and procedures to check for, and install, patches on a regular basis. You can find ColdFusion updates by visiting the ColdFusion Support Center. |
| Standard | Remove the cfdocs virtual directory. |
| Description | Sample applications are installed by default in the cfdocs virtual directory and are accessible to anyone. These applications should never be available on a production server:
|
| Standard | Restrict access to the cfide virtual directory to specific IP address and NT user accounts. |
| Description | The administrative CFIDE web application is installed by default and grants access to everyone. The only protection offered by the application is a password field. That means an attacker needs only to guess your password to gain administrative rights to your ColdFusion application server:
|
| Standard | Disable unnecessary system services on the host. |
| Description | After installation, ColdFusion creates default system services that are configured to run when the system starts. Many of these services are not required in every ColdFusion deployment. The following services are either required or optional to run ColdFusion MX 7: ColdFusion MX 7 Application Server (Required) ColdFusion MX 7 Search Server (Optional) |
| Standard | Create a ColdFusion service account. |
| Description | ColdFusion installs this account by default using the LocalSystem account. The built-in LocalSystem user account has a high level of accessibility; it is part of the Administrators group. If a worker process identity runs as the LocalSystem user account, that worker process has full access to the entire system. To run the ColdFusion MX 7 application server using a specific non-administrative account, follow these instructions:
|
| Standard | Disable unused web service extensions. |
| Description | If the server is used exclusively for ColdFusion, disable all other web extensions using the IIS Manager (see Figure 2).
Figure 2. IIS Manager |
The proper and secure use of application auditing and logging can help ensure that security and other anomalous events are tracked and detected as quickly as possible. Effective use of auditing and logging within an application includes such items as tracking successful and failed logins, as well as key application events such as the creation or deletion of key records.
You can use auditing to detect many types of attacks, including the following:
| Standard | Create logging event sources during deployment, not programmatically through application code. |
|---|---|
| Description | Creating an event source requires administrative privileges. Do not grant these privileges to a running application process. Instead, in the deployment procedure of an application, document a stand-alone script that is necessary to create the new event sources. An administrator executes this script once. Once the event source is created, the script is no longer necessary; remove it from the system. |
| Standard | Set appropriate ColdFusion log file access control lists (ACLs). |
| Description | Setting the appropriate credentials helps prevent attackers from deleting the files to cover their tracks. The security permissions on the log file directory should be Full Control for Administrators and SYSTEM groups. The ColdFusion user account should have read and write permissions only. |
| Standard | Set appropriate IIS log file ACLs. |
| Description | Setting the appropriate credentials helps prevent attackers from deleting the files to cover their tracks. Make sure the ACLs on the IIS-generated log files (%systemroot%\system32\LogFiles) are set appropriately. The permissions are set as secure by default in Windows 2003 Server; therefore, no modification is needed. The security permissions on the log file directory should be Full Control for Administrators and SYSTEM groups. |
| Standard | Write logs to a separate server. |
| Description | If resources permit, send logs to another server in real time that is not accessible by the attacker (write only), using Syslog, Tivoli, MOM (Microsoft Operations Manager) Server, or some other mechanism. Protecting logs this way helps prevent tampering. In addition, storing logs in a central repository helps you correlate and monitor—for example, when you use multiple ColdFusion servers and someone attempts a password-guessing attack across multiple machines where the hacker queries each machine for a password. |
The following section describes most of the security-related options available in the ColdFusion Administrator. If the Administrator is unavailable, you can modify these options by editing the XML files in the cf_root\lib\ directory. However, editing these files directly is not recommended. After modifying these options, you must restart the ColdFusion server. If you don't, none of your changes will take effect.
| Standard | Server Setting > Settings > Time Requests |
|---|---|
| Description | Set timeout requests to a maximum of 30 seconds to help prevent coding errors from becoming a denial of service issue. If there is an application that must run longer, you can specify <cfsetting requesttimeout="<seconds>"> to override this administrative setting. |
| Standard | Server Setting > Settings > Enable Use UUID for cftoken |
| Description | A UUID guarantees a unique identifier for the token. This reduces the risk of session ID collisions, which makes it harder for an attacker to gain access to a valid session. |
| Standard | Server Setting > Settings > Enable Global Script Protection |
| Description | Select the Global Script Protection option. This is a new security feature in ColdFusion MX 7 that isn't available in other web application platforms. It helps protect Form, URL, CGI, and Cookie scope variables from cross-site scripting attacks. |
| Standard | Server Setting > Settings > Specify a Sitewide Error Handler |
| Description | Prevent information leaks through verbose error messages. Specifying a sitewide error handler covers you when cftry/cfcatch are not used. This page should be a generic error message that you return to the user. Also, if the error handler displays user input, it should be reviewed for potential cross-site scripting issues. |
| Standard | Server Settings > Memory Variables > Use J2EE Session Variables |
| Description | Enable the Use J2EE Session Variables option. ColdFusion provides two types of session management: its own proprietary means and through J2EE. J2EE sessions provide the following security and performance related features in ColdFusion:
|
| Standard | Server Setting > Memory Variables > Maximum Timeout > Session |
| Description | Set the maximum session timeout to 20 minutes to limit the window of opportunity for session hijacking. |
| Standard | Server Setting > Memory Variables > Default Timeout > Session |
| Description | Set the default session timeout to 20 minutes to limit the window of opportunity for session hijacking. (The default value is 20 minutes.) |
| Standard | Server Setting > Memory Variables > Maximum Timeout > Application |
| Description | Set the maximum application timeout to 24 hours. |
| Standard | Server Setting > Memory Variables > Default Timeout > Application |
| Description | Set the default application timeout to 8 hours. |
| Standard | Server Settings > Mail > Mail Server |
| Description | Require a user name and password to authenticate to your mail server. |
| Standard | Server Settings > Mail > Connection Timeout |
| Description | Set the connection timeout to 60 seconds (The default value is 60 seconds.) |
| Standard | Data & Services > Data Sources |
| Description | Do not use an administrative account to connect ColdFusion to a data source. For example, do not use SA account to connect to Microsoft SQL Server. The account accessing the database should be granted specific privileges to the objects it needs to access. In addition, the account created to connect the database should be Windows-based, not a SQL account. Windows accounts have many more auditing, password, and other security controls associated with them. For example, account lockouts and password complexity requirements are built into Windows. However, a database would need custom code to handle these security-related tasks. |
| Standard | Data & Services > Data Sources |
| Description | Disable the following AllowedSQL options for all data sources:
As an administrator, you do not have control over what a developer sends to the database. However, there should be no circumstance where the previous commands need to be sent to an SQL server from a web application. Restricting database queries to parameterized stored procedures or query strings (using the |
| Standard | Debugging & Logging > Debugging Settings > Enable Robust Exception Information |
| Description | Disable this option for production servers. (Default) |
| Standard | Debugging & Logging > Debugging Settings > Enable Debugging |
| Description | Disable this option for production servers. (Default) |
| Standard | Debugging & Logging > Logging Settings > Log directory |
| Description | As a defensive measure, store log files in a different location than the default location. This obfuscates the whereabouts of the log files from an attacker. |
| Standard | Security > Sandbox Security > Enable ColdFusion Security |
| Description | The ColdFusion sandbox allows you to place access security restrictions on files, directories, methods, and data sources. Sandboxes make the most sense for a hosting provider or corporate intranet where multiple applications share the same server. First, select this option. Next, configure a sandbox. If you don't, all code in all directories can execute without restriction. Code in a directory and its subdirectories inherits the access controls defined for the sandbox. For example, if ABC company creates multiple applications within a directory, all applications have the same permissions as the parent. A sandbox applied to ABC-apps applies to app1 and app2. The following is a sample directory structure: D:\inetpub\wwwroot\ABC-apps\app1 D:\inetpub\wwwroot\ABC-apps\app2 Note: If you create a new sandbox for app2, it does not inherit settings from ABC-apps. Sandbox security configurations are application-specific; however, there are general guidelines to follow:
For more information on sandbox security, see the ColdFusion LiveDocs. |
After the server is properly configured and your application is developed, you must securely deploy the application to the production server. The following section describes some recommendations for publishing content to your hardened ColdFusion server.
| Standard | Disable RDS in a production environment. |
|---|---|
| Description | In production environments, you should not use RDS. In earlier versions of ColdFusion, RDS ran as a separate service or process and could be disabled by disabling the service. In ColdFusion MX 7, RDS is integrated into the main service. To disable it, you must disable the RDSServlet mapping in the web.xml file. The following procedure assumes that ColdFusion is installed in the default location:
|
| Standard | Use RDS over SSL. |
| Description | During development, you should use SSL v3 to encrypt all RDS communications between Dreamweaver MX and the ColdFusion server. This includes remote access to server data sources and drives, provided that both are accessed through RDS. |
| Standard | Use SFTP for remote file transfer. |
| Description | The SSH protocol suite comes with SFTP, an encrypted replacement of FTP. Dreamweaver MX supports SFTP. Unfortunately, Windows 2003 Server does not include the SSH server. You can install the SSH server using one of several commercial and free software packages. OpenSSH is a free SSH server program, for example. |
| Standard | Ensure that FTP is disabled. |
| Description | FTP transfers unencrypted data and authentication credentials over the network. To reduce the risk of eavesdropping, you should not use FTP. FTP is disabled by default in IIS 6. Select Programs > Administration Tools > Internet Information Services (IIS) Manager to ensure that FTP is disabled or not installed. |
| Standard | Implement page encoding. |
| Description | ColdFusion MX includes a utility called cfencode, which obscures the source of ColdFusion pages that comprise an application. Although this technique cannot prevent determined hackers from reading the contents of a CFML page, it does prevent trivial inspection of the pages. |
| Standard | Configure NFTS permissions on web content. |
| Description | Although the following permissions are application-dependent, some general rules apply: File types: CGI (.exe, .dll, .cmd, .pl) File types: Scripts (.cfm, .cfml, .jsp, .asp, .aspx, , .sgml, .wml, and .etc) File types: Includes (.inc, .shtm, .shtml) File types: Static content (.txt, .gif, .jpg, .html, .xml) |
The following steps describe how to use "Run As" to start IIS Manager from the command line and from the Windows Start menu:
From the command prompt, type the following:
runas /user:administrative_accountname "mmc %systemroot%\system32\inetsrv\iis.msc"
You can also access the Run As command by using the Windows interface. Select Start > Programs > Administrative Tools > Internet Information Services (IIS) Manager. Right-click Internet Information Services Manager and select the options in the Run As dialog box (see Figure 3).

Figure 3. Accessing the Run As command in Windows
The following information sources were the latest available at the time of writing this article: