CS 423 Operating System Design: The Linux Reference Monitor - - PowerPoint PPT Presentation

cs 423 operating system design the linux reference monitor
SMART_READER_LITE
LIVE PREVIEW

CS 423 Operating System Design: The Linux Reference Monitor - - PowerPoint PPT Presentation

CS 423 Operating System Design: The Linux Reference Monitor Professor Adam Bates CS 423: Operating Systems Design All the Access Controls Basic Access Matrix UNIX, ACL, various capability systems Aggregated Access Matrix TE,


slide-1
SLIDE 1

CS 423: Operating Systems Design

CS 423
 Operating System Design: The Linux Reference Monitor

Professor Adam Bates

slide-2
SLIDE 2

CS 423: Operating Systems Design

All the Access Controls

2

  • Basic Access Matrix
  • UNIX, ACL, various capability systems
  • Aggregated Access Matrix
  • TE, RBAC, groups and attributes, parameterized
  • Plus Domain Transitions
  • DTE, SELinux, Java
  • Lattice Access Control Models
  • Bell-LaPadula, Biba, Denning
  • Predicate Models
  • ASL, OASIS, domain-specific models, many others
  • Safety Models
  • Take-grant, Schematic Protection Model, Typed Access Matrix
slide-3
SLIDE 3

CS 423: Operating Systems Design 3

System Interface Entry Points Monitor Policy Access Hook Access Hook Access Hook Security-sensitive Operation Security-sensitive Operation Security-sensitive Operation

Authorize Request? Yes/No

  • Cool. But how do we implement these models

in an operating system?

Reference Monitor

slide-4
SLIDE 4

CS 423: Operating Systems Design

Reference Monitor

4

  • Where to make access control decisions? (Mediation)
  • Which access control decisions to make? (Authorization)
  • Decision function: Compute decision based on request

and the active security policy

  • Reference Monitor Concept (i.e., Goals):
  • Complete Mediation
  • Tamper Proof
  • Verifiable
slide-5
SLIDE 5

CS 423: Operating Systems Design

SELinux

5

  • Designed by the NSA
  • A more flexible solution than MLS
  • SELinux Policies are comprised of 3 components:
  • Labeling State defines security contexts for every file

(object) and user (subject).

  • Protection State defines the permitted

<subject,object,operation> tuples.

  • Transition State permits ways for subjects and objects to

move between security contexts.

  • Enforcement mechanism designed to satisfy reference

monitor concept

slide-6
SLIDE 6

CS 423: Operating Systems Design

SELinux Labeling State

6

  • Files and users on the system at boot-time must are

associated with their security labels (contexts)

  • Map file paths to labels via regular expressions
  • Map users to labels by names by name
  • User labels pass on to their initial processes
  • How are new files labeled? Processes?
slide-7
SLIDE 7

CS 423: Operating Systems Design

SELinux Protection State

7

  • MAC Policy based on

Type Enforcement

  • Access Matrix Policy
  • Processes with subject label…
  • Can access file of object label
  • If operations in matrix cell allow
  • Focus: Least Privilege
  • Only provide permissions necessary
slide-8
SLIDE 8

CS 423: Operating Systems Design 8

  • Permissions in SELinux can be produced with runtime

analysis.

  • Step 1: Run programs in a controlled (no attacker)

environment without any enforcement.

  • Step 2: Audit all of the permissions used during normal
  • peration.
  • Step 3: Generate policy file description
  • Assign subject and object labels associated with program
  • Encode all permissions used into access rules

SELinux Protection State

slide-9
SLIDE 9

CS 423: Operating Systems Design

SELinux Transition State

9

  • Premise: Processes don’t need to run in the same

protection state all of the time.

  • Borrows concepts from Role-Based Access Control
  • Example: passwd starts in user context, transitions

to privileged context to update /etc/passwd, transitions back to user.

slide-10
SLIDE 10

CS 423: Operating Systems Design

@ 2001 Linux Kernel Summit…

10

Include SELinux in Linux 2.5!

slide-11
SLIDE 11

CS 423: Operating Systems Design

@ 2001 Linux Kernel Summit…

11

Include SELinux in Linux 2.5! I’m just not that into you…

slide-12
SLIDE 12

CS 423: Operating Systems Design

Linux Security circa 2000

12

slide-13
SLIDE 13

CS 423: Operating Systems Design

Linus’s Dilemma

13

slide-14
SLIDE 14

CS 423: Operating Systems Design

Linus’s Dilemma

14

The answer to all computer science problems… add another layer of abstraction!

slide-15
SLIDE 15

CS 423: Operating Systems Design

Linux Security Models

15

slide-16
SLIDE 16

CS 423: Operating Systems Design

Linux Security Modules

16

slide-17
SLIDE 17

CS 423: Operating Systems Design

LSM Requirements

17

slide-18
SLIDE 18

CS 423: Operating Systems Design

LSM Architecture

18

slide-19
SLIDE 19

CS 423: Operating Systems Design

Opaque Security Fiels

19

slide-20
SLIDE 20

CS 423: Operating Systems Design

Security Hooks

20

slide-21
SLIDE 21

CS 423: Operating Systems Design

Security Hooks

21

slide-22
SLIDE 22

CS 423: Operating Systems Design 22

Security Hook Details

slide-23
SLIDE 23

CS 423: Operating Systems Design 23

LSM Hook Architecture

slide-24
SLIDE 24

CS 423: Operating Systems Design 24

Process

  • pen

System Call Lookup inode Process file path down to inode (resolving directories/ links) DAC checks LSM hook LSM Policy Engine "Is user_process allowed to perform

  • peration on inode?"

Access inode User Space Kernel Space

LSM Hook Architecture

slide-25
SLIDE 25

CS 423: Operating Systems Design

Conclusions

25

  • Access Control is supported in operating systems

through the “Reference Monitor” concept

  • LSM is a framework for designing reference monitors
  • Today, many security modules exist
  • Must define authorization hooks to mediate access
  • Must expose a policy framework for specifying which accesses

to authorize

  • Policy Challenges
  • Is language expressive enough to capture the goals of the user?
  • Is language simple/intuitive enough for ease of use?
  • Policy misconfiguration breaks security!!
slide-26
SLIDE 26

CS 423: Operating Systems Design

LSM Performance

26

slide-27
SLIDE 27

CS 423: Operating Systems Design

LSM Use

27