Text Book: Security in Computing

Slides:



Advertisements
Similar presentations
Lectures on File Management
Advertisements

Network Security Attack Analysis. cs490ns - cotter2 Outline Types of Attacks Vulnerabilities Exploited Network Attack Phases Attack Detection Tools.
CSc 352 Programming Hygiene Saumya Debray Dept. of Computer Science The University of Arizona, Tucson
Chapter 3 (Part 1) Network Security
Week 5 - Wednesday.  What did we talk about last time?  Attacks on hash functions.
Stack-Based Buffer Overflows Attacker – Can take over a system remotely across a network. local malicious users – To elevate their privileges and gain.
CMSC 414 Computer and Network Security Lecture 24 Jonathan Katz.
Chap 3: Program Security.  Programming errors with security implications: buffer overflows, incomplete access control  Malicious code: viruses, worms,
Buffer Overflow Attacks. Memory plays a key part in many computer system functions. It’s a critical component to many internal operations. From mother.
2-1 Last time What is our goal in this course? What is security? What is privacy? Who are the adversaries? Assets, vulnerabilities, threats, attacks and.
Lecture 12 Overview.
Java Security. Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security Manager.
Security Exploiting Overflows. Introduction r See the following link for more info: operating-systems-and-applications-in-
An anti-hacking guide.  Hackers are kindred of expert programmers who believe in freedom and spirit of mutual help. They are not malicious. They may.
Chapter 6 Buffer Overflow. Buffer Overflow occurs when the program overwrites data outside the bounds of allocated memory It was one of the first exploited.
Computer Security and Penetration Testing
BLENDED ATTACKS EXPLOITS, VULNERABILITIES AND BUFFER-OVERFLOW TECHNIQUES IN COMPUTER VIRUSES By: Eric Chien and Peter Szor Presented by: Jesus Morales.
Buffer Overflows Lesson 14. Example of poor programming/errors Buffer Overflows result of poor programming practice use of functions such as gets and.
OSI and TCP/IP Models And Some Vulnerabilities AfNOG th May 2011 – 10 th June 2011 Tanzania By Marcus K. G. Adomey.
CHAPTER 3 Program Security 1. Objectives 2  Defined the concept of secured program  differentiate malicious and non-malicious code  identify and describe.
Program Security Week-2. Programming Fault: When a human makes a mistake, called an error, in performing some software activity, the error may lead to.
Lecture 14 Program Security CS 450/650 Fundamentals of Integrated Computer Security Slides are modified from Wayne Summers and Ian Goldberg.
APPLICATION PENETRATION TESTING Author: Herbert H. Thompson Presentation by: Nancy Cohen.
Security Attacks CS 795. Buffer Overflow Problem Buffer overflows can be triggered by inputs that are designed to execute code, or alter the way the program.
Chapter-4 Software Security Why Software?  Why is software as important to security as crypto, access control and protocols?  Virtually all of information.
CPSC 6126 Computer Security Information Assurance.
JMU GenCyber Boot Camp Summer, Introduction to Penetration Testing Elevating privileges – Getting code run in a privileged context Exploiting misconfigurations.
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 29: Program Security Dr. Wayne Summers Department of Computer Science Columbus State University
Lecturer: Eng. Mohamed Adam Isak PH.D Researcher in CS M.Sc. and B.Sc. of Information Technology Engineering, Lecturer in University of Somalia and Mogadishu.
Computer Security: Chapter 5 Operating Systems Security.
INSIDER THREATS BY: DENZEL GAY COSC 356. ROAD MAP What makes the insider threat important Types of Threats Logic bombs Ways to prevent.
8 – Protecting Data and Security
Chapter 40 Internet Security.
Eighth Lecture Exception Handling in Java
Secure Coding Rules for C++ Copyright © 2016 Curt Hill
CHAPTER 3 PROGRAM SECURITY.
Buffer Overflows Incomplete Access Control
Mitigation against Buffer Overflow Attacks
CS 395: Topics in Computer Security
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.
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
Introduction to Operating Systems
Operating Systems Services provided on internet
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
Protecting Memory What is there to protect in memory?
Chap 20. Vulnerability Analysis
Protecting Memory What is there to protect in memory?
Software Security Testing
Protecting Memory What is there to protect in memory?
Chapter 2: System Structures
Objectives Identify the built-in data types in C++
Operating system Security
A First Book of ANSI C Fourth Edition
Some Simple Definitions for Testing
Testing the Software with Blinders on
CSE565: Computer Security Lecture 27 Program Security
Introduction to Operating Systems
Program Security Jagdish S. Gangolly School of Business
Security in Java Real or Decaf? cs205: engineering software
Software Security Lesson Introduction
Chapter 23: Vulnerability Analysis
Chapter 29: Program Security
Software Development Process
Focus of the Course Object-Oriented Software Development
Implementation of security elements in database
CS5123 Software Validation and Quality Assurance
Software Security Slide Set #10 Textbook Chapter 11 Clicker Questions
Review of Previous Lesson
Presentation transcript:

Text Book: Security in Computing Program Security Text Book: Security in Computing Charles P. Pfleeger From Charles P. Pfleeger, Security in Computing, 2nd Edition, Prentice Hall, 1996

Program Security Objectives Defined the concept of secured program differentiate malicious and non-malicious code identify and describe programming errors with security implication list and explain different types of viruses, how and where it attack and how it gain controls explain virus signature identify the impact of viruses to the computing system discuss and explain various policies, procedures and technical controls against virus threats

Program/Code Security (cont.) Protecting programs is at the heart of computer security because they constitute so much of a computing system s.a. (OS, Device drivers, Network infrastructure, DBMS, … etc) Two important questions: 1. How do we keep programs free from flaws? 2. How do we protect computing resources against programs that contain flaws?

Secure Program Security implies some degree of trust that the program enforces expected confidentiality, integrity and availability. The meaning of secure software is likely to get difference answer from different people. This difference occurs because the importance of the characteristics depends on who is analyzing the software.

Flaws, faults, and failures A flaw is a problem with a program A program security flaw is an undesired program behavior caused by a program vulnerability A security flaw is a problem that affects security in some way Confidentiality, integrity, availability Flaws come in two types: faults and failures 2-5

Flaws, faults, and failures A fault is a mistake “behind the scenes” An error in the code, data, specification, process, etc. A fault is a potential problem A failure is when something actually goes wrong You log in to the library’s web site, and it shows you someone else’s account “Goes wrong” means a deviation from the desired behaviour, not necessarily from the specified behaviour! The specification itself may be wrong A fault is the programmer/specifier/inside view A failure is the user/outside view 2-6

Finding and fixing faults How do you find a fault? If a user experiences a failure, you can try to work backwards to uncover the underlying fault What about faults that haven’t (yet) led to failures? Intentionally try to cause failures, then proceed as above Remember to think like an attacker! 2-7

Bug, Error, Fault, and Failure Bug in software is a term that can mean many different things depending on context. For example, it can be a mistake in interpreting a requirement or a syntax error in a piece of code. Error is a human mistake in performing some software activity that may lead to a fault in a computer program. A fault may cause a failure (which is a departure from the system's required behavior). a fault is an inside view of the system, seen by the developers, whereas a failure is an outside view seen by the user.

Types of Flaws Intentional - Malicious - Non-malicious Inadvertent (Unintentional) - validation error. - domain error: controlled access to data. - serialization and aliasing: program flow order. - inadequate identification and authentication. - boundary condition violation. - other exploitable logic errors.

Types of security flaws One way to divide up security flaws is by genesis (where they came from) Some flaws are intentional Malicious flaws are intentionally inserted to attack systems, either in general, or certain systems in particular If it’s meant to attack some particular system, we call it a targeted malicious flaw. 2- 12

Types of security flaws Nonmalicious (but intentional) flaws are often features that are meant to be in the system, and are correctly implemented, but nonetheless can cause a failure when used by an attacker Most security flaws are caused by unintentional program errors 2- 12

Nonmalicious Program Errors Human make many mistakes, most of which are unintentional and nonmalicious. Many such errors cause program malfunction but do not lead to more serious security vulnerabilities. 3 main concern : Buffer Overflows Incomplete Mediation Time-of-Check to Time-of-Use Errors 2- 12

Non-malicious Program Errors 1. Buffer Overflows All program and data elements are in memory during execution, sharing space with the operating system, other code, and resident routines. Therefore, the effect of the overflows data depends on where it is go in the memory; It may affect the user data, user code, system data, or system code.

Buffer Overflows buffer (or array or string) is a space in which data can be held. Because memory is finite, a buffer’s capacity is finite. For this reason in many programming languages, the programmer must declare the buffer’s maximum size so that the compiler can set aside the amount of space. Buffer overflow: when user input exceeds max buffer size Extra input goes into unexpected memory locations Attacker can run desired code, hijack program

Malicious user enters > 1024 chars, but buf can only store 1024 chars; extra chars overflow buffer void get_input() { char buf[1024]; gets(buf); } void main(int argc, char*argv[]){ get_input();

Buffer Flows (cont) Example 1 : Declare : char sample[10]; Run : sample[10] = ‘A’; Error : Subscript is out of bounds. Example 2 : Declare : sample[ i ] = ‘A’ Run : for ( i=0; i<=9; i++ ) sample[ i ] sample[10] = ‘B’ Error : Overwrites an existing variable value.

Defences against buffer overflows How might one protect against buffer overflows? Use a language with bounds checking And catch those exceptions! Non-executable stack “W⊕X” (memory page is either writable or executable, but never both) 2- 26

Non-malicious Program Errors (cont.) 2. Incomplete mediation Inputs to programs are often specified by untrusted users Web-based applications are a common example Users sometimes mistype data in web forms Phone number: 51998884567 Email: iang#cs.uwaterloo.ca The web application needs to ensure that what the user has entered constitutes a meaningful request This is called mediation 2- 29

Non-malicious Program Errors (cont.) 2. Incomplete mediation Incomplete Mediation : routine’s failing on a data type error. Another possibility is that the receiving program would continue to execute but would generate the very wrong result. One way to address the potential problems is to anticipate them – written code to check for correctness on the client’s side, program can restrict choice only to a valid ones. 2- 29

Incomplete mediation Example 1 : Declare : int number; Run : number = “two”; Error : Wrong value in specified format Example 2 : Declare : in database we declare name length as 10 character Run : We enter name = Christopher Columbus Error : Database error Incomplete mediation occurs when the application accepts incorrect data from the user

Non-malicious Program Errors (cont.) 3. Time-of-Check to Time-of-Use Errors : Definition : instruction that appear to be adjacent may not actually be executed immediately after each other, either because of intentionally changed order or because of the effects of other processes in concurrent execution. (A delay between checking permission to perform certain operations and using this permission may enable the operations to be changed)

Non-malicious Program Errors (cont.) 3. Time-of-Check to Time-of-Use Errors : Example: 1.User attempts to write 100 bytes at end of file “abc”. Description of operation is stored in a data structure. 2.OS checks user’s permissions on copy of data structure. 3.While user’s permissions are being checked, user changes data structure to describe operation to delete file “xyz”.

Non-malicious Program Errors (cont.) 3. Time-of-Check to Time-of-Use Errors : A delay between the time the access was checked and the time the result of the check was used, a change occurred, invalidating the result of the check. Example: Changing the file name that checked for a deletion access.