SlideShare a Scribd company logo
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Chapter 17: Protection
17.2 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Chapter 17: Protection
 Goals of Protection
 Principles of Protection
 Protection Rings
 Domain of Protection
 Access Matrix
 Implementation of Access Matrix
 Revocation of Access Rights
 Role-based Access Control
 Mandatory Access Control (MAC)
 Capability-Based Systems
 Other Protection Implementation Methods
 Language-based Protection
17.3 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Objectives
 Discuss the goals and principles of protection in a modern computer
system
 Explain how protection domains combined with an access matrix are
used to specify the resources a process may access
 Examine capability and language-based protection systems
 Describe how protection mechanisms can mitigate system attacks
17.4 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Goals of Protection
 In one protection model, computer consists of a collection of objects,
hardware or software
 Each object has a unique name and can be accessed through a well-
defined set of operations
 Protection problem - ensure that each object is accessed correctly
and only by those processes that are allowed to do so
17.5 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Principles of Protection
 Guiding principle – principle of least privilege
• Programs, users and systems should be given just enough
privileges to perform their tasks
• Properly set permissions can limit damage if entity has a bug,
gets abused
• Can be static (during life of system, during life of process)
• Or dynamic (changed by process as needed) – domain
switching, privilege escalation
• Compartmentalization a derivative concept regarding access to
data
 Process of protecting each individual system component
through the use of specific permissions and access restrictions
17.6 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Principles of Protection (Cont.)
 Must consider “grain” aspect
• Rough-grained privilege management easier, simpler, but least
privilege now done in large chunks
 For example, traditional Unix processes either have abilities of
the associated user, or of root
• Fine-grained management more complex, more overhead, but
more protective
 File ACL lists, RBAC
 Domain can be user, process, procedure
 Audit trail – recording all protection-orientated activities, important to
understanding what happened, why, and catching things that
shouldn’t
 No single principle is a panacea for security vulnerabilities – need
defense in depth
17.7 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Protection Rings
 Components ordered by amount of privilege and protected from each
other
• For example, the kernel is in one ring and user applications in
another
• This privilege separation requires hardware support
• Gates used to transfer between levels, for example the syscall
Intel instruction
• Also traps and interrupts
• Hypervisors introduced the need for yet another ring
• ARMv7 processors added TrustZone(TZ) ring to protect crypto
functions with access via new Secure Monitor Call (SMC)
instruction
 Protecting NFC secure element and crypto keys from even the
kernel
17.8 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Protection Rings (MULTICS)
 Let Di and Dj be any two domain rings
 If j < I  Di  Dj
17.9 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Android use of TrustZone
17.10 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
ARM CPU Architecture
17.11 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Domain of Protection
 Rings of protection separate functions into domains and
order them hierarchically
 Computer can be treated as processes and objects
• Hardware objects (such as devices) and software
objects (such as files, programs, semaphores
 Process for example should only have access to objects it
currently requires to complete its task – the need-to-know
principle
17.12 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Domain of Protection (Cont.)
 Implementation can be via process operating in a protection domain
• Specifies resources process may access
• Each domain specifies set of objects and types of operations on
them
• Ability to execute an operation on an object is an access right
 <object-name, rights-set>
• Domains may share access rights
• Associations can be static or dynamic
• If dynamic, processes can domain switch
17.13 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Domain Structure
 Access-right = <object-name, rights-set>
where rights-set is a subset of all valid operations that can be
performed on the object
 Domain = set of access-rights
17.14 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Domain Implementation (UNIX)
 Domain = user-id
 Domain switch accomplished via file system
• Each file has associated with it a domain bit (setuid bit)
• When file is executed and setuid = on, then user-id is set to owner
of the file being executed
• When execution completes user-id is reset
 Domain switch accomplished via passwords
• su command temporarily switches to another user’s domain when
other domain’s password provided
 Domain switching via commands
• sudo command prefix executes specified command in another
domain (if original domain has privilege or password given)
17.15 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Domain Implementation
(Android App IDs)
 In Android, distinct user IDs are provided on a per-application basis
 When an application is installed, the installd daemon assigns it a
distinct user ID (UID) and group ID (GID), along with a private data
directory (/data/data/<appname>) whose ownership is granted to this
UID/GID combination alone.
 Applications on the device enjoy the same level of protection provided
by UNIX systems to separate users
 A quick and simple way to provide isolation, security, and privacy.
 The mechanism is extended by modifying the kernel to allow certain
operations (such as networking sockets) only to members of a
particular GID (for example, AID INET, 3003)
 A further enhancement by Android is to define certain UIDs as
“isolated,” prevents them from initiating RPC requests to any but a bare
minimum of services
17.16 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Access Matrix
 View protection as a matrix (access matrix)
 Rows represent domains
 Columns represent objects
 Access(i, j) is the set of operations that a process
executing in Domaini can invoke on Objectj
17.17 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Use of Access Matrix
 If a process in Domain Di tries to do “op” on object Oj, then “op” must
be in the access matrix
 User who creates object can define access column for that object
 Can be expanded to dynamic protection
• Operations to add, delete access rights
• Special access rights:
 owner of Oi
 copy op from Oi to Oj (denoted by “*”)
 control – Di can modify Dj access rights
 transfer – switch from domain Di to Dj
• Copy and Owner applicable to an object
• Control applicable to domain object
17.18 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Use of Access Matrix (Cont.)
 Access matrix design separates mechanism from policy
• Mechanism
 Operating system provides access-matrix + rules
 If ensures that the matrix is only manipulated by authorized
agents and that rules are strictly enforced
• Policy
 User dictates policy
 Who can access what object and in what mode
 But doesn’t solve the general confinement problem
17.19 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Access Matrix of Figure A with
Domains as Objects
17.20 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Access Matrix with Copy Rights
17.21 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Access Matrix With Owner Rights
17.22 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Modified Access Matrix of Figure B
17.23 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Implementation of Access Matrix
 Generally, a sparse matrix
 Option 1 – Global table
• Store ordered triples <domain, object, rights-set> in
table
• A requested operation M on object Oj within domain Di -> search
table for < Di, Oj, Rk >
 with M ∈ Rk
• But table could be large -> won’t fit in main memory
• Difficult to group objects (consider an object that all domains can
read)
17.24 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Implementation of Access Matrix (Cont.)
 Option 2 – Access lists for objects
• Each column implemented as an access list for one object
• Resulting per-object list consists of ordered pairs <domain,
rights-set> defining all domains with non-empty set of access
rights for the object
• Easily extended to contain default set -> If M ∈ default set, also
allow access
17.25 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Implementation of Access Matrix (Cont.)
 Each column = Access-control list for one object
Defines who can perform what operation
Domain 1 = Read, Write
Domain 2 = Read
Domain 3 = Read
 Each Row = Capability List (like a key)
For each domain, what operations allowed on what objects
Object F1 – Read
Object F4 – Read, Write, Execute
Object F5 – Read, Write, Delete, Copy
17.26 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Implementation of Access Matrix (Cont.)
 Option 3 – Capability list for domains
• Instead of object-based, list is domain based
• Capability list for domain is list of objects together with
operations allows on them
• Object represented by its name or address, called a capability
• Execute operation M on object Oj, process requests operation and
specifies capability as parameter
 Possession of capability means access is allowed
• Capability list associated with domain but never directly accessible
by domain
 Rather, protected object, maintained by OS and accessed
indirectly
 Like a “secure pointer”
 Idea can be extended up to applications
17.27 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Implementation of Access Matrix (Cont.)
 Option 4 – Lock-key
• Compromise between access lists and capability lists
• Each object has list of unique bit patterns, called locks
• Each domain as list of unique bit patterns called keys
• Process in a domain can only access object if domain has key that
matches one of the locks
17.28 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Comparison of Implementations
 Many trade-offs to consider
• Global table is simple, but can be large
• Access lists correspond to needs of users
 Determining set of access rights for domain non-localized so
difficult
 Every access to an object must be checked
– Many objects and access rights -> slow
• Capability lists useful for localizing information for a given process
 But revocation capabilities can be inefficient
• Lock-key effective and flexible, keys can be passed freely from
domain to domain, easy revocation
17.29 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Comparison of Implementations (Cont.)
 Most systems use combination of access lists and capabilities
• First access to an object -> access list searched
 If allowed, capability created and attached to process
– Additional accesses need not be checked
 After last access, capability destroyed
 Consider file system with ACLs per file
17.30 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Revocation of Access Rights
 Various options to remove the access right of a domain to an object
• Immediate vs. delayed
• Selective vs. general
• Partial vs. total
• Temporary vs. permanent
 Access List – Delete access rights from access list
• Simple – search access list and remove entry
• Immediate, general or selective, total or partial, permanent or
temporary
17.31 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Revocation of Access Rights (Cont.)
 Capability List – Scheme required to locate capability in the
system before capability can be revoked
• Reacquisition – periodic delete, with require and denial if
revoked
• Back-pointers – set of pointers from each object to all
capabilities of that object (Multics)
• Indirection – capability points to global table entry which points
to object – delete entry from global table, not selective (CAL)
• Keys – unique bits associated with capability, generated when
capability created
 Master key associated with object, key matches master key
for access
 Revocation – create new master key
 Policy decision of who can create and modify keys – object
owner or others?
17.32 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Role-based Access Control
 Protection can be applied to non-file
resources
 Oracle Solaris 10 provides role-
based access control (RBAC) to
implement least privilege
• Privilege is right to execute
system call or use an option
within a system call
• Can be assigned to processes
• Users assigned roles granting
access to privileges and
programs
 Enable role via password to
gain its privileges
• Similar to access matrix
17.33 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Mandatory Access Control (MAC)
 Operating systems traditionally had discretionary access control
(DAC) to limit access to files and other objects (for example UNIX file
permissions and Windows access control lists (ACLs))
• Discretionary is a weakness – users / admins need to do
something to increase protection
 Stronger form is mandatory access control, which even root user can’t
circumvent
• Makes resources inaccessible except to their intended owners
• Modern systems implement both MAC and DAC, with MAC usually
a more secure, optional configuration (Trusted Solaris,
TrustedBSD (used in macOS), SELinux), Windows Vista MAC)
 At its heart, labels assigned to objects and subjects (including
processes)
• When a subject requests access to an object, policy checked to
determine whether or not a given label-holding subject is allowed
to perform the action on the object
17.34 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Capability-Based Systems
 Hydra and CAP were first capability-based systems
 Now included in Linux, Android and others, based on POSIX.1e (that
never became a standard)
• Essentially slices up root powers into distinct areas, each
represented by a bitmap bit
• Fine grain control over privileged operations can be achieved by
setting or masking the bitmap
• Three sets of bitmaps – permitted, effective, and inheritable
 Can apply per process or per thread
 Once revoked, cannot be reacquired
 Process or thread starts with all privs, voluntarily decreases set
during execution
 Essentially a direct implementation of the principle of least
privilege
 An improvement over root having all privileges but inflexible (adding
new privilege difficult, etc.)
17.35 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Capabilities in POSIX.1e
17.36 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Other Protection Improvement Methods
 System integrity protection (SIP)
• Introduced by Apple in macOS 10.11
• Restricts access to system files and resources, even by root
• Uses extended file attribs to mark a binary to restrict changes,
disable debugging and scrutinizing
• Also, only code-signed kernel extensions allowed and configurably
only code-signed apps
 System-call filtering
• Like a firewall, for system calls
• Can also be deeper –inspecting all system call arguments
• Linux implements via SECCOMP-BPF (Berkeley packet filtering)
17.37 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Other Protection
Improvement Methods (Cont.)
 Sandboxing
• Running process in limited environment
• Impose set of irremovable restrictions early in startup of process
(before main())
• Process then unable to access any resources beyond its allowed
set
• Java and .net implement at a virtual machine level
• Other systems use MAC to implement
• Apple was an early adopter, from macOS 10.5’s “seatbelt” feature
 Dynamic profiles written in the Scheme language, managing
system calls even at the argument level
 Apple now does SIP, a system-wide platform profile
17.38 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Other Protection
Improvement Methods (Cont.)
 Code signing allows a system to trust a program or script by using
crypto hash to have the developer sign the executable
• So code as it was compiled by the author
• If the code is changed, signature invalid and (some) systems
disable execution
• Can also be used to disable old programs by the operating
system vendor (such as Apple) cosigning apps, and then
invaliding those signatures so the code will no longer run
17.39 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Language-Based Protection
 Specification of protection in a programming language allows the
high-level description of policies for the allocation and use of
resources
 Language implementation can provide software for protection
enforcement when automatic hardware-supported checking is
unavailable
 Interpret protection specifications to generate calls on whatever
protection system is provided by the hardware and the operating
system
17.40 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Protection in Java 2
 Protection is handled by the Java Virtual Machine (JVM)
 A class is assigned a protection domain when it is loaded by the JVM
 The protection domain indicates what operations the class can (and
cannot) perform
 If a library method is invoked that performs a privileged operation, the
stack is inspected to ensure the operation can be performed by the
library
 Generally, Java’s load-time and run-time checks enforce type safety
 Classes effectively encapsulate and protect data and methods from
other classes
17.41 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Stack Inspection
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
End of Chapter 17

More Related Content

Similar to ch17.pptx

ch19.ppt, windows 7,History Design Principles System Components Environmental...
ch19.ppt, windows 7,History Design Principles System Components Environmental...ch19.ppt, windows 7,History Design Principles System Components Environmental...
ch19.ppt, windows 7,History Design Principles System Components Environmental...
KeerthiGuru6
 
운영체제론 Ch18
운영체제론 Ch18운영체제론 Ch18
운영체제론 Ch18
Jongmyoung Kim
 
Operating System - Unit I - Operating System Structures
Operating System - Unit I - Operating System StructuresOperating System - Unit I - Operating System Structures
Operating System - Unit I - Operating System Structures
cscarcas
 
Unit 1 ppt
Unit 1 pptUnit 1 ppt
Unit 1 ppt
GRajendra
 
ch2.ppt
ch2.pptch2.ppt
ch2.ppt
ch2.pptch2.ppt
ch2.ppt
ch2.pptch2.ppt
ch2.ppt
ch2.pptch2.ppt
ch2.ppt
Sami Mughal
 
ch2.ppt
ch2.pptch2.ppt
ch2.ppt
neeraj852572
 
ch2.ppt
ch2.pptch2.ppt
ch2.ppt
ch2.pptch2.ppt
Operating-System Structures
Operating-System StructuresOperating-System Structures
Operating-System Structures
K Gowsic Gowsic
 
14.Protection
14.Protection14.Protection
14.Protection
Senthil Kanth
 
ch2.ppt
ch2.pptch2.ppt
2 os structure
2 os structure2 os structure
2 os structure
BaliThorat1
 
MODULE 2.ppt
MODULE 2.pptMODULE 2.ppt
MODULE 2.ppt
MohitJain21BCE1523
 
ch2- os.pptx
ch2- os.pptxch2- os.pptx
ch2- os.pptx
MuhammadSubtain9
 
ch02.ppt
ch02.pptch02.ppt
ch02.ppt
emomani1
 
Distributed Computing
Distributed ComputingDistributed Computing
Distributed Computing
UzairAhmad467587
 
Chapter 2: Operating System Structures
Chapter 2: Operating System StructuresChapter 2: Operating System Structures
Chapter 2: Operating System Structures
Shafaan Khaliq Bhatti
 

Similar to ch17.pptx (20)

ch19.ppt, windows 7,History Design Principles System Components Environmental...
ch19.ppt, windows 7,History Design Principles System Components Environmental...ch19.ppt, windows 7,History Design Principles System Components Environmental...
ch19.ppt, windows 7,History Design Principles System Components Environmental...
 
운영체제론 Ch18
운영체제론 Ch18운영체제론 Ch18
운영체제론 Ch18
 
Operating System - Unit I - Operating System Structures
Operating System - Unit I - Operating System StructuresOperating System - Unit I - Operating System Structures
Operating System - Unit I - Operating System Structures
 
Unit 1 ppt
Unit 1 pptUnit 1 ppt
Unit 1 ppt
 
ch2.ppt
ch2.pptch2.ppt
ch2.ppt
 
ch2.ppt
ch2.pptch2.ppt
ch2.ppt
 
ch2.ppt
ch2.pptch2.ppt
ch2.ppt
 
ch2.ppt
ch2.pptch2.ppt
ch2.ppt
 
ch2.ppt
ch2.pptch2.ppt
ch2.ppt
 
ch2.ppt
ch2.pptch2.ppt
ch2.ppt
 
ch2.ppt
ch2.pptch2.ppt
ch2.ppt
 
Operating-System Structures
Operating-System StructuresOperating-System Structures
Operating-System Structures
 
14.Protection
14.Protection14.Protection
14.Protection
 
ch2.ppt
ch2.pptch2.ppt
ch2.ppt
 
2 os structure
2 os structure2 os structure
2 os structure
 
MODULE 2.ppt
MODULE 2.pptMODULE 2.ppt
MODULE 2.ppt
 
ch2- os.pptx
ch2- os.pptxch2- os.pptx
ch2- os.pptx
 
ch02.ppt
ch02.pptch02.ppt
ch02.ppt
 
Distributed Computing
Distributed ComputingDistributed Computing
Distributed Computing
 
Chapter 2: Operating System Structures
Chapter 2: Operating System StructuresChapter 2: Operating System Structures
Chapter 2: Operating System Structures
 

Recently uploaded

Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
Claudio Di Ciccio
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 

Recently uploaded (20)

Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 

ch17.pptx

  • 1. Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Chapter 17: Protection
  • 2. 17.2 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Chapter 17: Protection  Goals of Protection  Principles of Protection  Protection Rings  Domain of Protection  Access Matrix  Implementation of Access Matrix  Revocation of Access Rights  Role-based Access Control  Mandatory Access Control (MAC)  Capability-Based Systems  Other Protection Implementation Methods  Language-based Protection
  • 3. 17.3 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Objectives  Discuss the goals and principles of protection in a modern computer system  Explain how protection domains combined with an access matrix are used to specify the resources a process may access  Examine capability and language-based protection systems  Describe how protection mechanisms can mitigate system attacks
  • 4. 17.4 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Goals of Protection  In one protection model, computer consists of a collection of objects, hardware or software  Each object has a unique name and can be accessed through a well- defined set of operations  Protection problem - ensure that each object is accessed correctly and only by those processes that are allowed to do so
  • 5. 17.5 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Principles of Protection  Guiding principle – principle of least privilege • Programs, users and systems should be given just enough privileges to perform their tasks • Properly set permissions can limit damage if entity has a bug, gets abused • Can be static (during life of system, during life of process) • Or dynamic (changed by process as needed) – domain switching, privilege escalation • Compartmentalization a derivative concept regarding access to data  Process of protecting each individual system component through the use of specific permissions and access restrictions
  • 6. 17.6 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Principles of Protection (Cont.)  Must consider “grain” aspect • Rough-grained privilege management easier, simpler, but least privilege now done in large chunks  For example, traditional Unix processes either have abilities of the associated user, or of root • Fine-grained management more complex, more overhead, but more protective  File ACL lists, RBAC  Domain can be user, process, procedure  Audit trail – recording all protection-orientated activities, important to understanding what happened, why, and catching things that shouldn’t  No single principle is a panacea for security vulnerabilities – need defense in depth
  • 7. 17.7 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Protection Rings  Components ordered by amount of privilege and protected from each other • For example, the kernel is in one ring and user applications in another • This privilege separation requires hardware support • Gates used to transfer between levels, for example the syscall Intel instruction • Also traps and interrupts • Hypervisors introduced the need for yet another ring • ARMv7 processors added TrustZone(TZ) ring to protect crypto functions with access via new Secure Monitor Call (SMC) instruction  Protecting NFC secure element and crypto keys from even the kernel
  • 8. 17.8 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Protection Rings (MULTICS)  Let Di and Dj be any two domain rings  If j < I  Di  Dj
  • 9. 17.9 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Android use of TrustZone
  • 10. 17.10 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition ARM CPU Architecture
  • 11. 17.11 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Domain of Protection  Rings of protection separate functions into domains and order them hierarchically  Computer can be treated as processes and objects • Hardware objects (such as devices) and software objects (such as files, programs, semaphores  Process for example should only have access to objects it currently requires to complete its task – the need-to-know principle
  • 12. 17.12 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Domain of Protection (Cont.)  Implementation can be via process operating in a protection domain • Specifies resources process may access • Each domain specifies set of objects and types of operations on them • Ability to execute an operation on an object is an access right  <object-name, rights-set> • Domains may share access rights • Associations can be static or dynamic • If dynamic, processes can domain switch
  • 13. 17.13 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Domain Structure  Access-right = <object-name, rights-set> where rights-set is a subset of all valid operations that can be performed on the object  Domain = set of access-rights
  • 14. 17.14 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Domain Implementation (UNIX)  Domain = user-id  Domain switch accomplished via file system • Each file has associated with it a domain bit (setuid bit) • When file is executed and setuid = on, then user-id is set to owner of the file being executed • When execution completes user-id is reset  Domain switch accomplished via passwords • su command temporarily switches to another user’s domain when other domain’s password provided  Domain switching via commands • sudo command prefix executes specified command in another domain (if original domain has privilege or password given)
  • 15. 17.15 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Domain Implementation (Android App IDs)  In Android, distinct user IDs are provided on a per-application basis  When an application is installed, the installd daemon assigns it a distinct user ID (UID) and group ID (GID), along with a private data directory (/data/data/<appname>) whose ownership is granted to this UID/GID combination alone.  Applications on the device enjoy the same level of protection provided by UNIX systems to separate users  A quick and simple way to provide isolation, security, and privacy.  The mechanism is extended by modifying the kernel to allow certain operations (such as networking sockets) only to members of a particular GID (for example, AID INET, 3003)  A further enhancement by Android is to define certain UIDs as “isolated,” prevents them from initiating RPC requests to any but a bare minimum of services
  • 16. 17.16 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Access Matrix  View protection as a matrix (access matrix)  Rows represent domains  Columns represent objects  Access(i, j) is the set of operations that a process executing in Domaini can invoke on Objectj
  • 17. 17.17 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Use of Access Matrix  If a process in Domain Di tries to do “op” on object Oj, then “op” must be in the access matrix  User who creates object can define access column for that object  Can be expanded to dynamic protection • Operations to add, delete access rights • Special access rights:  owner of Oi  copy op from Oi to Oj (denoted by “*”)  control – Di can modify Dj access rights  transfer – switch from domain Di to Dj • Copy and Owner applicable to an object • Control applicable to domain object
  • 18. 17.18 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Use of Access Matrix (Cont.)  Access matrix design separates mechanism from policy • Mechanism  Operating system provides access-matrix + rules  If ensures that the matrix is only manipulated by authorized agents and that rules are strictly enforced • Policy  User dictates policy  Who can access what object and in what mode  But doesn’t solve the general confinement problem
  • 19. 17.19 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Access Matrix of Figure A with Domains as Objects
  • 20. 17.20 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Access Matrix with Copy Rights
  • 21. 17.21 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Access Matrix With Owner Rights
  • 22. 17.22 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Modified Access Matrix of Figure B
  • 23. 17.23 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Implementation of Access Matrix  Generally, a sparse matrix  Option 1 – Global table • Store ordered triples <domain, object, rights-set> in table • A requested operation M on object Oj within domain Di -> search table for < Di, Oj, Rk >  with M ∈ Rk • But table could be large -> won’t fit in main memory • Difficult to group objects (consider an object that all domains can read)
  • 24. 17.24 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Implementation of Access Matrix (Cont.)  Option 2 – Access lists for objects • Each column implemented as an access list for one object • Resulting per-object list consists of ordered pairs <domain, rights-set> defining all domains with non-empty set of access rights for the object • Easily extended to contain default set -> If M ∈ default set, also allow access
  • 25. 17.25 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Implementation of Access Matrix (Cont.)  Each column = Access-control list for one object Defines who can perform what operation Domain 1 = Read, Write Domain 2 = Read Domain 3 = Read  Each Row = Capability List (like a key) For each domain, what operations allowed on what objects Object F1 – Read Object F4 – Read, Write, Execute Object F5 – Read, Write, Delete, Copy
  • 26. 17.26 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Implementation of Access Matrix (Cont.)  Option 3 – Capability list for domains • Instead of object-based, list is domain based • Capability list for domain is list of objects together with operations allows on them • Object represented by its name or address, called a capability • Execute operation M on object Oj, process requests operation and specifies capability as parameter  Possession of capability means access is allowed • Capability list associated with domain but never directly accessible by domain  Rather, protected object, maintained by OS and accessed indirectly  Like a “secure pointer”  Idea can be extended up to applications
  • 27. 17.27 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Implementation of Access Matrix (Cont.)  Option 4 – Lock-key • Compromise between access lists and capability lists • Each object has list of unique bit patterns, called locks • Each domain as list of unique bit patterns called keys • Process in a domain can only access object if domain has key that matches one of the locks
  • 28. 17.28 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Comparison of Implementations  Many trade-offs to consider • Global table is simple, but can be large • Access lists correspond to needs of users  Determining set of access rights for domain non-localized so difficult  Every access to an object must be checked – Many objects and access rights -> slow • Capability lists useful for localizing information for a given process  But revocation capabilities can be inefficient • Lock-key effective and flexible, keys can be passed freely from domain to domain, easy revocation
  • 29. 17.29 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Comparison of Implementations (Cont.)  Most systems use combination of access lists and capabilities • First access to an object -> access list searched  If allowed, capability created and attached to process – Additional accesses need not be checked  After last access, capability destroyed  Consider file system with ACLs per file
  • 30. 17.30 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Revocation of Access Rights  Various options to remove the access right of a domain to an object • Immediate vs. delayed • Selective vs. general • Partial vs. total • Temporary vs. permanent  Access List – Delete access rights from access list • Simple – search access list and remove entry • Immediate, general or selective, total or partial, permanent or temporary
  • 31. 17.31 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Revocation of Access Rights (Cont.)  Capability List – Scheme required to locate capability in the system before capability can be revoked • Reacquisition – periodic delete, with require and denial if revoked • Back-pointers – set of pointers from each object to all capabilities of that object (Multics) • Indirection – capability points to global table entry which points to object – delete entry from global table, not selective (CAL) • Keys – unique bits associated with capability, generated when capability created  Master key associated with object, key matches master key for access  Revocation – create new master key  Policy decision of who can create and modify keys – object owner or others?
  • 32. 17.32 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Role-based Access Control  Protection can be applied to non-file resources  Oracle Solaris 10 provides role- based access control (RBAC) to implement least privilege • Privilege is right to execute system call or use an option within a system call • Can be assigned to processes • Users assigned roles granting access to privileges and programs  Enable role via password to gain its privileges • Similar to access matrix
  • 33. 17.33 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Mandatory Access Control (MAC)  Operating systems traditionally had discretionary access control (DAC) to limit access to files and other objects (for example UNIX file permissions and Windows access control lists (ACLs)) • Discretionary is a weakness – users / admins need to do something to increase protection  Stronger form is mandatory access control, which even root user can’t circumvent • Makes resources inaccessible except to their intended owners • Modern systems implement both MAC and DAC, with MAC usually a more secure, optional configuration (Trusted Solaris, TrustedBSD (used in macOS), SELinux), Windows Vista MAC)  At its heart, labels assigned to objects and subjects (including processes) • When a subject requests access to an object, policy checked to determine whether or not a given label-holding subject is allowed to perform the action on the object
  • 34. 17.34 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Capability-Based Systems  Hydra and CAP were first capability-based systems  Now included in Linux, Android and others, based on POSIX.1e (that never became a standard) • Essentially slices up root powers into distinct areas, each represented by a bitmap bit • Fine grain control over privileged operations can be achieved by setting or masking the bitmap • Three sets of bitmaps – permitted, effective, and inheritable  Can apply per process or per thread  Once revoked, cannot be reacquired  Process or thread starts with all privs, voluntarily decreases set during execution  Essentially a direct implementation of the principle of least privilege  An improvement over root having all privileges but inflexible (adding new privilege difficult, etc.)
  • 35. 17.35 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Capabilities in POSIX.1e
  • 36. 17.36 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Other Protection Improvement Methods  System integrity protection (SIP) • Introduced by Apple in macOS 10.11 • Restricts access to system files and resources, even by root • Uses extended file attribs to mark a binary to restrict changes, disable debugging and scrutinizing • Also, only code-signed kernel extensions allowed and configurably only code-signed apps  System-call filtering • Like a firewall, for system calls • Can also be deeper –inspecting all system call arguments • Linux implements via SECCOMP-BPF (Berkeley packet filtering)
  • 37. 17.37 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Other Protection Improvement Methods (Cont.)  Sandboxing • Running process in limited environment • Impose set of irremovable restrictions early in startup of process (before main()) • Process then unable to access any resources beyond its allowed set • Java and .net implement at a virtual machine level • Other systems use MAC to implement • Apple was an early adopter, from macOS 10.5’s “seatbelt” feature  Dynamic profiles written in the Scheme language, managing system calls even at the argument level  Apple now does SIP, a system-wide platform profile
  • 38. 17.38 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Other Protection Improvement Methods (Cont.)  Code signing allows a system to trust a program or script by using crypto hash to have the developer sign the executable • So code as it was compiled by the author • If the code is changed, signature invalid and (some) systems disable execution • Can also be used to disable old programs by the operating system vendor (such as Apple) cosigning apps, and then invaliding those signatures so the code will no longer run
  • 39. 17.39 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Language-Based Protection  Specification of protection in a programming language allows the high-level description of policies for the allocation and use of resources  Language implementation can provide software for protection enforcement when automatic hardware-supported checking is unavailable  Interpret protection specifications to generate calls on whatever protection system is provided by the hardware and the operating system
  • 40. 17.40 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Protection in Java 2  Protection is handled by the Java Virtual Machine (JVM)  A class is assigned a protection domain when it is loaded by the JVM  The protection domain indicates what operations the class can (and cannot) perform  If a library method is invoked that performs a privileged operation, the stack is inspected to ensure the operation can be performed by the library  Generally, Java’s load-time and run-time checks enforce type safety  Classes effectively encapsulate and protect data and methods from other classes
  • 41. 17.41 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Stack Inspection
  • 42. Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition End of Chapter 17