An Overview of the DHS/NIST SAMATE Project SSE Seminar April 10, 2006 Michael Kass Information Technology Laboratory National Institute of Standards and.

Slides:



Advertisements
Similar presentations
Juliet Test Suite Overview
Advertisements

Software Assurance Metrics and Tool Evaluation (SAMATE) Michael Kass National Institute of Standards and Technology
Recitation By yzhuang, sseshadr. Agenda Debugging practices – GDB – Valgrind – Strace Errors and Wrappers – System call return values and wrappers – Uninitialization.
Module R2 CS450. Next Week R1 is due next Friday ▫Bring manuals in a binder - make sure to have a cover page with group number, module, and date. You.
SPLINT STATIC CHECKING TOOL Sripriya Subramanian 10/29/2002.
Using Programmer-Written Compiler Extensions to Catch Security Holes Authors: Ken Ashcraft and Dawson Engler Presented by : Hong Chen CS590F 2/7/2007.
CMSC 414 Computer and Network Security Lecture 24 Jonathan Katz.
1 Chapter 4 Language Fundamentals. 2 Identifiers Program parts such as packages, classes, and class members have names, which are formally known as identifiers.
Software and Software Vulnerabilities. Synopsis Array overflows Stack overflows String problems Pointer clobbering. Dynamic memory management Integer.
Elementary Data Types Scalar Data Types Numerical Data Types Other
1 Software Testing and Quality Assurance Lecture 30 – Testing Systems.
Methods For The Prevention, Detection And Removal Of Software Security Vulnerabilities Jay-Evan J. Tevis Department of Computer Science and Software Engineering.
TGDC Meeting, July 2011 Voting System Software Assurance: SAMATE Automated Source Code Conformance Verification Study Michael Kass Computer Scientist,
This is a work of the U.S. Government and is not subject to copyright protection in the United States. The OWASP Foundation OWASP AppSec DC October 2005.
Evaluating Static Analysis Tools Dr. Paul E. Black
Examining the Code [Reading assignment: Chapter 6, pp ]
This is a work of the U.S. Government and is not subject to copyright protection in the United States. The OWASP Foundation OWASP AppSec DC October 2005.
Static Analysis for Security Amir Bazine Per Rehnberg.
A Scanner Sparkly Web Application Proxy Editors and Scanners.
TGDC Meeting, December 2011 Michael Kass National Institute of Standards and Technology Update on SAMATE Automated Source Code Conformance.
Shuo Chen, Jun Xu, Emre C. Sezer, Prachi Gauriar, and Ravishankar K. Iyer Brett Hodges April 8, 2010.
Security Exploiting Overflows. Introduction r See the following link for more info: operating-systems-and-applications-in-
Software Quality Assurance Lecture #8 By: Faraz Ahmed.
A Framework for Automated Web Application Security Evaluation
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
A Security Review Process for Existing Software Applications
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.
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.
Exploiting Buffer Overflows on AIX/PowerPC HP-UX/PA-RISC Solaris/SPARC.
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.
A Survey of Dynamic Techniques for Detecting Device Driver Errors Olatunji Ruwase LBA Reading Group 18 th May 2010.
Presentation of Failure- Oblivious Computing vs. Rx OS Seminar, winter 2005 by Lauge Wullf and Jacob Munk-Stander January 4 th, 2006.
Computer Science Detecting Memory Access Errors via Illegal Write Monitoring Ongoing Research by Emre Can Sezer.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 15: More-Advanced Concepts.
Introduction to Software Testing. Types of Software Testing Unit Testing Strategies – Equivalence Class Testing – Boundary Value Testing – Output Testing.
Unit Testing 101 Black Box v. White Box. Definition of V&V Verification - is the product correct Validation - is it the correct product.
16 October Reminder Types of Testing: Purpose  Functional testing  Usability testing  Conformance testing  Performance testing  Acceptance.
Pointers OVERVIEW.
Overflow Examples 01/13/2012. ACKNOWLEDGEMENTS These slides where compiled from the Malware and Software Vulnerabilities class taught by Dr Cliff Zou.
This is a work of the U.S. Government and is not subject to copyright protection in the United States. The OWASP Foundation OWASP AppSec DC October 2005.
An Undergraduate Course on Software Bug Detection Tools and Techniques Eric Larson Seattle University March 3, 2006.
NIST SAMATE Project and OMG Michael Kass NIST Information Technology Laboratory March 11, 2008.
Chapter 1 The Software Security Problem. Goals of this course Become aware of common pitfalls. Static Analysis and tools.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Sairajiv Burugapalli. This chapter covers three main categories of classic software vulnerability: Buffer overflows Integer vulnerabilities Format string.
SwA Co-Chair and Task Lead Strategy Session Agenda Technology, Tools and Product Evaluation Working Group Status Briefing Co-Chair(s) Michael Kass (NIST),
PROGRAMMING TESTING B MODULE 2: SOFTWARE SYSTEMS 22 NOVEMBER 2013.
Security Attacks Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
MOPS: an Infrastructure for Examining Security Properties of Software Authors Hao Chen and David Wagner Appears in ACM Conference on Computer and Communications.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
Beyond Stack Smashing: Recent Advances In Exploiting Buffer Overruns Jonathan Pincus and Brandon Baker Microsoft Researchers IEEE Security and.
Announcements Assignment 2 Out Today Quiz today - so I need to shut up at 4:25 1.
CAP6135: Malware and Software Vulnerability Analysis Buffer Overflow : Example of Using GDB to Check Stack Memory Cliff Zou Spring 2014.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Code improvement: Coverity static analysis Valgrind dynamic analysis GABRIELE COSMO CERN, EP/SFT.
Computer Scientist, Software and Systems Division, ITL
Content Coverity Static Analysis Use cases of Coverity Examples
Sabrina Wilkes-Morris CSCE 548 Student Presentation
Software Testing.
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
Security Issues Formalization
Software Security Testing
Module 30 (Unix/Linux Security Issues II)
A bit of C programming Lecture 3 Uli Raich.
A Security Review Process for Existing Software Applications
High Coverage Detection of Input-Related Security Faults
Chapter 14 - Advanced C Topics
Covering CWE with Programming Languages and Tools
Introduction to Static Analyzer
Presentation transcript:

An Overview of the DHS/NIST SAMATE Project SSE Seminar April 10, 2006 Michael Kass Information Technology Laboratory National Institute of Standards and Technology

Outline Background on the SAMATE project Overview of work done to date Opportunities for Collaboration with NKU

The Questions SwA tools are increasingly being used to provide an argument for an applications software assurance through the entire SDLC Do software assurance tools work as they should? Do they really find vulnerabilities and catch bugs? How much assurance does running the tool provide? Software Assurance tools should be … –Tested: accurate and reliable –Peer reviewed –Generally accepted

DHS Tasks NIST to: Assess current SwA tools and methods in order to identify deficiencies which can lead to software product failures and vulnerabilities Identify gaps in SwA tools and methods, and suggest areas of further research Develop metrics for the effectiveness of SwA tools

NIST Software Assurance Metrics and Tool Evaluation (SAMATE) Project Goals Define a taxonomy of Software Assurance tools and their functions Define a “common/agreed-upon” classification scheme for software security flaws/weaknesses Develop functional specifications for SwA tools Create an open reference dataset of test material for SwA tools Define common metrics for measuring the assurance of applications and effectiveness of SwA tools Identify gaps in capabilities of today’s tools and make recommendations to DHS for funding research in these areas

SAMATE workshop tool focus group tool function taxonomy tool functional specification reference dataset of tests SAMATE Products code and tool metrics software flaw taxonomy

Products: SwA Tool Taxonomy (high-level view) ”External” Tools –Network Scanners –Web Application Scanners –Web Services Scanners –Dynamic Analysis/Fault Injection Tools

Products: SwA Tool Taxonomy (cont.) “Internal” Tools - –Compilers –Software Requirements Verification –Software Design/Model Verification –Source Code Scanners –Byte Code Scanners –Binary Code Scanners

Products: Common Software Flaw Taxonomy There are currently multiple taxonomies to choose from/integrate (CWE, CLASP, Fortify Software..others) We need to integrate them into one common, agreed-upon taxonomy A flaw taxonomy must cover the entire SDLC (flaws introduced during requirements, design, implementation, deployment) A taxonomy should also contain axes/views such as “remediation” or “point of introduction in SDLC” Volunteers helping with the flaw taxonomy include: Cigital, Mitre, Ounce Labs, Klockwork Inc., Secure Software Inc., Fortify Software, OWASP

Products: SwA Tool Specification Need to define core functions of each class of tool Need to define a “base” set of functions that constitute a minimally acceptable level of capability Specification must be clear, unambiguous and testable

Products: Reference Dataset for Tool Evaluation A reference dataset for static analysis must be “open” Users must be able to access, critique and contribute Collaboration and contribution: –Need a community front end (interface for contributors), where peer review decides if a submitted piece of code is a vulnerability Reference dataset must be based upon a common enumeration of software weaknesses as defined by Mitre’s CWE

Products: Common Metrics for Software No “standard” code metrics are being used among source code scanners Hard to get agreement on “global” set of code metrics, because risk varies depending upon the local requirements Code metric must be multi-dimensional; no single scalar metric can measure software assurance

Products: Common Metrics for SwA Tools How “effective” is a tool? –How many “false positives” does it produce? –How many real flaws does it miss? –Should the metric be some combination of the above?

Initial SAMATE Work: SAMATE (Software Assurance Metrics and Tool Evaluation) project began work in 2005 –Initial kickoff meeting August 2005 Survey the State of the Art in SwA tools Classify SwA tools Choose a class of SwA tool to develop a functional specification Enlist volunteers to help: –Develop SwA Tool Functional Specifications –Contribute Test Cases for SwA Tools –Help define effectiveness metrics for SwA tools Over 50 members on the SAMATE list

Initial SAMATE Work (cont.): Follow-on SAMATE meeting in Long Beach November 2005 Paper presentations on the state of the art in SwA Tools –code and tool metrics, benchmarks “Target Practice” against contributed Test Cases –Test Case contributions from Fortify, Klocwork, MIT, Secure Software Inc. –Usability/validity of test cases (coverage, complexity, variation) was discussed –Required features of an online repository of SwA artifacts was discussed Discussion of what might constitute a “baseline” benchmark of test cases for source code analysis tools –set the bar “low” to start with –a mix of discreet and real world test cases is needed

Latest Work Currently developing a “baseline” functional specification for Source Code Analysis tools –Defining minimal functional requirements –Defining requirements for “optional” tool features –Defining a dictionary of terms What is a “weakness”, “false positive”, “control flow”, “inter-procedural analysis” …etc. –Linking functional tool requirements (finding weaknesses) to Mitre’s Common Weakness Enumeration CWECWE –Defining minimal code complexities that a tool should handle Continue work on an online SAMATE Reference Dataset (populate with test cases, and add usability features)

Source Code Scanner Requirements: The Tool Shall: SCA-RM-1: Identify any code weakness that is in the subset of the Common Weakness Enumeration list that apply to the coding language being analyzed ( listed in Appendix A) SCA-RM-2: Generate a text report identifying all weaknesses that it finds in a source code application SCA-RM-3: Identify a weakness by its proper CWE identifier SCA-RM-4: Specify the location of a weakness by providing the directory path, file name and line number SCA-RM-9: The tool shall be capable of detecting weaknesses that may exist within complex coding constructs (listed in Appendix B)

CWE Subset of Weaknesses for Source Code Analysis Tools (for test coverage) Location – Environment – Configuration – Code Source Code –Data Handling –API Abuse –Security Features –Time and State –Error Handling –Code Quality –Encapsulation Byte Code/Object Code Motivation/Intent Time of Introduction

Appendix B:Coding Constructs (for test complexity and variation) Initially based on MIT’s 22 C code constructs (Kratkiewicz, Lippman, MIT Lincoln Lab) –buffer (address, index,length/limit) complexity –obfuscation via container –local and secondary control flow –environmental dependencies –asynchrony –loop structure and complexity –memory (access type, location) –aliasing (pointer or variable) –tainted data (via input,file,socket,environment) –other (to be added) …

The coverage/complexity/variation “cube”of the SAMATE Reference Dataset CWE Coverage Code Complexity Variation

Test Case Coverage of CWE CWE is still “in progress”, but SAMATE is already aligning its specification and reference dataset terminology with it Coverage is based upon initial contributed tests by Klocwork (40), Fortify Software (80), MIT Lincoln Lab (1000) and Secure Software Inc. (20) NIST is supplementing this with other test cases to “fill in” coverage of the CWE A test suite for a “baseline benchmark” of source code analysis tools is the goal in populating the SRD (SAMATE Reference Dataset)

CWE Test Coverage Location Environment Configuration Code Source Code Data Handling Input Validation (PATH) Pathname Traversal and Equivalence Errors Injection Command Injection OS Command Injection (1 Fortify) Technology-Specific Input Validation Problems Output Validation Range Errors Buffer Errors OVER - Unbounded Transfer ('classic overflow') Stack overflow (43 Fortify, 1164 MIT, 1 Secure Software) Heap overflow (10 Fortify, 4 MIT, 1 Secure Software) Write-what-where condition (1 Secure Software) UNDER - Boundary beginning violation (1 Secure Software) READ - Out-of-bounds Read OREAD - Buffer over-read (1 MIT) Wrap-around error Unchecked array indexing LENCALC - Other length calculation error Miscalculated null termination (37 Fortify, 2 Secure Software) String Errors FORMAT - Format string vulnerability (7 Fortify, 1 Secure Software) Improper string length checking (1 Secure Software)

Type Errors Representation Errors (NUM) Numeric Errors OVERFLOW - Integer overflow (7 Fortify UNDERFLOW - Integer underflow Integer coercion error (1 Secure Software) (INFO) Information Management Errors LEAK - Information Leak (information disclosure) INT - Intended information leak (2 Fortify) API Abuse Often Misused: String Management (36 Fortify) Security Features Password Management Plaintext Storage (1 Secure Software) (CRYPTO) Cryptographic errors KEYMGT - Key Management Errors (1 Secure Software) (NUM) Numeric Errors OVERFLOW - Integer overflow (wrap or wraparound) UNDERFLOW - Integer underflow (wrap or wraparound) Integer coercion error (1 Secure Software) OBO - Off-by-one Error Sign extension error (1 Secure Software) Signed to unsigned conversion error Unsigned to signed conversion error (1 Secure Software) TRUNC - Numeric truncation error (1 Secure Software) BYTEORD - Numeric Byte Ordering Error Security Features CWE Test Coverage (cont.)

Time and State (RACE) Race Conditions SIGNAL - Signal handler race condition (1 Secure Software) Race condition in switch (1 Secure Software) TOCTOU - Time-of-check Time-of-use race condition (2 Fortify) Code Quality (RES) Resource Management Errors MEMLEAK - Memory leak (6 Fortify, 8 Klocwork) Double Free (2 Fortify, 1 Secure Software) Use After Free (10 Klocwork, 1 Secure Software) Code Quality (INIT) Initialization and Cleanup Errors Uninitialized variable (8 Klocwork) Pointer Issues Illegal Pointer Value (15 Klocwork) Byte/Object Code Motivation/Intent Time of Introduction CWE Test Coverage (cont.)

A Sample Test Case (derived from MIT contribution) CWE = Code.Source Code.Range Errors.Stack Overflow.Buffer Errors.Over.Stack Overflow index complexity = constant, secondary control flow = if, loop structure = non-standard for, scope = inter-procedural local control flow = function pointer void function1(char *buf) { /* BAD */ buf[10] = 'A'; } int main(int argc, char *argv[]) { void (*fptr)(char *); int test_value; int inc_value; int loop_counter; char buf[10]; test_value = 10; inc_value = 10 - (10 - 1); for(loop_counter = 0; ; loop_counter += inc_value) { if (loop_counter > test_value) break; fptr = function1; fptr(buf); } return 0; }

Opportunities for Collaboration between NKU and SAMATE Static Analysis Summit, June 29, 2006 at NIST –What is possible with today's techniques? –What is NOT possible today? –Where are the gaps that further research might fill? –What is the minimum performance bar for a source code analyzer? –Vetting of the draft SAMATE Source Code Analysis Specification Contributions to and use of the SRD –Test cases are needed to “fill in the coverage cube” –Studies/papers done using the SRD content

Contact Paul Black – SAMATE project leader at:

References K. Kratkiewicz, R.Lippman, “A Taxonomy of Buffer Overflows for Evaluating Static and Dynamic Software Testing Tools”, ASE 2005