I f Information Security ti S it CS 526 Lecture 20 UMIP & - - PowerPoint PPT Presentation

i f information security ti s it cs 526
SMART_READER_LITE
LIVE PREVIEW

I f Information Security ti S it CS 526 Lecture 20 UMIP & - - PowerPoint PPT Presentation

I f Information Security ti S it CS 526 Lecture 20 UMIP & IFEDAC CS526 Spring 2009/Lecture 20 1 Access Control Check Access Control Check Given an access request, return an access control decision based on the policy allow / deny


slide-1
SLIDE 1

I f ti S it Information Security CS 526

Lecture 20

UMIP & IFEDAC

1 Spring 2009/Lecture 20 CS526

slide-2
SLIDE 2

Access Control Check Access Control Check

  • Given an access request, return an access control decision based
  • n the policy

allow / deny – allow / deny

Access Control A Request Allow / Deny Check q / y The Policy

2 Spring 2009/Lecture 20 CS526

slide-3
SLIDE 3

Access Request Access Request

E l

  • Examples

– Operating system: process A wants to read file B – Browser: the script in webpage X wants to access webpage Y Browser: the script in webpage X wants to access webpage Y

  • A request

– Subject: the entity who issues the request

  • A piece of code
  • E g

a process in operating systems a webpage in browsers E.g., a process in operating systems, a webpage in browsers – Action: object + access mode

  • Check whether the subject has the privilege to perform the

action based on the policy action, based on the policy

3 Spring 2009/Lecture 20 CS526

slide-4
SLIDE 4

Policy Policy

  • Grant privileges to principals
  • Examples of principals

– Operating system: user accounts

4 Spring 2009/Lecture 20 CS526

slide-5
SLIDE 5

The Gap The Gap

  • A request: a subject wants to perform an action
  • The policy: each principal has a set of privileges
  • To fill the gap between the subjects and the principals

– relate the subject to the principals

5 Spring 2009/Lecture 20 CS526

slide-6
SLIDE 6

Origin Origin

  • The origins of a request

– The set of principals on whose behalf the subject is executing at the time when the request is issued time when the request is issued

  • Origin links the subjects with the principals

g j p p

– The origins cause the subject to issue the request – The origins should be responsible for the request

  • Check whether the origins have the privilege to perform the

ti b d th li action based on the policy

6 Spring 2009/Lecture 20 CS526

slide-7
SLIDE 7

Identifying the Origins Identifying the Origins

P l id if i h i i i i i l ki

  • Properly identifying the origins is critical to making correct

access control decisions

  • Some real‐world access control systems are vulnerable

because of their limitations in identifying the origins

– Incompleteness

  • E amine t o real
  • rld access control s stems
  • Examine two real‐world access control systems

– DAC in the operating system – SoP in the browser

  • Propose enhancements

7 Spring 2009/Lecture 20 CS526

slide-8
SLIDE 8

Discretionary Access Control (DAC) Discretionary Access Control (DAC)

  • Implemented in almost all modern operating systems

N i d fi iti

  • No precise definition
  • Features

R t i t b d th id tit f bj t – Restrict access based on the identity of subjects – Each object has a unique owner – Owner decides who can access O e dec des

  • ca access

8 Spring 2009/Lecture 20 CS526

slide-9
SLIDE 9

Origins in DAC Origins in DAC

  • Principals

– User accounts

  • The origin of a request

– The user account who starts the subject process The user account who starts the subject process – E.g., euid in UNIX – invoker

9 Spring 2009/Lecture 20 CS526

slide-10
SLIDE 10

DAC is NOT enough DAC is NOT enough

  • Vulnerable to Trojan Horses

– Malicious software

  • When a user executes a Trojan program

– The origin in DAC: the victim user The origin in DAC: the victim user – The process (adversary) gains the victim user’s privileges

10 Spring 2009/Lecture 20 CS526

slide-11
SLIDE 11

DAC is NOT enough (cont’) DAC is NOT enough (cont )

  • Vulnerable to buggy software

– The adversary can exploit the vulnerability and inject malicious code

  • When a program is exploited

– The origin is the invoker The origin is the invoker – The injected code gains the invoker’s privileges

  • Server daemons are attractive targets

– commonly vulnerable – Started by administrator

11 Spring 2009/Lecture 20 CS526

slide-12
SLIDE 12

Why DAC is vulnerable? Why DAC is vulnerable?

  • Implicit assumptions

– Software are benign, i.e., behave as intended Software are correct i e bug free – Software are correct, i.e., bug‐free

  • The reality

The reality

– Malware are popular – Software are vulnerable

12 Spring 2009/Lecture 20 CS526

slide-13
SLIDE 13

Why DAC is Vulnerable? (cont’) Why DAC is Vulnerable? (cont )

  • Fundamental reason

– A single invoker is not enough to capture the origins of a process

  • When the program is a Trojan

Th id h ld b ibl f th t – The program‐provider should be responsible for the requests

  • When the program is vulnerable

When the program is vulnerable

– It may be exploited by input‐providers – The requests may be issued by injected code from input‐providers

13 Spring 2009/Lecture 20 CS526

slide-14
SLIDE 14

Usable Mandatory Integrity Protection (UMIP) Usable Mandatory Integrity Protection (UMIP)

  • Preserve host integrity against the remote adversary

– Remote exploitation Downloaded malware – Downloaded malware

  • Idea: add an integrity level to the origin of a process

Idea: add an integrity level to the origin of a process

– Either high or low

  • Low integrity means the process may have been contaminated

– be exploited by remote attackers – executing a downloaded malware

14 Spring 2009/Lecture 20 CS526

slide-15
SLIDE 15

Basic UMIP Model Basic UMIP Model

  • Each process is associated with one bit to denote its integrity

level, either high or low

– A process having low integrity level might have been contaminated

  • A low integrity process by default cannot perform any sensitive
  • A low‐integrity process by default cannot perform any sensitive
  • perations that may compromise the system
  • Three questions

– How to do process integrity tracking? – What are sensitive operations? – What kinds of exceptions do we need?

15 Spring 2009/Lecture 20 CS526

slide-16
SLIDE 16

Process Integrity Tracking Process Integrity Tracking

  • Based on information flow

16 Spring 2009/Lecture 20 CS526

slide-17
SLIDE 17

Sensitive Operations: File Access Sensitive Operations: File Access

  • Asking users to label all files is a labor intensive and error‐

prone process

  • Our Approach: Use DAC information to identify sensitive files
  • Read‐protected files

– Owned by system accounts and not readable by world y y y – E.g., /etc/shadow

W i d fil

  • Write‐protected files

– Not writable by world – Including files owned by non‐system accounts Including files owned by non system accounts

17 Spring 2009/Lecture 20 CS526

slide-18
SLIDE 18

Sensitive Operations: Capabilities Sensitive Operations: Capabilities

  • Sensitive non‐file operations

– E.g., loading a kernel module, administration of IP firewall,…

  • Using the Capability system

– Break the root privileges down to smaller pieces Break the root privileges down to smaller pieces – In Linux Kernel 2.6.20, 31 different capabilities

  • Identify each capability as one kind of sensitive non‐file
  • peration

18 Spring 2009/Lecture 20 CS526

slide-19
SLIDE 19

Exception Policies: Process Integrity Tracking Exception Policies: Process Integrity Tracking

  • Default policy for process integrity tracking
  • Default policy for process integrity tracking
  • Exceptions:

Exceptions:

  • Examples

p – RAP programs: SSH Daemon – LSP programs: X server, desktop manager FPP i t – FPP programs: vim, cat

19 Spring 2009/Lecture 20 CS526

slide-20
SLIDE 20

Exception Policies: Low‐integrity Processes Performing Sensitive Operations

S l i i d f i i

  • Some low‐integrity processes need to perform sensitive
  • perations normally
  • Exception:
  • Examples:

/ / bi / f d – FTP Daemon Program: /usr/sbin/vsftpd – Use capabilities: CAP_NET_BIND_SERVICE, CAP_SYS_SETUID CAP SYS SETGID, CAP SYS CHROOT _ _ , _ _ – Read read‐protected files: /etc/shadow – Write write‐protected files: /etc/vsftpd, /var/log/xferlog

20 Spring 2009/Lecture 20 CS526

slide-21
SLIDE 21

Implementation & Performance Implementation & Performance

  • Implemented using Linux Security Module
  • Implemented using Linux Security Module

– no change to Linux file system

  • Performance

– Use the Lmbench 3 and the Unixbench 4.1 benchmarks – Overheads are less than 5% for most benchmark results

21 Spring 2009/Lecture 20 CS526

slide-22
SLIDE 22

Usability Evaluation Usability Evaluation

  • Experimental Settings

– Establish a server with Fedora Core 5 Enable UMIP implementation during system boot – Enable UMIP implementation during system boot – Install several commonly used services

  • E.g., http, ftp, samba, svn, smtp, ntp, …

g , p, p, , , p, p,

  • Results

– The system works with a small and easily‐understood policy – The system has been used by our group for about one year h h l d h h d – With the policy, remote administration through SSH and X administration are enabled

22 Spring 2009/Lecture 20 CS526

slide-23
SLIDE 23

Evaluation: Part of the Sample Policy Evaluation: Part of the Sample Policy

23 Spring 2009/Lecture 20 CS526

slide-24
SLIDE 24

Limitations of UMIP Limitations of UMIP

  • Policy Model in UMIP

– Trust the local users Defeat remote attackers – Defeat remote attackers

  • Local users are not trustworthy

Local users are not trustworthy

– Multi‐user systems – User may exploit vulnerabilities

24 Spring 2009/Lecture 20 CS526

slide-25
SLIDE 25

Revisit: The Origins of a Process Revisit: The Origins of a Process

DAC

  • DAC

– Origin: the invoker

  • Who may control a process?

– Invoker – Program provider – Input provider

  • UMIP

– Add the program‐provider and input‐providers to the origins – High / Low: whether it comes from network or has received network input

  • Information Flow Enhanced DAC
  • Information Flow Enhanced DAC

25 Spring 2009/Lecture 20 CS526

slide-26
SLIDE 26

Principal Principal

A i h i ll i h

  • An entity that may potentially compromise the system
  • local users (DAC user accounts)

local users (DAC user accounts)

  • Remote network traffic

– denoted as net – represents the remote adversary

26 Spring 2009/Lecture 20 CS526

slide-27
SLIDE 27

Integrity Level Integrity Level

  • Maintain an integrity level for each process and file

– a set of principals E g {alice} Ø {bob net} {net} – E.g., {alice}, Ø, {bob, net}, {net}, …

  • For process

For process

– Who MAY have gained control over the process

  • For file

– Who have changed the content stored in the file

  • The principals in the integrity level are the origins of a process

27 Spring 2009/Lecture 20 CS526

slide-28
SLIDE 28

Integrity Level Tracking Integrity Level Tracking

  • Track integrity levels using information flow

Track integrity levels using information flow

  • Rules

– p is newly created  assign p’parent.IL to p.IL p is newly created  assign p parent.IL to p.IL – p receives network communication  add {net} to p.IL – p reads a file f  add f.IL to p.IL – p receives IPC data from p’  add p’.IL to p.IL – p creates a file f  assign p.IL to f.IL it t fil f  dd IL t f IL – p writes to a file f  add p.IL to f.IL – p logs in a user u  add {u} to p.IL

  • Initial integrity level labeling

– The first process init.IL = top (Ø) p p ( )

28 Spring 2009/Lecture 20 CS526

slide-29
SLIDE 29

Integrity Level Examples Integrity Level Examples

  • For example

– Web server’s IL = {net} Alice’s email client’s IL {net Alice} – Alice s email client s IL = {net, Alice} – A file saved from Alice’s email attachment has IL = {net, Alice} – pdf viewer’s IL = {Alice} p { } – pdf viewer’s IL after opens an email attachment = {net, Alice}

29 Spring 2009/Lecture 20 CS526

slide-30
SLIDE 30

File Protection Classes File Protection Classes

  • Each file has three protection classes

Each file has three protection classes

– Read protection class (rpc): who can read it – Write protection class (wpc): who can write to it – Admin protection class (apc): who can change its rpc and wpc – Each value is a set of principals

  • Infer file protection classes from DAC policy

f – f.rpc

  • If f is world‐readable, f.rpc = bot
  • Otherwise, f.rpc = the set of users allowed to read f

Otherwise, f.rpc the set of users allowed to read f – Same for wpc – f.apc = {owner}

30 Spring 2009/Lecture 20 CS526

slide-31
SLIDE 31

IFEDAC Policy IFEDAC Policy

A i ll d if ll i i l i h ’ IL

  • An access is allowed if all principals in the process’s IL are

authorized

  • A process p requests to access a file f

– Allow reading, if p.IL  f.rpc – Allow writing, if p.IL  f.wpc – Allow changing f.rpc, f.wpc and f.apc, if p.IL  f.apc

  • File’s integrity level can be explicitly changed by user

– Only the owner of the file can change a file’s integrity level Only the owner of the file can change a file s integrity level

  • up to the integrity level of the current process

– Allow changing f.IL to IL’, if p.IL  f.apc and p.IL  IL’

31 Spring 2009/Lecture 20 CS526

slide-32
SLIDE 32

What Protection Does IFEDAC Offer? What Protection Does IFEDAC Offer?

  • Achieve the protection objective of DAC, i.e., all allowed
  • perations reflect the intention of authorized users, under the

following assumptions following assumptions

– Initially, the inferred file integrity levels are correct – Initially, files are labeled with correct DAC policies y, p – Hardware is not compromised – Kernel cannot be exploited in a critical way – When a legitimate user intends to upgrade a file’s integrity level (or update a file’s protection classes), the decision is correct

32 Spring 2009/Lecture 20 CS526

slide-33
SLIDE 33

IFEDAC Policy Enhances DAC Policy IFEDAC Policy Enhances DAC Policy

  • Generally IFEDAC enforces DAC policy

Generally, IFEDAC enforces DAC policy

– A protection class contains the authorized entities in a DAC policy

  • The protection classes can be different from that inferred from

The protection classes can be different from that inferred from DAC

– Stored using extended attributes – Can be explicitly set by users

  • Two example cases

– Internet directory: DAC (only owner can write), wpc = {u, net} – The shell startup scripts of privileged normal users: DAC (writable by owner), wpc= top DAC (writable by owner), wpc top

33 Spring 2009/Lecture 20 CS526

slide-34
SLIDE 34

Exceptions Exceptions

  • Default policy too strict for real‐world systems and common

practices

it doesn’t assume any program to be correct – it doesn t assume any program to be correct

  • In reality one has to trust the correctness of “some” program

In reality one has to trust the correctness of some program, needs exceptions to the default policy

  • Exceptions are associated with program binaries
  • Exceptions imply some form of trust for programs

Exceptions imply some form of trust for programs

– The trusts are strictly limited and can be clearly specified

34 Spring 2009/Lecture 20 CS526

slide-35
SLIDE 35

Usage Case I: Email Client (cont’) Usage Case I: Email Client (cont )

  • John saves another email attachment B to /home/john/download

John saves another email attachment B to /home/john/download – B.IL = {john, net}

  • John wants to install B to the system, so executes B as BP

– BP.IL = {john, net} – BP cannot touch the system files, installation failed if needs such access BP t fil th t t ld ibl ( h t t – BP cannot access files that are not world accessible (can change contents

  • f B’s Internet directory)
  • John really trusts B and wants to install it

– John login as an administrator (see below) – John explicitly upgrades B.IL to top

  • John executes B as BP’

– BP’.IL = top, installation succeed

35 Spring 2009/Lecture 20 CS526

slide-36
SLIDE 36

Usage Case II: Administrator Login Usage Case II: Administrator Login

  • Linux allows normal users to perform system administration

through the sudo tool (sudoer) IFEDAC ll if i i il d ll d d

  • IFEDAC allows specifying privileged users, called sudoers

– Process’s IL maintains when a sudoer logins

  • Sudoers’ files have wpc at {u} or lower
  • Sudoers files have wpc at {u} or lower

– Except the shell startup scripts with wpc at top

  • .bash rc, .bash profile, .bash history

.bas _ c, .bas _p o e, .bas _ sto y

  • When a sudoer John logins

– John gets a shell with IL at top – John can perform system administration in the shell – Any descendant that reads john’s normal files will drop to IL {john} – A utility program is provided to explicitly downgrade shell’s IL to {john}

36 Spring 2009/Lecture 20 CS526

slide-37
SLIDE 37

Comparing UMIP & IFEDAC with Biba (2) Comparing UMIP & IFEDAC with Biba (2)

  • In Biba, an object has one integrity level

– Determines who can write to it, and how will it contaminates a subject who reads who reads

  • In UMIP & IFEDAC, an object has

– An integrity level, records quality of info in the object, and ensures g y , q y j , correct contamination tracking – A write protection class, determines who can write it and protects integrity of the object integrity of the object – A read protection class, determines who can read it and protects confidentiality of the object

  • IFEDAC infers protection classes from DAC permissions

37 Spring 2009/Lecture 20 CS526

slide-38
SLIDE 38

Comparing UMIP & IFEDAC with Biba (3) Comparing UMIP & IFEDAC with Biba (3)

  • UMIP and IFEDAC uses aspects of all five Biba policies

– Subject low water policy for majority of subjects Ring policy for selected subjects (i e RAP & LSP which are explicitly – Ring policy for selected subjects (i.e., RAP & LSP, which are explicitly identifying trusted programs) – Object low water policy when objects has low write protection class (e.g., temporary files) – Strict integrity for objects that have high write protection class (e.g., critical binaries and configuration files) critical binaries and configuration files) – Strict integrity protection for subject‐subject interaction

38 Spring 2009/Lecture 20 CS526

slide-39
SLIDE 39

Summary of IFEDAC Summary of IFEDAC

  • DAC’s weakness lies in the enforcement

– The origin includes a single principal – Failed to identify the true origins of a request Vulnerable to Trojan horse and buggy software – Vulnerable to Trojan horse and buggy software

  • But DAC’s policy is good

But DAC s policy is good

– Easy and intuitive to specify – Sufficient to preserve the system integrity

  • The approach

Keep the DAC’s policy – Keep the DAC s policy – Fix the enforcement: identify the true origins of a request

39 Spring 2009/Lecture 20 CS526

slide-40
SLIDE 40

Coming Attractions Coming Attractions

  • Trusted Operating Systems and Assurance

CS526 Spring 2009/Lecture 20 40