CS703 - Advanced Operating Systems

Slides:



Advertisements
Similar presentations
Access Control Chapter 3 Part 3 Pages 209 to 227.
Advertisements

Secure Operating Systems Lesson 0x11h: Systems Assurance.
CSCD 303 Essential Computer Security Fall 2010 Lecture 4 - Desktop Security Reading:
Access Control and Operating System Security
Hands-On Microsoft Windows Server 2003 Administration Chapter 5 Administering File Resources.
Computer Security: Principles and Practice EECS710: Information Security Professor Hossein Saiedian Fall 2014 Chapter 4: Access Control.
Operating System Security Chapter 9. Operating System Security Terms and Concepts An operating system manages and controls access to hardware components.
Secure Architecture Principles Isolation and Least Privilege
Lecture 7 Access Control
Lecture slides prepared for “Computer Security: Principles and Practice”, 2/e, by William Stallings and Lawrie Brown, Chapter 4 “Overview”.
7-Access Control Fundamentals Dr. John P. Abraham Professor UTPA.
ADVANCED LINUX SECURITY. Abstract : Using mandatory access control greatly increases the security of an operating system. SELinux, which is an implementation.
Copyright © 2002 ProsoftTraining. All rights reserved. Operating System Security.
John Mitchell Secure OS Principles and Security Policies by John Mitchell (Modified by Vijay Ganesh)
1 Information Security – Theory vs. Reality , Winter 2011 Lecture 4: Access Control Eran Tromer Slides credit: John Mitchell, Stanford course.
70-294: MCSE Guide to Microsoft Windows Server 2003 Active Directory Chapter 9: Active Directory Authentication and Security.
Sharing Resources Lesson 6. Objectives Manage NTFS and share permissions Determine effective permissions Configure Windows printing.
7.3. Windows Security Descriptors
Module 4 Managing Access to Resources in Active Directory ® Domain Services.
Security+ All-In-One Edition Chapter 19 – Privilege Management Brian E. Brzezicki.
CS426Fall 2010/Lecture 91 Computer Security CS 426 Lecture 9 Unix Access Control.
G53SEC 1 Access Control principals, objects and their operations.
Access Control. What is Access Control? The ability to allow only authorized users, programs or processes system or resource access The ability to disallow.
CE Operating Systems Lecture 21 Operating Systems Protection with examples from Linux & Windows.
G53SEC 1 Reference Monitors Enforcement of Access Control.
Linux Security. Authors:- Advanced Linux Programming by Mark Mitchell, Jeffrey Oldham, and Alex Samuel, of CodeSourcery LLC published by New Riders Publishing.
UNIX System Protection. Unix History Developed by Dennis Ritchie and Ken Thompson at AT&T Bell Labs Adapted some ideas from the Multics project in 1969.
John Mitchell Announcement Thursday lecture: Alex Stamos, Yahoo! VP of Information Security (CISO) – Alex has been busy with Heartbleed – He is taking.
IS2150/TEL2810: Introduction of Computer Security1 October 18, 2005 Introduction to Computer Security Lecture 6 Windows/Unix/Solaris 10 Design Principles.
Trusted OS Design and Evaluation CS432 - Security in Computing Copyright © 2005, 2010 by Scott Orr and the Trustees of Indiana University.
SELinux. The need for secure OS Increasing risk to valuable information Dependence on OS protection mechanisms Inadequacy of mainstream operating systems.
1 Chapter Overview Managing Object and Container Permissions Locating and Moving Active Directory Objects Delegating Control Troubleshooting Active Directory.
Access Control  privilege How does your code manage who has access to what?  authorization  permission Two OS models: Unix Windows.
COEN 350: Network Security Authorization. Fundamental Mechanisms: Access Matrix Subjects Objects (Subjects can be objects, too.) Access Rights Example:
Trusted Operating Systems
Privilege Management Chapter 22.
Computer Security: Principles and Practice
Lecture9 Page 1 CS 236 Online Operating System Security, Con’t CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Security-Enhanced Linux Stephanie Stelling Center for Information Security Department of Computer Science University of Tulsa, Tulsa, OK
Access Controls Mandatory Access Control by Sean Dalton December 5 th 2008.
Chapter 29: Program Security Dr. Wayne Summers Department of Computer Science Columbus State University
MLS/MCS on SE Linux Russell Coker. What is SE Linux? A system for Mandatory Access Control (MAC) based on the Linux Security Modules (LSM) framework Uses.
SE Linux Implementation Russell Coker. What is SE Linux? A system for Mandatory Access Control (MAC) based on the Linux Security Modules (LSM) framework.
Access Control Model SAM-5.
Access Control CSE 465 – Information Assurance Fall 2017 Adam Doupé
Operating System Security
Protection and Security
Operating Systems Protection Alok Kumar Jagadev.
Chapter 14: System Protection
Introduction to Information Security , Spring 2016 Lecture 9: Secure Architecture Principles, Access Control Avishai Wool Slides credit: Eran.
IS 2150 / TEL 2810 Introduction to Security
Secure Architecture Principles Isolation and Least Privilege
Official levels of Computer Security
Access Control and Operating System Security
CE Operating Systems Lecture 21
An Overview Rick Anderson Pat Demko
UNIX System Protection
SECURITY IN THE LINUX OPERATING SYSTEM
OS Access Control Mauricio Sifontes.
Operating System Security
Chapter 14: Protection.
Chapter 29: Program Security
Operating Systems: A Modern Perspective, Chapter 3
Computer Security Access Control
CS703 - Advanced Operating Systems
Windows Vista Inside Out
Access Control What’s New?
Preventing Privilege Escalation
Access Control and Audit
CS703 - Advanced Operating Systems
Presentation transcript:

CS703 - Advanced Operating Systems By Mr. Farhan Zaidi

Lecture No. 44

Overview of today’s lecture Java Security UNIX file security Setuid programs Windows security Tokens, security descriptors and reference monitor SE Linux Features of a secure OS summarized DAC Vs MAC Orange book criteria etc.

Java Security (2) Examples of specified protection with JDK 1.2

Unix file security - Read, write, execute Owner, group, other Each file has owner and group Permissions set by owner Read, write, execute Owner, group, other Represented by vector of four octal values Only owner, root can change permissions This privilege cannot be delegated or shared Setid bits – Discussed later -

Question What happens? Owner gets access? Owner does not? Owner can have fewer privileges than other What happens? Owner gets access? Owner does not? Prioritized resolution of differences if user = owner then owner permission else if user in group then group permission else other permission

Setid bits on executable Unix file Three setid bits Setuid – set EUID of process to ID of file owner Setgid – set EGID of process to GID of file 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

Effective user id (EUID) Each process has three Ids (+ more under 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 the file being executed, or sys 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

Process Operations and IDs Root ID=0 for superuser root; can access any file Fork and Exec Inherit three IDs, except exec of file with setuid bit 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, setreuid

Example Owner 18 RUID 25 SetUID …; exec( ); program Owner 18 …; i=getruid() setuid(i); -rw-r--r-- RUID 25 file read/write EUID 18 Owner 25 -rw-r--r-- read/write RUID 25 file EUID 25

Careful with Setuid ! Can do anything that owner of file is allowed to do Be sure not to Take action for untrusted user Return secret data to untrusted user Note: anything possible if root; no middle ground between user and root

Unix summary Good things Main bad thing 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

Access control in Windows (NTFS) Some basic functionality similar to Unix Specify access for groups and users Read, modify, change owner, delete Some additional concepts Tokens Security attributes Generally More flexibility than Unix Can define new permissions Can give some but not all administrator privileges

Sample permission options Security ID (SID) Identity (replaces UID) SID revision number 48-bit authority value variable number of Relative Identifiers (RIDs), for uniqueness Users, groups, computers, domains, domain members all have SIDs

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 Negative permission (deny access) takes priority

Tokens Security Reference Monitor Security context Impersonation token uses tokens to identify the security context of a process or thread Security context Privileges and groups associated with the process or thread Impersonation token thread uses temporarily to adopt a different security context, usually of another user

Impersonation Tokens Client passes impersonation token to server 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 obtains the SIDs of client and client's privileges, but server cannot impersonate the client Impersonation server identifies and impersonates the client Delegation lets server impersonate client on local, remote systems

Security Descriptor who can perform what actions on the object Header Information associated with an object 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) – users, groups, … System Access Control List (SACL) – system logs, ..

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

SELinux Security-enhanced Linux system (NSA) Why Linux? Open source Enforce separation of information based on confidentiality and integrity requirements Mandatory access control incorporated into the major subsystems of the kernel Limit tampering and bypassing of application security mechanisms Confine damage caused by malicious applications Why Linux? Open source Already subject to public review NSA can review source, modify and extend

SELinux Security Policy Abstractions Type enforcement Each process has an associated domain Each object has an associated type Configuration files specify How domains are allowed to access types Allowable interactions and transitions between domains Role-based access control Each process has an associated role Separate system and user processes configuration files specify Set of domains that may be entered by each role

Kernelized Design Hardware and software for enforcing security rules Trusted Computing Base Hardware and software for enforcing security rules Reference monitor Part of TCB All system calls go through reference monitor for security checking Most OS not designed this way User space User process Kernel space OS kernel TCB Reference monitor

What makes a “secure” OS? Extra security features Stronger authentication mechanisms Example: require token + password More security policy options Example: only let users read file f for purpose p Logging and other features More secure implementation Apply secure design and coding principles Assurance and certification Code audit or formal verification Maintenance procedures Apply patches, etc.

Sample Features of “Trusted OS” Mandatory access control MAC not under user control, precedence over DAC Object reuse protection Write over old data when file space is allocated Complete mediation Prevent any access that circumvents monitor Audit Log security-related events and check logs Intrusion detection Anomaly detection Learn normal activity, Report abnormal actions Attack detection Recognize patterns associated with known attacks

DAC and MAC Discretionary Access Control Mandatory Access Control Restrict a subject's access to an object Generally: limit a user's access to a file Owner of file controls other users' accesses Mandatory Access Control Needed when security policy dictates that: protection decisions must not be left to object owner system enforces a security policy over the wishes or intentions of the object owner

DAC vs MAC DAC MAC Object owner has full power Complete trust in users Decisions are based only on user id and object ownerships Impossible to control information flow MAC Object owner CAN have some power Only trust in administrators Objects and tasks themselves can have ids Makes information flow control possible

Audit Write to write-once non-volatile medium Log security-related events Protect audit log Write to write-once non-volatile medium Audit logs can become huge Manage size by following policy Storage becomes more feasible Analysis more feasible since entries more meaningful Example policies Audit only first, last access by process to a file Do not record routine, expected events E.g., starting one process always loads …

Assurance methods Testing Can demonstrate existence of flaw, not absence Formal verification Time-consuming, painstaking process “Validation” Requirements checking Design and code reviews Module and system testing

Orange Book Criteria No security requirements Level D No security requirements Level C For environments with cooperating users C1 – protected mode OS, authenticated login, DAC, security testing and documentation (Unix) C2 – DAC to level of individual user, object initialization, auditing (Windows NT 4.0) Level B, A All users and objects must be assigned a security label (classified, unclassified, etc.) System must enforce Bell-LaPadula confidentiality model

Levels B, A (continued) B1 – classification and Bell-LaPadula Level B B1 – classification and Bell-LaPadula B2 – system designed in top-down modular way, must be possible to verify security of modules B3 – ACLs with users and groups, formal TCB must be presented, adequate security auditing, secure crash recovery Level A1 Formal proof of protection system, formal proof that model is correct, demonstration that implementation conforms to model.