SELinux (Security Enhanced Linux) By: Corey McClurg.

Slides:



Advertisements
Similar presentations
METALOGIC s o f t w a r e © Metalogic Software Corporation DACS Developer Overview DACS – the Distributed Access Control System.
Advertisements

Access Control Chapter 3 Part 3 Pages 209 to 227.
Chapter One The Essence of UNIX.
Linux File & Folder permissions. File Permissions In Ubuntu, files and folders can be set up so that only specific users can view, modify, or run them.
By: Arpit Pandey SELINUX (SECURITY-ENHANCED LINUX)
INSTALLATION OF WORDPRESS. WORDPRESS WordPress is an open source CMS, often used as a blog publishing application powered by PHP and MySQL. It has many.
Security-Enhanced Linux Joseph A LaConte CS 522 December 8, 2004.
Shane Jahnke CS591 December 7,  What is SELinux?  Changing SELinux Policies  What is SLIDE?  Reference Policy  SLIDE  Installation and Configuration.
SETUP AND CONFIGURATIONS WEBLOGIC SERVER. 1.Weblogic Installation 2.Creating domain through configuration wizard 3.Creating domain using existing template.
Linux Security.
ADVANCED LINUX SECURITY. Abstract : Using mandatory access control greatly increases the security of an operating system. SELinux, which is an implementation.
Securing LAMP: Linux, Apache, MySQL and PHP Track 2 Workshop PacNOG 7 July 1, 2010 Pago Pago, American Samoa.
Introducing LAMP: Linux, Apache, MySQL and PHP Track 2 Workshop PacNOG 7 July 1, 2010 Pago Pago, American Samoa.
Security-Enhanced Linux & Linux Security Module The George Washington University CS297 Programming Language & Security YU-HAO HU.
CGI Common Gateway Interface. CGI is the scheme to interface other programs to the Web Server.
Secure Operating Systems
SELinux US/Fedora/13/html/Security-Enhanced_Linux/
Module 9: Active Directory Domain Services. Overview Describe new features in AD DS List manageability and reliability enhancements in AD DS.
Managing User Accounts. Module 2 – Creating and Managing Users ♦ Overview ► One should log into a Linux system with a valid user name and password granted.
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:
FOSS Security through SELinux (Security Enhanced Linux) M.B.G. Suranga De Silva Information Security Specialist TECHCERT c/o Department of Computer Science.
Apache Web Server v. 2.2 Reference Manual Chapter 1 Compiling and Installing.
Module 9 Configuring Messaging Policy and Compliance.
1 Implementation of Security-Enhanced Linux Yue Cui Xiang Sha Li Song CMSC 691X Project 2—Summer 02.
Linux Security LINUX SECURITY. Firewall Linux Security Internet Database Application Web Server Firewall.
CIS 290 Linux Security Program Authentication Module and Security Enhanced LINUX.
Using the Flask Security Architecture to Facilitate Risk Adaptable Access Control March 31 Younsik Jeong Ph.D. Student.
Active Directory Administration Lesson 5. Skills Matrix Technology SkillObjective DomainObjective # Creating Users, Computers, and Groups Automate creation.
CGI Common Gateway Interface. CGI is the scheme to interface other programs to the Web Server.
Chapter 10: Rights, User, and Group Administration.
The HTTP is a standard that all Web browsers and Web servers must speak in order for the Web portion of the Internet to work.
Security Planning and Administrative Delegation Lesson 6.
Install Appaserver ©Tim Riley. Apache Group ©Tim Riley Add yourself to the apache group. Both the apache user and group are called “www-data”. This step.
SELinux. The need for secure OS Increasing risk to valuable information Dependence on OS protection mechanisms Inadequacy of mainstream operating systems.
Lecture 18 Page 1 CS 111 Online OS Use of Access Control Operating systems often use both ACLs and capabilities – Sometimes for the same resource E.g.,
Jaime Pérez Lyon, February Goals –The ability to monitor the status of the Identity and/or Service Providers of a working federation. –To have a.
LING 408/508: Programming for Linguists Lecture 17 October 28 th.
Apache, MySQL and PHP Installation and Configuration Chapter 2 MySQL Installation and Configuration.
Chapter 4- Part3. 2 Implementing User Profiles A local user profile is automatically created at the local computer when you log on with an account for.
CSCI 530 Lab Authorization. Review Authentication: proving the identity of someone Passwords Smart Cards DNA, fingerprint, retina, etc. Authorization:
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.
Privilege Management Chapter 22.
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.
Security-Enhanced Linux Stephanie Stelling Center for Information Security Department of Computer Science University of Tulsa, Tulsa, OK
Active Directory Domain Services (AD DS). Identity and Access (IDA) – An IDA infrastructure should: Store information about users, groups, computers and.
Access Controls Mandatory Access Control by Sean Dalton December 5 th 2008.
Linux Kernel Security (SELinux vs AppArmor vs Grsecurity)
SELinux Overview Dan Walsh SELinux for Dummies Dan Walsh
SELinux Overview DAC vs MAC Discretionary Access Control Mandatory
APACHE INSTALL AWS Linux (Amazon Web Services EC2)
Secure Operating System
Linux Security Presenter: Dolev Farhi |
HTCondor Security Basics
Secure Operating System Example: SELinux
Demystifying SELinux: WTF is it saying?
Active Directory Administration
SELinux Daniel J Walsh SELinux Lead Engineer.
SELinux in 20 Minutes LCA Miniconf Jan. 28th, Canberra AU
IS3440 Linux Security Unit 6 Using Layered Security for Access Control
Permission and CHMOD.
SELinux (Security Enhanced Linux)
An Overview Rick Anderson Pat Demko
OPS235: Week 1 Installing Linux (Lab1: Investigations 4 - )
SELinux
LING 408/508: Computational Techniques for Linguists
Security Templates Lecture 7.
VirgoStaging Status F.Carbognani, S. Cortese, E. Pacaud.
Access Control What’s New?
Presentation transcript:

SELinux (Security Enhanced Linux) By: Corey McClurg

What is the Idea behind SELinux? An example of how mandatory access controls can be added into Linux (Confining the actions of a process, including a superuser process) The security mechanisms implemented in the system provide flexible support for a wide range of security policies. Make it possible to configure the system to meet a wide range of security requirements. Documentation and source code is provided.

How do I get SELinux? It comes as an installation option when you install a number of Linux distributions. The latest release is also available from the NSA website for download, along with documentation, all of the different libraries and the policy compiler.

How do I get started? The release includes a general-purpose security policy configuration designed to meet a number of security objectives, this can be used as an example to go off of. Due to the flexibility of the system, the security policy can be modified and extended to customize for any given installation.

Type Enforcement In order to grant access to something, an allow rule must be created, such as:  allow user_t bin_t : file {read execute getattr}; This means a process with a domain type of user_t can read, execute, or get attributes for a file object with a type of bin_t, there is no significance in the “_t” portion. This rule might be in a policy to allow users to execute shell programs such as the bash shell (/bin/bash).

Using Type Enforcement A domain transition is wanted, in order for this to occur, 3 things must exist: 1. The process' new domain type has entrypoint access to an executable file type. 2. The process' current (or old) domain type has execute access to the entry point file type. 3. The process' current domain type has transition access to the new domain type.

Example Execute the command “ls -Z /usr/bin/passwd”  This will produce the output: -r-s—x—x root root system_u:object_r:passwd_exec_t /usr/bin/passwd  Using this provided information, we can then create TE rules to have a domain transition. Three rules are required to give the user the ability to do a domain transition to the password file:  allow user_t passwd_exec_t : file {getattr execute}; Lets user_t execute an execve() system call on passwd_exec_t  allow passwd_t passwd_exec_t : file entrypoint; This rule provides entrypoint access to the passwd_t domain, entrypoint defines which executable files can “enter” a domain.  allow user_t passwd_t : process transition; The original type (user_t) must have transition permission to the new type (passwd_t) for the domain transition to be allowed.

Example cont. This isn't very useful by itself since the user would have to specifically say that they want a domain transition. This is where type transition rules are used. To create a domain transition by default the following rule is created:  type_transition user_t passwd_exec_t : process passwd_t;  The type_transition rule indicates that by default on an execve() system call, if the calling process' domain type is user_t and the executable file's type is passwd_exec_t a domain transition to a new domain type (passwd_t) will be attempted A type_transition rule causes a domain transition to be attempted by default, but it does not allow it, that's why the other 3 rules had to be created

Example cont. What does this example accomplish?  It makes it so that the current user can change the password in the shadow(encrypted password) file, without these rules, this would not be possible even for the root user. The user isn't able to access the file directly though, they much access it through the passwd file so they can't do anything else.

Another Option: In addition to Type Enforcement, SELinux also provides a form of role-based access control (RBAC).  Roles build on type enforcement to limit the types to which a process may transition based on the role identifier in the process' security context.  Using roles is just a way to be even more specific about what access rights are given.

Limiting CGI scripts with SELinux There are types already defined in SELinux with different rights given to them. httpd_sys_script_ro_t httpd_sys_script_ro_t  A CGI script may only read files and directories with this type. Setting all cgi scripts to this other than index.cgi will make it so only index.cgi can do more than read files and directories httpd_sys_script_exec_t httpd_sys_script_exec_t  index.cgi must be set to this since httpd cannot execute any other types. httpd_sys_script_rw_t httpd_sys_script_rw_t  If a cgi script needs to be able to write, say to a database, then it will need this right (read/write access)

CGI cont. In addition to limiting the access of CGI scripts themselves, unless rules have been specifically declared to give a user access to CGI scripts, no user will be able to access them in the first place. CGI scripts can be much more safe on an apache server with SELinux implemented

Conclusion When used properly, SELinux can make a system much more secure A user is confined to being able to do only what has been defined in the SELinux policy. There are a few different routes that can be used to achieve the level of desired security using SELinux.

References 6&seqNum=1&rl=1 6&seqNum=1&rl= fc3/sn-using-other-types.html