Lecture 19 Page 1 CS 111 Online Protecting Operating Systems Resources How do we use these various tools to protect actual OS resources? Memory? Files?

Slides:



Advertisements
Similar presentations
Lecture 13 Page 1 CS 111 Online File Systems: Introduction CS 111 On-Line MS Program Operating Systems Peter Reiher.
Advertisements

Lecture 12 Page 1 CS 111 Online Devices and Device Drivers CS 111 On-Line MS Program Operating Systems Peter Reiher.
Lecture 2 Page 1 CS 236, Spring 2008 Security Principles and Policies CS 236 On-Line MS Program Networks and Systems Security Peter Reiher Spring, 2008.
Chapter 101 Virtual Memory Chapter 10 Sections and plus (Skip:10.3.2, 10.7, rest of 10.8)
Operating System Support Focus on Architecture
CMSC 414 Computer and Network Security Lecture 9 Jonathan Katz.
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.
Chapter 9 Virtual Memory Produced by Lemlem Kebede Monday, July 16, 2001.
Memory Management April 28, 2000 Instructor: Gary Kimura.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
I/O Systems ◦ Operating Systems ◦ CS550. Note:  Based on Operating Systems Concepts by Silberschatz, Galvin, and Gagne  Strongly recommended to read.
Lecture 18 Page 1 CS 111 Spring 2015 Security for Operating Systems: Cryptography, Authentication, and Protecting OS Resources CS 111 Operating Systems.
Lecture 7 Page 1 CS 236 Online Password Management Limit login attempts Encrypt your passwords Protecting the password file Forgotten passwords Generating.
Lecture 18 Page 1 CS 111 Online Design Principles for Secure Systems Economy Complete mediation Open design Separation of privileges Least privilege Least.
Lecture 17 Page 1 CS 111 Spring 2015 Operating System Security CS 111 Operating Systems Peter Reiher.
Lecture 8 Page 1 CS 136, Fall 2014 Operating System Security Computer Security Peter Reiher October 30, 2014.
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.
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
Lecture 8 Page 1 CS 236, Spring 2008 Protecting Interprocess Communications Operating systems provide various kinds of interprocess communications –Messages.
Operating Systems Lecture 2 Processes and Threads Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of.
Lecture 9 Page 1 CS 236 Online Assurance of Trusted Operating Systems How do I know that I should trust someone’s operating system? What methods can I.
Virtual Memory Review Goal: give illusion of a large memory Allow many processes to share single memory Strategy Break physical memory up into blocks (pages)
Lecture 19 Page 1 CS 236 Online 16. Account Monitoring and Control Why it’s important: –Inactive accounts are often attacker’s path into your system –Nobody’s.
Lecture 11 Page 1 CS 111 Online Memory Management: Paging and Virtual Memory CS 111 On-Line MS Program Operating Systems Peter Reiher.
Operating Systems Lecture 14 Segments Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software Engineering.
Lecture 9 Page 1 CS 136, Spring 2009 Operating System Security CS 136 Computer Security Peter Reiher April 28, 2009.
Lecture 18 Page 1 CS 111 Online OS Use of Access Control Operating systems often use both ACLs and capabilities – Sometimes for the same resource E.g.,
Operating Systems Security
Processes and Virtual Memory
Lecture 26 Virtual Machine Monitors. Virtual Machines Goal: run an guest OS over an host OS Who has done this? Why might it be useful? Examples: Vmware,
Lecture 4 Page 1 CS 111 Online Modularity and Virtualization CS 111 On-Line MS Program Operating Systems Peter Reiher.
Lecture 14 Page 1 CS 111 Summer 2013 Security in Operating Systems: Basics CS 111 Operating Systems Peter Reiher.
Virtual Memory Pranav Shah CS147 - Sin Min Lee. Concept of Virtual Memory Purpose of Virtual Memory - to use hard disk as an extension of RAM. Personal.
Lecture 7 Page 1 CS 111 Summer 2013 Dynamic Domain Allocation A concept covered in a previous lecture We’ll just review it here Domains are regions of.
Lecture9 Page 1 CS 236 Online Operating System Security, Con’t CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Lecture 12 Page 1 CS 111 Summer 2014 Security in Operating Systems: Basics CS 111 Operating Systems Peter Reiher.
Lecture 8 Page 1 CS 236 Online Protecting Interprocess Communications Operating systems provide various kinds of interprocess communications –Messages.
Copyright © Curt Hill More on Operating Systems Continuation of Introduction.
Lecture 8 Page 1 CS 236, Spring 2008 Operating System Security CS 236 On-Line MS Program Networks and Systems Security Peter Reiher Spring, 2008.
Lecture 4 Page 1 CS 111 Online Modularity and Memory Clearly, programs must have access to memory We need abstractions that give them the required access.
Lecture 8 Page 1 CS 136, Fall 2012 Operating System Security CS 136 Computer Security Peter Reiher October 23, 2012.
John Samuels October, Why Now?  Vista Problems  New Features  >4GB Memory Support  Experience.
Lecture 9 Page 1 CS 136, Winter 2010 Operating System Security CS 136 Computer Security Peter Reiher February 2, 2010.
UNIX U.Y: 1435/1436 H Operating System Concept. What is an Operating System?  The operating system (OS) is the program which starts up when you turn.
Lecture 2 Page 1 CS 236 Online Security Policies Security policies describe how a secure system should behave Policy says what should happen, not how you.
Lecture 5 Page 1 CS 111 Online Process Creation Processes get created (and destroyed) all the time in a typical computer Some by explicit user command.
Outline What does the OS protect? Authentication for operating systems
Protecting Interprocess Communications
Protecting Interprocess Communications
Protecting Memory What is there to protect in memory?
Protecting Memory What is there to protect in memory?
Protecting Interprocess Communications
Protecting Memory What is there to protect in memory?
Operating System Structure
Outline What does the OS protect? Authentication for operating systems
Process Creation Processes get created (and destroyed) all the time in a typical computer Some by explicit user command Some by invocation from other running.
Swapping Segmented paging allows us to have non-contiguous allocations
Modularity and Memory Clearly, programs must have access to memory
Outline What does the OS protect? Authentication for operating systems
OS Virtualization.
Outline What does the OS protect? Authentication for operating systems
Outline Introduction Memory protection Buffer overflows
Outline What does the OS protect? Authentication for operating systems
Outline Introduction Memory protection Buffer overflows
Protecting Interprocess Communications
Outline Introduction Memory protection Buffer overflows
Outline What does the OS protect? Authentication for operating systems
Presentation transcript:

Lecture 19 Page 1 CS 111 Online Protecting Operating Systems Resources How do we use these various tools to protect actual OS resources? Memory? Files? Devices? IPC? Secure booting

Lecture 19 Page 2 CS 111 Online Protecting Memory Most modern operating systems provide strong memory protection Usually hardware-based Most commonly through use of page tables and paging hardware To remind you, addresses issued by programs translated by hardware to physical addresses – If page tables handled right, process can’t even name other processes’ memory

Lecture 19 Page 3 CS 111 Online A Remaining Issue Page frames are reused A common set of page frames is shared by all processes The OS switches ownership of page frames as necessary When a process acquires a new page frame, it used to belong to another process – Can the new process read the old data?

Lecture 19 Page 4 CS 111 Online Strategies for Avoiding Data Leaks Through Page Frame Reuse Basically, clean previous process’ data from the page – Typically by writing zeros into them What are some strategies for this? – Don’t bother – Zero on deallocation – Zero on reallocation – Zero on use – Clean pages in the background

Lecture 19 Page 5 CS 111 Online Protecting Files We’ve already discussed this Most file systems have a built-in access control model The OS must enforce it All file access done through system calls Which gives the OS a chance to enforce the access control policy Typically checked on open

Lecture 19 Page 6 CS 111 Online A File Protection Vulnerability Unix/Linux systems only check access permissions on open The open file descriptor limits access to what was checked for But if the access permissions change while the file is open, access is NOT revoked Sometimes possible to keep files open for a long, long time So if user once had access to a file, may be hard to ever push him out again We could avoid this problem by keeping track of which processes have a file open. When access permissions change, we could “revoke” their file descriptor, requiring a re-check of access permissions. What would we need to do to make this work reasonably?

Lecture 19 Page 7 CS 111 Online Another File Data Vulnerability What if someone bypasses the operating system? Directly accessing the disk as a device The OS typically won’t allow that to happen – If it’s still in control... But there can be flaws or misconfigurations Or the disk can be moved to another machine – Which may not enforce the access permissions it specifies

Lecture 19 Page 8 CS 111 Online Full Disk Encryption FDE A solution to this problem Encrypt everything you put on the disk Decrypt data moved from the disk to memory Can be done in hardware – Typically in the disk drive or controller Or software – Typically by the operating system Various options for storing the key

Lecture 19 Page 9 CS 111 Online Hardware Vs. Software Full Disk Encryption HW advantages: – Usually faster than software – Totally transparent, works for any OS – Setup probably easier HW disadvantages: – Not ubiquitously available today – More expensive in dollars (not that much, though) – Might not fit into a particular machine – Backward compatibility SW FDE is more widely used

Lecture 19 Page 10 CS 111 Online Protecting Devices Most devices are treated as files So the file protection model applies In some cases, some parts of the devices are memory mapped into processes – Memory protections apply, here – But potential issues if you map them into more than one process Non-OS controlled bus interfaces can also cause problems (e.g., Firewire)

Lecture 19 Page 11 CS 111 Online Protecting IPC IPC channels are often also treated like files So the same protection model and mechanisms apply Even shared memory is handled this way – But especially important to remember that you don’t get complete mediation here – And granularity of protection is the segment, not the word or page or block

Lecture 19 Page 12 CS 111 Online Secure Boot Our OS-based protection mechanisms rely on one fundamental assumption – We are running an OS that properly implements them What if we aren’t running the OS that we think we are? Then all bets are off The false OS can do whatever it wants So we need to be sure we’ve booted what we wanted to boot

Lecture 19 Page 13 CS 111 Online The Bootstrap Process When a computer is powered on, the OS is not usually resident in memory It gets put there by a bootstrap loader The bootstrap program is usually very short Located in an easily defined place Hardware finds it, loads it, runs it Bootstrap then takes care of initializing the OS

Lecture 19 Page 14 CS 111 Online Booting and Security Most systems make it hard to change bootstrap loader – But it must have enough flexibility to load different OSes – From different places on machine Malware likes to corrupt the bootstrap Trusted computing platforms can help secure bootstrapping

Lecture 19 Page 15 CS 111 Online Approaches to Bootstrap Security TPM – an industry standard A hardware-assisted method to guarantee that the right bootstrap was loaded – And, from that, guarantee that the right OS was booted – And possibly build up further security from that SecureBoot – a Microsoft technology Built into the boot hardware and SW Essentially, only allows booting of particular OS versions

Lecture 19 Page 16 CS 111 Online Conclusion This scratches the surface of security issues for the OS Ideally, OS design and implementation should consider security from start to finish Ongoing research looks at improving OS security – E.g., by proving security properties of the kernel Since the OS is the foundation of the other software, its security is crucial