Docsity

Java and Operating System Security: A Comprehensive Overview, Slides of Advanced Operating Systems

Partial preview of the text

Download Java and Operating System Security: A Comprehensive Overview and more Slides Advanced Operating Systems in PDF only on Docsity!

Lecture No.

Overview of today’s lecture

 Java Security

 UNIX file security

 Setuid programs

 Windows security

 Tokens, security descriptors and reference monitor

 SE Linux

 Features of a secure OS summarized

 DAC Vs MAC

 Orange book criteria etc.

Unix file security

 Each file has owner and group
 Permissions set by owner

 Read, write, execute

 Owner, group, other

 Represented by vector of

four octal values

 Only owner, root can change permissions

 This privilege cannot be delegated or shared

 Setid bits – Discussed later

Question

 Owner can have fewer privileges than other

 What happens?

 Owner gets access?

 Owner does not?

 Prioritized resolution of differences

if user = owner then owner permission

else if user in group then group permission

else other permission

Effective user id (EUID)

 Each process has three Ids (+ more under Linux)  Real user ID (RUID)  same as the user ID of parent (unless changed)  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  determines the permissions for process  file access and port binding  Saved user ID (SUID)  So previous EUID can be restored  Real group ID, effective group ID, used similarly

Process Operations and IDs

 Root  ID=0 for superuser root; can access any file  Fork and Exec  Inherit three IDs, except exec of file with setuid bit  Setuid system calls  seteuid(newid) can set EUID to  Real ID or saved ID, regardless of current EUID  Any ID, if EUID=

 Details are actually more complicated  Several different calls: setuid, seteuid, setreuid

 Careful with Setuid!

 Can do anything that owner of file is allowed to do  Be sure not to  Take action for untrusted user  Return secret data to untrusted user

Note: anything possible if root; no middle ground between user and root

Unix summary

 Good things

 Some protection from most users

 Flexible enough to make things possible

 Main bad thing

 Too tempting to use root privileges

 No way to assume some root privileges without all

root privileges

Sample permission options

 Security ID (SID)  Identity (replaces UID)  SID revision number  48-bit authority value  variable number of Relative Identifiers (RIDs), for uniqueness  Users, groups, computers, domains, domain members all have SIDs

Permission Inheritance

 Static permission inheritance (Win NT)  Initially, subfolders inherit permissions of folder  Folder, subfolder changed independently  Replace Permissions on Subdirectories command  Eliminates any differences in permissions  Dynamic permission inheritance (Win 2000)  Child inherits parent permission, remains linked  Parent changes are inherited, except explicit settings  Inherited and explicitly-set permissions may conflict  Resolution rules  Positive permissions are additive  Negative permission (deny access) takes priority

Impersonation Tokens

 Process uses security attributes of another  Client passes impersonation token to server  Client specifies impersonation level of server  Anonymous  Token has no information about the client  Identification  server obtains the SIDs of client and client's privileges, but server cannot impersonate the client  Impersonation  server identifies and impersonates the client  Delegation  lets server impersonate client on local, remote systems

Security Descriptor

 Information associated with an object  who can perform what actions on the object  Several fields  Header  Descriptor revision number  Control flags, attributes of the descriptor  E.g., memory layout of the descriptor  SID of the object's owner  SID of the primary group of the object  Two attached optional lists:  Discretionary Access Control List (DACL) – users, groups, …  System Access Control List (SACL) – system logs, ..

SELinux

 Security-enhanced Linux system (NSA)

 Enforce separation of information based on confidentiality

and integrity requirements

 Mandatory access control incorporated into the major

subsystems of the kernel

 Limit tampering and bypassing of application security mechanisms  Confine damage caused by malicious applications

 Why Linux? Open source

 Already subject to public review

 NSA can review source, modify and extend

SELinux Security Policy Abstractions

 Type enforcement  Each process has an associated domain  Each object has an associated type  Configuration files specify  How domains are allowed to access types  Allowable interactions and transitions between domains  Role-based access control  Each process has an associated role  Separate system and user processes  configuration files specify  Set of domains that may be entered by each role