Implementing Best Practices
Basic Hygiene
-
Send logs of administrative and web accesses to a central collection point securely.
-
Alert on the following conditions
-
Successful login after three (3) or more failures.
-
Input validation, invalid parameter names, and values.
-
Output validation failures (database recordset mismatch, invalid data encoding).
-
Authentication successes and failures.
-
Session management failures (cookie session identification, value modification).
-
Application errors and system events (file system errors, configuration changes, runtime errors).
-
-
Log all network traffic, both accepted and dropped.
-
Alert on unsolicited outbound network sessions from VPN appliances.
-
Alert on connections from and to a new geography.
-
Build views to measure the risk of blocking unsolicited outbound traffic.
-
-
Prohibit administrative access from public networks.
-
Only allow public access to ports configured for web services.
-
Leverage .htaccess (or other filtering mechanisms) to default-deny visibility to paths/directories/applications.
-
Block server-initiated sessions except those necessary for support services (i.e., authentication, authorization, DNS, log storage).
-
Run web services using accounts with the least necessary privilege.
-
Prevent access to the server administratively privileged accounts.
-
Restrict administrative access to the minimum set of users.
-
Ensure that directories are not externally navigable/enumerable.
-
Place web servers in a DMZ.
-
Subscribe to vendor-specific software updates from your vendor. Enable automatic updates (if possible).
-
If a patch repairs a vulnerability:
-
Apply patches to internet-facing servers within three (3) days of release.
-
Apply patches to internal web servers within seven (7) days of release.
-
-
Secure backups with annual testing.
-
Disable unused services on the web server.
-
Uninstall unnecessary applications.
-
Minimize enumerability by removing banners, headers and other identifiable information.
Advanced Hygiene
-
Deploy EDR for greater visibility into server operations.
-
Improved alerting on:
-
Logging dropouts.
-
Software crashes and restarts.
-
Failed logins.
-
File uploads, including specific file types.
-
Monitoring for site changes.
-
Administrative access outside permitted maintenance windows.
-
Executions with administrative privilege.
-
Actions performed by service accounts.
-
Multiple simultaneous logins from various geographies.
-
Initial execution of software.
-
Attempts to initiate network sessions to systems not used for support services.
-
-
Restrict external access from unapproved cloud and geographic sources.
-
Restrict access to internal networks without authorized users, content managers, or administrators.
-
Deploy web application firewall capabilities to extend access control capabilities.
-
Block administrative access except for Bastion hosts.
-
Restrict access to internal network resources by user role.
-
Separate operating system administration from web service administration.
-
Place web servers into a dedicated network segment with security filtering available for all directions of traffic and connected networks.
-
Deploy a dedicated segment for administrative traffic.
-
Harden configuration using benchmarks from governments, third parties, or vendors.
-
Implement application control to prevent the execution of unapproved applications.
Resilient Operations
-
Implement behavior analysis.
-
“Superman” rules alerting impossible geographic access sources based on time and distance.
-
Geography, session duration, and transfer sizes are tracked per device and user with anomaly alerting.
-
Track patterns of administrator access and actions taken with anomaly alerts.
-
Baseline internal network traffic and alert on odd access patterns based on IP address and network segments.
-
-
Implement Default Deny for application control.
-
Delegate authority to users to perform a minimal set of privileged administration tasks rather than use privileged accounts.
-
Separate web servers based on the application or site they support. Microsegmentation at a server level is useful but not required.
-
Harden configuration following a CIS Benchmark (https://www.cisecurity.org/cis-benchmarks/) or vendor’s advice as much as possible.
Web Server Resources
-
https://owasp.org/www-project-application-security-hardening/
-
Community and Vendor Resources
-
https://www.cisecurity.org/cis-benchmarks/ > Server Software > Web Server