CIS 551 / TCOM 401 Computer and Network Security



Similar documents
CIS 551 / TCOM 401 Computer and Network Security. Spring 2005 Lecture 4

CSE331: Introduction to Networks and Security. Lecture 34 Fall 2006

? Resource. Access Control and Operating System Security. Access control matrix. Access control. Capabilities. Two implementation concepts.

? Resource. Outline. Access Control and Operating System Security. Access control. Access control matrix. Capabilities. Two implementation concepts

CSE543 - Introduction to Computer and Network Security. Module: Reference Monitor

CEN 559 Selected Topics in Computer Engineering. Dr. Mostafa H. Dahshan KSU CCIS

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

TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control

CIS433/533 - Computer and Network Security Operating System Security

System Security Fundamentals

Access Control Lists in Linux & Windows

Using NFS v4 ACLs with Samba in a multiprotocol environment

Capability-Based Access Control

EMC ISILON MULTIPROTOCOL DATA ACCESS WITH A UNIFIED SECURITY MODEL

USING USER ACCESS CONTROL LISTS (ACLS) TO MANAGE FILE PERMISSIONS WITH A LENOVO NETWORK STORAGE DEVICE

WHITE PAPER. Understanding Windows & UNIX File Permissions on GuardianOS

Computer security Lecture 3. Access control

Filesystem Security. General Principles

Distributed File Systems Part I. Issues in Centralized File Systems

Chapter 7: Unix Security. Chapter 7: 1

Chapter 12 File Management

Chapter 12 File Management. Roadmap

Chapter 6, The Operating System Machine Level

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

Access Control. Dr George Danezis

Computer Security: Principles and Practice

1. Introduction to the UNIX File System: logical vision

Introduction to Computer Security

Windows security for n00bs part 1 Security architecture & Access Control

Security IIS Service Lesson 6

Quest ChangeAuditor 5.1. For Windows File Servers. Events Reference

Restraining Execution Environments

SEER Enterprise Shared Database Administrator s Guide

Windows Server 2003 Active Directory MST 887. Course Outline

Introduction to Computer Security

Freshservice Discovery Probe User Guide

ChangeAuditor 6.0 For Windows File Servers. Event Reference Guide

Windows Operating Systems. Basic Security

Advanced Audit Policy Configurations for LT Auditor+ Reference Guide

CSE 120 Principles of Operating Systems. Modules, Interfaces, Structure

Windows Security Environment

Clustered Data ONTAP 8.2

Windows NT Server Operating System Security Features Carol A. Siegel Payoff

Integrating Lustre with User Security Administration. LAD 15 // Chris Gouge // 2015 Sep

A Survey of Access Control Policies

A COMPARISON BETWEEN THE SAMBA3 AND LIKEWISE LWIOD FILE SERVERS

Operating System Structure

Introduction to Computer Security

Oracle Solaris Security: Mitigate Risk by Isolating Users, Applications, and Data

TELE 301 Lecture 7: Linux/Unix file

Access Control Fundamentals

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

Symantec Enterprise Security Manager Baseline Policy Manual for CIS Benchmark

Chapter 14: Access Control Mechanisms

Using Network Attached Storage with Linux. by Andy Pepperdine

SECURITY SUBSYSTEM IN WINDOWS

Desktop : Ubuntu Desktop, Ubuntu Desktop Server : RedHat EL 5, RedHat EL 6, Ubuntu Server, Ubuntu Server, CentOS 5, CentOS 6

Host Hardening. OS Vulnerability test. CERT Report on systems vulnerabilities. (March 21, 2011)

Case Studies. Joint software development Mail 1 / 38. Case Studies Joint Software Development. Mailers

Contents III: Contents II: Contents: Rule Set Based Access Control (RSBAC) 4.2 Model Specifics 5.2 AUTH

Programmation Systèmes Cours 4 Runtime user management

IDENTITIES, ACCESS TOKENS, AND THE ISILON ONEFS USER MAPPING SERVICE

Access Control Basics. Murat Kantarcioglu

Unix Security Technologies: Host Security Tools. Peter Markowsky <peterm[at]ccs.neu.edu>

Novi Survey Installation & Upgrade Guide

COS 318: Operating Systems. File Layout and Directories. Topics. File System Components. Steps to Open A File

ELEC 377. Operating Systems. Week 1 Class 3

ChangeAuditor 5.6. For Windows File Servers Event Reference Guide

FREQUENTLY ASKED QUESTIONS

SHARING FILE SYSTEM RESOURCES

General DBA Best Practices

ONEFS MULTIPROTOCOL SECURITY UNTANGLED

Windows Security and the MKS Toolkit

Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION

Permissions Mapping in the Isilon OneFS File System

How To Manage File Access On Data Ontap On A Pc Or Mac Or Mac (For A Mac) On A Network (For Mac) With A Network Or Ipad (For An Ipad) On An Ipa (For Pc Or

The Case for SE Android. Stephen Smalley Trust Mechanisms (R2X) National Security Agency

StorHouse/CIFS Installation and Configuration Guide

Access Control. ITS335: IT Security. Sirindhorn International Institute of Technology Thammasat University ITS335. Access Control.

EMC Celerra Network Server

RH033 Red Hat Linux Essentials or equivalent experience with Red Hat Linux..

Using HP-UX Role-Based Access Control

File Services. File Services at a Glance

Learning Objectives. Chapter 1: Networking with Microsoft Windows 2000 Server. Basic Network Concepts. Learning Objectives (continued)

Lecture 17: Mobile Computing Platforms: Android. Mythili Vutukuru CS 653 Spring 2014 March 24, Monday

Case Study: Access control 1 / 39

vcenter Hyperic Configuration Guide

Operating System Structures

Active Directory and Linux Identity Management

Transcription:

CIS 551 / TCOM 401 Computer and Network Security Spring 2007 Lecture 3 1/18/07 CIS/TCOM 551 1

Announcements Email project groups to Jeff (vaughan2 AT seas.upenn.edu) by Jan. 25 Start your projects early! 1/18/07 CIS/TCOM 551 2

The Gold Standard Authentication Identify which principals take which actions Audit Recording the security relevant actions Authorization Determine what actions are permissible This lecture is about authorization. We'll get to authentication & audit later. 1/18/07 CIS/TCOM 551 3

Authorization Authorization is the process of determining whether a principal is permitted to perform a particular action. Access control Example: Read/Write/Execute permissions for a file system. Example: Java applets have restricted authorization to perform network & disk I/O. 1/18/07 CIS/TCOM 551 4

Policy vs. Mechanism 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) 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/18/07 CIS/TCOM 551 5

Access Control Matrices A[s][o] Obj 1 Obj 2 Obj N Subj 1 {r,w,x} {r,w} {} Subj 2 {w,x} {} Each entry contains a set of rights. Subj M {x} {r,w,x} {r,w,x} 1/18/07 CIS/TCOM 551 6

Access Control Checks Suppose subject s wants to perform action that requires right r on object o: If (r A[s][o]) then perform action else access is denied 1/18/07 CIS/TCOM 551 7

Rights and Actions Besides read, write, execute actions there are many others: Ownership 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) Deletion of Subjects Objects Rights (sometimes called revocation) 1/18/07 CIS/TCOM 551 8

Access Control Examples Assume OS is a subject with all rights To create a file f owned by Alice: Create object f Grant own to Alice with respect to f Grant read to Alice with respect to f Grant write to Alice with respect to f To start a login for Alice Input and check password Create a shell process p Grant own_process to Alice with respect to p 1/18/07 CIS/TCOM 551 9

Reference Monitors Subject Request Monitor (Action, Object)? Denied Granted 1/18/07 CIS/TCOM 551 10

Reference Monitors Criteria Correctness Complete mediation (all avenues of access must be protected) Expressiveness (what policies are admitted) How large/complex is the mechanism? Trusted Computing Base (TCB) The set of components that must be trusted to enforce a given security policy Would like to simplify/minimize the TCB to improve assurance of correctness 1/18/07 CIS/TCOM 551 11

Software Mechanisms Interpreters Check the execution of every instruction Hard to mediate high-level abstractions Wrappers Only interpret some of the instructions What do you wrap? Where do you wrap? (link-time?) Operating Systems Level of granularity? Context switching overheads? Example Java and C# runtime systems Program Interpreter OS Hardware A[s][o] A[s][o] A[s][o] 1/18/07 CIS/TCOM 551 12

Hardware Mechanisms Multiple modes of operation User mode (problem state) Kernel mode (supervisor state) Specialized hardware Virtual memory support (TLB s, etc.) Interrupts OS A[s][o] Hardware A[s][o] 1/18/07 CIS/TCOM 551 13

Protecting Reference Monitors It must not be possible to circumvent the reference monitor by corrupting it Mechanisms Type checking Sandboxing: run processes in isolation 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) 1/18/07 CIS/TCOM 551 14

Implementing Access Control Access control matrices Subjects >> #users (say 1000s) Objects >> #files (say 1,000,000s) To specify all users read f Change O(users) entries Matrix is typically sparse Store only non-empty entries Special consideration for groups of users

Access Control Lists A[s][o] Obj 1 Obj 2 Obj N Subj 1 {r,w,x} {r,w} {} Subj 2 {w,x} {} {r} Subj M {x} {r,w,x} {r,w,x} For each object, store a list of (Subject x Rights) pairs. 1/18/07 CIS/TCOM 551 16

Access Control Lists Resolving queries is linear in length of the list Revocation w.r.t. a single object is easy Who can access this object? is easy Useful for auditing Lists could be long Factor into groups (lists of subjects) Give permissions based on group Introduces consistency question w.r.t. groups Authentication critical When does it take place? Every access would be expensive. 1/18/07 CIS/TCOM 551 17

Representational Completeness Access Control Lists Can represent any access control matrix Potentially very large Used in windows file system, NTFS Unix file permissions (next topic) Fixed size Can't naturally express some access control policies/matrices 1/18/07 CIS/TCOM 551 18

Unix file security Each file has owner and group setid Permissions set by owner Read, write, execute --- rwx rwx Owner, group, other owner Represented by vector of four octal values Only owner, root can change permissions This privilege cannot be delegated or shared Setid bits Discuss in a few slides rwx group other 1/18/07 CIS/TCOM 551 19

Question "owner" can have fewer privileges than "other" What happens? User gets access? User does not? Prioritized resolution of differences if user = owner then owner permission else if user in group then group permission else other permission 1/18/07 CIS/TCOM 551 20

Unix Policies Interact /home/jeff/ jeff jeff -rwx --- --- /home/jeff/.bashrc jeff jeff -rwx r-- r-- stevez cannot read /home/jeff/.bashrc The confidentiality/availability of an object depends on policies other than it's own. Such interacts make specifying policies hard. Problem is not limited to unix (or file systems). 1/18/07 CIS/TCOM 551 21

Setid bits on executable Unix file Three setid bits Sticky Off: if user has write permission on directory, can rename or remove files, even if not owner On: only file owner, directory owner, and root can rename or remove file in the directory Setuid set EUID of process to ID of file owner passwd owned by root and setuid is true Jeff executes passwd: passwd runs as root Setgid set EGID of process to GID of file 1/18/07 CIS/TCOM 551 22

Effective User ID (EUID) Each process has three user IDs (more in Linux) Real user ID (RUID) same as the user ID of parent (unless changed) used to determine which user started the process Effective user ID (EUID) from set user ID bit on program file, or system call determines the permissions for process file access and port binding Saved user ID (SUID) So previous EUID can be restored Real group ID, effective group ID, used similarly 1/18/07 CIS/TCOM 551 23

Process Operations and IDs Root ID=0 for superuser root; can access any file Fork and Exec Inherit three IDs, except when executing a file with setuid bit on. Setuid system calls seteuid(newid) can set EUID to Real ID or saved ID, regardless of current EUID Any ID, if EUID=0 Details are actually more complicated Several different calls: setuid, seteuid, setruid 1/18/07 CIS/TCOM 551 24

Example RUID 25 Owner 18 SetUID ; ; exec( ); Owner 18 -rw-r--r-- file Owner 25 -rw-r--r-- file read/write read/write program ; ; i=getruid() setuid(i); ; ; RUID 25 EUID 18 RUID 25 EUID 25 1/18/07 CIS/TCOM 551 25

Setuid programming Can do anything that owner of file is allowed to do Be Careful! Root can do anything; don t get tricked (no middle ground) Principle of least privilege change EUID when root privileges no longer needed Be sure not to Take action for untrusted user Return secret data to untrusted user Setuid scripts This is a bad idea Historically, race conditions Begin executing setuid program; change contents of program before it loads and is executed 1/18/07 CIS/TCOM 551 26

Unix summary We re all very used to this So probably seems pretty good We overlook ways it might be better Good things Some protection from most users Flexible enough to make things possible Main bad thing Too tempting to use root privileges No way to assume some root privileges without all root privileges 1/18/07 CIS/TCOM 551 27

Access control in Windows (NTFS) Some basic functionality similar to Unix Specify access for groups and users Read, modify, change owner, delete ACLs used for fine grained control Some additional concepts Tokens Security attributes Generally More flexibility than Unix Can define new permissions Can give some but not all administrator privileges 1/18/07 CIS/TCOM 551 28

Sample permission options SID Security IDentifier Identity (like Unix UID) SID revision number 48-bit authority value Globally unique Describes users, groups, computers, domains, domain members 1/18/07 CIS/TCOM 551 29

File Permission Inheritance Static permission inheritance (Win NT) Initially, subfolders inherit permissions of folder Folder, subfolder changed independently Replace Permissions on Subdirectories command Eliminates any differences in permissions Dynamic permission inheritance (Win 2000) Child inherits parent permission, remains linked Parent changes are inherited, except explicit settings Inherited and explicitly-set permissions may conflict Resolution rules Positive permissions are additive (take union of all permissions) Negative permission (deny access) takes priority 1/18/07 CIS/TCOM 551 30

Security Descriptor Access Control List associated with an object Specifies who can perform what actions on the object Several fields Header Descriptor revision number Control flags, attributes of the descriptor E.g., memory layout of the descriptor SID of the object's owner SID of the primary group of the object Two attached optional lists: Discretionary Access Control List (DACL) Describes access policy System Access Control List (SACL) Describes audit/logging policy 1/18/07 CIS/TCOM 551 31

Tokens Security Reference Monitor uses tokens to identify the security context of a process or thread Security context privileges, accounts, and groups associated with the process or thread Impersonation token thread uses temporarily to adopt a different security context, usually of another user Related to the EUID used in Unix. 1/18/07 CIS/TCOM 551 32

Impersonation Tokens Windows equivalent of setuid Process uses security attributes of another Client passes impersonation token to server Client specifies impersonation level of server Anonymous Token has no information about the client Identification server obtain the SIDs of client and client's privileges, but server cannot impersonate the client Impersonation (= Anonymous + Identification) server identify and impersonate the client Delegation (= Impersonation + Authentication) lets server impersonate client on local, remote system 1/18/07 CIS/TCOM 551 33

Example access request Access token Security descriptor User: Mark Group1: Administrators Group2: Writers Revision Number Control flags Owner SID Group SID DACL Pointer SACL Pointer Deny Writers Read, Write Allow Mark Read, Write Access request: write Action: denied User Mark requests write permission Descriptor denies permission to group Reference Monitor denies request 1/18/07 CIS/TCOM 551 34

Windows Summary Good things Very expressive Don t need full SYSTEM (e.g. root) privileges for many tasks Bad thing More complex policies Harder to implement: Larger TCB Harder for users to understand