Policy vs. Mechanism. Example Reference Monitors. Reference Monitors. CSE 380 Computer Operating Systems

Similar documents
CSE 380 Computer Operating Systems

Protection. CSE473 - Spring Professor Jaeger. CSE473 Operating Systems - Spring Professor Jaeger

Access Control. CMPSC Spring 2012 Introduction Computer and Network Security Professor Jaeger.

CIS 5373 Systems Security

Data Security and Privacy. Unix Discretionary Access Control

Operating system security models

CSE 565 Computer Security Fall 2018

OS security mechanisms:

Secure Architecture Principles

Outline. Operating System Security CS 239 Computer Security February 23, Introduction. Server Machines Vs. General Purpose Machines

IT Service Delivery And Support Week Four - OS. IT Auditing and Cyber Security Fall 2016 Instructor: Liang Yao

Secure Architecture Principles

Secure Architecture Principles

Privilege Separation

Secure Architecture Principles

Operating Systems Security Access Control

CS 392/681 - Computer Security. Module 5 Access Control: Concepts and Mechanisms

Hardware. Ahmet Burak Can Hacettepe University. Operating system. Applications programs. Users

Keys and Passwords. Steven M. Bellovin October 17,

Operating System Security

Secure Architecture Principles

CSE 380 Computer Operating Systems

P1L5 Access Control. Controlling Accesses to Resources

PROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D)

RBAC in Solaris 10. Darren J Moffat Staff Engineer, Networking & Security Sun Microsystems, Inc. 7 th October 2004

We ve seen: Protection: ACLs, Capabilities, and More. Access control. Principle of Least Privilege. ? Resource. What makes it hard?

CSE 380 Computer Operating Systems

CS 392/681 - Computer Security. Module 6 Access Control: Concepts and Mechanisms

Operating system security

Web Servers and Security

A Survey of Access Control Policies. Amanda Crowell

Outline. UNIX security ideas Users and groups File protection Setting temporary privileges. Examples. Permission bits Program language components

Architecture. Steven M. Bellovin October 31,

Web Servers and Security

ENGR 3950U / CSCI 3020U Midterm Exam SOLUTIONS, Fall 2012 SOLUTIONS

Information Security Theory vs. Reality

Access Control. Steven M. Bellovin September 13,

Operating System Security

Unix Basics. UNIX Introduction. Lecture 14

Architecture. Steven M. Bellovin October 27,

Information Security CS 526

Sandboxing. (1) Motivation. (2) Sandboxing Approaches. (3) Chroot

CSE543 - Introduction to Computer and Network Security. Module: Operating System Security

CS 475. Process = Address space + one thread of control Concurrent program = multiple threads of control

PESIT Bangalore South Campus

Chapter 13: Protection. Operating System Concepts Essentials 8 th Edition

Programming Project # 2. cs155 Due 5/5/05, 11:59 pm Elizabeth Stinson (Some material from Priyank Patel)

Module 4: Access Control

Discretionary Access Control

Distributed Systems CSCI-B 534/ENGR E-510. Spring 2019 Instructor: Prateek Sharma

Access Control CSC WAKE FOREST. U N I V E R S I T Y Department of Computer Science. Fall 2014

Chapter 14: Protection. Operating System Concepts 9 th Edition

Protection Kevin Webb Swarthmore College April 19, 2018

CS 356 Lecture 7 Access Control. Spring 2013

Privileges: who can control what

INSE 6130 Operating System Security

CS399 New Beginnings. Jonathan Walpole

Integrity Policies. CSE497b - Spring 2007 Introduction Computer and Network Security Professor Jaeger.

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 18: Naming, Directories, and File Caching

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 18: Naming, Directories, and File Caching

Chapter 4 Protection in General-Purpose Operating Systems

(In columns, of course.)

CS 333 Introduction to Operating Systems Class 2 OS-Related Hardware & Software The Process Concept

Access Control. Steven M. Bellovin September 2,

OS Security III: Sandbox and SFI

COS 318: Operating Systems. File Systems. Topics. Evolved Data Center Storage Hierarchy. Traditional Data Center Storage Hierarchy

Processes. CS3026 Operating Systems Lecture 05

Computer Security. 04r. Pre-exam 1 Concept Review. Paul Krzyzanowski. Rutgers University. Spring 2018

Processes. Process Management Chapter 3. When does a process gets created? When does a process gets terminated?

? Resource. Announcements. Access control. Access control in operating systems. References. u Homework Due today. Next assignment out next week

CSE 127: Computer Security. Security Concepts. Kirill Levchenko

Chapter 4: Access Control

Storage and File System

FreeBSD Advanced Security Features

Process! Process Creation / Termination! Process Transitions in" the Two-State Process Model! A Two-State Process Model!

IS 2150 / TEL 2810 Information Security and Privacy

CSE 380 Computer Operating Systems. Instructor: Insup Lee. University of Pennsylvania Fall 2003

Chapter 11: File-System Interface

Advanced Systems Security: Principles

Process Time. Steven M. Bellovin January 25,

Today: Protection. Protection

Chapter 4. Protection in General-Purpose Operating Systems. ch. 4 1

Confinement (Running Untrusted Programs)

Storage and File Hierarchy

Silberschatz and Galvin Chapter 19

COS 318: Operating Systems

Module 19: Protection

CSE/ISE 311: Systems Administra5on Access Control and Processes

CSE 390a Lecture 4. Persistent shell settings; users/groups; permissions

Processes and Threads. Processes and Threads. Processes (2) Processes (1)

Computer Security Operating System Security & Access Control. Dr Chris Willcocks

CSE 410: Systems Programming

Secure Architecture Principles

CS2506 Quick Revision

CS61 Scribe Notes Date: Topic: Fork, Advanced Virtual Memory. Scribes: Mitchel Cole Emily Lawton Jefferson Lee Wentao Xu

The UNIX Operating System. HORT Lecture 2 Instructor: Kranthi Varala

Lecture 21. Isolation: virtual machines, sandboxes Covert channels. The pump Why assurance? Trust and assurance Life cycle and assurance

Operating systems and security - Overview

Operating systems and security - Overview

Virtual Memory. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. November 15, MIT Fall 2018 L20-1

Transcription:

Policy vs. Mechanism CSE 380 Computer Operating Systems Instructor: Insup Lee and Dianna Xu University of Pennsylvania Fall 2003 Lecture Note: Protection Mechanisms q Access control policy is a specification ß Given in terms of a model of the system ß Subjects: do things (i.e. a process writes to files) ß Objects: are passive (i.e. the file itself) ß Actions: what the subjects do (i.e. read a string from a file) ß Rights: describe authority (i.e. read or write permission) q Mechanisms are used to implement a policy ß Example: access control bits in Unix file system & OS checks ß Mechanism should be general; ideally should not constrain the possible policies. ß Complete mediation: every access must be checked 1 2 Reference Monitors Example Reference Monitors Subject Request (Action, Object) Monitor? Granted Denied q Operating Systems ß File system ß Memory (virtual memory, separate address spaces) q Firewalls ß Regulate network access q Java Virtual Machine ß Regulates Java programs resource usage 3 4 1

Access Control Matrix Access Control Checks A[s][o] Subj 1 Obj 1 Obj 2 {r,w} Obj N {} q Suppose subject s wants to perform action that requires right r on object o: Subj 2 {w,x} {} Each entry contains a set of rights. q If (r A[s][o]) then perform action else access is denied Subj M {x} 5 6 Model for resource Protection Rights and Actions q A Protection System is composed of ß set of subjects: processes executing in a specific protection domain ß set of objects: all the passive elements of the system plus all the subjects ß set of rules specifying the protection policy q Protection Domain: Set of rights a process has at any given time q Protection state is checked for each access of an object, X, by a subject, S q Protection state can be conceptualized as an access matrix. q A[S,X] is a set that describes the access rights held by subject S to object X. q Besides read, write, execute actions there are many others: q Ownership q Creation ß New subjects (i.e. in Unix add a user) ß New objects (i.e. create a new file) ß New rights: Grant right r to subject s with respect to object o (sometimes called delegation) q Deletion of ß Subjects ß Objects ß Rights (sometimes called revocation) 7 8 2

Protecting the Reference Monitor Storing the Access Control Matrix q It must not be possible to circumvent the reference monitor by corrupting it q Mechanisms ß Type checking ß Software fault isolation: rewrite memory access instructions to perform bounds checking ß User/Kernel modes ß Segmentation of memory (OS resources aren t part of virtual memory system) q Subjects >> # users ß A row can correspond to a protection domain ß Each subject runs within a protection domain ß Example: User-ID and Group-ID in Unix determine domain q Objects >> # files ß Potentially could have permissions on any resource q The matrix is typically sparse ß Store only non-empty entries 9 10 Access Control Lists A[s][o] Obj 1 Obj 2 Obj N Subj 1 {r,w} {} Subj 2 {w,x} {} {r} Subj M {x} For each object, store a list of (Subject, Rights) pairs. Access Control Lists q Resolving queries is linear in length of the list q Revocation w.r.t. a single object is easy q Who can access this object? is easy ß Useful for auditing q Lists could be long ß Factor into groups (lists of subjects) ß Give permissions based on group ß Introduces consistency question w.r.t. groups q Authentication critical ß When does it take place? Every access would be expensive. 11 12 3

Capabilities Lists Capabilities A[s][o] Obj 1 Obj 2 Obj N Subj 1 {r,w} {} Subj 2 {w,x} {} {r} Subj M {x} For each subject, store a list of (Object, Rights) pairs. q A capability is a (Object, Rights) pair q Must be protected from tampering ß Otherwise, subjects could get illegal access q Authentication takes place when the capabilities are granted (not needed at use) q Harder to carry out revocation (must find all entries where the object appears) q Easy to audit a subject, hard to audit an object 13 14 Storing Capabilities Securely q Special hardware: tagged words in memory ß Can t copy/modify tagged words q Store the capabilities in protected address space q Could use static scoping mechanism of safe programming languages. ß Java s private fields q Could use cryptographic techniques ß OS kernel could sign (Object, Rights) pairs using a private key ß Any process can verify the capability Unix Security q Each user has a unique 16-bit UID ß UID of root/superuser is 0 q Each user can belong to a group, each group has a unique 16-bit GID q Protection domain of a process is determined by the (UID,GID) of the user that owns the process q Every file has ß UID and GID of the owner ß Protection bits that can be set/changed by the owner ß Devices handled as files (e.g. /dev/tty, /dev/lp) q 9 bits specifying allowed read(r)/write(w)/execute(x) access for the owner, group, and everyone else ß E.g. rw-r----- means owner can read/write and group can read 15 16 4

SETUID q How to give temporary access to privileged resources? q E.g. /dev/lp is owned by printer daemon (or by root), other processes need to write to it to send jobs to printer, but you do not want to set permission to rwxrwxrwx q Solution: Each file/device has a SETUID bit q When an executable program P with SETUID bit set to 1 is executed by a process Q, the protection domain of Q is changed to (UID,GID) of P (i.e. the owner of P) ß If P s SETUID bit is 0, then protection domain of Q does not change 17 Sample Scenario q /dev/lp is owned by root with protection rw------- ß This is used to access the printer q /bin/lp is owned by root with --x--x--x with SETUID=1 q User A issues a print command q Shell (running with A s UID and GID) interprets the command and forks off a child process, say, P q Process P has the same UID/GID as user A q Child process P executes exec( /bin/lp,) q Now P s domain changes to root s UID q Consequently, /dev/lp can be accessed to print q When /bin/lp terminates so does P q Parent shell never got the access to /dev/lp 18 5