OpenParable
Skip to content
← Back to skills

Cis Apache24 12.3

DevOps & Security
cis-apache24-12.3

Cis Apache24 12.3 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 Apache AppArmor Profile is in Enforce Mode

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
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-12.3/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/cis-apache24-12-3, 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.

12.3 Ensure Apache AppArmor Profile is in Enforce Mode

Profile Applicability

  • Level 2

Description

AppArmor profiles may be in one of three modes: disabled, complain or enforce. In the complain mode, any violations of the access controls are logged but the restrictions are not enforced. Also, once a profile mode has been changed, it is recommended to restart the Apache server, otherwise the currently running process may not be confined by the policy.

Rationale

The complain mode is useful for testing and debugging a profile, but is not appropriate for production. Only the confined process running in enforce mode will prevent attacks that violate the configured access controls.

Audit

Perform the following steps to determine if the recommended state is implemented:

Use the aa-unconfined command to check that the apache2 policy is enforced, and that the currently running apache2 processes are confined. The output should include both confined by and (enforce).

# aa-unconfined --paranoid | grep apache2
1899 /usr/sbin/apache2 confined by '/usr/sbin/apache2 (enforce)'
1902 /usr/sbin/apache2 confined by '/usr/sbin/apache2 (enforce)'
1903 /usr/sbin/apache2 confined by '/usr/sbin/apache2 (enforce)'
...

Note: Non-compliant results may include not confined or (complain) such as the following:

3304 /usr/sbin/apache2 not confined
2502 /usr/sbin/apache2 confined by '/usr/sbin/apache2 (complain)'
4004 /usr/sbin/apache2 confined by
'/usr/sbin/apache2//HANDLING_UNTRUSTED_INPUT (complain)'

Remediation

Perform the following to implement the recommended state:

  1. Set the profile state to enforce mode.
  2. # aa-enforce apache2
  3. Setting /usr/sbin/apache2 to enforce mode.

Default Value

The default Apache profile is very permissive.

References

  1. https://wiki.ubuntu.com/AppArmor

CIS Controls

Controls VersionControlIG 1IG 2IG 3
v82.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.●●
v72.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 2 | Automated