SELinux Daniel J Walsh SELinux Lead Engineer.

Slides:



Advertisements
Similar presentations
Operating System Security
Advertisements

JENNIS SHRESTHA CSC 345 April 22, Contents Introduction History Flux Advanced Security Kernel Mandatory Access Control Policies MAC Vs DAC Features.
1 Defining System Security Policies. 2 Module - Defining System Security Policies ♦ Overview An important aspect of Network management is to protect your.
By: Arpit Pandey SELINUX (SECURITY-ENHANCED LINUX)
SELinux (Security Enhanced Linux) By: Corey McClurg.
Shane Jahnke CS591 December 7,  What is SELinux?  Changing SELinux Policies  What is SLIDE?  Reference Policy  SLIDE  Installation and Configuration.
SELinux. 2SELinux Wikipedia says: Security-Enhanced Linux (SELinux) is an implementation of mandatory access control using Linux Security Modules (LSM)
ADVANCED LINUX SECURITY. Abstract : Using mandatory access control greatly increases the security of an operating system. SELinux, which is an implementation.
© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company All rights reserved. Security Strategies in Linux Platforms and.
Security-Enhanced Linux & Linux Security Module The George Washington University CS297 Programming Language & Security YU-HAO HU.
Principles of Computer Security: CompTIA Security + ® and Beyond, Second Edition © 2010 Baselines Chapter 14.
Security Enhanced Linux (SELinux)
Computer Security & OS Lab. DKU May 26 Younsik Jeong Ph.D. Student.
Secure Operating Systems
SELinux US/Fedora/13/html/Security-Enhanced_Linux/
Csci5233 Computer Security1 Bishop: Chapter 27 System Security.
Linux kernel security Professor: Mahmood Ranjbar Authors: mohammad Heydari Mahmood ZafarArjmand Zohre Alihoseyni Maryam Sabaghi.
Security Enhanced Linux David Quigley. History SELinux Timeline 1985:LOCK (early Type Enforcement) 1990: DTMach / DTOS 1995: Utah Fluke / Flask 1999:
Information Assurance Research Group 1 NSA Security-Enhanced Linux (SELinux) Grant M. Wagner Information Assurance.
FOSS Security through SELinux (Security Enhanced Linux) M.B.G. Suranga De Silva Information Security Specialist TECHCERT c/o Department of Computer Science.
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
1 Implementation of Security-Enhanced Linux Yue Cui Xiang Sha Li Song CMSC 691X Project 2—Summer 02.
Operating System Security. OS manages and controls access to hardware components Older OSs focused on ensuring data confidentiality Modern operating systems.
ADV. NETWORK SECURITY CODY WATSON What’s in Your Dongle and Bank Account? Mandatory and Discretionary Protections of External Resources.
Cracking Techniques Onno W. Purbo
1 Linux Security. 2 Linux is not secure No computer system can ever be "completely secure". –make it increasingly difficult for someone to compromise.
SELinux. The need for secure OS Increasing risk to valuable information Dependence on OS protection mechanisms Inadequacy of mainstream operating systems.
Principles of Computer Security: CompTIA Security + ® and Beyond, Third Edition © 2012 Principles of Computer Security: CompTIA Security+ ® and Beyond,
Trusted Operating Systems
The SELinux of First Look. Prologue After many discussions with a lot of Linux users, I’ve come to realize that most of them seem to disable SELinux rather.
Security-Enhanced Linux Eric Harney CPSC 481. What is SELinux? ● Developed by NSA – Released in 2000 ● Adds additional security capabilities to Linux.
5/7/2007CoreMcClug/SELinux 1 By: Corey McClurg. Outline A History of SELinux What is SELinux and how do I get it? Getting Started Mandatory Access Control.
LINUX Presented By Parvathy Subramanian. April 23, 2008LINUX, By Parvathy Subramanian2 Agenda ► Introduction ► Standard design for security systems ►
Security-Enhanced Linux Stephanie Stelling Center for Information Security Department of Computer Science University of Tulsa, Tulsa, OK
Aaron Corso COSC Spring What is LAMP?  A ‘solution stack’, or package of an OS and software consisting of:  Linux  Apache  MySQL  PHP.
1 Introduction to SELinux David P. Quigley National Security Agency National Information Assurance Research Laboratory (NIARL)
How to live with SELinux
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.
Linux Kernel Security (SELinux vs AppArmor vs Grsecurity)
Server Security 1 SE Linux, Systrace Lars Noodén March – April 2009.
Overview of NSA Security Enhanced Linux Russell Coker.
SELinux Overview Dan Walsh SELinux for Dummies Dan Walsh
Developing a Secure Internet Service SE Linux in Production Russell Coker Linux Consultant.
Red Hat Enterprise Linux 5 Security April Red Hat Development Model Collaboration with partners and open source contributors to develop technology.
SELinux: Best Practices and What's New in Red Hat Enterprise Linux 5 Name Dan Walsh Date Wednesday May 9 th 2007.
What is SELinux trying to tell me? The 4 key causes of SELinux errors.
10/2/2016 Secure Virtualization Using SELinux Daniel J Walsh
SELinux Overview DAC vs MAC Discretionary Access Control Mandatory
SE Linux Implementation Russell Coker. What is SE Linux? A system for Mandatory Access Control (MAC) based on the Linux Security Modules (LSM) framework.
OpenShift & SELinux Dan Walsh Twitter: #rhatdan
Operating System Security
Writing SELinux Policy | Permissive Domains | Real bugs
SELinux for Dummies Dan Walsh.
Demystifying SELinux: WTF is it saying?
Onno W. Purbo Cracking Techniques Onno W. Purbo
SE Linux Implementation
Vulnerability Scanning With 'lynis'
SELinux in 20 Minutes LCA Miniconf Jan. 28th, Canberra AU
SELinux RHEL5: A benchmark
IS3440 Linux Security Unit 6 Using Layered Security for Access Control
Chapter 27: System Security
IS3440 Linux Security Unit 2 Securing a Linux Platform―Core Components
SELinux (Security Enhanced Linux)
An Overview Rick Anderson Pat Demko
SELinux
SECURITY IN THE LINUX OPERATING SYSTEM
Operating System Security
Operating System Hardening
NSA Security-Enhanced Linux (SELinux)
Designing IIS Security (IIS – Internet Information Service)
Presentation transcript:

SELinux Daniel J Walsh SELinux Lead Engineer

0 Day Exploits Patch Cycle Someone discovers a vulnerability in software Package Maintainer and OS Vendor Notified Fix generated/Distributed Fix installed by users What protects you before the fix is installed? What happens if the wrong people find the problem and don’t report it? Exploits that don’t have a patch built for them are called 0-Day Exploits. What are attackers after? Spam... Where is the good stuff?

Mandatory Method (MAC) What is SELinux? Mandatory Method (MAC) Current systems use DAC (Discretionary Access Control) User/Programs has limited privilege Security policy set by administrator and enforced by the System Incorporates program function/trustworthiness into A/C decisions. Root compromises confined by policy

Compartmentalization Helms Deep – Lord of the Rings http://tolkienbattles.bravepages.com/chelmsbackground.jpg http://bioinfo.mshri.on.ca/people/feldman/vgmuseum/otherbook/meq2- map2.jpg

Building on 13 years of NSA’s OS security research Developed by the NSA Building on 13 years of NSA’s OS security research Application of NSA’s Flask security architecture Cleanly separates policy from enforcement using well-defined policy interfaces Fine-grained controls over kernel services Transparent to applications and users Removes power of root Several demo machines running root as guest account

Why should you use SELinux SELinux kernel enforces MAC policies Confines programs/system servers to minimum privileges Reduces or eliminates harm caused by compromised applications. root's power decomposed: Principle of least privilege. Traditional operating systems depend on Correctness of the Kernel All the privileged applications and their configurations SELinux kernel depends primarily on Correctness of Kernel Security policy configuration.

Where should you run SELinux? Corporate Network Internet Intranet Red Hat Enterprise Linux ES Red Hat Enterprise Linux ES DNS Web FTP NFS NIS Red Hat Enterprise Linux AS Firewall VPN Database CRM ERP DNS Web FTP Red Hat Enterprise Linux ES Red Hat Enterprise Linux WS Red Hat Enterprise Linux ES DMZ App Server Farm

SELinux Key Components - Kernel Patch implementing security hooks Uses Linux Security Module (LSM) Framework for security enhancements to Linux OTHER Linux Security Modules have been written, but SELinux is the only one in widespread use.

SELinux Key Components - Policy Strict A system where everything is denied by default. You must specify allow rules to grant privileges SELinux designed to be a strict policy. The policy rules only have allows, no denies. Minimal privilege's for every daemon separate user domains for programs like GPG,X, ssh, etc Difficult to enforce in general purpose Operating system.

SELinux Key Components - Policy Targeted System where everything is allowed. use deny rules. Protects systems Doors and Windows By default processes run in unconfined_t. unconfined processes have the same access they would have without SELinux running. Daemons with defined policy transition to locked down domains. httpd started from unconfined_t transitions to httpd_t which has limited access.

SELinux Key Components - Applications Most user applications and server applications unchanged SELinux aware applications Applications used to view or manipulate security contexts Programs required to set user session security context Examples: login/sshd, ls, cp, ps, setfilecon, logrotate, cron .. DBUS, Trusted-X

How SELinux Enforces Security Policy SELinux Kernel File Fa Process Pa SC SC Security Policy File Fb Process Pb SC SC Device Da User Ua SC SC Device Db User Ub SC SC Security Enforcement Module Permits or denies accesses to all objects Subject Requests Access to File or Device Permission Granted to Object

Apache Example Apache executable unmodified System administrator might have three choices of policy High - Apache only can display html pages in /var/www/html Medium – Apache can run cgi-scripts in /var/www/cgi-bin Low – Apache can display pages in users home directories Cracker only has access to files that Apache had access too If Apache had read access to /var/www/html that is all cracker can do. Cracker can cause other pages to display.

Configuring Policy Booleans File Context Turn on/off sections of policy setsebool -P allow_nfs_home_dirs 1 /etc/selinux/targeted/booleans File Context chcon -R -t httpd_sys_script_rw_t /var/www/myapp/data chcon -t httpd_sys_script_t /var/www/cgi-bin/myapp /etc/selinux/targeted/contexts/files/file_contexts.local

Configuring Policy Apache Example System administrator has multiple choices of policy Booleans httpd_disable_trans, httpd_enable_cgi httpd_enable_homedirs httpd_tty_comm, httpd_unified File Context (sys and user versions of following) httpd_sys_content_t, httpd_sys_script_exec_t, httpd_sys_script_ro_t, httpd_sys_script_rw_t, httpd_sys_script_ra_t chcon -R -t httpd_sys_content_t /home/dwalsh/public_html http://fedora.redhat.com/docs/selinux-apache-fc3/ man httpd_selinux

Configuring Policy Writing Policy Requires selinux-policy-POLICYTYPE-sources /etc/selinux/targeted/src/policy Tunables AVC messages in /var/log/messages or /var/log/audit.log avc: denied { read write } for pid=6775 exe=/usr/sbin/crond name=null dev=tmpfs ino=2150 scontext=root:system_r:system_crond_t tcontext=system_u:object_r:null_device_t tclass=chr_file audit2allow -i /var/log/messages allow system_crond_t null_device_t:chr_file { read write }; make rules

SELinux in Fedora Core Fedora Core 2 Fedora Core 3 Shipped with SELinux off by default Defaulted to Strict Policy Targeted policy available via Rawhide Fedora Core 3 Shipped with SELinux on by default Targeted Policy with 10 targets Strict policy available via Rawhide, requires a relabel Fedora Core 4 About to ship with SELinux on by default Targeted Policy with 70 Targets

SELinux in RHEL 4 SELinux is an installation option that is on by default Default policy is targeted policy dhcpd mailman.te mysqld named nscd ntpd portmap postgresql squid syslogd winbind Strict Policy provided by professional services. Training Policy writing Services

Fedora Core 5 Additional “targets” for targeted policy Better lock down of executable stack Better controls over networking IPSEC/Named Networks Iptables Integration Mechanism to change allow easier change from Targeted policy to MLS Policy. EAL4/LSPP application begins. Apply technology from IBM/TCS into mainline OS for MLS/LSPP support. Labeled Networking with IPSEC

SELinux Futures New Policies – MLS LSPP Compliance? Better control over user space Trusted X Compartmentalized Workstation

Q/A More Information Red Hat Enterprise Linux Resource http://www.redhat.com/software/rhel/ SELinux Resources http://www.nsa.gov/selinux http://fedora.redhat.com/projects/selinux/ Mailing Lists selinux@tycho.nsa.gov - NSA List fedora-selinux-list@redhat.com - Fedora SELinux List