AppArmor Policy Interface Access

Last updated 4 days ago on 2026-03-20
Created 4 days ago on 2026-03-20

About

Identifies access to AppArmor kernel policy control interfaces through the .load, .replace, or .remove files under /sys/kernel/security/apparmor/. These special files are used to load, modify, or remove AppArmor profiles and are rarely accessed during normal system activity outside of policy administration. Reads or writes to these interfaces may indicate legitimate security configuration changes, but can also reflect defense evasion, unauthorized policy tampering, or the installation of attacker-controlled profiles. This detection is especially valuable on systems where AppArmor policy changes are uncommon or tightly controlled.
Tags
Domain: EndpointOS: LinuxUse Case: Threat DetectionTactic: Defense EvasionData Source: Auditd ManagerLanguage: eql
Severity
low
Risk Score
21
MITRE ATT&CK™

Defense Evasion (TA0005)(external, opens in a new tab or window)

License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Event Correlation Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-auditd_manager.auditd-*auditbeat-*
Related Integrations

auditd_manager(external, opens in a new tab or window)

Query
text code block:
file where host.os.type == "linux" and event.action in ("opened-file", "wrote-to-file", "deleted") and file.path in ( "/sys/kernel/security/apparmor/.load", ".load", "/sys/kernel/security/apparmor/.replace", ".replace", "/sys/kernel/security/apparmor/.remove", ".remove" )

Install detection rules in Elastic Security

Detect AppArmor Policy Interface Access in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).