Outline for Today’s Lecture Administrative: –If you weren’t here last time, pick up midterm –Assignment 3 still in progress Objective: –Security –Access.

Slides:



Advertisements
Similar presentations
Chapter 9 Security 9.1 The security environment
Advertisements

CMSC 414 Computer (and Network) Security Lecture 13 Jonathan Katz.
Silberschatz, Galvin and Gagne  Operating System Concepts The Security Problem A system is secure iff its resources are used and accessed as.
1 Protection Protection = access control Goals of protection Protecting general objects Example: file protection in Linux.
19.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 19: Security The Security Problem Authentication Program Threats.
1 Security Chapter The security environment 9.2 Basics of cryptography 9.3 User authentication 9.4 Attacks from inside the system 9.5 Attacks from.
Security A system is secure if its resources are used and accessed as intended under all circumstances. It is not generally possible to achieve total security.
CSE331: Introduction to Networks and Security Lecture 28 Fall 2002.
CSE 513 Introduction to Operating Systems Class 10 - Security Jonathan Walpole Dept. of Comp. Sci. and Eng. Oregon Health and Science University.
Security Chapter The security environment 9.2 Basics of cryptography 9.3 User authentication 9.4 Attacks from inside the system 9.5 Attacks from.
1 Pertemuan 05 Malicious Software Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
CS-550 (M.Soneru): Protection and Security - 1 [SaS] 1 Protection and Security.
Security Chapter The security environment 9.2 Basics of cryptography 9.3 User authentication 9.4 Attacks from inside the system 9.5 Attacks from.
1 Pertemuan 23 Sistem Keamanan Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
CS 333 Introduction to Operating Systems Class 20 - Security Jonathan Walpole Computer Science Portland State University.
1 Security and Protection Chapter 9. 2 The Security Environment Threats Security goals and threats.
1 CSE 380 Computer Operating Systems Instructor: Insup Lee and Dianna Xu University of Pennsylvania Fall 2003 Lecture Note: Protection Mechanisms.
Silberschatz, Galvin and Gagne  Operating System Concepts Module 19: Security The Security Problem Authentication Program Threats System Threats.
Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE USC CSci530 Computer Security Systems Lecture.
Buffer Overflow Attacks Figure (a) Situation when the main program is running. (b) After the procedure A has been called. (c) Buffer overflow shown.
Chapter 9 Security Malware Defenses. Malware Can be used for a form of blackmail. Example: Encrypts files on victim disk, then displays message.
1 Computer Viruses (and other “Malicious Programs) Computer “Viruses” and related programs have the ability to replicate themselves on an ever increasing.
Protection and Security CSCI 444/544 Operating Systems Fall 2008.
Henric Johnson1 Chapter 10 Malicious Software Henric Johnson Blekinge Institute of Technology, Sweden
1 Security Chapter The security environment 9.2 User authentication 9.3 Attacks from inside the system 9.4 Attacks from outside the system 9.5 Protection.
1 Chap 10 Malicious Software. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on.
Chapter 15: Security (Part 1). The Security Problem Security must consider external environment of the system, and protect the system resources Intruders.
Operating Systems Protection & Security.
Malicious Code Brian E. Brzezicki. Malicious Code (from Chapter 13 and 11)
CS333 Intro to Operating Systems Jonathan Walpole.
Silberschatz and Galvin  Operating System Concepts Module 20: Security The Security Problem Authentication Program Threats System Threats Threat.
The Utility Programs: The system programs which perform the general system support and maintenance tasks are known as utility programs. Tasks performed.
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 14: Protection.
Controlling Files Richard Newman based on Smith “Elementary Information Security”
Lecture 14 Overview. Program Flaws Taxonomy of flaws: – how (genesis) – when (time) – where (location) the flaw was introduced into the system 2 CS 450/650.
Operating Systems 1 K. Salah Module 6.0: Security and Protection  Types of misuse: –1. Accidental –2. Intentional –Protection is to prevent either accidental.
1 Security Chapter The security environment 9.2 Basics of cryptography 9.3 User authentication 9.4 Attacks from inside the system 9.5 Attacks from.
1 Higher Computing Topic 8: Supporting Software Updated
1 Chap 10 Virus. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on an ever increasing.
CSCE 522 Lecture 12 Program Security Malicious Code.
Administrative: Objective: –Tutorial on Risks –Phoenix recovery Outline for today.
Security. cs431-cotter2 Figure 9-1. Security goals and threats. Threats Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights.
Chapter 10 Malicious software. Viruses and ” Malicious Programs Computer “ Viruses ” and related programs have the ability to replicate themselves on.
Types of Electronic Infection
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.
Security Chapter 9 Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Outline for Today’s Lecture Administrative: –Potential extension on Program 4 (not on webpage yet) Thursday Dec. 15 at 11:59pm (1 week more) –Exam will.
Outline Objective: –Access Control Mechanisms. The Security Environment Threats Security goals and threats.
Security CS Introduction to Operating Systems.
1 Lecture 1: Introduction Outline course’s focus intruder’s capabilities motivation for security worms, viruses, etc. legal and patent issues.
n Just as a human virus is passed from person from person, a computer virus is passed from computer to computer. n A virus can be attached to any file.
Computer Systems Viruses. Virus A virus is a program which can destroy or cause damage to data stored on a computer. It’s a program that must be run in.
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Protection.
Outline for Today’s Lecture Administrative: Objective: –Access Control Mechanisms (cont.) –Security risks.
Page 1 Viruses. Page 2 What Is a Virus A virus is basically a computer program that has been written to perform a specific set of tasks. Unfortunately,
CS703 - Advanced Operating Systems By Mr. Farhan Zaidi.
Security on the Internet Norman White ©2001. Security What is it? Confidentiality – Can my information be stolen? Integrity – Can it be changed? Availability.
Chapter 9 Security 9.1 The security environment
Chapter 14: System Protection
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Chapter 2: System Structures
CS510 Operating System Foundations
Chapter 9 Security 9.1 The security environment
12: Security The Security Problem Authentication Program Threats
Chap 10 Malicious Software.
Security.
Chap 10 Malicious Software.
Operating System Concepts
Operating System Concepts
Chapter 14: Protection.
Presentation transcript:

Outline for Today’s Lecture Administrative: –If you weren’t here last time, pick up midterm –Assignment 3 still in progress Objective: –Security –Access Control Mechanisms

Grades* Median = 80 Mean = 75.8 A A-/B+ B B-/C+ C-/D* * = remedial concurrency problem *histogram not updated after grade changes

Step 0: Basic Mechanisms Discussed in previous lecture: symmetric key cryptography public key cryptography digital signatures one-way functions hashes

Step 1: User Authentication Basic Principles. Authentication must identify: 1.Something the user knows 2.Something the user has 3.Something the user is This is done before user can use the system for access control

Authentication Using Passwords (a) A successful login (b) Login rejected after name entered (c) Login rejected after name and password typed

Authentication Using Passwords How a cracker broke into LBL –a U.S. Dept. of Energy research lab

Login Spoofing (a) Correct login screen (b) Phony login screen

Authentication Using Passwords The use of salt to defeat precomputation of encrypted passwords Salt Password,,,,

One-Time Passwords Using 1-way function: Function such that given formula for f(x) –easy to evaluate y = f(x) But given y –computationally infeasible to find x One-time passwords –Choose password s and integer n –1 st time P 1 =f(f(f(f(s)))), 2 nd time P 2 = f(f(f(s))), etc –Login name supplies current integer value –Server stores old password, f(newpassword)==old?

Challenge - Response Sets of question – answer pairs –Server picks one and asks –User knows answer User picks function f(x) –Server sends a value for x –User sends back f(x) as password Using symmetric encryption –Server sends random value r –User encrypts with secret key – e(r,k) Server compares

Graphical Challenge-Response

Authentication Using a Physical Object Magnetic cards –magnetic stripe cards –chip cards: stored value cards, smart cards RFIDs

Authentication Using Biometrics A device for measuring finger length. Retinal scans Voice recognition Surveillance tech –Image analysis –Gait analysis

Countermeasures Limiting times when someone can log in Automatic callback at number prespecified Limited number of login tries A database of all logins Simple login name/password as a trap –security personnel notified when attacker bites

Step 2: Access Control Mechanisms Protection Domains Examples of three protection domains

The Access Model Authorization problems can be represented abstractly by of an access model. –each row represents a subject/principal/domain –each column represents an object –each cell: accesses permitted for the {subject, object} pair read, write, delete, execute, search, control, or any other method In real systems, the access matrix is sparse and dynamic. need a flexible, efficient representation

17 Access Control Matrix Processes execute in a protection domain, initially inherited from subject TA grp Terry Lynn gradefile solutions proj1 rwx rw r rx luvltr r rw hotgossip rw

18 Two Representations ACL - Access Control Lists –Columns of previous matrix –Permissions attached to Objects –ACL for file hotgossip: Terry, rw; Lynn, rw Capabilities –Rows of previous matrix –Permissions associated with Subject –Tickets, Namespace (what it is that one can name) –Capabilities held by Lynn: luvltr, rw; hotgossip,rw

Protection Domains A protection matrix

Protection Domains A protection matrix with domains as objects

File Access Control Access control lists - detailed list attached to file of users allowed (denied) access, including kind of access allowed/denied. UNIX RWX - owner, group, everyone Capabilities – permitted accesses associated with subject (user), similar to an address space. –Un-forgeable object reference, like a pointer.

Trusted Systems Trusted Computing Base A reference monitor

Access Control Lists Approach: represent the access matrix by storing its columns with the objects. Tag each object with an access control list (ACL) of authorized subjects/principals. To authorize an access requested by S for O –search O’s ACL for an entry matching S –compare requested access with permitted access –access checks are often made only at bind time

Access Control Lists Use of access control lists of manage file access R

Access Control Lists Two access control lists

UNIX access control Each file carries its access control with it. rwx rwx rwx setuid Owner UID Group GID Everybody else Owner has chmod, chgrp rights (granting, revoking)

27 Access Control Matrix How to encode in Unix? TA grp Terry Lynn gradefile solutions proj1 rwx rw r rx luvltr r rw hotgossip rw

Capabilities Approach: represent the access matrix by storing its rows with the subjects. Tag each subject with a list of capabilities for the objects it is permitted to access. –A capability is an unforgeable object reference, like a pointer. –It endows the holder with permission to operate on the object e.g., permission to invoke specific methods –Typically, capabilities may be passed from one subject to another. Rights propagation and confinement problems

Capabilities Each process has a capability list

Cryptographically-protected capability Generic Rights 1.Copy capability 2.Copy object 3.Remove capability 4.Destroy object Capabilities ServerObjectRightsf(Objects, Rights, Check)

Dynamics of Protection Schemes How to endow software modules with appropriate privilege? –What mechanism exists to bind principals with subjects? e.g., setuid syscall, setuid bit –What principals should a software module bind to? privilege of creator: but may not be sufficient to perform the service privilege of owner or system: dangerous

Dynamics of Protection Schemes Problems: Mutual Suspicion When a caller requests a service, the callee should be limited in what stuff of the caller’s it has access to (only what it is passed). (entering domain - setuid vs. passing in single object) Modification When caller does pass an object as parameter, we want to control whether the callee can modify it (I send you a photo, you remove my copyright mark) Conservation When caller passes an object to gain service, we want to know that the callee doesn’t retain or even pass on the right to the object after we think they are done with it. (our credit card number – and selling such databases) Confinement We want to prevent information leaks (besides the objects themselves)

33 Dynamics of Protection Schemes How to revoke privileges? What about adding new subjects or new objects? How to dynamically change the set of objects accessible (or vulnerable) to different processes run by the same user? –Need-to-know principle / Principle of minimal privilege –How do subjects change identity to execute a more privileged module? protection domain, protection domain switch (enter)

34 Protection Domains Processes execute in a protection domain, initially inherited from subject Goal: to be able to change protection domains Introduce a level of indirection Domains become protected objects with operations defined on them: owner, copy, control TA grp Terry Lynn gradefile solutions proj1 rwx rwrwo r rxc luvltr r rw hotgossip rw Domain0 ctl enter r

35 If domain contains copy on right to some object, then it can transfer that right to the object to another domain. If domain is owner of some object, it can grant that right to the object, with or without copy to another domain If domain is owner or has ctl right to a domain, it can remove right to object from that domain Rights propagation. TA grp Terry Lynn gradefile solutions proj1 rwx rwrwo r rxc luvltr r rw hotgossip rw Domain0 ctl enter r rcrc r

UNIX access control Each file carries its access control with it. rwx rwx rwx setuid Owner UID Group GID Everybody elseWhen bit set, it allows process executing object to assume UID of owner temporarily - enter owner domain (rights amplification) Owner has chmod, chgrp rights (granting, revoking)

Capability Calling Mechanism Assume a capability to execute a procedure (lpr) Parameter is a capability to an object of mine (read access to file foo) lpr’s c-list has a template capability for the parameter, requires that certain rights are passed in (if lpr can’t read the file foo, it obviously can’t do its job) Sometimes, need rights amplification to do the job.

Dynamics of Protection Schemes Problems: Mutual Suspicion enter my domain vs. me, as owner, granting right to another domain (temp) Modification rights for particular operations Conservation ctl – being able to revoke rights; not granting copy rights Confinement remove rights to write or create anything else?

Multilevel Security The Bell-La Padula multilevel security model

Multilevel Security The Biba Model Principles to guarantee integrity of data 1.Simple integrity principle process can write only objects at its security level or lower 2.The integrity * property process can read only objects at its security level or higher

Risks

Trojan Horses: Inside Jobs Free program made available to unsuspecting user –Contains code to do harm –Example of tricking user, himself or herself, into running that program Place altered version of utility program on victim's computer, say, in some bin directory that might be in their PATHs Lay a trap for sysadmin to gain root privilege –Install local version of ls; then do something that causes sysadmin to % cd yourHomeDir % ls -l

Login Spoofing (a) Correct login screen (b) Phony login screen

Logic Bombs Company programmer writes program –potential to do harm –OK as long as he/she enters password daily; his/her name stays on the paycheck database; etc. –if programmer fired, no password and bomb explodes

Trap Doors (a) Normal code. (b) Code with a trapdoor inserted

Generic Security Attacks Typical attacks Request “free” memory, disk space, tapes and just read what was left there (not zero filled on dealloc) Try illegal system calls – if the system gets confused enough, you may be in. Start a login and hit DEL, RUBOUT, or BREAK to possibly kill password checking Try modifying complex OS structures kept in user space (if any) Try to do specified DO NOTs Convince a system programmer to add a trap door Beg admin's sec’y to help a poor user who forgot password

Buffer Overflow (a) Situation when main program is running (b) After procedure A is called (c) Fixed sized buffer B - overflow shown in gray User supplies long enough string to overwrite return address

UNIX lpr utility, option to remove file after printing; print and remove password file Link file core in working directory to the password file. Force a core dump of a SETUID program, writes on the core file, overwriting password file Famous Security Flaws

The TENEX – password problem Page faults could be monitored by user – user func. called One char at a time password checking – either illegal or fault (a)(b)(c)

Design Principles for Security 1.System design should be public – open source 2.Default should be no access 3.Check for current authority – e.g. not just at “open” 4.Give each process least privilege possible 5.Protection mechanism should be -simple -uniform -in lowest layers of system Security is not an add-on feature 6.Scheme should be psychologically acceptable And … keep it simple

From the Outside:Network Security External threat –code transmitted to target machine –code executed there, doing damage Goals of virus writer –quickly spreading virus –difficult to detect –hard to get rid of Virus = program can reproduce itself by attaching its code to another program –additionally, do harm

Virus Damage Scenarios Blackmail Denial of service as long as virus runs Permanently damage hardware Target a competitor's computer –do harm –espionage Intra-corporate dirty tricks –sabotage another corporate officer's files

How Viruses Work Virus usually written in assembly language Inserted into another program –use tool called a “dropper” Virus dormant until program executed –then infects other programs –eventually executes its “payload” possibly waits for significant date Types: companion, executable program, memory, boot sector, device driver, macro, source code

Bait and switch – companion viruses MS-DOS example: run prog system tries prog.com then prog.exe Release a prog.com for a popular prog.exe How Viruses Work

Recursive procedure that finds executable files on a UNIX system Virus could infect them all

How Viruses Work An executable program with a parasitic virus at the front at the end spread over free space within program (cavity virus)

Boot sector viruses 1 st hide the real boot sector When booted, copies virus into memory, making it a memory resident virus Then boots the OS Device driver infected with virus, loads it at boot time. How Viruses Work

After virus has captured interrupt, trap vectors –Syscall trap a good one. Can look for exec calls After OS has retaken printer interrupt vector After virus has noticed loss of printer interrupt vector and recaptured it

Macros Applications like Word or Excel allow macros that get executed via keystroke or menu Attach a macro to open file function and you are off and running Can be sent in attachments Some ers automatically open attachments How Viruses Work

How Viruses Spread Virus placed where likely to be copied When copied –infects programs on hard drive, floppy –may try to spread over LAN Attach to innocent looking –when it runs, use mailing list to replicate

Antivirus and Anti-Antivirus Techniques (a) A program (b) Infected program, metadata giveaways (c) Compressed infected program (d) Encrypted virus (e) Compressed virus with encrypted compression code

Antivirus and Anti-Antivirus Techniques Examples of a polymorphic virus All of these examples do the same thing Mutation engine – code that morphs the signature part of the virus each time it spreads

Antivirus and Anti-Antivirus Techniques Integrity checkers - checksums Behavioral checkers Virus avoidance –good OS –install only shrink-wrapped software –use antivirus software –do not click on attachments to –avoid active content –frequent backups Recovery from virus attack –halt computer, reboot from safe disk, run antivirus

The Internet Worm Worm = replicating program Nov. 1988, Robert Morris, Cornell grad student Consisted of two programs –bootstrap to upload worm –the worm itself Worm first hid its existence Next replicated itself on new machines –rsh –finger - overflow finger daemon’s stack with long string –Bug in sendmail to mail bootstrap & exec it –Tried to break user passwords and go on Too aggressive – let 1 in 7 re-infects live CERT – Computer Emergency Response Team – collects info on system flaws that can be attacked. Fields reports of security break-ins

Mobile Code Sandboxing (a) Memory divided into 1-MB sandboxes (b) One way of checking an instruction for validity

Mobile Code Applets can be interpreted by a Web browser

Mobile Code How code signing works

Java Security A type safe language –compiler rejects attempts to misuse variable Checks include … 1.Attempts to forge pointers 2.Violation of access restrictions on private class members 3.Misuse of variables by type 4.Generation of stack over/underflows 5.Illegal conversion of variables to another type

Java Security Examples of specified protection with JDK 1.2

Covert Channels Client, server and collaborator processes Encapsulated server can still leak to collaborator via covert channels

Covert Channels A covert channel using file locking

Covert Channels Pictures appear the same Picture on right has text of 5 Shakespeare plays –encrypted, inserted into low order bits of color values Zebras Hamlet, Macbeth, Julius Caesar Merchant of Venice, King Lear

Is it a Technical Problem? Lots of known solution techniques Access control Crypto Firewalls Intrusion detection So why isn’t it a solved problem?

Economics “The party who is in a position to protect a system is not the party who would suffer the results of security failure.” Ross Anderson Security For whom is it built? Who pays for it?