Week 7 - Monday.  What did we talk about last time?  Malicious code case studies  Exam 1 post mortem.

Slides:



Advertisements
Similar presentations
Memory.
Advertisements

ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
10 Software Engineering Foundations of Computer Science ã Cengage Learning.
Week 6 - Friday.  What did we talk about last time?  Viruses and other malicious code.
Network Security Philadelphia UniversitylAhmad Al-Ghoul Module 6 Module 6 Security in Operating Systems  MModified by :Ahmad Al Ghoul  PPhiladelphia.
Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
Memory Management Design & Implementation Segmentation Chapter 4.
CMSC 414 Computer and Network Security Lecture 9 Jonathan Katz.
CS-3013 & CS-502, Summer 2006 Memory Management1 CS-3013 & CS-502 Summer 2006.
CMSC 414 Computer and Network Security Lecture 13 Jonathan Katz.
SE571 Security in Computing
03/17/2008CSCI 315 Operating Systems Design1 Virtual Memory Notice: The slides for this lecture have been largely based on those accompanying the textbook.
03/05/2008CSCI 315 Operating Systems Design1 Memory Management Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Cambodia-India Entrepreneurship Development Centre - : :.... :-:-
Operating Systems.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
1 Functional Testing Motivation Example Basic Methods Timing: 30 minutes.
Chapter 3 – Program Security Section 3.4 Targeted Malicious Code Section 3.5 Controls Against Program Threats.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-7 Memory Management (1) Department of Computer Science and Software.
Lecture 16 Overview.
8.4 paging Paging is a memory-management scheme that permits the physical address space of a process to be non-contiguous. The basic method for implementation.
Software Development Process.  You should already know that any computer system is made up of hardware and software.  The term hardware is fairly easy.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
CSE 4481 Computer Security Lab Mark Shtern. INTRODUCTION.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Intermediate 2 Software Development Process. Software You should already know that any computer system is made up of hardware and software. The term hardware.
Security in Operating Systems Cuiwei Zhao. Security in Operating System §Security breaches §Security goals §Protected objects of the general purpose operating.
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.
G53SEC 1 Reference Monitors Enforcement of Access Control.
1 Memory Management Chapter 7. 2 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable.
Operating Systems Lecture November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
1 Ch. 1: Software Development (Read) 5 Phases of Software Life Cycle: Problem Analysis and Specification Design Implementation (Coding) Testing, Execution.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Main Memory. Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Example: The.
Software Engineering 2004 Jyrki Nummenmaa 1 BACKGROUND There is no way to generally test programs exhaustively (that is, going through all execution.
ITGS Network Architecture. ITGS Network architecture –The way computers are logically organized on a network, and the role each takes. Client/server network.
Intermediate 2 Computing Unit 2 - Software Development.
Lecture 17 Overview. Targeted Malicious Code Trapdoor – undocumented entry point to a module – forget to remove them – intentionally leave them in the.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
Chapter 7 Memory Management Eighth Edition William Stallings Operating Systems: Internals and Design Principles.
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.
Securing a Host Computer BY STEPHEN GOSNER. Definition of a Host  Host  In networking, a host is any device that has an IP address.  Hosts include.
Week 8 - Monday.  Exam 1 post mortem  Web attacks targeting users.
( ) 1 Chapter # 8 How Data is stored DATABASE.
Computer Security: Chapter 5 Operating Systems Security.
Botnets A collection of compromised machines
Modularity Most useful abstractions an OS wants to offer can’t be directly realized by hardware Modularity is one technique the OS uses to provide better.
Memory Management.
Protecting Memory What is there to protect in memory?
Protecting Memory What is there to protect in memory?
Protecting Memory What is there to protect in memory?
Paging COMP 755.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Chapter 9 – Real Memory Organization and Management
Operating System Structure
Modularity and Memory Clearly, programs must have access to memory
Botnets A collection of compromised machines
Operating Systems Security
Chapter 2: System Structures
Module 2: Computer-System Structures
Main Memory Background Swapping Contiguous Allocation Paging
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Operating Systems Lecture 3.
Topic 5: Communication and the Internet
CSE451 Virtual Memory Paging Autumn 2002
Module 2: Computer-System Structures
COMP755 Advanced Operating Systems
Presentation transcript:

Week 7 - Monday

 What did we talk about last time?  Malicious code case studies  Exam 1 post mortem

Omar Mustardo

 Code Red appeared in 2001  It infected a quarter of a million systems in 9 hours  It is estimated that it infected 1/8 of the systems that were vulnerable  It exploited a vulnerability by creating a buffer overflow in a DLL in the Microsoft Internet Information Server software  It only worked on systems running an MS web server, but many machines did by default

 The original version of Code Red defaced the website that was being run  Then, it tried to spread to other machines on days 1-19 of a month  Then, it did a distributed denial of service attack on whitehouse.gov on days  Later versions attacked random IP addresses  It also installed a trap door so that infected systems could be controlled from the outside

 A trapdoor is a way to access functionality that is not documented  They are often inserted during development for testing purposes  Sometimes a trapdoor is because of error cases that are not correctly checked or handled

 Intentionally created trapdoors can exist in production code when developers:  Forget to remove them  Intentionally leave them in for testing  Intentionally leave them in for maintenance  Intentionally leave them in as a covert means of access to the production system

 I have never heard this term before I read this book  This is the Office Space attack  Steal tiny amounts of money when a cent is rounded in financial transactions  Or, steal a few cents from millions of people  Steal more if the account hasn’t been used much  The rewards can be huge, and these kinds of attacks are hard to catch

 A rootkit is malicious code that gives an attacker access to a system as root (a privileged user) and hides from detection  Sony put a program on music CDs called XCP (extended copy protection) which allowed users to listen to the CD on Windows but not rip its contents  It installed itself without the user’s knowledge  It had to have control over Windows and be hard to remove  It would hide the presence of any program starting with the name $sys$, but malicious users could take advantage of that

 Most programs are supposed to execute with some kind of baseline privileges  Not the high level privileges needed to change system data  Windows Vista and 7 ask you if you want to have privileges escalated  Some times you can be tricked  Symantec needed high level privileges to run Live Update  Unfortunately, it ran some local programs with high privileges  If a malicious user had replaced those local programs with his own, ouch

 It’s possible to install software that logs all the keystrokes a user enters  If designed correctly, these values come from the keyboard drivers, so all data (including passwords) is visible  There are also hardware keystroke loggers  Most are around $40  Is your keyboard free from a logger?

 We only have time for a few slides about good software development  A shame, since good development stops both unintentional and malicious flaws  Development lifecycle:  Specify the system  Design the system  Implement the system  Test the system  Review the system  Document the system  Manage the system  Maintain the system

 A goal of software engineering should be to develop software robust independent components  Modularization  Components should meet the following criteria:  Single-purpose: Perform one function  Small: Short enough to be understandable by a single human  Simple: Simple enough to be understandable by a single human  Independent: Isolated from other modules

 Components should hide their implementation details  Only the smallest number of public methods should be kept to allow them to interact with other components  This information hiding model is thought of as a black box  For both components and programs, one reason for encapsulation is mutual suspicion  We always assume that other code is malicious or badly written

 Unit testing tests each component separately in a controlled environment  Integration testing verifies that the individual components work when you put them together  Function and performance tests sees if a system performs according to specification  Acceptance testing give the customer a chance to test the product you have created  The final installation testing checks the product in its actual use environment

 Regression testing is done when you fix a bug or add a feature  We have to make sure that everything that used to work still works after the change  Black-box testing uses input values to test for expected output values, ignoring internals of the system  White-box or clear box testing uses knowledge of the system to design tests that are likely to find bugs  You can only prove there are bugs. It is impossible to proves that aren’t bugs.

 If you program for a living, you will probably be held to standards  Standards cannot guarantee bug-free code, but they can help AreaExamples DesignUML diagrams, flowcharts DocumentationJavadoc comments with input and output for every method LanguageJava and specific standard libraries Coding styleIndentation, variable naming, no break statements in loops ProgrammingPeer reviews and code audits TestingTest result storage, coverage standards for tests Configuration ManagementNo commits without unit tests

 The OS has to enforce much of the computer security we want  Multiple processes are running at the same time  We want protection for:  Memory  Hard disks  I/O devices like printers  Sharable programs  Networks  Any other data that can be shared

 OS security is fundamentally based on separation  Physical separation: Different processes use different physical objects  Temporal separation: Processes with different security requirements are executed at different times  Logical separation: Programs cannot access data or resources outside of permitted areas  Cryptographic separation: Processes conceal their data so that it is unintelligible

 Protecting memory is one of the most fundamental protections an OS can give  All data and operations for a program are in memory  Most I/O accesses are done by writing memory to various locations  Techniques for memory protection  Fence  Base/bounds registers  Tagged architectures  Segmentation  Paging

 A fence can be a predefined or variable memory location  Everything below the fence is for the OS  If a program ever tries to access memory below the fence, it either fails or is shut down  As with many memory schemes, code needs to be relocatable so that the program is written as if it starts at memory location 0, but actually can be offset to an appropriate location OS Memory User Program Memory Fence

 In modern systems, many user programs run at the same time  We can extend the idea of a fence to two registers for each program  The base register gives the lowest legal address for a particular user program  The bounds register gives the highest legal address for a particular user program OS Memory Program A Memory Base A Program B Memory Program C Memory Bounds A

 The idea of base and bounds registers can be extended so that there are separate ranges for the program code and for its data  It is possible to allow data for some users to be globally readable or writable  But this makes data protection all or nothing  Tagged architectures allow every byte (or perhaps defined groups of bytes) to marked read only, read/write, or execute only  Only a few architectures have used this model because of the extra overhead involved

 Segmentation has been implemented on many processors including most x86 compatibles  A program sets up several segments such as code, data, and constant data  Writing to code is usually illegal  Other rules can be made for other segments  A memory lookup is both a segment identifier and an offset within that segment  For performance reasons, the OS can put these segments wherever it wants and do lookups  Segments can be put on secondary storage if they are not currently in use  The programmer sees a solid block of memory Code Constant Data Data Constant Data Data Code Programmer’s View OS View Other users have their own segments

 Paging is a very common way of managing memory  A program is divided up into equal- sized pieces called pages  An address is page number and an offset  Paging doesn’t have the fragmentation programs that segmentation does  It also doesn’t specify different protection levels  Paging and segmentation can be combined to give protection levels Page 0 Programmer’s View OS View Other users have their own pages Page 1 Page 2 Page 3 Page 0 Page 1 Page 3 Page 2

 More OS security  Access control  Authentication  Cody Kump presents

 Read Sections 4.1 through 4.4  Start working on Project 2