Notes - MCS
Secure Execution Environments
Notes - MCS
Secure Execution Environments
  • Secure Execution Environments
  • Introduction
    • Trusted Computing Base (TCB)
    • TEE (Trusted Execution Environment)
    • Can you trust the operating system?
  • Security in Operating Systems
    • Operating system
    • Virtual machines and hypervisors
    • Computational model
    • Access control
    • Protection with capabilities
    • Unix file protection ACLs
    • Windows NTFS file protection
    • Unix file protection ACLs
    • Privilege elevation
    • Privilege reduction
    • Linux login
  • Virtualization on Intel Processors
    • Modes of Operation
    • Virtual memory
    • How to put assembly instructions inside C code
    • A more elaborate example
    • Useful assembly instructions
  • Intel Software Guard Extensions
    • What is SGX (Software Guard eXtensions)?
    • SGX Enclave Memory
    • Guidelines for designing applications using SGX
    • Performance Overhead
    • SDK compilation modes
    • Writing Enclave Functions
  • ARM TrustZone
    • SoC and IP
    • ARM TrustZone
    • Worlds
    • Architecture
    • TrustZone bootstrap
  • Linux Kernel Namespaces
    • Namespaces
    • Advantages
    • Process Namespace
    • Network namespace
    • Mount namespace
    • UTS namespace
    • User namespace
  • LXC Linux Containers
    • Container
    • LXC containers
  • AppArmor
    • Purpose
    • Enforcement
    • Benefits
    • Attack prevention
    • Enforcement policies
    • Enforcement modes
    • Logging and auditing
    • Profiles
  • TPM (Trusted Platform Module)
    • Trusted Platform Module (TPM)
    • History
    • Cryptographic Concepts
    • Use cases
    • TPM Software Stack (TSS)
    • TPM concepts
    • Entities
    • Key management
    • Restrict signatures
    • Sessions
    • Authorization roles
  • Bootstrap security
    • AEGIS
    • Trusted computing
    • Root of Trust Measurements
    • Trusted Computing Platform Alliance (TCPA)
    • TPM-based attestation
    • Trusted Platform identity credentials
    • UEFI (Unified Extensible Firmware Interface)
    • NSA Boot Security
    • UEFI secure boot & TPM measurements
    • Intel Trusted Execution Technology (TXT)
    • Smartcards
      • Java Cards
      • OpenCard Framework (OCF)
      • Cryptographic services
Powered by GitBook
On this page
  • What they can control
  • Text files
  • Skeleton profiles
  • Syntax
  • Variables
  • Defined internally
  • Includes
  • Feature ABI
  • Filename wildcards
  • File permissions
  1. AppArmor

Profiles

What they can control

  • File access

  • Exec

  • Capabilities

  • Network

  • UNIX sockets

  • Mount

    • mount / remount / unmount

    • pivot_root

  • Signals

  • Dbus

  • prtrace

  • rlimits

Text files

Compiled and installed with apparmor_parser.

Skeleton profiles

  • Default empty profiles to start with.

  • Generated with aa-easyprof for a given application.

# vim:syntax=apparmor
# AppArmor policy for apparmor_parser
# ###AUTHOR###
# ###COPYRIGHT###
# ###COMMENT###

#include <tunables/global>

# No template variables specified

"/usr/bin/apparmor_parser" {
 #include <abstraction/base>
 
 # No abstractions specified
 
 # No policy groups specified
 
 # No read paths specified
 
 # Not write paths specified
}
  • Comments

  • Global variables

  • Base abstractions

Syntax

Variables

  • @{var_name}

    • @{var_name}=...

      • Variable assignment

    • @{var_name}

      • Variable value

Defined internally

  • Preconfigured

    • /etc/apparmor.d/tunables

  • Automatic

    • @{profile_name}

Includes

Include filename

  • Or #include filename

  • CPP like

Filenames

  • include "/absolute_path"

  • include "relative_path"

  • include <magic_path>

    • From /etc/apparmor.d by default

Existing includes

Abstractions

  • include <abstractions/...>

  • Minimum, harmless access to fundamental resources.

Variable definitions.

  • include <tunable/...>

Feature ABI

Application Binary Interface.

abi filename

  • Absolute, relative or magic.

The file contains the feature set used in the profile.

  • Currently <abi/3.0>

  • Already included in <abstractions/base>

This is used to adjust kernel features to the profiles' use of features.

Filename wildcards

  • /dir_path/*

    • All files in the directory /dir_path

  • /dir_path/*/

    • All directories in the directory /dir_path

  • /dir_path/**

    • All files and directories under the directory /dir_path

  • /dir_path/**/

    • All directories under the directory /dir_path

File permissions

  • r: read

  • w: write

  • a: append

    • Cannot truncate

  • m: memory map

    • Useful for shared libraries

  • l: link

    • Add a name to an existing file

  • k: lock

    • File access synchronization.

Last updated 1 year ago