SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Downloaden Sie, um offline zu lesen
Flask: Flux Advanced Security Kernel


   ECE 579S, September, 2010
   Worchester Polytechnic Institute
   By
    –   Samantha Rassner
    –   Sanjay Kumar
    –   Luis Espinal
A Brief History… Early OS and
         Networking
   1946 – ENIAC, the first digital
   computer

   1961, 1963 – CTSS, the first multiple
   user mainframe and remote login

   1964 – Multics, first multithreaded,
   mutliuser operating system

   1965 – ARPANET and the first WAN
   connection made
         Rassner, Kumar, Espinal. ECE 579S, 2010   2
Unix and the Internet
1972 – Unix is released as a scaled down and
portable Multics


1982 – IM PC is available to consumers


1986 – Mach Kernel is proposed to streamline
and “secure” client-server architecture


1987, 1988 – T1 backbone begins, the Internet
is opened to commercial traffic
       Rassner, Kumar, Espinal. ECE 579S, 2010   3
Security? What Security?
  1982 – The fist virus, the Elk Cloner


  1988 – Morris Worm, first Internet attack,
  crashed 6k of 60k computers on ARPANET


  1988, 1989 – Tmach and SDOS attempt to
  implement DoD secure systems


  1991 – Linux released as open source, many
  developers use and improve the Linux kernel
          Rassner, Kumar, Espinal. ECE 579S, 2010   4
And then…

1998 - NSA analyzes mainstream operating
systems for security capability

1999 - NSA and U of Utah develop FLASK
to address security “missing links” and
create a platform for future secure systems

2003 - SELinux implements FLASK and is
incorporated into Linux kernel 2.6

      Rassner, Kumar, Espinal. ECE 579S, 2010   5
Evolution of Secure Distributed OS
• In the early days, security was a guard at the
  door
• User identification in place of user
  authentication
• Network closed to the public, only people
  using machines were the developers
• Developers often bypassed permission
  (logging in as root) to facilitate programming

                 Rassner, Kumar, Espinal. ECE 579S, 2010   6
Remember the Secure Design
            Principles…
•   Least privilege
•   Fail-safe defaults
•   Economy of mechanism
•   Complete mediation
•   Open design
•   Separation of privilege
•   Least common mechanism
•   Psychological acceptability
                   Rassner, Kumar, Espinal. ECE 579S, 2010   7
Adding Security After the Fact
• Bell-LaPadula security models often directly
  conflicted with operating system practices
• Network protocols designed for
  communication, not security
• Systems are as strong as their weakest link
  – Internet security (circa 1980s)
• Scope of threats on a public Internet are very
  different than in the University and research
  centers
                  Rassner, Kumar, Espinal. ECE 579S, 2010   8
Modern Security Approach
• User management – root is for admins only!
• Access Control lists
• Firewalls, antivirus
• IPSec, SSL, TLS
• AES, DES, WPA, etc.
• Still the same basic kernel…
   – Needs to be more flexible to support least privilege
   – Needs Mandatory Access Control in addition to
     Discretionary Access Control
• In 1999 NSA defined next-gen requirements
                   Rassner, Kumar, Espinal. ECE 579S, 2010   9
Flask
• OS Security Architecture
  – Flexible security policies
• Flux advanced security kernel
  – Prototyped on fluke OS
• Developed at University of Utah in 1999
• Implemented by NSA in Security Enhanced
  Linux ( SELinux)


                   Rassner, Kumar, Espinal. ECE 579S, 2010   10
Security Policy Requirements
• Fine grained access rights
  – Enforcement of policy in system service
    components
• Controlling the propagation of access rights
  – Consult policy on every access
• Revocation of access rights
  – Prevent access after revocation of policy


                  Rassner, Kumar, Espinal. ECE 579S, 2010   11
Flask Architecture
• Object Manager
  – Enforcer of Security Policy
• Security Server
  – Makes Security policy decisions
• Access Vector Cache
  – Speeds up Policy decsions




                  Rassner, Kumar, Espinal. ECE 579S, 2010   12
Flask Architecture




   Rassner, Kumar, Espinal. ECE 579S, 2010   13
Object Manager
• Retrieve Access Interfaces
  – Provides APIs to provide access to objects
• Labeling Interfaces
  – Assign Security attributes to Objects
• Polyinstantiation Interfaces
  – Provide member resources support




                  Rassner, Kumar, Espinal. ECE 579S, 2010   14
Object Manager - Labels
• Labels are security attributes
  – Also called security context
• Security Context
  – Variable length string
  – Example: “identity:role:domain” in SELinux
• Security Identifier
  – 32 bit value
  – Maps to Security Context

                  Rassner, Kumar, Espinal. ECE 579S, 2010   15
Object Manager - Labeling


 Client (SID –C)



                 Creates Client Object

            Object Manager                                                     Security Server


    Obj SID         Obj SID     Obj                                            SID/ Context Map
    SID




    New SID                                               New SID
                                                                               Policy Logic
    ( SID,SID,Obj Type)
                                                    New SID Request
                                                                                      Label Rules

    S
                                      Enforcement                     Policy



                              Rassner, Kumar, Espinal. ECE 579S, 2010                               16
Polyinstantiation
• Resource sharing among clients
• Multiple Instantiations of resource
  (Memebers)
• Distinct SIDs for each instantiation
• SELinux uses /tmp/resourceid as
  polyinstantiated resource



                 Rassner, Kumar, Espinal. ECE 579S, 2010   17
PolyInstantiation
Client (SID –C)



                Creates Client Object

           Object Manager


   Obj SID
   SID                   Poly Obj     SID
   Obj SID                                                                    Security Server

   Obj
                                                                              SID/ Context Map
                     OBJ            OBJ      OBJ
                     SID            SID      SID


                                                             Mbr SID
   New SID
                                            Enforcement   Mbr SID Req             Policy
                                                                              Policy Logic
   ( SID,SID,Obj Type)
                                                                                     Label Rules

   S




                                    Rassner, Kumar, Espinal. ECE 579S, 2010                        18
Security Server
•   Makes Policy decisions for access
•   Maps Security Context to SID
•   Polyinstantiation Support
•   Support Load/Unload of Policies
•   Support Policy Revocation




                  Rassner, Kumar, Espinal. ECE 579S, 2010   19
Access Vector Cache
• Speeds up access to policy decision
• Cache of Security policies provided by Security
  Server
• Intercepts policy revocation requests




                 Rassner, Kumar, Espinal. ECE 579S, 2010   20
SELinux
• An implementation of FLASK
   – Separates protection (enforcement) from security
     (policy)
• SELinux MLS Policy Implements BLP
   – Implements a reliable, trusted MAC/MLS
      • Via trusted channels and type enforcement
• Polyinstantiated/multi-level directories
   – Useful against inference attacks
   – Example. access to /tmp is polyinstantiated according
     to domain’s security context
                       from Paul Moore’s “Trusted Computing with SELinux, RedHat 2008 Summit

                     Rassner, Kumar, Espinal. ECE 579S, 2010                             21
SELinux At A Glance
• Integrated in the mainline 2.6 series Linux
  kernels
• Based on LSM Plugin Architecture
  – LSM, a partial implementation of FLASK
• Integrated with existing DAC typical of Unix
  systems
• Backwards Compatible
  – Applications do not need to be compiled or written
    specifically for SELinux
                     from Paul Moore’s “Trusted Computing with SELinux, RedHat 2008 Summit


                   Rassner, Kumar, Espinal. ECE 579S, 2010
                                                                                       22
SELinux’s FLASK Architecture




           from Paul Moore’s “Trusted Computing with SELinux, RedHat 2008 Summit

         Rassner, Kumar, Espinal. ECE 579S, 2010
                                                                             23
LSM Architecture




           From Wright et al “Linux Security Module Framework”, 2002




   Rassner, Kumar, Espinal. ECE 579S, 2010
                                                                 24
SELinux LSM Architecture




                  From Anatomy of Security-Enhanced Linux (SELinux)
                                          Architecture and implementation
                    M. Tim Jones, Consultant Engineer, Emulex Corp. 2008

       Rassner, Kumar, Espinal. ECE 579S, 2010
                                                                      25
SELinux Kernel Architecture




From SELinux by Example, Caplan,
MacMillan, Mayer.
Prentice Hall, 2007                                                          26
                                   Rassner, Kumar, Espinal. ECE 579S, 2010
SELinux Policies
• Policy Flexibility Via Extended Attributes
  – Can be used to implement
     • Domain types
     • RBAC
     • Need-to-know categories
  – Applicable to
     • Process
     • File/Resource
     • User
                      from Paul Moore’s “Trusted Computing with SELinux, RedHat 2008 Summit




                    Rassner, Kumar, Espinal. ECE 579S, 2010
                                                                                        27
SELinux – Trusted MAC/MLS
• MLS supported in security contexts
  – user:role:type:sensitivity[:category,...][-
    sensitivity[:category,...]]
• Trusted Paths
  – Client-Server Identification at IPC Level (as in
    FLASK)
• Type Enforcement
  – No access by default, no super user
                   from Paul Moore’s “Trusted Computing with SELinux”, RedHat 2008 Summit


                  Rassner, Kumar, Espinal. ECE 579S, 2010
                                                                                      28
SELinux – Type Enforcement
• Gives precedence to MAC over DAC
   – There is no access by default (no super user).
• Based on security context labeling
• Used for implementing least-privilege
   – Controls domain transition
      • explicit who-can-access-what-and-how
• Allows variable granularity of policies controlling
   – Labeled file access
   – Labeled networking
   – Labeled printing


                     Rassner, Kumar, Espinal. ECE 579S, 2010
                                                               29
Type Enforcement Concepts
• Rights are based on labels in a security context, not on
  process (owner/group) id.
• A security context contains labels
• A label applied to a process is a domain
• A label applied to a resource is a type

• Optionally, a role is an association of a domain to a type
  for a given permission.

• Labels and roles defined under /etc/selinux/
from SELinux How To
http://www.linuxtopia.org/online_books/getting_started_with_SELinux/

                                        Rassner, Kumar, Espinal. ECE 579S, 2010
                                                                                  30
Type Enforcement Example
• Example:
   – allow user_t bin_t : file {read execute getattr};


• user_t is a domain,a label applied to unprivileged
  processes

• bin_t is a type, a label for executables under /usr/bin

• This rule indicates unprivileged users can exec, read and
  get attributes from executable files under /usr/bin

• Used for implementing least-privilege
                                      From SELinux by Example, Caplan, MacMillan, Mayer.
                                                                      Prentice Hall, 2007


                           Rassner, Kumar, Espinal. ECE 579S, 2010
                                                                                            31
Type Enforcement Example (con’t)
        allow user_t bin_t : file {read execute getattr};




                          From SELinux by Example, Caplan, MacMillan, Mayer.
                                                          Prentice Hall, 2007


               Rassner, Kumar, Espinal. ECE 579S, 2010
                                                                                32
/etc/passwd – standard Linux




                    From SELinux by Example, Caplan, MacMillan, Mayer.
                                                    Prentice Hall, 2007


         Rassner, Kumar, Espinal. ECE 579S, 2010
                                                                          33
/etc/passwd - SELinux




                From SELinux by Example, Caplan, MacMillan, Mayer.
                                                Prentice Hall, 2007
     Rassner, Kumar, Espinal. ECE 579S, 2010
                                                                      34
Notes
• LSM is a partial implementation of FLASK
  – Does not provide for access revocation of executing
    transactions
  – Requires support for extended attributes (not present
    in NFS)_
• Other Implementations (Path-based)
  – TOMOYO Linux
     • Linux Kernel mainline version 2.6.30
  – SMACK (Simplified Mandatory Access Control
    Kernel)
  – AppArmor
     • Available with Ubuntu by default


                     Rassner, Kumar, Espinal. ECE 579S, 2010
                                                               35
References
•   SELinux by Example, Caplan, MacMillan, Mayer. Prentice Hall, 2007
•   SELinux How To - http://www.linuxtopia.org/online_books/getting_started_with_SELinux/
•   Paul Moore’s “Trusted Computing with SELinux”, RedHat 2008 Summit
      – http://www.redhat.com/promo/summit/2008/downloads/pdf/Wednesday_245pm_Paul_Moore
          _Whats_New_Infrastructure.pdf
•   Anatomy of Security-Enhanced Linux (SELinux) Architecture and implementation, M. Tim Jones,
    Consultant Engineer, Emulex Corp. 2008
      – http://www.ibm.com/developerworks/linux/library/l-selinux/
•   The Flask Security Architecture: System Support for Diverse Security Policies. Spencer et al.
    Usenix 1999.
•   The Inevitability of Failure: The Flawed Assumption of Security in Modern Computing
    Environments. Loscocco et al. 1998.
•   Security is No Secret. Joab Jackson. Government Computer News. 2008.
•   http://www.multicians.org/
•   http://www.computerhistory.org/timeline/
•   Issues in secure distributed operating system design., Wong, Raymond M., Digest of Papers -
    IEEE Computer Society International Conference, Feb 1989. p.338-341
•   Red Hat Enterprise Linux 4: Red Hat SELinux Guide,
    http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/selinux-guide/selg-chapter-
    0013.html
•   A comparison of secure UNIX operating systems, Wong, R.M., Computer Security Applications
    Conference, 1990., Proceedings of the Sixth Annual (0-8186-2105-2) 1990. p.333-333

                                 Rassner, Kumar, Espinal. ECE 579S, 2010
                                                                                               36

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction_of_ADDS
Introduction_of_ADDSIntroduction_of_ADDS
Introduction_of_ADDS
Harsh Sethi
 
Pengenalan Instalasi Novell Netware
Pengenalan Instalasi Novell NetwarePengenalan Instalasi Novell Netware
Pengenalan Instalasi Novell Netware
Ari FX
 

Was ist angesagt? (13)

MySQL enterprise edition
MySQL enterprise edition MySQL enterprise edition
MySQL enterprise edition
 
Cloud Computing presentation
Cloud Computing presentationCloud Computing presentation
Cloud Computing presentation
 
Introduction_of_ADDS
Introduction_of_ADDSIntroduction_of_ADDS
Introduction_of_ADDS
 
Database migration from Sybase ASE to PostgreSQL @2013.pgconf.eu
Database migration from Sybase ASE to PostgreSQL @2013.pgconf.euDatabase migration from Sybase ASE to PostgreSQL @2013.pgconf.eu
Database migration from Sybase ASE to PostgreSQL @2013.pgconf.eu
 
Cloud computing : Cloud sim
Cloud computing : Cloud sim Cloud computing : Cloud sim
Cloud computing : Cloud sim
 
Less05 asm instance
Less05 asm instanceLess05 asm instance
Less05 asm instance
 
Diapo prĂŠsentation cloud
Diapo prĂŠsentation cloudDiapo prĂŠsentation cloud
Diapo prĂŠsentation cloud
 
Systemz Security Overview (for non-Mainframe folks)
Systemz Security Overview (for non-Mainframe folks)Systemz Security Overview (for non-Mainframe folks)
Systemz Security Overview (for non-Mainframe folks)
 
Redefining tables online without surprises
Redefining tables online without surprisesRedefining tables online without surprises
Redefining tables online without surprises
 
Pengenalan Instalasi Novell Netware
Pengenalan Instalasi Novell NetwarePengenalan Instalasi Novell Netware
Pengenalan Instalasi Novell Netware
 
Les avantages de la virtualisation
Les avantages de la virtualisationLes avantages de la virtualisation
Les avantages de la virtualisation
 
NOSQL Database: Apache Cassandra
NOSQL Database: Apache CassandraNOSQL Database: Apache Cassandra
NOSQL Database: Apache Cassandra
 
GNS3, VoIP, ToIP
GNS3, VoIP, ToIPGNS3, VoIP, ToIP
GNS3, VoIP, ToIP
 

Ähnlich wie Flask: Flux Advanced Security Kernel

130418 makan pourzandi - esf -- an elastic security framework for cloud inf...
130418   makan pourzandi - esf -- an elastic security framework for cloud inf...130418   makan pourzandi - esf -- an elastic security framework for cloud inf...
130418 makan pourzandi - esf -- an elastic security framework for cloud inf...
Ptidej Team
 

Ähnlich wie Flask: Flux Advanced Security Kernel (20)

Linux Kernel Security Overview - KCA 2009
Linux Kernel Security Overview - KCA 2009Linux Kernel Security Overview - KCA 2009
Linux Kernel Security Overview - KCA 2009
 
Zero Trust Run-time Kubernetes Security made easy with AccuKnox
Zero Trust Run-time Kubernetes Security made easy with AccuKnoxZero Trust Run-time Kubernetes Security made easy with AccuKnox
Zero Trust Run-time Kubernetes Security made easy with AccuKnox
 
Soc analyst course content v3
Soc analyst course content v3Soc analyst course content v3
Soc analyst course content v3
 
Soc analyst course content
Soc analyst course contentSoc analyst course content
Soc analyst course content
 
Immutable Infrastructure Security
Immutable Infrastructure SecurityImmutable Infrastructure Security
Immutable Infrastructure Security
 
IBM Spectrum Scale Security
IBM Spectrum Scale Security IBM Spectrum Scale Security
IBM Spectrum Scale Security
 
Openstack security presentation 2013
Openstack security presentation 2013Openstack security presentation 2013
Openstack security presentation 2013
 
Zonesec_ares
Zonesec_aresZonesec_ares
Zonesec_ares
 
130418 makan pourzandi - esf -- an elastic security framework for cloud inf...
130418   makan pourzandi - esf -- an elastic security framework for cloud inf...130418   makan pourzandi - esf -- an elastic security framework for cloud inf...
130418 makan pourzandi - esf -- an elastic security framework for cloud inf...
 
08-spaf (1).ppt
08-spaf (1).ppt08-spaf (1).ppt
08-spaf (1).ppt
 
SELinux Project Overview - Linux Foundation Japan Symposium 2008
SELinux Project Overview - Linux Foundation Japan Symposium 2008SELinux Project Overview - Linux Foundation Japan Symposium 2008
SELinux Project Overview - Linux Foundation Japan Symposium 2008
 
Slide Deck – Session 6 – FRSecure CISSP Mentor Program 2017
Slide Deck – Session 6 – FRSecure CISSP Mentor Program 2017Slide Deck – Session 6 – FRSecure CISSP Mentor Program 2017
Slide Deck – Session 6 – FRSecure CISSP Mentor Program 2017
 
Applied Security for Containers, OW2con'18, June 7-8, 2018, Paris
Applied Security for Containers, OW2con'18, June 7-8, 2018, ParisApplied Security for Containers, OW2con'18, June 7-8, 2018, Paris
Applied Security for Containers, OW2con'18, June 7-8, 2018, Paris
 
3 Telecom+Network Part1
3 Telecom+Network Part13 Telecom+Network Part1
3 Telecom+Network Part1
 
CLOUD NATIVE SECURITY
CLOUD NATIVE SECURITYCLOUD NATIVE SECURITY
CLOUD NATIVE SECURITY
 
Come gestire l'encryption dei dati con SKLM
Come gestire l'encryption dei dati con SKLMCome gestire l'encryption dei dati con SKLM
Come gestire l'encryption dei dati con SKLM
 
The Future of Embedded and IoT Security: Kaspersky Operating System
The Future of Embedded and IoT Security: Kaspersky Operating SystemThe Future of Embedded and IoT Security: Kaspersky Operating System
The Future of Embedded and IoT Security: Kaspersky Operating System
 
IBM Spectrum Scale Secure- Secure Data in Motion and Rest
IBM Spectrum Scale Secure- Secure Data in Motion and RestIBM Spectrum Scale Secure- Secure Data in Motion and Rest
IBM Spectrum Scale Secure- Secure Data in Motion and Rest
 
Getting Started with Runtime Security on Azure Kubernetes Service (AKS)
Getting Started with Runtime Security on Azure Kubernetes Service (AKS)Getting Started with Runtime Security on Azure Kubernetes Service (AKS)
Getting Started with Runtime Security on Azure Kubernetes Service (AKS)
 
Safe and secure autonomous systems
Safe and secure autonomous systemsSafe and secure autonomous systems
Safe and secure autonomous systems
 

KĂźrzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

KĂźrzlich hochgeladen (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 

Flask: Flux Advanced Security Kernel

  • 1. Flask: Flux Advanced Security Kernel  ECE 579S, September, 2010  Worchester Polytechnic Institute  By – Samantha Rassner – Sanjay Kumar – Luis Espinal
  • 2. A Brief History… Early OS and Networking 1946 – ENIAC, the first digital computer 1961, 1963 – CTSS, the first multiple user mainframe and remote login 1964 – Multics, first multithreaded, mutliuser operating system 1965 – ARPANET and the first WAN connection made Rassner, Kumar, Espinal. ECE 579S, 2010 2
  • 3. Unix and the Internet 1972 – Unix is released as a scaled down and portable Multics 1982 – IM PC is available to consumers 1986 – Mach Kernel is proposed to streamline and “secure” client-server architecture 1987, 1988 – T1 backbone begins, the Internet is opened to commercial traffic Rassner, Kumar, Espinal. ECE 579S, 2010 3
  • 4. Security? What Security? 1982 – The fist virus, the Elk Cloner 1988 – Morris Worm, first Internet attack, crashed 6k of 60k computers on ARPANET 1988, 1989 – Tmach and SDOS attempt to implement DoD secure systems 1991 – Linux released as open source, many developers use and improve the Linux kernel Rassner, Kumar, Espinal. ECE 579S, 2010 4
  • 5. And then… 1998 - NSA analyzes mainstream operating systems for security capability 1999 - NSA and U of Utah develop FLASK to address security “missing links” and create a platform for future secure systems 2003 - SELinux implements FLASK and is incorporated into Linux kernel 2.6 Rassner, Kumar, Espinal. ECE 579S, 2010 5
  • 6. Evolution of Secure Distributed OS • In the early days, security was a guard at the door • User identification in place of user authentication • Network closed to the public, only people using machines were the developers • Developers often bypassed permission (logging in as root) to facilitate programming Rassner, Kumar, Espinal. ECE 579S, 2010 6
  • 7. Remember the Secure Design Principles… • Least privilege • Fail-safe defaults • Economy of mechanism • Complete mediation • Open design • Separation of privilege • Least common mechanism • Psychological acceptability Rassner, Kumar, Espinal. ECE 579S, 2010 7
  • 8. Adding Security After the Fact • Bell-LaPadula security models often directly conflicted with operating system practices • Network protocols designed for communication, not security • Systems are as strong as their weakest link – Internet security (circa 1980s) • Scope of threats on a public Internet are very different than in the University and research centers Rassner, Kumar, Espinal. ECE 579S, 2010 8
  • 9. Modern Security Approach • User management – root is for admins only! • Access Control lists • Firewalls, antivirus • IPSec, SSL, TLS • AES, DES, WPA, etc. • Still the same basic kernel… – Needs to be more flexible to support least privilege – Needs Mandatory Access Control in addition to Discretionary Access Control • In 1999 NSA defined next-gen requirements Rassner, Kumar, Espinal. ECE 579S, 2010 9
  • 10. Flask • OS Security Architecture – Flexible security policies • Flux advanced security kernel – Prototyped on fluke OS • Developed at University of Utah in 1999 • Implemented by NSA in Security Enhanced Linux ( SELinux) Rassner, Kumar, Espinal. ECE 579S, 2010 10
  • 11. Security Policy Requirements • Fine grained access rights – Enforcement of policy in system service components • Controlling the propagation of access rights – Consult policy on every access • Revocation of access rights – Prevent access after revocation of policy Rassner, Kumar, Espinal. ECE 579S, 2010 11
  • 12. Flask Architecture • Object Manager – Enforcer of Security Policy • Security Server – Makes Security policy decisions • Access Vector Cache – Speeds up Policy decsions Rassner, Kumar, Espinal. ECE 579S, 2010 12
  • 13. Flask Architecture Rassner, Kumar, Espinal. ECE 579S, 2010 13
  • 14. Object Manager • Retrieve Access Interfaces – Provides APIs to provide access to objects • Labeling Interfaces – Assign Security attributes to Objects • Polyinstantiation Interfaces – Provide member resources support Rassner, Kumar, Espinal. ECE 579S, 2010 14
  • 15. Object Manager - Labels • Labels are security attributes – Also called security context • Security Context – Variable length string – Example: “identity:role:domain” in SELinux • Security Identifier – 32 bit value – Maps to Security Context Rassner, Kumar, Espinal. ECE 579S, 2010 15
  • 16. Object Manager - Labeling Client (SID –C) Creates Client Object Object Manager Security Server Obj SID Obj SID Obj SID/ Context Map SID New SID New SID Policy Logic ( SID,SID,Obj Type) New SID Request Label Rules S Enforcement Policy Rassner, Kumar, Espinal. ECE 579S, 2010 16
  • 17. Polyinstantiation • Resource sharing among clients • Multiple Instantiations of resource (Memebers) • Distinct SIDs for each instantiation • SELinux uses /tmp/resourceid as polyinstantiated resource Rassner, Kumar, Espinal. ECE 579S, 2010 17
  • 18. PolyInstantiation Client (SID –C) Creates Client Object Object Manager Obj SID SID Poly Obj SID Obj SID Security Server Obj SID/ Context Map OBJ OBJ OBJ SID SID SID Mbr SID New SID Enforcement Mbr SID Req Policy Policy Logic ( SID,SID,Obj Type) Label Rules S Rassner, Kumar, Espinal. ECE 579S, 2010 18
  • 19. Security Server • Makes Policy decisions for access • Maps Security Context to SID • Polyinstantiation Support • Support Load/Unload of Policies • Support Policy Revocation Rassner, Kumar, Espinal. ECE 579S, 2010 19
  • 20. Access Vector Cache • Speeds up access to policy decision • Cache of Security policies provided by Security Server • Intercepts policy revocation requests Rassner, Kumar, Espinal. ECE 579S, 2010 20
  • 21. SELinux • An implementation of FLASK – Separates protection (enforcement) from security (policy) • SELinux MLS Policy Implements BLP – Implements a reliable, trusted MAC/MLS • Via trusted channels and type enforcement • Polyinstantiated/multi-level directories – Useful against inference attacks – Example. access to /tmp is polyinstantiated according to domain’s security context from Paul Moore’s “Trusted Computing with SELinux, RedHat 2008 Summit Rassner, Kumar, Espinal. ECE 579S, 2010 21
  • 22. SELinux At A Glance • Integrated in the mainline 2.6 series Linux kernels • Based on LSM Plugin Architecture – LSM, a partial implementation of FLASK • Integrated with existing DAC typical of Unix systems • Backwards Compatible – Applications do not need to be compiled or written specifically for SELinux from Paul Moore’s “Trusted Computing with SELinux, RedHat 2008 Summit Rassner, Kumar, Espinal. ECE 579S, 2010 22
  • 23. SELinux’s FLASK Architecture from Paul Moore’s “Trusted Computing with SELinux, RedHat 2008 Summit Rassner, Kumar, Espinal. ECE 579S, 2010 23
  • 24. LSM Architecture From Wright et al “Linux Security Module Framework”, 2002 Rassner, Kumar, Espinal. ECE 579S, 2010 24
  • 25. SELinux LSM Architecture From Anatomy of Security-Enhanced Linux (SELinux) Architecture and implementation M. Tim Jones, Consultant Engineer, Emulex Corp. 2008 Rassner, Kumar, Espinal. ECE 579S, 2010 25
  • 26. SELinux Kernel Architecture From SELinux by Example, Caplan, MacMillan, Mayer. Prentice Hall, 2007 26 Rassner, Kumar, Espinal. ECE 579S, 2010
  • 27. SELinux Policies • Policy Flexibility Via Extended Attributes – Can be used to implement • Domain types • RBAC • Need-to-know categories – Applicable to • Process • File/Resource • User from Paul Moore’s “Trusted Computing with SELinux, RedHat 2008 Summit Rassner, Kumar, Espinal. ECE 579S, 2010 27
  • 28. SELinux – Trusted MAC/MLS • MLS supported in security contexts – user:role:type:sensitivity[:category,...][- sensitivity[:category,...]] • Trusted Paths – Client-Server Identification at IPC Level (as in FLASK) • Type Enforcement – No access by default, no super user from Paul Moore’s “Trusted Computing with SELinux”, RedHat 2008 Summit Rassner, Kumar, Espinal. ECE 579S, 2010 28
  • 29. SELinux – Type Enforcement • Gives precedence to MAC over DAC – There is no access by default (no super user). • Based on security context labeling • Used for implementing least-privilege – Controls domain transition • explicit who-can-access-what-and-how • Allows variable granularity of policies controlling – Labeled file access – Labeled networking – Labeled printing Rassner, Kumar, Espinal. ECE 579S, 2010 29
  • 30. Type Enforcement Concepts • Rights are based on labels in a security context, not on process (owner/group) id. • A security context contains labels • A label applied to a process is a domain • A label applied to a resource is a type • Optionally, a role is an association of a domain to a type for a given permission. • Labels and roles defined under /etc/selinux/ from SELinux How To http://www.linuxtopia.org/online_books/getting_started_with_SELinux/ Rassner, Kumar, Espinal. ECE 579S, 2010 30
  • 31. Type Enforcement Example • Example: – allow user_t bin_t : file {read execute getattr}; • user_t is a domain,a label applied to unprivileged processes • bin_t is a type, a label for executables under /usr/bin • This rule indicates unprivileged users can exec, read and get attributes from executable files under /usr/bin • Used for implementing least-privilege From SELinux by Example, Caplan, MacMillan, Mayer. Prentice Hall, 2007 Rassner, Kumar, Espinal. ECE 579S, 2010 31
  • 32. Type Enforcement Example (con’t) allow user_t bin_t : file {read execute getattr}; From SELinux by Example, Caplan, MacMillan, Mayer. Prentice Hall, 2007 Rassner, Kumar, Espinal. ECE 579S, 2010 32
  • 33. /etc/passwd – standard Linux From SELinux by Example, Caplan, MacMillan, Mayer. Prentice Hall, 2007 Rassner, Kumar, Espinal. ECE 579S, 2010 33
  • 34. /etc/passwd - SELinux From SELinux by Example, Caplan, MacMillan, Mayer. Prentice Hall, 2007 Rassner, Kumar, Espinal. ECE 579S, 2010 34
  • 35. Notes • LSM is a partial implementation of FLASK – Does not provide for access revocation of executing transactions – Requires support for extended attributes (not present in NFS)_ • Other Implementations (Path-based) – TOMOYO Linux • Linux Kernel mainline version 2.6.30 – SMACK (Simplified Mandatory Access Control Kernel) – AppArmor • Available with Ubuntu by default Rassner, Kumar, Espinal. ECE 579S, 2010 35
  • 36. References • SELinux by Example, Caplan, MacMillan, Mayer. Prentice Hall, 2007 • SELinux How To - http://www.linuxtopia.org/online_books/getting_started_with_SELinux/ • Paul Moore’s “Trusted Computing with SELinux”, RedHat 2008 Summit – http://www.redhat.com/promo/summit/2008/downloads/pdf/Wednesday_245pm_Paul_Moore _Whats_New_Infrastructure.pdf • Anatomy of Security-Enhanced Linux (SELinux) Architecture and implementation, M. Tim Jones, Consultant Engineer, Emulex Corp. 2008 – http://www.ibm.com/developerworks/linux/library/l-selinux/ • The Flask Security Architecture: System Support for Diverse Security Policies. Spencer et al. Usenix 1999. • The Inevitability of Failure: The Flawed Assumption of Security in Modern Computing Environments. Loscocco et al. 1998. • Security is No Secret. Joab Jackson. Government Computer News. 2008. • http://www.multicians.org/ • http://www.computerhistory.org/timeline/ • Issues in secure distributed operating system design., Wong, Raymond M., Digest of Papers - IEEE Computer Society International Conference, Feb 1989. p.338-341 • Red Hat Enterprise Linux 4: Red Hat SELinux Guide, http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/selinux-guide/selg-chapter- 0013.html • A comparison of secure UNIX operating systems, Wong, R.M., Computer Security Applications Conference, 1990., Proceedings of the Sixth Annual (0-8186-2105-2) 1990. p.333-333 Rassner, Kumar, Espinal. ECE 579S, 2010 36