SECURITY IN COMPUTING BY PFLEEGER Operating Systems Security.

Slides:



Advertisements
Similar presentations
Memory.
Advertisements

Part IV: Memory Management
Memory Management Chapter 7.
CMSC 414 Computer (and Network) Security Lecture 13 Jonathan Katz.
Chapter 6 User Protections in OS. csci5233 computer security & integrity (Chap. 6) 2 Outline User-level protections 1.Memory protection 2.Control of access.
CSC 405 Introduction to Computer Security
Network Security Philadelphia UniversitylAhmad Al-Ghoul Module 6 Module 6 Security in Operating Systems  MModified by :Ahmad Al Ghoul  PPhiladelphia.
CS 153 Design of Operating Systems Spring 2015
Memory Management Design & Implementation Segmentation Chapter 4.
Memory Management (II)
Operating System Support Focus on Architecture
19: Protection1 PROTECTION Protection is the mechanism for controlling access to computer resources. Security concerns the physical integrity of the system.
CS-550 (M.Soneru): Protection and Security - 1 [SaS] 1 Protection and Security.
CMSC 414 Computer and Network Security Lecture 9 Jonathan Katz.
Memory Management (continued) CS-3013 C-term Memory Management CS-3013 Operating Systems C-term 2008 (Slides include materials from Operating System.
Memory Management 1 CS502 Spring 2006 Memory Management CS-502 Spring 2006.
CS-3013 & CS-502, Summer 2006 Memory Management1 CS-3013 & CS-502 Summer 2006.
Memory Management Chapter 5.
Computer Organization and Architecture
95-752:7-1 Operating System Features :7-2 Operating System Features Memory protection Temporary file issues Dead space issues Sandboxing Object.
CMSC 414 Computer and Network Security Lecture 13 Jonathan Katz.
SE571 Security in Computing
1 Lecture 8: Memory Mangement Operating System I Spring 2008.
CS-550 (M.Soneru): Protection and Security - 2 [SaS] 1 Protection and Security - 2.
Operating System Chapter 7. Memory Management Lynn Choi School of Electrical Engineering.
Systems Security & Audit Operating Systems security.
Memory Management Chapter 7.
1 Memory Management Memory Management COSC513 – Spring 2004 Student Name: Nan Qiao Student ID#: Professor: Dr. Morteza Anvari.
Chapter 7 Memory Management
Lecture 18 Page 1 CS 111 Online Access Control Security could be easy – If we didn’t want anyone to get access to anything The trick is giving access to.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
Security in Operating Systems Cuiwei Zhao. Security in Operating System §Security breaches §Security goals §Protected objects of the general purpose operating.
Chapter 4 – Protection in General Purpose Operating Systems  Protection features provided by general-purpose operating systems— protecting memory, files,
CE Operating Systems Lecture 14 Memory management.
Protection in General- Purpose OS Week-3. Our Main Concern In what way do operating systems protect one user’s process from inadvertent or malicious interaction.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
CE Operating Systems Lecture 21 Operating Systems Protection with examples from Linux & Windows.
1 Memory Management Chapter 7. 2 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable.
14.1/21 Part 5: protection and security Protection mechanisms control access to a system by limiting the types of file access permitted to users. In addition,
Security in Computing Protection in General-Purpose Operating Systems.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Operating Systems Lecture 14 Segments Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software Engineering.
1 Memory Management Chapter 7. 2 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable.
Memory Management. Why memory management? n Processes need to be loaded in memory to execute n Multiprogramming n The task of subdividing the user area.
Linux-vs-Windows Security
Lecture 14 Page 1 CS 111 Summer 2013 Security in Operating Systems: Basics CS 111 Operating Systems Peter Reiher.
Chapter 7 Memory Management Eighth Edition William Stallings Operating Systems: Internals and Design Principles.
1 Memory Management n In most schemes, the kernel occupies some fixed portion of main memory and the rest is shared by multiple processes.
ACCESS MATRIX IMPLEMENTATION AND COMPARISON By: Rushabh Dharwadkar Roll no: TE COMP.
Chapter 8: Memory Management. 8.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 8: Memory Management Background Swapping Contiguous.
Computer Security: Chapter 5 Operating Systems Security.
Memory Hierarchy Ideal memory is fast, large, and inexpensive
Non Contiguous Memory Allocation
Chapter 14: Protection Modified by Dr. Neerja Mhaskar for CS 3SH3.
Chapter 14: System Protection
Main Memory Management
Operating Systems Security
Chapter 8: Main Memory.
Protection in Operating Systems
CE Operating Systems Lecture 21
Main Memory Background Swapping Contiguous Allocation Paging
Lecture 3: Main Memory.
Operating System Chapter 7. Memory Management
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Chapter 8: Memory Management strategies
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Access Control Dr. X Parenthesis: before we dive deeper into crypto, we will explore and old but still valid security principle, access controls.
COMP755 Advanced Operating Systems
Presentation transcript:

SECURITY IN COMPUTING BY PFLEEGER Operating Systems Security

OS SECURITY What is OS? A program that acts as an intermediary between user and computer hardware Purpose of OS: provide an environment in which a user can execute programs in a convenient and efficient manner

OS Security : Overview What is protection in OS?  Prevention of mischievous, intentional violation of an access restriction by a user  Prevention of erroneous program from affecting the execution of other programs  Improve reliability

Protection of resources OS Protection includes these:  Memory protection  File protection  General control of access to objects  User authentication

Basis of protection : separation Physical separation  Different processes use different physical objects  Separate printers for different levels of security Temporal separation  Processes with different security req. are executed at different times Logical separation  Programs cannot access outside its permitted domain  Illusion of single process operation Cryptographic separation  Process conceal data and computations that its unintelligible to outside process

Is separation the only answer? Separation of different forms may be combined Separation can lead to poor resource sharing We want users and objects to be able to share algorithms and functions without compromising their security needs A practical OS provides protection by separation and ‘controlled’ sharing

OS can help via Do not protect  OS with no protection Isolate  Different processes running concurrently are unaware of the presence of each other Share all or share nothing  Public (for all) or private (for owner only) Share via access limitation  Ensuring only authorized access occurs

Share by capabilities  Dynamic creation of sharing rights – can depend on owner/ context of computation/object Limit use of an object  To what extend is your privileges? E.g. Can view but not print Granularity  Access can be controlled at various levels  Bit, byte, element word  The larger the level of object controlled, the easier the access control implementation

Memory and address protection Protection can be built into h/ware that controls use of memory Include  Fence  Relocation  Base/bounds registers  Tagged architecture  Segmentation  Paging  Combined paging with segmentation

Memory Protection: Fence In a farm, a fence keeps the cows from grazing the neighbours yard/land. In OS, same function. Keeps the users from ‘grazing’/destroying the OS resident portion of memory.

Fence Fixed fence is very restrictive  Amount of space predefined  Whether OS use it or not - its there  Waste of space may occur  OS have no space to grow

Fence Fence register is another way  Fence is not fixed – can be changed  The register contains the end of OS  Address of user programs or modification will be compared to the register.  If address in user area – instruction executed  If address in OS area – error condition raised  Can protect OS from user but not user from another user  User cannot identify certain areas as off-limits

Memory Protection: Relocation OS do change, hence programs must be written in a way that does not depend on placement at a specific location in memory. Relocation takes a program and puts it in an appropriate place/address, with the help of a relocation factor. Fence register can be a h/ware relocation device.

Memory Protection: Base/Bounds Registers Relocation provides the base/starting address – the lower bound All address in a program are offset to the base address A variable fence register = base register But a program can still overflow into other areas, and may cause problem So a register with the upper bound address is needed

Bounds register – upper address limit  Knowing how much space is allotted  Checking for overflows A program address should be above the base address and below the bound address Protects a program’s addresses from being modified by another user Context switching – transferring control from one user to the other (base and bound changed)

Another pair of base/bound registers may be used for addresses inside a user’s address space  Program Base/Bound – for instructions only  Data Base/Bound – for data access only Saves user from overwriting and destroying his program Also gives the ability to split program into 2 pieces and relocated separately

Memory Protection: Tagged Architecture Every word of machine has one or a few extra bits to identify access rights to that word. Access bits can only be set by OS instruction (privileged) Adjacent locations may have different access rights

Advantage  Can pick and choose what to protect and what not to  Minimum sharing for task completion  With few extra bits, different data classes can be separated and data fields protected Disadvantage  Major changes to conventional OS needed for implementation  Cost

Memory Protection: Segmentation = dividing a program into separate pieces/segments having different access rights Each segment has a unique name Code within a segment addressed as  Name – name of segment  Offset – its location from the start of the segment

Segmentation… Program is a long collection of segments and these segments may be placed in any available memory locations. OS must have a way arranging this  Segment look-up tables  Keeps segment name and true address in memory  User need not know the address, just

Benefit of segmentation  Each address reference is checked for protection  Many different classes of data item can be assigned different levels of protection  2 or more users can share access to a segment, with potentially different access rights  A user cannot generate an address or access to an unpermitted segment.

Segmentation must offer protection while being efficient. Problems with segmentation  Protection problem – segment size  Efficiency problem – segment name  Memory utilization problem

Protection problem  A user can refer to a valid segment name with an offset beyond end of segment  can read other parts of memory, hence unsafe  but segment A is 200 bytes long  So must check generated address to verify that its not beyond end of segment  have segment length in look-up table  Need more time and more resources

Efficiency problem  Segment name inconvenient to encode and will also slow look- up  Compiler can translate name to numbers but problem when 2 procedures share the same segment Memory utilization problem  Segmentation can cause fragmentation, hence lead to poor memory utilization  Compaction can help but compacting and updating the look- up table takes time

Memory Protection: Paging Program divided to equal-sized pieces called pages Memory is divided to equal-sized units called page frames. Address: As with segmentation, OS maintains a table (page translation table) of user page numbers and their true addresses in memory

All pages same fixed size : no fragmentation No addressing beyond end of page : will be directed to next page page size = 64 bytes (64=2 6 ), number of pages =10. Largest offset value = 63 any larger will translate to next page Say 

Segments are logical units, paging is not. When additional instruction are added  Subsequent instruction are pushed to lower addresses  Instructions at the end, becomes the start of a new page. Problem: no way of establishing if all values on a page should be protected at the same level

Memory Protection: Combined paging and segmentation Paging offers implementation efficiency Segmentation offers logical protection Combined: can use the best of both features

Control of access to general objects Objects that needs protection:  Memory  Files or storage devices  A executing program in memory  A directory of files  A hardware device  A data structure, such as a stack  Parts of the OS  Instructions  Passwords  The protection mechanism

Goals in protecting objects Check every access, not just the first one.  E.g. for revocation Enforce least privileged  A subject should have access to the smallest number of objects necessary to perform some task. Verify acceptable usage  A subject may use the object only in certain legitimate and appropriate ways (only push, pop, clear on a stack, for instances).

Protection mechanisms for general objects Directory Access Control List Access Control Matrix Capability Procedure-oriented Access Control

G.O.Protection: Directory This mechanism works like a file directory Each file has a unique owner who has access rights control over it Each user has a file directory, which list all the files the user has access to User cannot write to a file directory – to preserve integrity  This is done by OS Rights to a file include read, write, execute and owner

Problems  List becomes too large if many shared objects are accessible to all users  Have entry for objects even if user doesn’t use it  Deletion must reflect on all directories  Difficulty in revoking access  Must go thru all directories to revoke rights to file  Pseudonyms: when files are renamed  2 owners have different file with same name Solution: owner’s designation with file name (owner:filename)  When file are renamed (P  Q), then re-request P, problems of conflicting access rights Q-r P-rw

G.O.P.: Access Control List One list for each object. The list shows all subjects who should have access to the object and what their access is. A major advantage with ACLs is that a default access can be assigned to group of subjects as well as specific rights to individual subjects. Often used, e.g. Windows NT.

G.O.P: Access Control Matrix A list of access rights for user and objects A list of triples  Subject  Object  Rights Problem: searching large numbers of triplets is inefficient

G.O.P: Access Control Matrix

G.O.P: Capability An un-forgeable token that gives the possessor certain rights to an object Users can  create objects and specify acceptable access rights R,W,X  Create new objects and define type of accesses unknown to the system  E.g. access right to transfer/propagate object  A  OT  B  O  C O – RWX T - Transfer

G.O.P: Procedure-Oriented Access Control A procedure that controls access to objects over the basic OS protection  i.e. 2 levels: procedure + OS Ensures that accesses to an object be made thru a trusted interface  E.g. can’t get to tables directly, must go thru create, delete or modify interfaces Implements information hiding  But cause inefficiency – no simple, fast access

File Protection Mechanisms

Mechanisms include:  All-None Protection  Group Protection

All-None Protection In the original IBM OS all files were public. Protection based on trust and ignorance (open only with filename that u know) Not acceptable because  Lack of trust – esp. in large systems  All or nothing  Rise of timesharing  Complexity – OS performance is degraded  File listings – with lists users get to see all files

Group Protection Groups of users having common relationship – the need to share  User  Group  World Different access rights assigned to each category Problems:  Group affiliation – solved by 1 person, 1group only  Multiple personalities – 1 person, >1 account; but which personality to use?  All groups – user have access to all his files when active, but not the other ‘sharers’  Limited sharing – sharing on a per-file basis

Single Permission Password/token  Have password can access/modify  Problems:  Loss – or forgotten  Use – inconvenient and time consuming to apply to all  Disclosure – if password disclosed have to change & all legitimate users must be informed  Revocation – if you don’t trust 1 person in a group, only way to revoke is to change password.

Temporary acquired permission  Used in Unix with set userid (suid)  Allow another person to get the same rights to file as owner while executing the file.

Quick Summary Looked at  Memory protection  Fence, base/bound, paging, segmentation  File protection  3 or 4 level format  General object access control  AC List, AC Matrix  User authentication  Password, token, biometrics and how tos