Lecture 10
Lecture 10
System
Professor Mangal Sain
Lecture 10
Protection
OBJECTIVES
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)
DOMAIN IMPLEMENTATION (ANDROID APP IDS)
Protection
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
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 “*”)
indirectly
Like a “secure pointer”
Protection
ROLE-BASED ACCESS CONTROL
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)
CAPABILITIES IN POSIX.1E
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)
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
OTHER PROTECTION IMPROVEMENT METHODS (CONT.)