SELinux. Security Enhanced Linux



Similar documents
Linux OS-Level Security Nikitas Angelinas MSST 2015

Security Enhanced Linux and the Path Forward

Secure computing: SELinux

NSA Security-Enhanced Linux (SELinux)

RHS429 - Red Hat Enterprise SELinux Policy Administration

Networking in NSA Security-Enhanced Linux

Confining the Apache Web Server with Security-Enhanced Linux

Linux Security on HP Servers: Security Enhanced Linux. Abstract. Intended Audience. Technical introduction

A Survey of Access Control Policies

Securing Data in a RHEL SELinux Multi-Level Secure Environment

SELinux course. Ing. Pavol Lupták, CISSP, CEH Lead Security Consultant, Nethemba s.r.o.

A Firewall Model of File System Security

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

Using the Flask Security Architecture to Facilitate Risk Adaptable Access Controls

Safety measures in Linux

Access Control Intro, DAC and MAC. System Security

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

Survey on Linux Security and Vulnerabilities

Top Secret KVM, Lessons Learned from an ICD 503 Deployment

How To Write Security Enhanced Linux On Embedded Systems (Es) On A Microsoft Linux (Amd64) (Amd32) (A Microsoft Microsoft 2.3.2) (For Microsoft) (Or

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

Access Control Lists in Linux & Windows

The Flask Security Architecture A Flexible Mandatory Access Control Mechanism For Use in Multiple Secure Systems

Linux Distributed Security Module 1

CAPP-Compliant Security Event Audit System for Mac OS X and FreeBSD

RSBAC - a framework for enhanced Linux system security

Information Security Measures and Monitoring System at BARC. - R.S.Mundada Computer Division B.A.R.C., Mumbai-85

Using Likewise Enterprise to Boost Compliance with Sarbanes-Oxley

BM482E Introduction to Computer Security

SELinux Policy Management Framework for HIS

Introduction to Computer Security

White Paper Levels of Linux Operating System Security

Mandatory Access Control in Linux

TELE 301 Lecture 7: Linux/Unix file

Acronis True Image 9.1 Pro/Light for Linux

Best Practices, Procedures and Methods for Access Control Management. Michael Haythorn

Mandatory Access Control

Red Hat Enterprise Linux 7 Virtualization Security Guide

Using an Open Source Framework to Catch the Bad Guy. Norman Mark St. Laurent Senior Solutions Architect, Red Hat

Red Hat Linux Administration II Installation, Configuration, Software and Troubleshooting

FreeIPA - Open Source Identity Management in Linux

CS 416: Opera-ng Systems Design

SSSD. Client side identity management. LinuxAlt 2012 Jakub Hrozek 3. listopadu 2012

SELinux & AppArmor - Comparison of Secure OSes

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 7 Access Control Fundamentals

Security and Integrity of a Distributed File Storage in a Virtual Environment

Survey of Filesystems for Embedded Linux. Presented by Gene Sally CELF

Object Classes and Permissions

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

How To Achieve Pca Compliance With Redhat Enterprise Linux

Securing Your Cloud with Xen Project s Advanced Security Features

Use Cases for Docker in Enterprise Linux Environment CloudOpen North America, 2014 Linda Wang Sr. Software Engineering Manager Red Hat, Inc.

1. Introduction to the UNIX File System: logical vision

Advanced Systems Security: Retrofitting Commercial Systems

Red Hat System Administration 1(RH124) is Designed for IT Professionals who are new to Linux.

Introduction to Android 5 Security

Trusted RUBIX TM. Version 6. Multilevel Security in Trusted RUBIX White Paper. Revision 2 RELATIONAL DATABASE MANAGEMENT SYSTEM TEL

Handling POSIX attributes for trusted Active Directory users and groups in FreeIPA

Barracuda Yosemite Server Backup

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

A Security Assessment of Virtualized Residential Gateways:

Linux Kernel Architecture

Protection of Components based on a Smart Card Enhanced Security Module

GL254 - RED HAT ENTERPRISE LINUX SYSTEMS ADMINISTRATION III

Role-Based Access Control (RBAC)

A COMPARISON BETWEEN THE SAMBA3 AND LIKEWISE LWIOD FILE SERVERS

What is included in the ATRC server support

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

Integrating Linux systems with Active Directory

User-level processes (clients) request services from the kernel (server) via special protected procedure calls

Security Enhanced (SE) Android: Bringing Flexible MAC to Android

Getting Started with the Linux Intrusion Detection

Chapter 12 File Management

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

Chapter 12 File Management. Roadmap

RBAC and HIPAA Security

Common Criteria Evaluation Challenges for SELinux. Doc Shankar IBM Linux Technology Center

The Linux System. o Updating without touching the user's files and configurations.

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

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

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

CIS 551 / TCOM 401 Computer and Network Security

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

Identity Management Basics. OWASP May 9, The OWASP Foundation. Derek Browne, CISSP, ISSAP

Panoramica su Cloud Computing targata Red Hat AIPSI Meeting 2010

Access Control. 1 Overview of Access Control. Lecture Notes (Syracuse University) Access Control: 1. What is Access Control?

What s New in Centrify Server Suite 2014

Transcription:

SELinux Security Enhanced Linux Introduction and brief overview. Copyright 2005 by Paweł J. Sawicki http://www.pawel-sawicki.com/

Agenda DAC Discretionary Access Control ACL Access Control Lists MAC Mandatory Access Control SELinux History FLASK Details and implementation Examples

Discretionary Access Control Benefits Fast Robust Well known Limitations Risky control over the permissions Error prone Power-users vs. normal users

DAC - continued... Examples chmod 777 /etc/shadow Binding to protected ports (<1024) Full control over user s files Compromised applications setuid/setgid

Access Control Lists Supersedes DAC in the area of FS permissions Imposes overhead More complicated than DAC Applies to FS permissions only

Mandatory Access Control Least privilege approach (opt-in) All available information is concerned

SELinux Security Enhanced Linux Originally developed by the NSA LSM Linux Security Modules Object oriented security Present in 2.6 Linux kernel tree SELinux inspiration and the main reason Type Enforcement (TE) & RBAC

SELinux data storage Persistent Security IDs (PSIDs) Unused part of an inode in the ext2 FS Flat-file storage LSM xattrs (extended attributes) getfattr ext3, xfs, ReiserFS Coexistence of multiple security modules SELinux being reference implementation

Fundamentals Subjects Processes Objects Resources Files Devices Sockets Ports Processes Etc.

MLS Multi Level Security No data integrity No least privilege No processes and object duty separation

FLASK Security Server Security policy logic Security contexts Access Vector Cache

FLASK general principles

FLASK operation Considered at the operation attempt Security context are sent to the AVC AVC check Cache driven Misses relayed to the SS Enforcement Server (kernel) receives the decision and allows or denies the operation Populating audit log (if applicable)

FLASK vs. pure MLS No rigidly defined lattice of relationships Defining security labels based on user identity (UID) role attributes domain or type attributes MLS levels...

Security contexts Also known as security labels General <user>:<role>:<type> Example system_u:system_r:crond_t

SELinux and FLASK No distinction between a type and a domain Domains have the process attribute Security server, AVC and the policy engine are incorporated into the kernel Domain-type access control w/ role-based limiting

Policies Set of rules that guide the security engine Defines types (resources) and domains (processes) Uses roles to limit domain transients A domain is akin to a type whenever we consider processes

Types Groups together connected resources Abstraction layer for the functionality etc_t

Boot up process - 1 Kernel load Initial process gets predefined SID (kernel) No policy loaded yet! Mounting /proc Checks /proc/filesystems for selinuxfs Mounting /selinux Check /selinux/policyvers Check /etc/selinux/config for the policy flavour

Boot up process - 2 In case of troubles fall back to old policy Remap SIDs into contexts /sbin/init re-executes itself Normal bootup

TE Rules Access Vectors <av_kind> <source_type(s)> <target_type(s)>:<class(es)> <permission(s)> allow named_t sbin_t:dir search;

AVC denied messages type=avc msg=audit(1133209488.535:344): avc: denied { getattr } for pid=4198 comm="httpd" name="index.html" dev=dm-0 ino=3438923 scontext=root:system_r:httpd_t tcontext=system_u:object_r:httpd_private_cont ent_t tclass=file

AVC continued... type=avc msg=audit(1133209488.535:344): avc: denied { getattr } for pid=4198 comm="httpd"

AVC continued... name="index.html" dev=dm-0 ino=3438923 scontext=root:system_r:httpd_t tcontext=system_u:object_r:httpd_private_cont ent_t tclass=file

File contexts regexp <-type> ( <file_label> <<none>> ) /bin(/.*)? system_u:object_r:bin_t /etc/shadow.* -- system_u:object_r:shadow_t

Targeted vs. Strict Only selected subjects are concerned Easy to implement Non-standard applications

Examples Accidental chmod usage /etc/shadow user directory Compromised program Port binding Port connection

Bibliography Security-Enhanced Linux http://www.nsa.gov/selinux/ Red Hat SELinux Guide http://www.redhat.com/docs/manuals/enterprise/rhel-4-manual/selinux-guide/ Fedora Core 3 SELinux FAQ http://fedora.redhat.com/docs/selinux-faq-fc3/ The UnOfficial SELinux FAQ http://www.crypt.gen.nz/selinux/faq.html Getting Started with SE Linux HOWTO: the new SE Linux https://sourceforge.net/docman/display_doc.php?docid=20372&group_id=21266 Writing SE Linux policy HOWTO https://sourceforge.net/docman/display_doc.php?docid=21959&group_id=21266 SELinux, Kerry Thompson http://www.samag.com/documents/s=7835/sam0303a/0303a.htm

Questions?

The End!

Legal statement You may not publish this document in any form possible without a written permission of the author. The most recent version of this presentation is always available at the following address: http://pjs.name/papers/ Copyright 2005 by Paweł J. Sawicki All rights reserved. Author: Paweł J. Sawicki <pjs@pjs.name>