Outline: Access Control and Operating System Security
Outline: Access Control and Operating System Security
uCommon Assumption
• System knows who the user is File 1 File 2 File 3 … File n
– User has entered a name and password, or other info
• Access requests pass through gatekeeper User 1 read write - - read
– Global property; OS must be designed so that this is true
User 2 write write write - -
Reference
monitor User 3 - - - read read
User
process ? Resource …
1
Roles (also called Groups) Groups for resources, rights
uRole = set of users uPermission = 〈right, resource〉
• Administrator, PowerUser, User, Guest uGroup related resources
• Assign permissions to roles; each user gets permission uHierarchy for rights or resources
uRole hierarchy • If user has right r, and r>s, then user has right s
• Partial order of roles Administrator • If user has read access to directory, user has read
• Each role gets access to every file in directory
PowerUser
permissions of roles below
• List only new permissions User uBig problem in access control
given to each role • Complex mechanisms require complex input
Guest
• Difficult to configure and maintain
• Roles, other organizing ideas try to simplify problem
2
Bell-LaPadula Confidentiality Model Picture: Confidentiality
uWhen is it OK to release information? Read below, write above Read above, write below
uTwo Properties (with silly names)
• Simple security property
– A subject S may read object O only if C(O) ≤ C(S)
Proprietary Proprietary
• *-Property
– A subject S with read access to O may write object P only
if C(O) ≤ C(P) S S
uIn words,
• You may only read below your classification and Public Public
only write above your classification
3
Example OS Mechanisms Multics
uMultics uOperating System
uUnix • Designed 1964-1967
– MIT Project MAC, Bell Labs, GE
uWindows
• At peak, ~100 Multics sites
uSE Linux (briefly) • Last system, Canadian Department of Defense,
Nova Scotia, shut down October, 2000
u Extensive Security Mechanisms
• Influenced many subsequent systems
http://www.multicians.org/security.html
4
Question Effective user id (EUID)
uOwner can have fewer privileges than other uEach process has three Ids (+ more under Linux)
• What happens? • Real user ID (RUID)
– User gets access? – same as the user ID of parent (unless changed)
– User does not? – used to determine which user started the process
• Effective user ID (EUID)
– from set user ID bit on the file being executed, or sys call
uPrioritized resolution of differences – determines the permissions for process
if user = owner then owner permission • file access and port binding
else if user in group then group permission • Saved user ID (SUID)
else other permission – So previous EUID can be restored
uReal group ID, effective group ID, used similarly
5
Setuid programming Unix summary
uWe talked about this before … uWe’re all very used to this …
uBe Careful! • So probably seems pretty good
• Root can do anything; don’ t get tricked • We overlook ways it might be better
• Principle of least privilege – change EUID when uGood things
root privileges no longer needed • Some protection from most users
uSetuid scripts • Flexible enough to make things possible
• This is a bad idea uMain bad thing
• Historically, race conditions • Too tempting to use root privileges
– Begin executing setuid program; change contents of
• No way to assume some root privileges without all
program before it loads and is executed
root privileges
6
Security Descriptor Example access request
uInformation associated with an object Access
User: Mark
Group1: Administrators
• who can perform what actions on the object token Group2: Writers
uSeveral fields Access request: write
• Header Revision Number Action: denied
Control flags
– Descriptor revision number
Owner SID • User Mark requests write permission
– Control flags, attributes of the descriptor Group SID • Descriptor denies permission to group
• E.g., memory layout of the descriptor DACL Pointer
Security SACL Pointer
• Reference Monitor denies request
• SID of the object's owner
descriptor Deny
• SID of the primary group of the object Writers
• Two attached optional lists: Read, Write
Allow
– Discretionary Access Control List (DACL) – users, groups, …
Mark
– System Access Control List (SACL) – system logs, .. Read, Write
7
Secure Operating Systems Sample Features of Trusted OS
uExtra mechanisms for extra security u Mandatory access control
• MAC not under user control, precedence over DAC
uFollow design and implementation procedures
u Object reuse protection
uReview of design and implementation • Write over old data when file space is allocated
uMaintenance procedures u Complete mediation
• Prevent any access that circumvents monitor
u Audit
Will discuss • See next slide
• Mechanisms associated with secure OS u Intrusion detection
• Standards for certification • Anomaly detection
– Mostly used by government, some commercial interest – Learn normal activity, Report abnormal actions
• Attack detection
– Recognize patterns associated with known attacks
8
Why Linux? Rainbow Series
uOpen source
• Already subject to public review DoD Trusted Computer Sys Evaluation Criteria (Orange Book)
– This by itself does not guarantee security … Audit in Trusted Systems (Tan Book)
• NSA can review source, modify and extend Configuration Management in Trusted Systems (Amber Book)
• Hope to encourage additional operating system Trusted Distribution in Trusted Systems (Dark Lavender Book)
security research
Security Modeling in Trusted Systems (Aqua Book)
• Released under the same terms and conditions as
Formal Verification Systems (Purple Book)
the original sources.
– includes documentation and source code Covert Channel Analysis of Trusted Systems (Light Pink Book)
… many more
http://www.radium.ncsc.mil/tpep/library/rainbow/index.html
9
Common Criteria Protection Profiles
uThree parts uRequirements for categories of systems
• CC Documents • Subject to review and certified
– Protection profiles: requirements for category of systems uExample: Controlled Access PP (CAPP_V1.d)
• Functional requirements
• Security functional requirements
• Assurance requirements
– Authentication, User Data Protection, Prevent Audit Loss
• CC Evaluation Methodology
• Security assurance requirements
• National Schemes (local ways of doing evaluation)
– Security testing, Admin guidance, Life-cycle support, …
uEndorsed by 14 countries • Assumes non-hostile and well-managed users
uReplaces TCSEC • Does not consider malicious system developers
• CC adopted 1998
• Last TCSEC evaluation completed 2000
http://www.commoncriteria.org/
10
Is Windows is “Secure”? Limitations of Secure OS
uGood things uNoninterference
• Design goals include security goals • Actions by high-level users (secret, top secret)
• Independent review, configuration guidelines should not be observable by low-level users
(unclassified, …)
uBut …
• Difficult to achieve and prove, not impossible
• “Secure” is a complex concept
– What properties protected against what attacks?
• Typical installation includes more than just OS uCovert Channels
– Many problems arise from applications, device drivers • Can user of system deliberately communicate
– Windows driver certification program secret information to external collaborator?
11