Mandatory Access Control and SE Linux CS 460 Cyber Security Lab Spring ‘10.

Slides:



Advertisements
Similar presentations
Information Flow and Covert Channels November, 2006.
Advertisements

1 cs691 chow C. Edward Chow Confidentiality Policy CS691 – Chapter 5 of Matt Bishop.
Access Control Methodologies
I NFORMATION S ECURITY : C ONFIDENTIALITY P OLICIES (C HAPTER 4) Dr. Shahriar Bijani Shahed University.
ITIS 3200: Introduction to Information Security and Privacy Dr. Weichao Wang.
Slide #5-1 Chapter 5: Confidentiality Policies Overview –What is a confidentiality model Bell-LaPadula Model –General idea –Informal description of rules.
Access Control Intro, DAC and MAC System Security.
1 Confidentiality Policies CSSE 490 Computer Security Mark Ardis, Rose-Hulman Institute March 18, 2004.
Confidentiality Policies  Overview  What is a confidentiality model  Bell-LaPadula Model  General idea  Informal description of rules  Formal description.
June 1, 2004Computer Security: Art and Science © Matt Bishop Slide #5-1 Chapter 5: Confidentiality Policies Overview –What is a confidentiality.
April 20, 2004ECS 235Slide #1 DG/UX System Provides mandatory access controls –MAC label identifies security level –Default labels, but can define others.
1 cs691 chow C. Edward Chow Confidentiality Policy CS691 – Chapter 5 of Matt Bishop.
Security-Enhanced Linux Joseph A LaConte CS 522 December 8, 2004.
November 1, 2004Introduction to Computer Security ©2004 Matt Bishop Slide #5-1 Chapter 5: Confidentiality Policies Overview –What is a confidentiality.
Sicurezza Informatica Prof. Stefano Bistarelli
User Domain Policies.
7/15/2015 5:04 PM Lecture 4: Bell LaPadula James Hook CS 591: Introduction to Computer Security.
Lecture slides prepared for “Computer Security: Principles and Practice”, 2/e, by William Stallings and Lawrie Brown, Chapter 4 “Overview”.
ADVANCED LINUX SECURITY. Abstract : Using mandatory access control greatly increases the security of an operating system. SELinux, which is an implementation.
1 IS 2150 / TEL 2810 Introduction to Security James Joshi Assistant Professor, SIS Lecture 5 September 27, 2007 Security Policies Confidentiality Policies.
Mandatory Security Policies CS461/ECE422 Spring 2012.
Security Policy Models CSC 482/582: Computer Security.
CH14 – Protection / Security. Basics Potential Violations – Unauthorized release, modification, DoS External vs Internal Security Policy vs Mechanism.
SELinux US/Fedora/13/html/Security-Enhanced_Linux/
Security Policy What is a security policy? –Defines what it means for a system to be secure Formally: Partition system into –Secure (authorized) states.
1 Confidentiality Policies September 21, 2006 Lecture 4 IS 2150 / TEL 2810 Introduction to Security.
1 IS 2150 / TEL 2810 Information Security & Privacy James Joshi Associate Professor, SIS Lecture 6 Oct 2-9, 2013 Security Policies Confidentiality Policies.
© G. Dhillon, IS Department Virginia Commonwealth University Principles of IS Security Formal Models.
Security Enhanced Linux David Quigley. History SELinux Timeline 1985:LOCK (early Type Enforcement) 1990: DTMach / DTOS 1995: Utah Fluke / Flask 1999:
1 Implementation of Security-Enhanced Linux Yue Cui Xiang Sha Li Song CMSC 691X Project 2—Summer 02.
Session 2 - Security Models and Architecture. 2 Overview Basic concepts The Models –Bell-LaPadula (BLP) –Biba –Clark-Wilson –Chinese Wall Systems Evaluation.
Slide #5-1 Confidentiality Policies CS461/ECE422 Computer Security I Fall 2010 Based on slides provided by Matt Bishop for use with Computer Security:
SELinux. The need for secure OS Increasing risk to valuable information Dependence on OS protection mechanisms Inadequacy of mainstream operating systems.
Academic Year 2014 Spring Academic Year 2014 Spring.
1 IS 2150 / TEL 2810 Introduction to Security James Joshi Associate Professor, SIS Lecture 5 September 29, 2009 Security Policies Confidentiality Policies.
1/15/20161 Computer Security Confidentiality Policies.
Access Control: Policies and Mechanisms Vinod Ganapathy.
Security-Enhanced Linux Eric Harney CPSC 481. What is SELinux? ● Developed by NSA – Released in 2000 ● Adds additional security capabilities to Linux.
Computer Security: Principles and Practice
November 1, 2004Introduction to Computer Security ©2004 Matt Bishop Slide #5-1 Confidentiality Policies Overview –What is a confidentiality model Bell-LaPadula.
CS426Fall 2010/Lecture 211 Computer Security CS 426 Lecture 21 The Bell LaPadula Model.
Security Models Xinming Ou. Security Policy vs. Security Goals In a mandatory access control system, the system defines security policy to achieve security.
IS 2150/TEL 2810: Introduction of Computer Security1 September 27, 2003 Introduction to Computer Security Lecture 4 Security Policies, Confidentiality.
Design and Implementation MAC in Security Operating System CAI Yi, ZHENG Zhi-rong, SHEN Chang-xiang Presented By, Venkateshwarlu Jangili. 1.
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.
Lecture 2 Page 1 CS 236 Online Security Policies Security policies describe how a secure system should behave Policy says what should happen, not how you.
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.
SELinux Overview Dan Walsh SELinux for Dummies Dan Walsh
Access Control CSE 465 – Information Assurance Fall 2017 Adam Doupé
Chapter 5: Confidentiality Policies
Computer Security Confidentiality Policies
IS 2150 / TEL 2810 Introduction to Security
Advanced System Security
Chapter 5: Confidentiality Policies
Confidentiality Models
DG/UX System Provides mandatory access controls Initially
Confidentiality Policies
Trust Models CS461/ECE422.
Chapter 5: Confidentiality Policies
Lecture 17: Mandatory Access Control
Chapter 5: Confidentiality Policies
Computer Security Access Control
Computer Security Confidentiality Policies
IS 2150 / TEL 2810 Information Security & Privacy
Chapter 5: Confidentiality Policies
Advanced System Security
Presentation transcript:

Mandatory Access Control and SE Linux CS 460 Cyber Security Lab Spring ‘10

Overview Review mandatory access control Discuss SE Linux –Type Enforcement Model –MLS or Bell-LaPadula model –Multiple Category Security (MCS)

MAC vs DAC Discretionary Access Control (DAC) –Normal users can change access control state directly assuming they have appropriate permissions –Access control implemented in standard OS’s, e.g., Unix, Linux, Windows –Access control is at the discretion of the user Mandatory Access Control (MAC) –Enforced by system wide set of rules –Normal user cannot change access control schema “Strong” system security requires MAC –Normal users cannot be trusted

Confidentiality Policy Goal: prevent the unauthorized disclosure of information –Deals with information flow –Integrity incidental Multi-level security models are best-known examples –Bell-LaPadula Model basis for many, or most, of these

Bell-LaPadula Model, Step 1 Security levels arranged in linear ordering –Top Secret: highest –Secret –Confidential –Unclassified: lowest Levels consist of security clearance L(s) –Objects have security classification L(o) Bell, LaPadula 73

Example objectsubjectsecurity level Telephone Lists Activity Logs Files Personnel Files UlaleyUnclassified ClaireConfidential SamuelSecret TamaraTop Secret Tamara can read all files Claire cannot read Personnel or Files Ulaley can only read Telephone Lists

Reading Information Information flows up, not down –“Reads up” disallowed, “reads down” allowed Simple Security Condition (Step 1) –Subject s can read object o iff, L(o) ≤ L(s) and s has permission to read o Note: combines mandatory control (relationship of security levels) and discretionary control (the required permission) –Sometimes called “no reads up” rule

Writing Information Information flows up, not down –“Writes up” allowed, “writes down” disallowed *-Property (Step 1) –Subject s can write object o iff L(s) ≤ L(o) and s has permission to write o Note: combines mandatory control (relationship of security levels) and discretionary control (the required permission) –Sometimes called “no writes down” rule

Basic Security Theorem, Step 1 If a system is initially in a secure state, and every transition of the system satisfies the simple security condition (step 1), and the *-property (step 1), then every state of the system is secure –Proof: induct on the number of transitions Meaning of “secure” in axiomatic

Bell-LaPadula Model, Step 2 Expand notion of security level to include categories (also called compartments) Security level is (clearance, category set) Examples –( Top Secret, { NUC, EUR, ASI } ) –( Confidential, { EUR, ASI } ) –( Secret, { NUC, ASI } )

Levels and Lattices (A, C) dom (A, C) iff A ≤ A and C  C Examples –(Top Secret, {NUC, ASI}) dom (Secret, {NUC}) –(Secret, {NUC, EUR}) dom (Confidential,{NUC, EUR}) –(Top Secret, {NUC})  dom (Confidential, {EUR}) –(Secret, {NUC})  dom (Confidential,{NUC, EUR}) Let C be set of classifications, K set of categories. Set of security levels L = C  K, dom form lattice –Partially ordered set –Any pair of elements Has a greatest lower bound Has a least upper bound

Example Lattice TS: NUC,EUR TS: NUC,ASI TS:NUCS:NUCC: NUC,EUR C:EURSLTS: ASI, NUC,EUR

Levels and Ordering Security levels partially ordered –Any pair of security levels may (or may not) be related by dom “dominates” serves the role of “greater than” in step 1 –“greater than” is a total ordering, though

Reading Information Information flows up, not down –“Reads up” disallowed, “reads down” allowed Simple Security Condition (Step 2) –Subject s can read object o iff L(s) dom L(o) and s has permission to read o Note: combines mandatory control (relationship of security levels) and discretionary control (the required permission) –Sometimes called “no reads up” rule

Writing Information Information flows up, not down –“Writes up” allowed, “writes down” disallowed *-Property (Step 2) –Subject s can write object o iff L(o) dom L(s) and s has permission to write o Note: combines mandatory control (relationship of security levels) and discretionary control (the required permission) –Sometimes called “no writes down” rule

Basic Security Theorem, Step 2 If a system is initially in a secure state, and every transition of the system satisfies the simple security condition (step 2), and the *- property (step 2), then every state of the system is secure –Proof: induct on the number of transitions –In actual Basic Security Theorem, discretionary access control treated as third property, and simple security property and *-property phrased to eliminate discretionary part of the definitions — but simpler to express the way done here.

Problem Colonel has (Secret, {NUC, EUR}) clearance Major has (Secret, {EUR}) clearance Can Major write data that Colonel can read? Can Major read data that Colonel wrote? What about the reverse?

Solution Define maximum, current levels for subjects –maxlevel(s) dom curlevel(s) Example –Treat Major as an object (Colonel is writing to him/her) –Colonel has maxlevel (Secret, { NUC, EUR }) –Colonel sets curlevel to (Secret, { EUR }) –Now L(Major) dom curlevel(Colonel) Colonel can write to Major without violating “no writes down” –Does L(s) mean curlevel(s) or maxlevel(s)? Formally, we need a more precise notation

Adjustments to “write up” General write permission is both read and write –So both simple security condition and *- property apply –S dom O and O dom S means S=O BLP discuss append as a “pure” write so writeup still applies

BLP in OS’s Multi-level systems (MLS) implemented in OS’s follow BLP –Many Trusted OS’s evaluated over the years. –Trusted Solaris is probably most widely deployed Often people use the concepts of MAC and MLS and BLP interchangeably –But there exist other MAC models There are also mandatory integrity models –But we won’t go there today…

Example Scenario Proj1HighCharlesDev Manager Proj1,Proj2LowBobIntern Proj1,Proj2, Proj3 HighAliceProject Manager ProjectsClearanceUserRole

Sensitivity Labels High:Proj1Charles Low:Proj1,Proj2Bob High:Proj1,Proj2,Proj3Alice Sensitivity LabelUser

Operations What is the highest Proj1 file label such that –Alice and Bob can both read? –Alice and Charles can both read? –All three can read What about write?

SE Linux Security Architecture A bolt-on to the basic Unix security model –Implements a security server to interpret security policy –Leaves basic Unix security mechanisms alone. But replace key programs to require security server approval as well E.g. the SE Linux identity and the Linux user are two separate things. SE Linux labeling and Unix DAC are both applied

SELinux Architecture Sponsored by NSA Evolved from Flask architecture precursor Originally direct kernel patch –Moved to use the Linux Security Module (LSM) –Limited number of tools that can hook into LSM Meeting Critical Security Objectives with Security-Enhanced Linux – ers/ottawa01-abs.shtml

Key SELinux Concepts Users – Identifier for a single user or an equivalence class of users Class – Type of an object, e.g., file or process Roles – Specification of privileges or actions that can be taken by user fulfilling a role Domains – Classification of a subject Types – Classification of an object (really the same thing as a domain but applied to objects)

SELinux Concepts Two basic security enforcement decisions –Access control: Can subject access object? –Labeling: What label should a new object have? Very general policy language enables the specification of many models. –Ships with a targeted policy enabled.

SE Linux Type Enforcement (TE) Access controlled by unstructured label called a type –When labeling a process the type is sometimes called a domain Policy defines access rules in terms of process and file types –allow : –allow httpd_t http_config_t:file { read, write };

Example TE mapping Proj1, SecretProj1Charles ROProj1, ROProj2Bob Proj1, Proj2, Proj3, SecretProj1, SecretProj2 Alice Domain or typeUser

TE Rules allow Proj1 ProjData:file { read, write, execute }; allow ROProj1 ProjData:file { read, execute }; allow SecretProj1 SecretProj1Data: file { read, write, execute };

Operations How must data be labeled for Alice, Bob, and Charles to coordinate on Proj1? How must sensitive Proj1 data be labeled? Can Bob write any Proj1 data?

SE Linux Concepts Entities are labeled with a security context –User, Role, Type or Domain –E.g., Bob:user_r:corporate_t –When displayed from the “id” command means Logged on as user Bob fulfilling the user_r role in the corporate_t domain –When displayed off file foo from “ls –Z foo” means Created by user Bob while in user_r role. Member of corporate_t type

Policy Language Overview Type declaration –type type-name [ alias alias-id ] [, attr-id] ; –E.g., type sshd_t, domain, privuser, privrole; –Binds a type name to some attributes Attributes are arbitrary tags associated with types at definition type In many places in policy attributes can be used in place of direct types –allow domain unlabeled_t:file { read, write, execute }; Also used in implementing MLS. More later.

Type Transition Defines the rules for the type of a new object –type_transition source_types target_types : classes new_type ; Source_type is the type/domain of the creating subject. Target_type is the type of the parent object, e.g. directory in the file system case –E.g., type_transition sshd_t tmp_t : devfile_class_set cardmsg_dev_t ; When sshd daemon creates a device file in the tmp directory, the new file is labeled with cardmsg_dev_t devfile_class_set is a M4 macro

Access Vector Rules Rules that determine which domains can access which types –(allow | auditallow | dontaudit) src_type target_type : classes permissions ; –When a subject of src_type accesses an object of target_type, it has the specified permissions if object is one of the specified classes –E.g., allow sshd_t shell_exec_t : file execute;

Role Based Access Control Provide indirection between a user and the privileges of a user –A user can fulfill multiple roles –Multiple users can fulfill the same role –User groups can act as a weak substitution for Roles User may be capable of multiple roles but will only operate with one active role –Reduce privilege exposure

Role Syntax Role Definition –role name type type_set ; –Defines which domains (types) a role can be assumed in –E.g., role staff_r type staff_t; Role Allow –allow current_role new_role ; –E.g., allow staff_t sysadm_t ; –If not specified cannot take one new role from current role

Domain Transitions By default new process inherits domain of creating process Can create additional rules to enable a domain transition –type_transition d1 d2:process f1 –Plus three allow rules to permit execute access between the three types

TE Policy Problems Explicit rule base policy gives expressibility, but… Policies become very large –150,000 rules in “targeted” SE Linux policy (after macro expansion Policy language is powerful, but very low level –Macros used to approximate program modularity –Analysis tools work post macro

Modular Policy Pre-FC5 all policy files just plugged into a single file and compiled –Must reload whole policy to add policy for new app –App-specific policy must depend on specific names of existing policy Modular mechanism enables defining type parameters – 5-manual/Deployment_Guide-en-US/sec-sel-building- policy-module.htmlhttp:// 5-manual/Deployment_Guide-en-US/sec-sel-building- policy-module.html

MLS in SE Linux A parallel security model that can be executed in addition to type enforcement Augment the security context with a sensitivity label –Sensitivity label equals one of 16 clearance levels, and a subset of 256 compartments –Bob:user_r:corporate_t:s0_c0,c5,c10

MLS in SE Linux Leverages the TE constraint policy language to express the BLP access rules Added mlsconstrain statement –mlsconstrain { dir file lnk_file } { read getattr execute } (( l1 dom l2 ) or (( t1 == mlsfilereadtoclr ) and ( h1 dom l2 )) or ( t1 == mlsfileread ) or ( t2 == mlstrustedobject ));

MCS in SE Linux Multiple Category Security –Attempts to use the MLS infrastructure to provide a more useable security mechanism for mainline RedHat distributions Use the sensitivity labels –But only allow a single clearance –Effectively assign sets of categories to subjects and objects –Using the sensitivity label in the security context

MCS in SE Linux While MCS uses the MLS mechanisms it is not a mandatory control Regular users can assign any category associated with them to a file they have access to –Regular users have the labeling discretion Functionally equivalent to ACLs, but stylistically different –May be easier to understand

Summary MAC is not the same as Bell LaPadula SE Linux offers several access control models –Type enforcement, MLS, and MCS SE Linux flexibility can be complex –Once the complex mandatory policy has been created and proven, the normal user cannot evade it More execution details for SELinux in upcoming class exercise.