Writing Secure Programs. Program Security CSCE 522 - Farkas/Eastman - Fall 20052 Program Flaws Taxonomy of flaws: how (genesis) when (time) where (location)

Slides:



Advertisements
Similar presentations
Testing and Quality Assurance
Advertisements

Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
Chapter 4 Quality Assurance in Context
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,
Lecture 1: Overview modified from slides of Lawrie Brown.
Trusted Hardware: Can it be Trustworthy? Design Automation Conference 5 June 2007 Karl Levitt National Science Foundation Cynthia E. Irvine Naval Postgraduate.
CMSC 414 Computer and Network Security Lecture 24 Jonathan Katz.
1 Static Testing: defect prevention SIM objectives Able to list various type of structured group examinations (manual checking) Able to statically.
COE Data and Computer Communications Data Communications & Networking Overview.
Security Engineering II. Problem Sources 1.Requirements definitions, omissions, and mistakes 2.System design flaws 3.Hardware implementation flaws, such.
Building Secure Software Chapter 9 Race Conditions.
SE 555 Software Requirements & Specification Requirements Validation.
CSC 402, Fall Requirements Analysis for Special Properties Systems Engineering (def?) –why? increasing complexity –ICBM’s (then TMI, Therac, Challenger...)
Lecture 15 Overview. Kinds of Malicious Codes Virus: a program that attaches copies of itself into other programs. – Propagates and performs some unwanted.
Software Quality Assurance For Software Engineering && Architecture and Design.
Chapter 3 – Program Security Section 3.4 Targeted Malicious Code Section 3.5 Controls Against Program Threats.
CSCI 5801: Software Engineering
System Implementation. System Implementation and Seven major activities Coding Testing Installation Documentation Training Support Purpose To convert.
CSCE 548 Secure Software Development Risk-Based Security Testing.
1. Topics to be discussed Introduction Objectives Testing Life Cycle Verification Vs Validation Testing Methodology Testing Levels 2.
Information Systems Security Computer System Life Cycle Security.
1 Debugging and Testing Overview Defensive Programming The goal is to prevent failures Debugging The goal is to find cause of failures and fix it Testing.
Database Security DBMS Features Statistical Database Security.
Instructor: Peter Clarke
Lecture 16 Overview.
Engineering Secure Software. A Ubiquitous Concern  You can make a security mistake at every step of the development lifecycle  Requirements that allow.
Chapter 5 P rogram Security. csci5233 computer security & integrity (Chap. 5) 2 Outline Viruses & worms Targeted Malicious Codes –Trapdoors, Salami attack,
CSCE 522 Lecture 12 Program Security Malicious Code.
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.
Security - Why Bother? Your projects in this class are not likely to be used for some critical infrastructure or real-world sensitive data. Why should.
CSCE 522 Secure Software Development Best Practices.
What security is about in general? Security is about protection of assets –D. Gollmann, Computer Security, Wiley Prevention –take measures that prevent.
1 ITGD 2202 Supervision:- Assistant Professor Dr. Sana’a Wafa Al-Sayegh Dr. Sana’a Wafa Al-SayeghStudent: Anwaar Ahmed Abu-AlQumboz.
Software Testing and Maintenance 1 Code Review  Introduction  How to Conduct Code Review  Practical Tips  Tool Support  Summary.
Safety-Critical Systems 7 Summary T V - Lifecycle model System Acceptance System Integration & Test Module Integration & Test Requirements Analysis.
Software Defects.
CPSC 6126 Computer Security Information Assurance.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Unix Security Assessing vulnerabilities. Classifying vulnerability types Several models have been proposed to classify vulnerabilities in UNIX-type Oses.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
CSCE 201 Secure Software Development Best Practices.
The Digital Crime Scene: A Software Perspective Written By: David Aucsmith Presented By: Maria Baron.
Chapter 23: Vulnerability Analysis Dr. Wayne Summers Department of Computer Science Columbus State University
Lecture 17 Overview. Targeted Malicious Code Trapdoor – undocumented entry point to a module – forget to remove them – intentionally leave them in the.
Dynamic Testing.
Software Engineering Lecture 8: Quality Assurance.
CSCE 548 Introduction Basic Security Concepts. APOGEE Students Download recorded lectures Contact instructor if needed via – Phone: during office hours.
Agenda  Quick Review  Finish Introduction  Java Threads.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
What is a software? Computer Software, or just Software, is the collection of computer programs and related data that provide the instructions telling.
Engineering Secure Software. A Ubiquitous Concern  You can make a security mistake at every step of the development lifecycle  Requirements that allow.
ON “SOFTWARE ENGINEERING” SUBJECT TOPIC “RISK ANALYSIS AND MANAGEMENT” MASTER OF COMPUTER APPLICATION (5th Semester) Presented by: ANOOP GANGWAR SRMSCET,
Software Security Q: What does it mean to say that a program is secure? A: There is a sufficient amount of trust that the program maintains _____________,
Powerpoint Templates Data Communication Muhammad Waseem Iqbal Lecture # 07 Spring-2016.
Vulnerability Analysis
Buffer Overflows Incomplete Access Control
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
CSCE 548 Secure Software Development Risk-Based Security Testing
Chapter 7: Identifying Advanced Attacks
CSCE 548 Secure Software Development Final Exam – Review 2016
Verification & Validation
CSE565: Computer Security Lecture 27 Program Security
Critical Systems Validation
Text Book: Security in Computing
Program Security Jagdish S. Gangolly School of Business
جلسه دوم مبانی امنیت (3) ارائه دهنده: حسین محمدحسن زاده 15 اسفند 1391
Chapter 23: Vulnerability Analysis
Chapter 7 Software Testing.
Presentation transcript:

Writing Secure Programs

Program Security CSCE Farkas/Eastman - Fall Program Flaws Taxonomy of flaws: how (genesis) when (time) where (location) the flaw was introduced into the system

Program Security CSCE Farkas/Eastman - Fall Security Flaws by Genesis Genesis Intentional Inadvertent

Program Security CSCE Farkas/Eastman - Fall Intentional Genesis Malicious: Trojan Horse, Trapdoor, Logic Bomb, covert channels Non-malicious

Program Security CSCE Farkas/Eastman - Fall Inadvertent Genesis Validation error Domain error Serialization error Identification/authentication error Other error

Program Security CSCE Farkas/Eastman - Fall Program Security Topics Today Faults, flaws, and failures (Terminology) Nonmalicious program errors Covert channels Controls against program threats

Program Security CSCE Farkas/Eastman - Fall Security Terminology Terms used in software engineering and security communities not consistent Vulnerability, threat, attack, control, flaw A threat is blocked by control of a vulnerability A flaw may result in a vulnerability An attack exploits a vulnerability

Program Security CSCE Farkas/Eastman - Fall IEEE Standard 729 for Software “Bugs” Error – Human mistake Fault – Incorrect code Failure – Incorrect system behavior Errors may (or may not) cause faults One error may generate many faults Faults may (or may not) cause failures

Program Security CSCE Farkas/Eastman - Fall Nonmalicious Program Errors Buffer overflows Incomplete mediation Time-of-check to time-of-use errors

Program Security CSCE Farkas/Eastman - Fall Buffer Overflows Probably most publicized class of nonmalicious program errors Result from attempt to write too much data into a buffer without checking size May simply interfere with user program or allow system to be taken over

Program Security CSCE Farkas/Eastman - Fall Mediation Mediators facilitate communication among two or more parties Mediators attempt to resolve differences Mediation may be final Intermediaries are also “go-betweens” Usage close but not exactly the same in computer security

Program Security CSCE Farkas/Eastman - Fall Incomplete Mediation Complete mediation – all data accesses handled by an intermediary Required for a trusted computing system Incomplete mediation allows incorrect data into the system, which may not be able to handle it

Program Security CSCE Farkas/Eastman - Fall Incomplete Mediation Example Things.com Customer order returned to company system as url &total=205 User changes total to 25 Real (unidentified) company

Program Security CSCE Farkas/Eastman - Fall Time-of-Check to Time-of-Use Errors TOCTTOU Time interval between checking that a data item is valid and actually using it Value changed during that time period Serialization or synchronization flaw Must ensure that check/use is handled as a transaction

Program Security CSCE Farkas/Eastman - Fall Indirect Information Flow Channels Covert channels – unintended channels of communication Inference channels – determining sensitive data using nonsensitive data A kind of covert channel

Program Security CSCE Farkas/Eastman - Fall Communication Channels Overt Channel: designed into a system and documented in the user's manual Covert Channel: not documented. Covert channels may be deliberately inserted into a system, but most such channels are accidents of the system design.

Program Security CSCE Farkas/Eastman - Fall Covert Channel Timing Channel: based on system times Storage channels: not time related communication Can be turned into each other

Program Security CSCE Farkas/Eastman - Fall Covert Channel Need: Two active participants Encoding schema Example: sender modulates the CPU utilization level with the data stream to be transmitted Sender: repeat get a bit to send if the bit is 1 wait one second (don't use CPU time) else busy wait one second (use CPU time) endif until done

Program Security CSCE Farkas/Eastman - Fall Covert Channels Noise Synchronization Protection (user state, system state) Removal Slow down Audit

Program Security CSCE Farkas/Eastman - Fall Wells and Eastman Examined a covert channel involving patterns of access to encrypted database blocks stored as a B-tree Can determine tree structure, given a sufficient access log Can not determine actual data values simply from access log However, given some data values can guess values for others

Program Security CSCE Farkas/Eastman - Fall Inference Channels + Meta-data Sensitive Information Non-sensitive information =

Program Security CSCE Farkas/Eastman - Fall Inference Channels Statistical Database Inferences General Purpose Database Inferences Will return to inference channels later in course

Program Security CSCE Farkas/Eastman - Fall Controls Against Program Threats Good software engineering Applications Systems programs Good project management Good system management No silver bullet

Program Security CSCE Farkas/Eastman - Fall Developmental Controls Modularity, encapsulation, and information hiding Peer reviews Hazard analysis Testing Good design Prediction Static analysis Configuration management Analysis of mistakes

Program Security CSCE Farkas/Eastman - Fall Peer Reviews Have been shown to be one of the most effective ways to find and correct software faults Distinguish different kinds of peer review Review (informal) Walk-through (systematic examination of code/documentation) Inspection (use checklist)

Program Security CSCE Farkas/Eastman - Fall Hazard Analysis Set of systematic techniques to identify and manage potential hazards Form of risk analysis Most effective approaches include HAZOP – Hazard and operability studies FMEA – Failure modes and effects analysis FTA – Fault tree analysis

Program Security CSCE Farkas/Eastman - Fall Prediction Not clearly separated from hazard analysis Predict the risks involved in building and using the system OCTAVE approach to security involves identifying most important risks and concentrating on those

Program Security CSCE Farkas/Eastman - Fall Good Design Concepts addressed here are fault detection and fault tolerance Passive vs. active fault detection Fault tolerance – retry, correct, restore Defensive driving!!

Program Security CSCE Farkas/Eastman - Fall Code Examination Static analysis Proofs of program correctness

Program Security CSCE Farkas/Eastman - Fall Static Analysis Control flow structure Data structure Data flow structure

Program Security CSCE Farkas/Eastman - Fall Proofs of Correctness Proving that the program performs exactly as specified is also equivalent to the halting problem (and thus not possible) Program verification – sometimes limited to analysis of preconditions and postconditions Formal methods

Program Security CSCE Farkas/Eastman - Fall Software Development Practices Learn from mistakes Keep track of mistakes!! Systematic approach to documenting and using information about problems and what was done about them Negative information useful Why we didn’t do it this way

Program Security CSCE Farkas/Eastman - Fall Operating System Controls Trusted software Mutual suspicion Confinement Access logs More later

Program Security CSCE Farkas/Eastman - Fall Administrative Controls Standards of program development Security audits Separation of duties More later

Program Security CSCE Farkas/Eastman - Fall CSCE 548: Building Secure Software Construction of software systems resistant to vulnerabilities and attacks. Cryptographic tools. Language, operating system, and network security. Case studies. Development of best practices through programming assignments Prereq: CSCE 510 or consent of instructor