Object Classes and Permissions



Similar documents
Networking in NSA Security-Enhanced Linux

Linux Kernel Architecture

SELinux and grsecurity: A Side-by-Side Comparison of Mandatory Access Control and Access Control List Implementations

Linux OS-Level Security Nikitas Angelinas MSST 2015

Red Hat Linux Internals

REAL TIME OPERATING SYSTEM PROGRAMMING-II: II: Windows CE, OSEK and Real time Linux. Lesson-12: Real Time Linux

Chapter 10 Case Study 1: LINUX

System Security Fundamentals

We mean.network File System

Linux Driver Devices. Why, When, Which, How?

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

Operating System Components and Services

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

Device Management Functions

SELinux. Security Enhanced Linux

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

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

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

Linux/UNIX System Programming. POSIX Shared Memory. Michael Kerrisk, man7.org c February 2015

CIS 551 / TCOM 401 Computer and Network Security

RECOVER ( 8 ) Maintenance Procedures RECOVER ( 8 )

Distributed File Systems. NFS Architecture (1)

Lab 2 : Basic File Server. Introduction

Linux Virtual Server Tutorial

LWIOD Access Audit Module

Programmation Systèmes Cours 7 IPC: FIFO

List of FTP commands for the Microsoft command-line FTP client

View access control as a matrix Subjects (processes/users) access objects (e.g., files) Each cell of matrix has allowed permissions

Get quick control over your Linux server with server commands

Interprocess Communication Message Passing

Chapter 12 File Management. Roadmap

Chapter 12 File Management

Chapter 14 Analyzing Network Traffic. Ed Crowley

Verifying information flow goals in Security-Enhanced Linux

6.828 Operating System Engineering: Fall Quiz II Solutions THIS IS AN OPEN BOOK, OPEN NOTES QUIZ.

TACC Stats I/O Performance Monitoring for the Intransigent

DATABASE MANAGEMENT SYSTEMS

Porting Lustre to Operating Systems other than Linux. Ken Hornstein US Naval Research Laboratory April 16, 2010

Unix System Calls. Dept. CSIE

Providing a Shared File System in the Hare POSIX Multikernel. Charles Gruenwald III

Operating Systems and Networks

Cloud File System. Cloud computing advantages:

Lecture 5. User-Mode Linux. Jeff Dike. November 7, Operating Systems Practical. OSP Lecture 5, UML 1/33

Proceedings of the 11 th USENIX Security Symposium

Capability-Based Access Control

Configuring Security for SMTP Traffic

Managed Backup Service - Agent for Linux Release Notes

Using the CoreSight ITM for debug and testing in RTX applications

TECHNICAL NOTES. Security Firewall IP Tables

IBM Tivoli Composite Application Manager for Microsoft Applications: Microsoft Internet Information Services Agent Version Fix Pack 2.

Securing Commercial Operating Systems

REAL TIME OPERATING SYSTEMS. Lesson-10:

Safety measures in Linux

Acronis Backup & Recovery 11.5

Lecture 24 Systems Programming in C

MCSE Core exams (Networking) One Client OS Exam. Core Exams (6 Exams Required)

OS: IPC I. Cooperating Processes. CIT 595 Spring Message Passing vs. Shared Memory. Message Passing: Unix Pipes

mypro Installation and Handling Manual Version: 7

Lecture 16: System-Level I/O

Socket = an interface connection between two (dissimilar) pipes. OS provides this API to connect applications to networks. home.comcast.

The POSIX Socket API

Appendix. Web Command Error Codes. Web Command Error Codes

Generalised Socket Addresses for Unix Squeak

Acronis Backup & Recovery: Events in Application Event Log of Windows

How To Install Linux Titan

DEVICE DRIVERS AND TERRUPTS SERVICE MECHANISM Lesson-14: Device types, Physical and Virtual device functions

Server Manager Performance Monitor. Server Manager Diagnostics Page. . Information. . Audit Success. . Audit Failure

Virtual Private Systems for FreeBSD

Chapter 12 File Management

Answers to Sample Questions on Network Layer

Centralized Logging With syslog ng. Ryan Ma6eson h6p://prefetch.net

Network Programming with Sockets. Process Management in UNIX

Table of Contents. Chapter 1: Introduction. Chapter 2: Getting Started. Chapter 3: Standard Functionality. Chapter 4: Module Descriptions

Making Linux Safe for Virtual Machines

NetFlow Aggregation. Feature Overview. Aggregation Cache Schemes

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

New and Improved Lustre Performance Monitoring Tool. Torben Kling Petersen, PhD Principal Engineer. Chris Bloxham Principal Architect

Exploration of Large Scale Virtual Networks. Open Network Summit 2016

Bandwidth Management in MPLS Networks

A COMPARISON BETWEEN THE SAMBA3 AND LIKEWISE LWIOD FILE SERVERS

CSC 2405: Computer Systems II

Lecture 17. Process Management. Process Management. Process Management. Inter-Process Communication. Inter-Process Communication

Linux Distributed Security Module 1

CS161: Operating Systems

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

NSA Security-Enhanced Linux (SELinux)

Using NFS v4 ACLs with Samba in a multiprotocol environment

Table of Contents Introduction Supporting Arguments of Sysaxftp File Transfer Commands File System Commands PGP Commands Other Using Commands

µtasker Document FTP Client

Windows Server 2008/2012 Server Hardening

HP POLYSERVE SOFTWARE

About the File Manager 2

IT304 Experiment 2 To understand the concept of IPC, Pipes, Signals, Multi-Threading and Multiprocessing in the context of networking.

Objectives. At the end of this chapter students should be able to:

COS 318: Operating Systems. Virtual Machine Monitors

Security. TestOut Modules

The Hadoop Distributed File System

A Look through the Android Stack

A Simple Implementation and Performance Evaluation Extended-Role Based Access Control

Transcription:

Object Classes and Permissions Security Policy Development Primer for Security Enhanced Linux (Module 5)

2 SE Linux Policy Structure Top-level sections of policy.conf: Flask definitions object classes, permissions, initial SIDs TE and RBAC declarations and statements defines the type enforcement and role access control policies user declarations identify users to policy and associate users with roles constraints additional restrictions based on types, roles, and users security context specifications special security context specifications

3 Object Classes Basis for access control in SE Linux specified in terms of subject s access to objects subjects processes objects 29 distinct object classes access numerous permissions each class with its own permission specification

4 Object Class Definitions Object classes are defined in: /usr/local/selinux/flask/security_classes same definitions built into kernel Object class definition statement class file class identifier simply defines an object class identifier Policy writers should never change security_classes changed only when object classes change in kernel

5 Summary of Object Classes File-related Object Classes file: regular file dir: directory fd: file descriptor opened object descriptors associated with processes lnk_file: symbolic link chr_file: character device (e.g., serial ports, terminals) blk_file: block device (e.g, disk drives) sock_file: Unix-domain socket local socket listed in file name space fifo_file: FIFO, aka named pipes filesystem abstract object representing controls on whole file systems

6 Summary of Object Classes Network-related object classes node: host(s) by IP address netif: network interfaces tcp_socket: IP stream socket udp_socket: IP datagram socket rawip_socket: IP raw socket netlink_socket: Netlink sockets packet_socket: low level packet socket unix_stream_socket: local stream socket unix_dgram_socket: local datagram socket key_socket: IPsec security association database socket socket: all other socket types

7 Summary of Object Classes System V IPC-related sem: semaphore set msgq: message queue msg: messages within a message queue shm: shared memory ipc: no longer used

8 Summary of Object Classes Process class both an object and a subject Security class abstract object to control call to in-kernel security server load new policy, get list of contexts and SIDs only one System class abstract object to control certain system behavior e.g. toggle enforcing mode only one Capability class provides a means to control Linux capabilities must have associated permission as well as capability

9 Object Class Permissions Each object class has a defined set of permissions called an access vector The permission definitions in the policy are in: /usr/local/selinux/flask/access_vectors Permission identifiers defined in two ways common statement (used for multiple classes as a group) class statement #2 (class-specific permissions) Policy writers should never change access_vectors as with object classes, hard coded into the kernel changed only when access vectors change in kernel

10 Object Class Permissions Common permissions defines group of permission identifiers associated with object classes as a group ensures all like permissions assigned same bit in kernel common file {ioctl read write create getattr setattr lock } common perm identifier permission identifiers assigned to object classes via class statement (#2)

11 Object Class Permissions Object class permission definition (class statement #2) assigns permissions to each object class can assign common and/or class-specific permissions class file inherits file { execute_no_trans entrypoint } optional common perms class ID (from previous class definition) common perms (from previous common stmnt) class-specific permissions Net effect: File class has following permissions defined: ioctl read write create getattr setattr lock relabelfrom relabelto append unlink link rename execute swapon quotaon mounton execute_no_trans entrypoint

12 Object Class Permissions Exploring Object Classes and Permissions

13 File Object Class Permissions read: read file contents write: write or append file contents append: append file contents i.e., opened with O_APPEND flag create: create a new file getattr: read file attributes such as access mode stat, some ioctls, setattr: change file attributes such as access mode chmod, some ioctls, ioctl: ioctl sys call requests not addressed by other permissions unlink: remove hard link (delete) link: create hard link to file

14 File Object Class Permissions lock: set and unset file locks rename: rename a hard link relabelfrom: change the security context based on existing type relabelto: change the security context based on the new type mounton: only meaningful for directories in Linux swapon: allows file to be used for paging/swapping space quotaon: enabling quotas execute: same meaning as ordinary Linux execute execute_no_trans: permission to execute file without a domain transition entrypoint: permission to enter a new domain via this program

15 Process Object Class Permissions transition: permission to change security context checked against old domain type and new domain type fork: fork or clone a process sigchld: permission to signal SIGCHLD sigkill: permission to signal SIGKILL sigstop: permission to signal SIGSTOP signull: no signal sent, ala kill(pid, 0) signal: all other signal ptrace: ability to trace a process (e.g., debugging) getsched, setsched: get and set process priority getsession: get session information (getsid) getpgid, setpgid: get and set process group ID getcap, setcap: get and set capabilities (capget, capset) share: allows state sharing (via clone call)

16 More on Object Class Permissions Understanding all requires detailed understanding of implementation Additional references on classes and permissions www.nsa.gov/selinux/doc/slinux.pdf most comprehensive, but a little out of date www.nsa.gov/selinux/doc/module.pdf describes some changes from above report Example policy includes macros provides more abstract permission model using m4 macro processor language definitions in./policy/macros/global_macros.te

17 Permission Macro Examples All from policy/macros/global_macros.te rx_file_perms (file read/execute permission) read getattr lock execute ioctl r_dir_perms (read and traverse directory) read getattr lock search ioctl create_dir_perms (create and use new directory) create read getattr lock setattr link unlink rename search add_name remove_name reparent write rmdir Permission macros can be used in place (or alongside) of explicit permission list

18 Interrelationship of Permissions Many actions require several permissions for several object classes Domain transition, for example process transition permission allow src_type new_type : process transition; program execution permission allow src_type program_type : file { getattr execute }; new domain execute access allow new_type program_type : file entrypoint; other issues file descriptor inheritance, signals, other IPC Macros can help here too see domain_trans() macro for example

19 QUESTIONS?