Discretionary Access Control

Size: px
Start display at page:

Download "Discretionary Access Control"

Transcription

1 Operating System Security Discretionary Seong-je Cho ( 조성제 ) (sjcho at dankook.ac.kr) Fall 2018 Computer Security & Operating Systems Lab, DKU , F 18

2 Discretionary (DAC) Allows the owner of the resource to specify which subjects can access which resources Access control is at the discretion of the owner Object owner has the authority to control access of the object A system that enables the object owner to specify set of Users with access to a set of objects DAC models enforce access control based on user identities, object ownership and permission delegation The owner of an object may delegate the permission of the object to another user -2-

3 DAC models Discretionary: users can be given the ability of passing on their privileges to other users, where granting and revocation of privileges is regulated by an administrative policy. DAC model = Access Matrix model = Matrix model DAC can be implemented through Lists (ACLs) or Capability Lists -3-

4 DAC model = Access Matrix model Access Matrix = Matrix (an abstract model) is a table of subjects and objects indicating what actions individual subjects can take upon individual objects. Each row of this table is associated with a subject (or principal) Each column of the table is associated with an object each entry in the matrix indicates the access rights of a particular subject for a particular object An empty cell means that no access rights are granted. Access Matrix is implemented primarily in three ways List (ACL): bound to an object Capability List : bound to a subject Authorization Table Three columns: subjects, access rights, objects Generally used in DBMS systems -4-

5 Access Matrix -5-

6 ACLs vs. Capability Lists For each object, an ACL lists users and their permitted access rights A capability ticket specifies authorized objects and operations for a particular user -6-

7 ACLs vs. Capability lists List (ACL): Object-centered approach Capability List: Subject-centered approach ACLs /etc/passwd /usr/bin/ /u/roberto/ /admin/ root: r,w mike: r roberto: r backup: r root: r,w,x mike: r,x roberto: r,x backup: r,x root: r,w,x roberto: r,w,x backup: r,x root: r,w,x backup: r,x -7-

8 Capability Lists It defines, for each subject s, the list of the objects for which s has nonempty access control rights, together with the specific rights for each such object. root /etc/passwd: r,w,x; /usr/bin: r,w,x; /u/roberto: r,w,x; /admin/: r,w,x roberto /usr/passwd: r; /usr/bin: r; /u/roberto: r,w,x mike /usr/passwd: r; /usr/bin: r,x backup /etc/passwd: r,x; /usr/bin: r,x; /u/roberto: r,x; /admin/: r,x -8-

9 ACLs vs. Capabilities Capabilities Quick to check like a ticket so scale well ACLs slow to check - scalability problem if expressiveness exploited e.g. negatives and exceptions allowed if there are many subjects and large groups generalization? multidomain operation? names outside domain of registration? In a distributed system many services are not part of privileged OSs. Anonymous knowledge of names not needed may generalize to multiple domains. anonymity may be wanted by some applications for privacy reasons -9-

10 ACLs vs Capability List Immediate to check the authorization holding on an object with ACLs. (subject?) Immediate to determine the privileges of a subject with Capability lists. (object?) Distributed system, authenticate once, access various servers choose which one? Limited number of groups of users, small bit vectors, authorization specified by owner. Which one? -10-

11 Table 4.1 Authorization Table for Files in Figure 4.3 A relational DB can implement an authorization table of this type. 11

12 Figure 4.4 Extended Matrix Suppose that the entry α* exists in A[S0, X]. This means that S0 has access right α to subject X and, because of the presence of the copy flag, can transfer this right, with or without copy flag, to another subject. 12

13 Figure 4.5 Function 1. A subject S0 issues a request of type α for object X. 2. The request causes the system (the operating system or an access control interface module of some sort) to generate a message of the form (S0, α, X) to the controller for X. 3. The controller interrogates the access matrix A to determine if α is in A[S0, X]. If so, the access is allowed; if not, the access is denied and a protection violation occurs. The violation should trigger a warning and appropriate action. 13

14 Table 4.2 System Commands Rule R3 permits S0 to delete any access right from any matrix entry in a row for which S0 controls the subject and for any matrix entry in a column for which S0 owns the object. 14

15 Protection Domains set of objects together with access rights to those objects more flexibility when associating capabilities with protection domains In terms of the access matrix, a row defines a protection domain User can spawn processes with a subset of the access rights of the user Association between a process and a domain can be static or dynamic In user mode, certain areas of memory are protected from user s use and certain instructions may not be executed In kernel mode, privileged instructions may be executed and protected areas of memory may be accessed 15

16 Protection Domains A protection domain is a set of (object, access rights) pairs, where each pair specifies for a given object exactly what operations can be carried out By associating a protection domain with each request, we can cut down on redundant information in access control lists One approach to using protection domains is to construct groups of users -16-

17 UNIX/Linux DAC is implemented as Lists (ACLs)

18 UNIX Challenges More about protection than security Implicitly assumes non-malicious user and trusted system processes Discretionary (DAC) User or their processes may update permission assignments Each program has all user s rights Must trust their processes to be non-malicious A system that uses DAC allows the owner of the resource to specify which subjects can access which resources. Access control is at the discretion of the owner. File permission assignments Assignment based on what is necessary for things to work All your processes have all your rights System services have full access User invoke setuid (root) procs that have all rights Must trust system processes 18

19 UNIX Protection State Subjects Users Groups Processes make accesses on behalf of users belonging to particular groups Objects UID (Real UID, Effective UID, Saved UID), GID Effective UID determines access Files Regular files, Device (character or block), Socket, FIFO, Link Files are stored as inodes Directories Operations Read Write Execute -19-

20 UNIX File UNIX files are administered using inodes (index nodes) control structures (inodes) with key information needed for a particular file several file names may be associated with a single inode an active inode is associated with exactly one file file attributes, permissions and control information are sorted in the inode on the disk there is an inode table, or inode list, that contains the inodes of all the files in the file system when a file is opened its inode is brought into main memory and stored in a memory resident inode table directories are structured in a hierarchical tree may contain files and/or other directories contains file names plus pointers to associated inodes 20

21 UNIX File unique UID member of a primary group identified by a GID belongs to a specific group 12 protection bits specify read, write, and execute permission for the owner of the file, members of the group and all other users SetUID, SetGID, Sticky bit the UID, GID, and protection bits are part of the file s inode Superuser is exempt from usual access control restrictions -21-

22 Changing permissions Change permissions of a file chmod chmod 644 file -- owner can read/write, group, others can read only chmod u+x file -- adds execute permission for owner Change owner of a file chown chown new_owner file Change group of a file chgrp chgrp new_group file -22-

23 Lists (ACLs) in UNIX modern UNIX systems support ACLs FreeBSD, OpenBSD, Linux, Solaris FreeBSD setfacl command assigns a list of UNIX user IDs and groups any number of users and groups can be associated with a file read, write, execute protection bits a file does not need to have an ACL includes an additional protection bit that indicates whether the file has an extended ACL when a process requests access to a file system object two steps are performed: step 1 selects the most appropriate ACL ACL entries are looked at in the following order: owner named users (owning or named) groups others step 2 checks if the matching entry contains sufficient permissions 23

24 Linux command: setfacl / getfacl It sets ACLs of files and directories setfacl [-bkndrlpvh] [{-m -x} acl_spec] [{-M -X} acl_file] file Granting an additional user read access setfacl -m u:lisa:r file Revoking write access from all groups and all named users (using the effective rights mask) setfacl -m m::rx file Removing a named group entry from a file's ACL setfacl -x g:staff file Options --set and --set-file: They set the ACL of a file or a directory. The previous ACL is replaced -m (--modify) and M (--modify-file) -x (--remove) and X (--remove-file) -d, --default - : If the file name parameter is a single dash, setfacl reads a list of files from standard input Copying the ACL of one file to another getfacl file1 setfacl --set-file=- file2 Copying the access ACL into the Default ACL getfacl -a dir setfacl -d -M- dir -24-

25 ACLs in UNIX FreeBSD and most UNIX implementations that support extended ACLs use the following strategy (e.g., Figure 4.6b): 1. The owner class and other class entries in the 9-bit permission field have the same meaning as in the minimal ACL case. 2. The group class entry specifies the permissions for the owner group for this file. These permissions represent the maximum permissions that can be assigned to named users or named groups, other than the owning user. In this latter role, the group class entry functions as a mask. 3. Additional named users and named groups may be associated with the file, each with a 3-bit permission field. The permissions listed for a named user or named group are compared to the mask field. Any permission for the named user or named group that is not present in the mask field is disallowed. 25

26 Linux command: getfacl Get file access control lists getfacl [-drlpvh] file 1: # file: somedir/ 2: # owner: lisa 3: # group: staff 4: user::rwx 5: user:joe:rwx #effective:r-x 6: group::rwx #effective:r-x 7: group:cool:r-x 8: mask:r-x 9: other:r-x 10: default:user::rwx 11: default:user:joe:rwx #effective:r-x 12: default:group::r-x 13: default:mask:r-x 14: default:other:--- Extended ACLs Line 4,6 and 9 are the base ACL entries Lines 5 and 7 are named user and named group entries. Line 8 is the effective rights mask. This entry limits the effective rights granted to all groups and to named users. (The file owner and others permissions are not affected by the effective rights mask; all other entries are.) Lines display the default ACL associated with this directory. Directories may have a default ACL. Regular files never have a default ACL. -26-

27 getfacl & setfacl -27-

28 ACLs in Linux chacl command change the ACL of a file or directory Minimum ACL chacl u::rwx,g::r-x,o::r-- file An ACL that specifies a user or group other than the file's owner or owner's group, must contain a mask entry: chacl u::rwx,g::r-x,o::r--,u:bob:r--,m::r-x file1 file2 To set the default and access ACLs on newdir to be the same as on olddir, you could type: chacl -b `chacl -l olddir \ sed -e 's/.*\[//' -e 's#/# #' -e 's/]$//'` newdir when a process requests access to a file system object two steps are performed: step 1 selects the most appropriate ACL ACL entries are looked at in the following order: owner named users (owning or named) groups others step 2 checks if the matching entry contains sufficient permissions -28-

29 UNIX File set user ID (SetUID) set group ID (SetGID) system temporarily uses rights of the file owner / group in addition to the real user s rights when making access control decisions enables privileged programs to access files / resources not generally accessible sticky bit when applied to a directory it specifies that only the owner of any file in the directory can rename, move, or delete that file superuser is exempt from usual access control restrictions has system-wide access 29

30 SetUID, SetGID, Sticky bit $ id uid=504(sjcho) gid=504(sjcho) groups=504(sjcho) context=user_u:system_r:unconfined_t $ ls -l /usr/bin/passwd -rwsr-xr-x 1 root root Jan /usr/bin/passwd $ ls -l /etc/passwd -rw-r--r-- 1 root root 2133 Mar 29 17:08 /etc/passwd $ ls -l / drwxrwxrwt 11 root root Mar 29 18:14 tmp drwxr-xr-x 14 root root 4096 Mar 4 14:02 usr -30-

31 Real and Effective UIDs (RUID, EUID) Most of the time, the EUID of a process is just the same as the real ones. However, the EUID of a process can differ from the RUID when the process invokes a setuid program. Assume you're logging into your normal user account, which has a user ID of 500. Now you invoke a setuid root application. Because it's setuid root, the OS will set the EUID of the process to that of the root user (0). The RUID, however, remains unchanged. -31-

32 UID transitions: setuid Domain transitions -32-

33 Advantages of DAC Users can self manage access privileges. The burden of security administrators is significantly reduced, as resource users and administrators jointly manage permission. Per-user granularity for individual access decisions as well as coarse-grained access for groups are supported. It is easy to change privileges. Supporting new privileges is easy. -33-

34 Limitation of DAC DAC has trouble to ensure consistency if there is a global policy Global policy: DAC let users to decide the access control policies on their data, regardless of whether those policies are consistent with the global policies. Therefore, if there is a global policy, DAC has trouble to ensure consistency. Information flow: information can be copied from one object to another, so access to a copy is possible even if the owner of the original does not provide access to the original copy. -34-

35 Limitation of DAC Information flow: It is not appropriate for multilayered systems where information flow is restricted. (That is, DACs are inadequate for enforcing Information flow policies) It provides no constraint on copying information from one object to another So access to a copy is possible even if the owner of the original does not provide access to the original copy. This has been a major concern for military. -35-

36 Limitation of DAC: Malicious software: DAC policies can be easily changed by owner, so a malicious program (e.g., a downloaded untrustworthy program) running by the owner can change DAC policies on behalf of the owner. Flawed software: Similarly to the previous item, flawed software can be instructed by attackers to change its DAC policies. -36-

37 Disadvantages of DAC There is no mechanism for restricting rights other than revoking the privilege. It becomes quickly complicated and difficult to maintain access rights as the number of users and resources increases. It is difficult to judge the reasonable rights for a user or group. Inconsistencies in policies are possible due to individual delegation of permission. Access may be given to users that are unknown to the owner of the object. This is possible since the user granted authority by the owner can give away access to other users. -37-

38 Take Away UNIX security originally aimed at protection in multiuser systems DAC over files UNIX DAC security model cannot express security requirements Lots of rights accessible by default Means for limiting rights are impractical The use of UNIX mechanisms has evolved over time Resulting in vulnerabilities -38-

39 Summary access control prevent unauthorized users from gaining access to resources prevent legitimate users from accessing resources in an unauthorized manner enable legitimate users to access resources in an authorized manner subjects, objects, access rights authentication, authorization, audit discretionary access controls (DAC) controls access based on user identity mandatory access control (MAC) controls access based on security labels role-based access control (RBAC) controls access based on roles 39

40 chroot Create a domain in which a process is confined int chroot (const char *path); // chroot ( /car/myroot ); Process can only read/write within file system subtree Applies to all descendant processes Can carry file descriptors in chroot jail chroot vulnerability Unfortunately, chroot can trick its own system define a passwd file at <newroot>/etc/passwd run su su thinks that this is the real passwd file gives root access Use mknod to create device file to access physical memory Setup requires great care Never run chroot process as root Must not be able to get root privileges No control by chrooted process (user) of contents in jail Be careful about descriptors, open sockets, IPC that may be available -40-

41 Device File Vulnerabilities Devices are represented as files /dev/tty terminal /dev/mem -- physical memory /dev/kmem -- virtual memory /dev/mouse -- mouse Create using mknod (only accessible by root) Can bypass access control by getting access to memory /dev/kmem or /dev/mem used to be world accessible Can get access to user inputs /dev/tty is world readable -- see password, set keys mesg n -- prevents write access to current terminal -41-

42 Link Vulnerabilities Add new path to an inode Multiple names for a single inode Run ln -s /etc/passwd file trusted_dump file < *passwd-entry* To overwrite /etc/passwd Programs have to be aware of which files they are using open(file, O_NOFOLLOW, mode) Prevents open from following a link Also, problems with access, then open File name to inode mapping causes problems -42-

43 /tmp Vulnerability creat(pathname, mode) O_EXCL flag if file already exists this is an error Potential attack Create file in shared space (/tmp) Give it a filename used by a higher authority service Make sure that service has permission to the file If creat is used without O_EXCL, then can share the file with the higher authority process -43-

General Access Control Model for DAC

General Access Control Model for DAC General Access Control Model for DAC Also includes a set of rules to modify access control matrix Owner access right Control access right The concept of a copy flag (*) Access control system commands General

More information

Operating system security models

Operating system security models Operating system security models Unix security model Windows security model MEELIS ROOS 1 General Unix model Everything is a file under a virtual root diretory Files Directories Sockets Devices... Objects

More information

Module 4: Access Control

Module 4: Access Control Module 4: Access Control Dr. Natarajan Meghanathan Associate Professor of Computer Science Jackson State University, Jackson, MS 39232 E-mail: natarajan.meghanathan@jsums.edu Access Control In general,

More information

CIS 5373 Systems Security

CIS 5373 Systems Security CIS 5373 Systems Security Topic 3.2: OS Security Access Control Endadul Hoque Slide Acknowledgment Contents are based on slides from Ninghui Li (Purdue), John Mitchell (Stanford), Bogdan Carbunar (FIU)

More information

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

Protection. CSE473 - Spring Professor Jaeger.   CSE473 Operating Systems - Spring Professor Jaeger Protection CSE473 - Spring 2008 Professor Jaeger www.cse.psu.edu/~tjaeger/cse473-s08/ Protection Protect yourself from untrustworthy users in a common space They may try to access your resources Or modify

More information

Processes are subjects.

Processes are subjects. Identification and Authentication Access Control Other security related things: Devices, mounting filesystems Search path Race conditions NOTE: filenames may differ between OS/distributions Principals

More information

Chapter 4: Access Control

Chapter 4: Access Control (DAC) Chapter 4: Comp Sci 3600 Security Outline (DAC) 1 2 (DAC) 3 4 5 Attribute-based control (DAC) The prevention of unauthorized use of a resource, including the prevention of use of a resource in an

More information

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

CSE543 - Introduction to Computer and Network Security. Module: Operating System Security CSE543 - Introduction to Computer and Network Security Module: Operating System Security Professor Trent Jaeger 1 OS Security An secure OS should provide (at least) the following mechanisms Memory protection

More information

Secure Architecture Principles

Secure Architecture Principles CS 155 Spring 2016 Secure Architecture Principles Isolation and Least Privilege Access Control Concepts Operating Systems Browser Isolation and Least Privilege Acknowledgments: Lecture slides are from

More information

Processes are subjects.

Processes are subjects. Identification and Authentication Access Control Other security related things: Devices, mounting filesystems Search path TCP wrappers Race conditions NOTE: filenames may differ between OS/distributions

More information

Secure Architecture Principles

Secure Architecture Principles Computer Security Course. Secure Architecture Principles Slides credit: Dan Boneh What Happens if you can t drop privilege? In what example scenarios does this happen? A service loop E.g., ssh Solution?

More information

Secure Architecture Principles

Secure Architecture Principles CS 155 Spring 2016 Secure Architecture Principles Isolation and Least Privilege Access Control Concepts Operating Systems Browser Isolation and Least Privilege Acknowledgments: Lecture slides are from

More information

Secure Architecture Principles

Secure Architecture Principles CS 155 Spring 2017 Secure Architecture Principles Isolation and Least Privilege Access Control Concepts Operating Systems Browser Isolation and Least Privilege Secure Architecture Principles Isolation

More information

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

Access Control. CMPSC Spring 2012 Introduction Computer and Network Security Professor Jaeger. Access Control CMPSC 443 - Spring 2012 Introduction Computer and Network Security Professor Jaeger www.cse.psu.edu/~tjaeger/cse443-s12/ Access Control Describe the permissions available to computing processes

More information

Secure Architecture Principles

Secure Architecture Principles Secure Architecture Principles Isolation and Least Privilege Access Control Concepts Operating Systems Browser Isolation and Least Privilege Original slides were created by Prof. John Mitchel 1 Secure

More information

Data Security and Privacy. Unix Discretionary Access Control

Data Security and Privacy. Unix Discretionary Access Control Data Security and Privacy Unix Discretionary Access Control 1 Readings for This Lecture Wikipedia Filesystem Permissions Other readings UNIX File and Directory Permissions and Modes http://www.hccfl.edu/pollock/aunix1/filepermissions.htm

More information

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

We ve seen: Protection: ACLs, Capabilities, and More. Access control. Principle of Least Privilege. ? Resource. What makes it hard? We ve seen: Protection: ACLs, Capabilities, and More Some cryptographic techniques Encryption, hashing, types of keys,... Some kinds of attacks Viruses, worms, DoS,... And a distributed authorization and

More information

cs642 /operating system security computer security adam everspaugh

cs642 /operating system security computer security adam everspaugh cs642 computer security /operating system security adam everspaugh ace@cs.wisc.edu principles Principles of Secure Designs Compartmentalization / Isolation / Least privilege Defense-in-depth / Use more

More information

File Security Lock Down Your Data. Brian Reames January 22, 2012

File Security Lock Down Your Data. Brian Reames January 22, 2012 File Security Lock Down Your Data Brian Reames January 22, 2012 Table of Contents 1.0 Basic Linux Permissions...4 1.1 Determining Permissions... 5 1.2 File Permissions vs. Directory Permissions... 6 1.3

More information

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

CS 392/681 - Computer Security. Module 5 Access Control: Concepts and Mechanisms CS 392/681 - Computer Security Module 5 Access Control: Concepts and Mechanisms Course Policies and Logistics Midterm next Thursday!!! Read Chapter 2 and 15 of text 10/15/2002 Module 5 - Access Control

More information

Protection Kevin Webb Swarthmore College April 19, 2018

Protection Kevin Webb Swarthmore College April 19, 2018 Protection Kevin Webb Swarthmore College April 19, 2018 xkcd #1200 Before you say anything, no, I know not to leave my computer sitting out logged in to all my accounts. I have it set up so after a few

More information

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

Computer Security Operating System Security & Access Control. Dr Chris Willcocks Computer Security Operating System Security & Access Control Dr Chris Willcocks Lecture Content Access Control ACMs ACLs Introduction to *NIX security - we ll cover this more due to server popularity -

More information

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

Outline. UNIX security ideas Users and groups File protection Setting temporary privileges. Examples. Permission bits Program language components UNIX security Ulf Larson (modified by Erland Jonsson/Magnus Almgren) Computer security group Dept. of Computer Science and Engineering Chalmers University of Technology, Sweden Outline UNIX security ideas

More information

Secure Architecture Principles

Secure Architecture Principles Computer Security Course. Secure Architecture Principles Slides credit: John Mitchell Basic idea: Isolation A Seaman's Pocket-Book, 1943 (public domain) http://staff.imsa.edu/~esmith/treasurefleet/treasurefleet/watertight_compartments.htm

More information

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

CS 392/681 - Computer Security. Module 6 Access Control: Concepts and Mechanisms CS 392/681 - Computer Security Module 6 Access Control: Concepts and Mechanisms Course Policies and Logistics Midterm grades Thursday. Read Chapter 2 and 15 th of text Lab 4 postponed - due next week.

More information

P1L5 Access Control. Controlling Accesses to Resources

P1L5 Access Control. Controlling Accesses to Resources P1L5 Access Control Controlling Accesses to Resources TCB sees a request for a resource, how does it decide whether it should be granted? Authentication establishes the source of a request Authorization

More information

Operating system security

Operating system security Operating system security Tuomas Aura T-110.4206 Information security technology Aalto University, autumn 2011 Outline Access control models in operating systems: 1. Unix 2. Windows Acknowledgements: This

More information

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

Computer Security. 04r. Pre-exam 1 Concept Review. Paul Krzyzanowski. Rutgers University. Spring 2018 Computer Security 04r. Pre-exam 1 Concept Review Paul Krzyzanowski Rutgers University Spring 2018 February 15, 2018 CS 419 2018 Paul Krzyzanowski 1 Key ideas from the past four lectures February 15, 2018

More information

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

TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control Version 1.0, Last Edited 09/20/2005 Name of Students: Date of Experiment: Part I: Objective The objective of the exercises

More information

Security Architecture

Security Architecture Security Architecture We ve been looking at how particular applications are secured We need to secure not just a few particular applications, but many applications, running on separate machines We need

More information

HDP HDFS ACLs 3. Apache HDFS ACLs. Date of Publish:

HDP HDFS ACLs 3. Apache HDFS ACLs. Date of Publish: 3 Apache HDFS ACLs Date of Publish: 2018-07-15 http://docs.hortonworks.com Contents Apache HDFS ACLs... 3 Configuring ACLs on HDFS... 3 Using CLI Commands to Create and List ACLs... 3 ACL Examples... 4

More information

OS security mechanisms:

OS security mechanisms: OS security mechanisms: Memory Protection: One of the important aspects of Operating system security is Memory Protection. Memory provides powerful indirect way for an attacker to circumvent security mechanism,

More information

Introduction to Computer Security

Introduction to Computer Security Introduction to Computer Security UNIX Security Pavel Laskov Wilhelm Schickard Institute for Computer Science Genesis: UNIX vs. MULTICS MULTICS (Multiplexed Information and Computing Service) a high-availability,

More information

Files and Directories

Files and Directories CSCI 2132: Software Development Files and Directories Norbert Zeh Faculty of Computer Science Dalhousie University Winter 2019 Files and Directories Much of the operation of Unix and programs running on

More information

Information Security Theory vs. Reality

Information Security Theory vs. Reality Information Security Theory vs. Reality 0368-4474-01, Winter 2011 Lecture 4: Access Control Eran Tromer 1 Slides credit: John Mitchell, Stanford course CS155, 2010 Access control Assumptions System knows

More information

Operating systems fundamentals - B10

Operating systems fundamentals - B10 Operating systems fundamentals - B10 David Kendall Northumbria University David Kendall (Northumbria University) Operating systems fundamentals - B10 1 / 12 Introduction Basics of protection and security

More information

CS/CIS 249 SP18 - Intro to Information Security

CS/CIS 249 SP18 - Intro to Information Security Lab assignment CS/CIS 249 SP18 - Intro to Information Security Lab #2 - UNIX/Linux Access Controls, version 1.2 A typed document is required for this assignment. You must type the questions and your responses

More information

OS Security III: Sandbox and SFI

OS Security III: Sandbox and SFI 1 OS Security III: Sandbox and SFI Chengyu Song Slides modified from Dawn Song 2 Administrivia Lab2 VMs on lab machine Extension? 3 Users and processes FACT: although ACLs use users as subject, the OS

More information

Operating Systems Security Access Control

Operating Systems Security Access Control Authorization and access control Operating Systems Security Access Control Ozalp Babaoglu From authentication to authorization Once subjects have been authenticated, the next problem to confront is authorization

More information

Capability and System Hardening

Capability and System Hardening P a g e 1 Date Assigned: mm/dd/yyyy Date Due: mm/dd/yyyy by hh:mm Educational Objectives Capability and System Hardening This lab is designed to help you gain a better understanding of system hardening

More information

Information Security CS 526

Information Security CS 526 Information Security CS 526 s Security Basics & Unix Access Control 1 Readings for This Lecture Wikipedia CPU modes System call Filesystem Permissions Other readings UNIX File and Directory Permissions

More information

CSE 565 Computer Security Fall 2018

CSE 565 Computer Security Fall 2018 CSE 565 Computer Security Fall 2018 Lecture 13: Operating System Security Department of Computer Science and Engineering University at Buffalo 1 Review Previous topics access control authentication session

More information

CIS Operating Systems File Systems Security. Professor Qiang Zeng Fall 2017

CIS Operating Systems File Systems Security. Professor Qiang Zeng Fall 2017 CIS 5512 - Operating Systems File Systems Security Professor Qiang Zeng Fall 2017 Previous class File and directory Hard link and soft link Mount Layered structure File system design Naïve: linked list

More information

Outline. Last time. (System) virtual machines. Virtual machine technologies. Virtual machine designs. Techniques for privilege separation

Outline. Last time. (System) virtual machines. Virtual machine technologies. Virtual machine designs. Techniques for privilege separation Outline CSci 5271 Introduction to Computer Security Day 9: OS security basics Stephen McCamant University of Minnesota, Computer Science & Engineering Last time (System) virtual machines Restrict languages,

More information

Advanced Systems Security: Ordinary Operating Systems

Advanced Systems Security: Ordinary Operating Systems Systems and Internet Infrastructure Security Network and Security Research Center Department of Computer Science and Engineering Pennsylvania State University, University Park PA Advanced Systems Security:

More information

Exercise 4: Access Control and Filesystem Security

Exercise 4: Access Control and Filesystem Security Exercise 4: Access Control and Filesystem Security Introduction Duration: 90 min Maximum Points: 30 Note: The solutions of theorethical assignments should be handed out before the practical part in the

More information

Files (review) and Regular Expressions. Todd Kelley CST8207 Todd Kelley 1

Files (review) and Regular Expressions. Todd Kelley CST8207 Todd Kelley 1 Files (review) and Regular Expressions Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 midterms (Feb 11 and April 1) Files and Permissions Regular Expressions 2 Sobel, Chapter 6 160_pathnames.html

More information

IS 2150 / TEL 2810 Information Security and Privacy

IS 2150 / TEL 2810 Information Security and Privacy IS 2150 / TEL 2810 Information Security and Privacy James Joshi Professor, SIS Access Control OS Security Overview Lecture 2, Sept 6, 2016 1 Objectives Understand the basics of access control model Access

More information

UNIX File Hierarchy: Structure and Commands

UNIX File Hierarchy: Structure and Commands UNIX File Hierarchy: Structure and Commands The UNIX operating system organizes files into a tree structure with a root named by the character /. An example of the directory tree is shown below. / bin

More information

Fall 2014:: CSE 506:: Section 2 (PhD) Securing Linux. Hyungjoon Koo and Anke Li

Fall 2014:: CSE 506:: Section 2 (PhD) Securing Linux. Hyungjoon Koo and Anke Li Securing Linux Hyungjoon Koo and Anke Li Outline Overview Background: necessity & brief history Core concepts LSM (Linux Security Module) Requirements Design SELinux Key elements Security context: identity

More information

Access Control. Steven M. Bellovin September 13,

Access Control. Steven M. Bellovin September 13, Access Control Steven M. Bellovin September 13, 2016 1 Security Begins on the Host Even without a network, hosts must enforce the CIA trilogy Something on the host the operating system aided by the hardware

More information

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

Hardware. Ahmet Burak Can Hacettepe University. Operating system. Applications programs. Users Operating System Security Ahmet Burak Can Hacettepe University abc@hacettepe.edu.tr Computer System Components Hardware Provides basic computing resources (CPU, memory, I/O devices). Operating system Controls

More information

6.858 Lecture 4 OKWS. Today's lecture: How to build a secure web server on Unix. The design of our lab web server, zookws, is inspired by OKWS.

6.858 Lecture 4 OKWS. Today's lecture: How to build a secure web server on Unix. The design of our lab web server, zookws, is inspired by OKWS. 6.858 Lecture 4 OKWS Administrivia: Lab 1 due this Friday. Today's lecture: How to build a secure web server on Unix. The design of our lab web server, zookws, is inspired by OKWS. Privilege separation

More information

Unix Basics. UNIX Introduction. Lecture 14

Unix Basics. UNIX Introduction. Lecture 14 Unix Basics Lecture 14 UNIX Introduction The UNIX operating system is made up of three parts; the kernel, the shell and the programs. The kernel of UNIX is the hub of the operating system: it allocates

More information

Operating System Security

Operating System Security Operating System Security Ahmet Burak Can Hacettepe University abc@hacettepe.edu.tr 1 Computer System Components Hardware Provides basic computing resources (CPU, memory, I/O devices). Operating system

More information

Privileges: who can control what

Privileges: who can control what Privileges: who can control what Introduction to Unix May 24, 2008, Morocco Hervey Allen Goal Understand the following: The Unix security model How a program is allowed to run Where user and group information

More information

SELinux. Don Porter CSE 506

SELinux. Don Porter CSE 506 SELinux Don Porter CSE 506 MAC vs. DAC By default, Unix/Linux provides Discretionary Access Control The user (subject) has discretion to set security policies (or not) Example: I may chmod o+a the file

More information

CSI 402 Lecture 11 (Unix Discussion on Files continued) 11 1 / 19

CSI 402 Lecture 11 (Unix Discussion on Files continued) 11 1 / 19 CSI 402 Lecture 11 (Unix Discussion on Files continued) 11 1 / 19 User and Group IDs Ref: Chapter 3 of [HGS]. Each user is given an ID (integer) called uid. (Most system programs use uid instead of the

More information

Security Enhanced Linux

Security Enhanced Linux Security Enhanced Linux Bengt Nolin beno9295@student.uu.se October 13, 2004 Abstract A very brief introduction to SELinux; what it is, what is does and a little about how it does it. 1 1 Background 1.1

More information

Advanced Systems Security: Ordinary Operating Systems

Advanced Systems Security: Ordinary Operating Systems Systems and Internet Infrastructure Security Network and Security Research Center Department of Computer Science and Engineering Pennsylvania State University, University Park PA Advanced Systems Security:

More information

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

? Resource. Announcements. Access control. Access control in operating systems. References. u Homework Due today. Next assignment out next week Announcements Access control John Mitchell u Homework Due today. Next assignment out next week u Graders If interested in working as grader, send email to Anupam u Projects Combine some of the project

More information

An Overview of Security in the FreeBSD Kernel. Brought to you by. Dr. Marshall Kirk McKusick

An Overview of Security in the FreeBSD Kernel. Brought to you by. Dr. Marshall Kirk McKusick An Overview of Security in the FreeBSD Kernel Brought to you by Dr. Marshall Kirk McKusick 2013 BSDCan Conference May 17, 2013 University of Ottawa Ottawa, Canada Copyright 2013 Marshall Kirk McKusick.

More information

Explicit Information Flow in the HiStar OS. Nickolai Zeldovich, Silas Boyd-Wickizer, Eddie Kohler, David Mazières

Explicit Information Flow in the HiStar OS. Nickolai Zeldovich, Silas Boyd-Wickizer, Eddie Kohler, David Mazières Explicit Information Flow in the HiStar OS Nickolai Zeldovich, Silas Boyd-Wickizer, Eddie Kohler, David Mazières Too much trusted software Untrustworthy code a huge problem Users willingly run malicious

More information

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

Access Control CSC WAKE FOREST. U N I V E R S I T Y Department of Computer Science. Fall 2014 Access Control CSC 348 648 WAKE FOREST U N I V E R S I T Y Department of Computer Science Fall 2014 Attempted Topics Describe language/models for talking about security systems ACM, Capabilities and ACLs

More information

CSE 380 Computer Operating Systems

CSE 380 Computer Operating Systems CSE 380 Computer Operating Systems Instructor: Insup Lee and Dianna Xu University of Pennsylvania Fall 2003 Lecture Note: Protection Mechanisms 1 Policy vs. Mechanism q Access control policy is a specification

More information

OS Security. Authorization. Radboud University Nijmegen, The Netherlands. Winter 2015/2016

OS Security. Authorization. Radboud University Nijmegen, The Netherlands. Winter 2015/2016 OS Security Authorization Radboud University Nijmegen, The Netherlands Winter 2015/2016 A short recap Authentication establishes a mapping between entities (users) and intended operations Typical approach:

More information

Announcements. is due Monday April 1 needs to include a paragraph write-up about the results of using the two different scheduling algorithms

Announcements. is due Monday April 1 needs to include a paragraph write-up about the results of using the two different scheduling algorithms Announcements Reading Chapter 11 (11.1-11.5) Programming Project #3 is due Monday April 1 needs to include a paragraph write-up about the results of using the two different scheduling algorithms Midterm

More information

Introduction to Security

Introduction to Security IS 2150 / TEL 2810 Introduction to Security James Joshi Associate Professor, SIS Secure Design Principles OS Security Overview Lecture 2 September 4, 2012 1 Objectives Understand the basic principles of

More information

FreeBSD Advanced Security Features

FreeBSD Advanced Security Features FreeBSD Advanced Security Features Robert N. M. Watson Security Research Computer Laboratory University of Cambridge 19 May, 2007 Introduction Welcome! Introduction to some of the advanced security features

More information

Access Control. Steven M. Bellovin September 2,

Access Control. Steven M. Bellovin September 2, Access Control Steven M. Bellovin September 2, 2014 1 Security Begins on the Host Even without a network, hosts must enforce the CIA trilogy Something on the host the operating system aided by the hardware

More information

Case Studies in Access Control

Case Studies in Access Control Joint software development Mail 1 / 38 Situations Roles Permissions Why Enforce Access Controls? Unix Setup Windows ACL Setup Reviewer/Tester Access Medium-Size Group Basic Structure Version Control Systems

More information

User Commands chmod ( 1 )

User Commands chmod ( 1 ) NAME chmod change the permissions mode of a file SYNOPSIS chmod [-fr] absolute-mode file... chmod [-fr] symbolic-mode-list file... DESCRIPTION The chmod utility changes or assigns the mode of a file. The

More information

Case Study: Access Control. Steven M. Bellovin October 4,

Case Study: Access Control. Steven M. Bellovin October 4, Case Study: Access Control Steven M. Bellovin October 4, 2015 1 Case Studies in Access Control Joint software development Mail Steven M. Bellovin October 4, 2015 2 Situations Small team on a single machine

More information

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

TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control Version 2.0, Last Edited 10/1/2006 Students Name: Date of Experiment: Part I: Objective The objective of the exercises

More information

Introduction to Security

Introduction to Security IS 2150 / TEL 2810 Introduction to Security James Joshi Assistant Professor, SIS Secure Design Principles OS Security Overview Lecture 1 September 2, 2008 1 Objectives Understand the basic principles of

More information

Access Control Mechanisms

Access Control Mechanisms Access Control Mechanisms Week 11 P&P: Ch 4.5, 5.2, 5.3 CNT-4403: 26.March.2015 1 In this lecture Access matrix model Access control lists versus Capabilities Role Based Access Control File Protection

More information

Last time. Security Policies and Models. Trusted Operating System Design. Bell La-Padula and Biba Security Models Information Flow Control

Last time. Security Policies and Models. Trusted Operating System Design. Bell La-Padula and Biba Security Models Information Flow Control Last time Security Policies and Models Bell La-Padula and Biba Security Models Information Flow Control Trusted Operating System Design Design Elements Security Features 10-1 This time Trusted Operating

More information

412 Notes: Filesystem

412 Notes: Filesystem 412 Notes: Filesystem A. Udaya Shankar shankar@cs.umd.edu December 5, 2012 Contents 1 Filesystem interface 2 2 Filesystem implementation 3 3 FAT (mostly from Wikepedia) 5 4 UFS (mostly from Wikepedia)

More information

CSCI 420: Mobile Application Security. Lecture 7. Prof. Adwait Nadkarni. Derived from slides by William Enck, Patrick McDaniel and Trent Jaeger

CSCI 420: Mobile Application Security. Lecture 7. Prof. Adwait Nadkarni. Derived from slides by William Enck, Patrick McDaniel and Trent Jaeger CSCI 420: Mobile Application Security Lecture 7 Prof. Adwait Nadkarni Derived from slides by William Enck, Patrick McDaniel and Trent Jaeger 1 cryptography < security Cryptography isn't the solution to

More information

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

Policy vs. Mechanism. Example Reference Monitors. Reference Monitors. CSE 380 Computer Operating Systems 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

More information

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

Chapter 13: Protection. Operating System Concepts Essentials 8 th Edition Chapter 13: Protection Operating System Concepts Essentials 8 th Edition Silberschatz, Galvin and Gagne 2011 Chapter 13: Protection Goals of Protection Principles of Protection Domain of Protection Access

More information

Unix, History

Unix, History Operating systems Examples from Unix, VMS, Windows NT on user authentication, memory protection and file and object protection. Trusted Operating Systems, example from PitBull Unix, History Unix, History

More information

A Survey of Access Control Policies. Amanda Crowell

A Survey of Access Control Policies. Amanda Crowell A Survey of Access Control Policies Amanda Crowell What is Access Control? Policies and mechanisms that determine how data and resources can be accessed on a system. The Players Subjects Objects Semi-objects

More information

Original ACL related man pages

Original ACL related man pages Original ACL related man pages NAME getfacl - get file access control lists SYNOPSIS getfacl [-drlpvh] file... getfacl [-drlpvh] - DESCRIPTION For each file, getfacl displays the file name, owner, the

More information

CS631 - Advanced Programming in the UNIX Environment

CS631 - Advanced Programming in the UNIX Environment CS631 - Advanced Programming in the UNIX Environment Slide 1 CS631 - Advanced Programming in the UNIX Environment Files and Directories Department of Computer Science Stevens Institute of Technology Jan

More information

12- File system and access rights

12- File system and access rights 12- File system and access rights File properties under Linux vs. Other systems File types (-) Regular files...(s) is unknow to me till now (eg. /dev/gpmctl) (l) Symbolic Links (eg. /sbin/init.d/rc2.d...all

More information

Access Control. Tom Chothia Computer Security, Lecture 5

Access Control. Tom Chothia Computer Security, Lecture 5 Access Control Tom Chothia Computer Security, Lecture 5 The Crypto Wars 1993-1996: Clipper chip considered in US congress and rejected. Due partly to Matt Blaze s analysis and strongly attack by John Kerry

More information

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 CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2004 Lecture 18: Naming, Directories, and File Caching 18.0 Main Points How do users name files? What is a name? Lookup:

More information

Chapter 14: Protection. Operating System Concepts 9 th Edition

Chapter 14: Protection. Operating System Concepts 9 th Edition Chapter 14: Protection Silberschatz, Galvin and Gagne 2013 Chapter 14: Protection Goals of Protection Principles of Protection Domain of Protection Access Matrix Implementation of Access Matrix Access

More information

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 CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2002 Lecture 18: Naming, Directories, and File Caching 18.0 Main Points How do users name files? What is a name? Lookup:

More information

Security Models Trusted Zones SPRING 2018: GANG WANG

Security Models Trusted Zones SPRING 2018: GANG WANG Security Models Trusted Zones SPRING 2018: GANG WANG Access Control Slides credit to Ethan L. Miller and Scott A. Brandt Protection Domains Three protection domains Each lists objects with permitted operations

More information

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

Sandboxing. (1) Motivation. (2) Sandboxing Approaches. (3) Chroot Sandboxing (1) Motivation Depending on operating system to do access control is not enough. For example: download software, virus or Trojan horse, how to run it safely? Risks: Unauthorized access to files,

More information

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

IT Service Delivery And Support Week Four - OS. IT Auditing and Cyber Security Fall 2016 Instructor: Liang Yao IT Service Delivery And Support Week Four - OS IT Auditing and Cyber Security Fall 2016 Instructor: Liang Yao 1 What is an Operating System (OS)? OS is a software that designed to run on specific hardware

More information

File System. yihshih

File System. yihshih File System yihshih Files % ls l d rwx--x--x 7 wutzh gcs 1024 Sep 22 17:25 public_html File type File access mode # of links File user owner File group owner File size File last modify time 2 File name

More information

Basic File Attributes

Basic File Attributes Basic File Attributes The UNIX file system allows the user to access other files not belonging to them and without infringing on security. A file has a number of attributes (properties) that are stored

More information

Multifactor authentication:

Multifactor authentication: Multifactor authentication: Authenticating people can be based on 2 factors: Something the user KNOWS : e.g. a password or PIN Something the user HAS: e.g. An ATM card, smartcard or hardware token, or

More information

Race Condition Vulnerability Lab

Race Condition Vulnerability Lab Concordia Institute for Information Systems Engineering - INSE 6130 1 Race Condition Vulnerability Lab Copyright c 2006-2012 Wenliang Du, Syracuse University. The development of this document is funded

More information

Access Control. Discretionary Access Control

Access Control. Discretionary Access Control Access Control Discretionary Access Control 1 Outlines Access Control Discretionary Access Control (DAC) Mandatory Access Control (MAC) Role-Based Access Control (RBAC) 2 Access Control Access control

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Mukesh Pund Principal Scientist, NISCAIR, New Delhi, India History In 1969, a team of developers developed a new operating system called Unix which was written using C Linus Torvalds,

More information

RACF UNIXPRIV Class. SHARE August 2018 RSH CONSULTING, INC. RACF SPECIALISTS

RACF UNIXPRIV Class. SHARE August 2018 RSH CONSULTING, INC. RACF SPECIALISTS RSH CONSULTING, INC. RACF SPECIALISTS 617 969 9050 WWW.RSHCONSULTING.COM RSH Consulting Robert S. Hansel RSH Consulting, Inc. is an IT security professional services firm established in 1992 and dedicated

More information