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
  • Not an OS kernel operation
  • From login to session processes
  • Password validation process
  1. Security in Operating Systems

Linux login

Not an OS kernel operation

A privileged login application presents an interface for getting users’ credentials.

  • A username/password pair.

  • Biometric data.

  • Smartcard and activation PIN.

The login application validates the credentials and fetches the appropriate UID and GIDs for the user.

  • And starts an initial user application on a process with those identifiers.

    • In a Linux console, this application is a shell (sh, bash, csh, tcsh, zsh, etc.)

  • When this process ends the login application reappears.

Thereafter all processes created by the user have their identifiers.

  • Inherited through forks.

From login to session processes

The login process must be a privileged process.

  • Has to create processes with arbitrary UID and GIDs.

    • The ones of the entity logging in.

Password validation process

The username is used to fetch a UID/GID pair from /etc/passwd.

  • And a set of additional GIDs in the /etc/group file.

The supplied password is transformed using a digest function.

  • Currently configurable, for creating a new user (/etc/login.defs).

  • Its identification is stored along with the transformed password.

The result is checked against a value stored in /etc/shadow.

  • Indexed again by the username.

  • If they match, the user was correctly authenticated.

File protections.

  • /etc/passwd and /etc/group can be read by anyone.

    • This is fundamental, for instance, for listing directories (why?)

  • /etc/shadow can only be read by root.

    • Protection against dictionary attacks.

Last updated 1 year ago