Cis Apache24 5.9
DevOps & Securitycis-apache24-5.9Cis Apache24 5.9 is an Agent Skill for devops & security published in the CyberStrikeus/CyberStrike repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Ensure Old HTTP Protocol Versions Are Disallowed
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/CyberStrikeus/CyberStrike/blob/HEAD/.cyberstrike/skill/CIS_benchmarks/Server_Software/Apache_HTTP_Server/CIS_Apache_HTTP_Server_2.4_Benchmark_v2.3.0/cis-apache24-5.9/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/cis-apache24-5-9, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
5.9 Ensure Old HTTP Protocol Versions Are Disallowed
Profile Applicability
- Level 1
Description
The Apache modules mod_rewrite or mod_security can be used to disallow old and invalid HTTP protocols versions. The HTTP version 1.1 RFC is dated June 1999 and has been supported by Apache since version 1.2. It should no longer be necessary to allow ancient versions of HTTP such as 1.0 and prior.
Rationale
Many malicious automated programs, vulnerability scanners and fingerprinting tools will send abnormal HTTP protocol versions to see how the web server responds. These requests are usually part of the attacker's enumeration process and therefore it is important that we respond by denying these requests.
Audit
Perform the following to determine if the recommended state is implemented:
- Locate the Apache configuration files and included configuration files.
- Verify there is a rewrite condition within the global server context that disallows requests that do not include the HTTP/1.1 as shown below.
RewriteEngine OnRewriteCond %{THE_REQUEST} !(HTTP/1\.1|HTTP/2\.0)$RewriteRule .* - [F]- Verify the following directives are included in each section so that the main server settings will be inherited.
RewriteEngine OnRewriteOptions Inherit
Remediation
Perform the following to implement the recommended state:
- Load the
mod_rewritemodule for Apache by doing either one of the following:- Build Apache with
mod_rewritestatically loaded during the build, by adding the--enable-rewriteoption to the./configurescript. ./configure --enable-rewrite.- Or, dynamically loading the module with the
LoadModuledirective in thehttpd.confconfiguration file. LoadModule rewrite_module modules/mod_rewrite.so
- Build Apache with
- Set the apache2 profile to enforce mode, reload AppArmor, and then test the web site functionality again.
# aa-enforce /usr/sbin/apache2# /etc/init.d/apparmor reload
Default Value
The default Apache profile is very permissive.
References
No external references provided in the PDF for this control.
CIS Controls
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|---|---|---|---|
| v8 | 2.5 Allowlist Authorized SoftwareUse technical controls, such as application allowlisting, to ensure that only authorized software can execute or be accessed. Reassess bi-annually, or more frequently. | ● | ● | |
| v7 | 2.7 Utilize Application WhitelistingUtilize application whitelisting technology on all assets to ensure that only authorized software executes and all unauthorized software is blocked from executing on assets. | ● |
Profile
- Level 1 | Automated