openskills.info
AppArmor logoCourse Preview

AppArmor

AppArmor is a Linux security module that confines programs to a limited set of resources using per-program profiles. Each profile specifies which files, network access, and capabilities a process may use, reducing the damage a compromised application can cause.

itLinux

AppArmor

AppArmor confines a Linux program to a declared set of allowed operations. It is a Linux Security Module, or LSM. The kernel enforces its policy after the usual discretionary access checks.

The practical goal is damage containment. A network service may need to read its configuration, bind a socket, and write its own state. It does not need every permission held by its Unix user. An AppArmor profile narrows that service to the resources and operations its workload requires.

The mental model

Follow one request through four parts:

  1. Process — a running program requests an operation from the kernel.
  2. Profile — AppArmor identifies the profile attached to that process.
  3. Rule — the profile allows matching file, capability, network, signal, ptrace, mount, D-Bus, or other mediated operations.
  4. Decision — enforce mode blocks an operation without permission. Complain mode permits it and records the violation for policy development.

AppArmor policy is allow-list oriented. When an enforcing profile has no rule that permits a mediated operation, the kernel denies it. An explicit deny rule also blocks access, but it can suppress routine audit noise.

Continue the course

This section is part of the paid course.

See pricing to subscribe, or log in if you already have access.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources

  • https://apparmor.net/
  • https://documentation.ubuntu.com/security/security-features/privilege-restriction/apparmor/
  • https://apparmor.net/profiles/profile-types-and-syntax/
  • https://apparmor.net/reference/profiles-quick-reference/
  • https://apparmor.net/profiles/Policy_Layout/
  • https://ubuntu.com/server/docs/how-to/security/apparmor/
  • https://apparmor.net/man/5.0/apparmor.d/
  • https://apparmor.net/man/master/apparmor_parser/
  • https://apparmor.net/man/4.1/aa-status/
  • https://apparmor.net/man/master/aa-genprof/
  • https://apparmor.net/man/4.0/aa-logprof/
  • https://apparmor.net/monitoring/