{"stig":{"title":"Apache Server 2.4 Windows Site Security Technical Implementation Guide","version":"2","release":"3"},"checks":[{"vulnId":"V-214365","ruleId":"SV-214365r960963_rule","severity":"medium","ruleTitle":"The Apache web server must not perform user management for hosted applications.","description":"User management and authentication can be an essential part of any application hosted by the web server. Along with authenticating users, the user management function must perform several other tasks such as password complexity, locking users after a configurable number of failed logons, and management of temporary and emergency accounts. All of this must be done enterprise-wide.\n\nThe web server contains a minimal user management function, but the web server user management function does not offer enterprise-wide user management, and user management is not the primary function of the web server. User management for the hosted applications should be done through a facility that is built for enterprise-wide user management, such as LDAP and Active Directory.","checkContent":"Interview the System Administrator (SA) about the role of the Apache web server.\n\nIf the web server is hosting an application, have the SA provide supporting documentation on how the application's user management is accomplished outside of the web server.\n\nIf the web server is not hosting an application, this is Not Applicable.\n\nIf the web server is performing user management for hosted applications, this is a finding.\n\nIf the web server is hosting an application and the SA cannot provide supporting documentation on how the application's user management is accomplished outside of the Apache web server, this is a finding.","fixText":"Reconfigure any hosted applications on the Apache web server to perform user management outside the web server.\n\nDocument how the hosted application user management is accomplished.","ccis":["CCI-000381"]},{"vulnId":"V-214367","ruleId":"SV-214367r960963_rule","severity":"medium","ruleTitle":"The Apache web server must allow the mappings to unused and vulnerable scripts to be removed.","description":"Scripts allow server-side processing on behalf of the hosted application user or as processes needed in the implementation of hosted applications. Removing scripts not needed for application operation or deemed vulnerable helps to secure the web server.\n\nTo ensure scripts are not added to the web server and run maliciously, script mappings that are not needed or used by the web server for hosted application operation must be removed.","checkContent":"Locate cgi-bin files and directories enabled in the Apache configuration via \"Script\", \"ScriptAlias\" or \"ScriptAliasMatch\", or \"ScriptInterpreterSource\" directives.\n\nIf any script is present that is not needed for application operation, this is a finding.","fixText":"Remove any scripts in cgi-bin directory if they are not needed for application operation.","ccis":["CCI-000381"]},{"vulnId":"V-214368","ruleId":"SV-214368r960963_rule","severity":"medium","ruleTitle":"Users and scripts running on behalf of users must be contained to the document root or home directory tree of the Apache web server.","description":"A web server is designed to deliver content and execute scripts or applications on the request of a client or user. Containing user requests to files in the directory tree of the hosted web application and limiting the execution of scripts and applications guarantees that the user is not accessing information protected outside the application's realm.\n\nThe web server must also prohibit users from jumping outside the hosted application directory tree through access to the user's home directory, symbolic links or shortcuts, or through search paths for missing files.","checkContent":"Review the &lt;'INSTALLED PATH'&gt;\\conf\\httpd.conf file and search for the following directive:\n\nDirectory\n\nFor every root directory entry (i.e., &lt;Directory /&gt;), verify the following exists. If it does not, this is a finding:\n\nRequire all denied\n\nIf the statement above is not found in the root directory statement, this is a finding.","fixText":"Edit the &lt;'INSTALLED PATH'&gt;\\conf\\httpd.conf file and set the root directory directive as follows:\n\nDirectory\n\nRequire all denied","ccis":["CCI-000381"]},{"vulnId":"V-214371","ruleId":"SV-214371r961041_rule","severity":"medium","ruleTitle":"Only authenticated system administrators or the designated PKI Sponsor for the Apache web server must have access to the Apache web servers private key.","description":"The web server's private key is used to prove the identity of the server to clients and securely exchange the shared secret key used to encrypt communications between the web server and clients.\n\nBy gaining access to the private key, an attacker can pretend to be an authorized server and decrypt the SSL traffic between a client and the web server.","checkContent":"If the Apache web server does not have a private key, this is Not Applicable.\n\nReview the private key path in the \"SSLCertificateFile\" directive. Verify only authenticated System Administrators and the designated PKI Sponsor for the web server can access the web server private key.\n\nIf the private key is accessible by unauthenticated or unauthorized users, this is a finding.","fixText":"Configure the Apache web server to ensure only authenticated and authorized users can access the web server's private key.","ccis":["CCI-000186"]},{"vulnId":"V-214372","ruleId":"SV-214372r1138072_rule","severity":"medium","ruleTitle":"Apache web server accounts accessing the directory tree, the shell, or other operating system functions and utilities must only be administrative accounts.","description":"As a rule, accounts on a web server are to be kept to a minimum. Only administrators, web managers, developers, auditors, and web authors require accounts on the machine hosting the web server. The resources to which these accounts have access must also be closely monitored and controlled. Only the system administrator needs access to all the system's capabilities, while the web administrator and associated staff require access and control of the web content and web server configuration files.","checkContent":"Review the web server documentation and configuration to determine what web server accounts are available on the server.\n\nIf any directories or files are owned by anyone other than root, this is a finding.\n\nIf non-privileged web server accounts are available with access to functions, directories, or files not needed for the role of the account, this is a finding.","fixText":"Limit the functions, directories, and files that are accessible by each account and role to administrative accounts and remove or modify non-privileged account access.","ccis":["CCI-001082"]},{"vulnId":"V-214373","ruleId":"SV-214373r1138073_rule","severity":"high","ruleTitle":"Anonymous user access to the Apache web server application directories must be prohibited.","description":"To properly monitor the changes to the web server and the hosted applications, logging must be enabled. Along with logging being enabled, each record must properly contain the changes made and the names of those who made the changes.\n\nAllowing anonymous users the capability to change the web server or the hosted application will not generate proper log information that can then be used for forensic reporting in the case of a security issue. Allowing anonymous users to make changes will also grant change capabilities to anybody without forcing a user to authenticate before the changes can be made.\n\nSatisfies: SRG-APP-000211-WSR-000031, SRG-APP-000380-WSR-000072","checkContent":"Obtain a list of the user accounts for the system, noting the privileges for each account.\n\nVerify with the System Administrator (SA) or the Information System Security Officer (ISSO) that all privileged accounts are mission essential and documented.\n\nVerify with the SA or the ISSO that all non-administrator access to shell scripts and operating system functions are mission essential and documented.\n\nIf undocumented privileged accounts are present, this is a finding.\n\nIf undocumented access to shell scripts or operating system functions is present, this is a finding.","fixText":"Ensure non-administrators are not allowed access to the directory tree, the shell, or other operating system functions and utilities.","ccis":["CCI-001082","CCI-001813"]},{"vulnId":"V-214374","ruleId":"SV-214374r1138074_rule","severity":"medium","ruleTitle":"The Apache web server must separate the hosted applications from hosted Apache web server management functionality.","description":"The separation of user functionality from web server management can be accomplished by moving management functions to a separate IP address or port. To further separate the management functions, separate authentication methods and certificates should be used.\n\nBy moving the management functionality, the possibility of accidental discovery of the management functions by non-privileged users during hosted application use is minimized.","checkContent":"Review the web server documentation and deployed configuration to determine whether hosted application functionality is separated from web server management functions.\n\nIf the functions are not separated, this is a finding.","fixText":"Configure Apache to separate the hosted applications from web server management functionality.","ccis":["CCI-001082"]},{"vulnId":"V-214376","ruleId":"SV-214376r1043180_rule","severity":"medium","ruleTitle":"Cookies exchanged between the Apache web server and client, such as session cookies, must have security settings that disallow cookie access outside the originating Apache web server and hosted application.","description":"Cookies are used to exchange data between the web server and the client. Cookies, such as a session cookie, may contain session information and user credentials used to maintain a persistent connection between the user and the hosted application since HTTP/HTTPS is a stateless protocol.\n\nWhen the cookie parameters are not set properly (i.e., domain and path parameters), cookies can be shared within hosted applications residing on the same web server or to applications hosted on different web servers residing on the same domain.","checkContent":"Review the &lt;'INSTALLED PATH'&gt;\\conf\\httpd.conf file.\n\nIf \"HttpOnly; secure\" is not configured, this is a finding.\n\nReview the code. If when creating cookies, the following is not occurring, this is a finding:\n\nfunction setCookie() { document.cookie = \"ALEPH_SESSION_ID = $SESS; path = /; secure\"; }","fixText":"Add this line to the \"httpd.conf\" file:\n\nHeader always edit Set-Cookie ^(.*)$ $1;HttpOnly;secure\n\nAdd the secure attribute to the JavaScript set cookie:\n\nfunction setCookie() { document.cookie = \"ALEPH_SESSION_ID = $SESS; path = /; secure\"; }\n\n\"HttpOnly\" cannot be used since by definition this is a cookie set by JavaScript.\n\nRestart www_server and Apache.","ccis":["CCI-001664"]},{"vulnId":"V-214380","ruleId":"SV-214380r961122_rule","severity":"medium","ruleTitle":"The Apache web server must augment re-creation to a stable and known baseline.","description":"Making certain that the web server has not been updated by an unauthorized user is always a concern. Adding patches, functions, and modules that are untested and not part of the baseline opens the possibility for security risks. The web server must offer, and not hinder, a method that allows for the quick and easy reinstallation of a verified and patched baseline to guarantee the production web server is up-to-date and has not been modified to add functionality or expose security risks.\n\nWhen the web server does not offer a method to roll back to a clean baseline, external methods, such as a baseline snapshot or virtualizing the web server, can be used.","checkContent":"Interview the System Administrator for the Apache web server.\n\nAsk for documentation on the disaster recovery methods tested and planned for the Apache web server in the event of the necessity for rollback.\n\nIf documentation for a disaster recovery has not been established, this is a finding.","fixText":"Prepare documentation for disaster recovery methods for the Apache web server in the event of the necessity for rollback.\n\nDocument and test the disaster recovery methods designed.","ccis":["CCI-001190"]},{"vulnId":"V-214382","ruleId":"SV-214382r961131_rule","severity":"medium","ruleTitle":"The Apache web server document directory must be in a separate partition from the Apache web servers system files.","description":"A web server is used to deliver content on the request of a client. The content delivered to a client must be controlled, allowing only hosted application files to be accessed and delivered. To allow a client access to system files of any type is a major security risk that is entirely avoidable. Obtaining such access is the goal of directory traversal and URL manipulation vulnerabilities. To facilitate such access by misconfiguring the web document (home) directory is a serious error. In addition, having the path on the same drive as the system folder compounds potential attacks, such as drive space exhaustion.","checkContent":"Determine whether the public web server has a two-way trusted relationship with any private asset located within the network. Private web server resources (e.g., drives, folders, printers, etc.) will not be directly mapped to or shared with public web servers.\n\nIf sharing is selected for any web folder, this is a finding.\n\nIf private resources (e.g., drives, partitions, folders/directories, printers, etc.) are shared with the public web server, this is a finding.","fixText":"Configure the public web server to not have a trusted relationship with any system resource that is also not accessible to the public. Web content is not to be shared via Microsoft shares or NFS mounts.","ccis":["CCI-001084"]},{"vulnId":"V-214383","ruleId":"SV-214383r961167_rule","severity":"medium","ruleTitle":"The Apache web server must display a default hosted application web page, not a directory listing, when a requested web page cannot be found.","description":"The goal is to completely control the web user's experience in navigating any portion of the web document root directories. Ensuring all web content directories have at least the equivalent of an \"index.html\" file is a significant factor to accomplish this end.\n\nEnumeration techniques, such as URL parameter manipulation, rely upon being able to obtain information about the web server's directory structure by locating directories without default pages. In the scenario, the web server will display to the user a listing of the files in the directory being accessed. By having a default hosted application web page, the anonymous web user will not obtain directory browsing information or an error message that reveals the server type and version.","checkContent":"Review the DocumentRoot directive in the &lt;'INSTALLED PATH'&gt;\\conf\\httpd.conf file.\n\nNote each location following the \"DocumentRoot\" string. This is the configured path(s) to the document root directory(s).\n\nTo view a list of the directories and sub-directories and the file \"index.html\", from each stated \"DocumentRoot\" location, enter the following command:\n\ndir \"index.html\"\n\nReview the results for each document root directory and its subdirectories.\n\nIf a directory does not contain an \"index.html\" or equivalent default document, this is a finding.","fixText":"Add a default document to the applicable directories.","ccis":["CCI-001312"]},{"vulnId":"V-214388","ruleId":"SV-214388r961278_rule","severity":"medium","ruleTitle":"The Apache web server must restrict inbound connections from nonsecure zones.","description":"Remote access to the web server is any access that communicates through an external, non-organization-controlled network. Remote access can be used to access hosted applications or to perform management functions.\n\nA web server can be accessed remotely and must be capable of restricting access from what the DoD defines as nonsecure zones. Nonsecure zones are defined as any IP, subnet, or region that is defined as a threat to the organization. The nonsecure zones must be defined for public web servers logically located in a DMZ, as well as private web servers with perimeter protection devices. By restricting access from nonsecure zones, through the internal web server access list, the web server can stop or slow denial-of-service (DoS) attacks on the web server.","checkContent":"Review the &lt;'INSTALLED PATH'&gt;\\conf\\httpd.conf file.\n\nIf \"IP Address Restrictions\" are not configured or IP ranges configured to be \"Allow\" are not restrictive enough to prevent connections from nonsecure zones, this is a finding.","fixText":"Configure the \"http.conf\" file to include restrictions.\n\nExample: \n\n&lt;RequireAll&gt;\nRequire not host phishers.example.com moreidiots.example\n&lt;/RequireAll&gt;","ccis":["CCI-002314"]},{"vulnId":"V-214389","ruleId":"SV-214389r961353_rule","severity":"medium","ruleTitle":"Non-privileged accounts on the hosting system must only access Apache web server security-relevant information and functions through a distinct administrative account.","description":"By separating web server security functions from non-privileged users, roles can be developed that can then be used to administer the web server. Forcing users to change from a non-privileged account to a privileged account when operating on the web server or on security-relevant information forces users to only operate as a web server administrator when necessary. Operating in this manner allows for better logging of changes and better forensic information and limits accidental changes to the web server.","checkContent":"Determine which tool or control file is used to control the configuration of the web server.\n\nIf the control of the web server is done via control files, verify who has update access to them. If tools are being used to configure the web server, determine who has access to execute the tools.\n\nIf accounts other than the System Administrator (SA), the Web Manager, or the Web Manager designees have access to the web administration tool or control files, this is a finding.","fixText":"Restrict access to the web administration tool to only the SA, Web Manager, or the Web Manager designees.","ccis":["CCI-002235"]},{"vulnId":"V-214390","ruleId":"SV-214390r1192950_rule","severity":"medium","ruleTitle":"The Apache web server must prohibit or restrict the use of nonsecure or unnecessary ports, protocols, modules, and/or services.","description":"Web servers provide numerous processes, features, and functionalities that use TCP/IP ports. Some of these processes may be deemed unnecessary or too unsecure to run on a production system.\n\nThe web server must provide the capability to disable or deactivate network-related services that are deemed nonessential to the server mission, are too unsecure, or are prohibited by the Ports, Protocols, and Services Management (PPSM) Category Assurance List (CAL) and vulnerability assessments.\n\nConfiguring the web server to implement organizationwide security implementation guides and security checklists guarantees compliance with federal standards and establishes a common security baseline across the DOD that reflects the most restrictive security posture consistent with operational requirements. \n\nSatisfies: SRG-APP-000516-WSR-000174, SRG-APP-000383-WSR-000175","checkContent":"Review the website documentation and deployment configuration to determine which ports and protocols are enabled.\n \nVerify the ports and protocols being used are permitted, are necessary for the operation of the web server and the hosted applications, and are secure for a production system.\n\nReview both the &lt;'INSTALLED PATH'&gt;\\conf\\httpd.conf and the  &lt;'INSTALLED PATH'&gt;\\conf\\extra\\httpd-ssl.conf files.\n \nVerify only the listener for IANA well-known ports for HTTP and HTTPS  (80 and 443) are in use.\n \nIf any of the ports or protocols are not permitted, are nonsecure, or are not necessary for website operation, this is a finding.","fixText":"Ensure the website enforces the use of IANA well-known ports for HTTP and HTTPS.","ccis":["CCI-001762","CCI-000366"]},{"vulnId":"V-214394","ruleId":"SV-214394r961632_rule","severity":"medium","ruleTitle":"Cookies exchanged between the Apache web server and the client, such as session cookies, must have cookie properties set to prohibit client-side scripts from reading the cookie data.","description":"A cookie can be read by client-side scripts easily if cookie properties are not set properly. By allowing cookies to be read by the client-side scripts, information such as session identifiers could be compromised and used by an attacker who intercepts the cookie. Setting cookie properties (i.e., HttpOnly property) to disallow client-side scripts from reading cookies better protects the information inside the cookie.","checkContent":"Verify the  \"session_cookie_module\"  module is installed.\n\nInspect the httpd.conf file to confirm the \"session_cookie_module\" is being used.\n\nIf the \"session_cookie_module\" module is not being used, this is a finding.\n\nSearch for the \"Session\" and \"SessionCookieName\" directives.\n\nIf \"Session\" is not \"on\" and \"SessionCookieName\" does not contain \"httpOnly\" and \"secure\", this is a finding.","fixText":"Set \"Session\" to \"on\". \n\nEnsure the \"SessionCookieName\" directive includes \"httpOnly\" and \"secure\".","ccis":["CCI-002418"]},{"vulnId":"V-214395","ruleId":"SV-214395r961632_rule","severity":"medium","ruleTitle":"Cookies exchanged between the Apache web server and the client, such as session cookies, must have cookie properties set to force the encryption of cookies.","description":"Cookies can be sent to a client using TLS/SSL to encrypt the cookies, but TLS/SSL is not used by every hosted application since the data being displayed does not require the encryption of the transmission. To safeguard against cookies, especially session cookies, being sent in plaintext, a cookie can be encrypted before transmission. To force a cookie to be encrypted before transmission, the cookie \"Secure\" property can be set.","checkContent":"Verify the \"mod_session_crypto\" module is installed.\n\nIf the mod_session_crypto module is not being used, this is a finding.","fixText":"Ensure the \"mod_session_crypto\" module is installed.\n\nEnable encrypted session cookies.\n\nExample:\n\nSession On\nSessionCookieName session path=/\nSessionCryptoPassphrase secret","ccis":["CCI-002418"]}]}