Saltstack Official Apache Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Hardening.md 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. # Hardening list
  2. This formula enforce security recommandations from [CIS Benchmarks](https://www.cisecurity.org/cis-benchmarks/) website
  3. From ***CIS_Apache_HTTP_Server_2.4_Benchmark_v1.4.pdf*** document
  4. > A scoring status indicates whether compliance with the given recommendation impacts the assessed target's benchmark score.
  5. > Items in [*level 2*] profile exhibit one or more of the following characteristics:
  6. > - are intended for environments or use cases where security is paramount
  7. > - acts as defense in depth measure
  8. > - may negatively inhibit the utility or performance of the technology
  9. In this formula we focus on (**Scored**) [*level* ***1***] items
  10. ## List of all items with their CIS references
  11. ## 2. Minimize Apache Modules
  12. - [ ] 2.1 Enable Only Necessary Authentication and Authorization Modules (Not Scored)
  13. - [X] 2.2 Enable the Log Config Module (**Scored**)
  14. - [X] 2.3 Disable WebDAV Modules (**Scored**)
  15. - [X] 2.4 Disable Status Module (**Scored**)
  16. - [X] 2.5 Disable Autoindex Module (**Scored**)
  17. - [ ] 2.6 Disable Proxy Modules (**Scored**)
  18. - [X] 2.7 Disable User Directories Modules (**Scored**)
  19. - [X] 2.8 Disable Info Module (**Scored**)
  20. ## 3. Principles, Permissions, and Ownership
  21. - [X] 3.1 Run the Apache Web Server as a non-root user (**Scored**)
  22. - [X] 3.2 Give the Apache User Account an Invalid Shell (**Scored**)
  23. - [ ] 3.3 Lock the Apache User Account (**Scored**)
  24. - [X] 3.4 Set Ownership on Apache Directories and Files (**Scored**)
  25. - [X] 3.5 Set Group Id on Apache Directories and Files (**Scored**)
  26. - [ ] 3.6 Restrict Other Write Access on Apache Directories and Files (**Scored**)
  27. - [X] 3.7 Secure Core Dump Directory (**Scored**)
  28. - [ ] 3.8 Secure the Lock File (**Scored**)
  29. - [X] 3.9 Secure the Pid File (**Scored**)
  30. - [X] 3.10 Secure the ScoreBoard File (**Scored**)
  31. - [X] 3.11 Restrict Group Write Access for the Apache Directories and Files (**Scored**)
  32. - [X] 3.12 Restrict Group Write Access for the Document Root Directories and Files (**Scored**)
  33. ## 4. Apache Access Control
  34. - [X] 4.1 Deny Access to OS Root Directory (**Scored**)
  35. - [ ] 4.2 Allow Appropriate Access to Web Content (Not Scored)
  36. - [X] 4.3 Restrict Override for the OS Root Directory (**Scored**)
  37. - [X] 4.4 Restrict Override for All Directories (**Scored**)
  38. ## 5. Minimize Features, Content and Options
  39. - [X] 5.1 Restrict Options for the OS Root Directory (**Scored**)
  40. - [X] 5.2 Restrict Options for the Web Root Directory (**Scored**)
  41. - [X] 5.3 Minimize Options for Other Directories (**Scored**)
  42. - [X] 5.4 Remove Default HTML Content (**Scored**)
  43. - [X] 5.5 Remove Default CGI Content printenv (**Scored**)
  44. - [X] 5.6 Remove Default CGI Content test-cgi (**Scored**)
  45. - [X] 5.7 Limit HTTP Request Methods (**Scored**)
  46. - [X] 5.8 Disable HTTP TRACE Method (**Scored**)
  47. - [X] 5.9 Restrict HTTP Protocol Versions (**Scored**)
  48. - [X] 5.10 Restrict Access to .ht* files (**Scored**)
  49. - [ ] 5.11 Restrict File Extensions [*level 2*] (**Scored**)
  50. - [ ] 5.12 Deny IP Address Based Requests [*level 2*] (**Scored**)
  51. - [ ] 5.13 Restrict Listen Directive [*level 2*] (**Scored**)
  52. - [ ] 5.14 Restrict Browser Frame Options [*level 2*] (**Scored**)
  53. ## 6. Operations - Logging, Monitoring and Maintenance
  54. - [X] 6.1 Configure the Error Log (**Scored**)
  55. - [ ] 6.2 Configure a Syslog Facility for Error Logging [*level 2*] (**Scored**)
  56. - [X] 6.3 Configure the Access Log (**Scored**)
  57. - [X] 6.4 Log Storage and Rotation (**Scored**)
  58. - [ ] 6.5 Apply Applicable Patches (**Scored**)
  59. - [ ] 6.6 Install and Enable ModSecurity [*level 2*] (**Scored**)
  60. - [ ] 6.7 Install and Enable OWASP ModSecurity Core Rule Set [*level 2*] (**Scored**)
  61. ## 7. SSL/TLS Configuration
  62. - [X] 7.1 Install mod_ssl and/or mod_nss (**Scored**)
  63. - [ ] 7.2 Install a Valid Trusted Certificate (**Scored**)
  64. - [ ] 7.3 Protect the Server's Private Key (**Scored**)
  65. - [X] 7.4 Disable the SSL v3.0 Protocol (**Scored**)
  66. - [ ] 7.5 Restrict Weak SSL/TLS Ciphers (**Scored**)
  67. - [X] 7.6 Disable SSL Insecure Renegotiation (**Scored**)
  68. - [X] 7.7 Ensure SSL Compression is not Enabled (**Scored**)
  69. - [ ] 7.8 Restrict Medium Strength SSL/TLS Ciphers (**Scored**)
  70. - [ ] 7.9 Disable the TLS v1.0 Protocol [*level 2*] (**Scored**)
  71. - [ ] 7.10 Enable OCSP Stapling [*level 2*] (**Scored**)
  72. - [ ] 7.11 Enable HTTP Strict Transport Security [*level 2*] (**Scored**)
  73. ## 8. Information Leakage
  74. - [X] 8.1 Set ServerToken to 'Prod' (**Scored**)
  75. - [X] 8.2 Set ServerSignature to 'Off' (**Scored**)
  76. - [ ] 8.3 Information Leakage via Default Apache Content [*level 2*] (**Scored**)
  77. - [ ] 8.4 Information Leakage via ETag [*level 2*] (**Scored**)
  78. ## 9. Denial of Service Mitigations
  79. - [X] 9.1 Set TimeOut to 10 or less (**Scored**)
  80. - [X] 9.2 Set the KeepAlive directive to On (**Scored**)
  81. - [X] 9.3 Set MaxKeepAliveRequests to 100 or greater (**Scored**)
  82. - [X] 9.4 Set KeepAliveTimeout Low to Mitigate Denial of Service (**Scored**)
  83. - [X] 9.5 Set Timeout Limits for Request Headers (**Scored**)
  84. - [X] 9.6 Set Timeout Limits for the Request Body (**Scored**)
  85. ## 10. Request Limits
  86. - [ ] 10.1 Set the LimitRequestLine directive to 512 or less [*level 2*] (**Scored**)
  87. - [ ] 10.2 Set the LimitRequestFields directive to 100 or less [*level 2*] (**Scored**)
  88. - [ ] 10.3 Set the LimitRequestFieldsize directive to 1024 or less [*level 2*] (**Scored**)
  89. - [ ] 10.4 Set the LimitRequestBody directive to 102400 or less [*level 2*] (**Scored**)
  90. ## 11. Enable SELinux to Restrict Apache Processes
  91. - [ ] 11.1 Enable SELinux in Enforcing Mode [*level 2*] (**Scored**)
  92. - [ ] 11.2 Run Apache Processes in the httpd_t Confined Context [*level 2*] (**Scored**)
  93. - [ ] 11.3 Ensure the httpd_t Type is Not in Permissive Mode [*level 2*] (**Scored**)
  94. - [ ] 11.4 Ensure Only the Necessary SELinux Booleans are Enabled [*level 2*] (Not Scored)
  95. ## 12. Enable AppArmor to Restrict Apache Processes
  96. - [ ] 12.1 Enable the AppArmor Framework [*level 2*] (**Scored**)
  97. - [ ] 12.2 Customize the Apache AppArmor Profile [*level 2*] (Not Scored)
  98. - [ ] 12.3 Ensure Apache AppArmor Profile is in Enforce Mode [*level 2*] (**Scored**)