White Box testing & Inspections

Slides:



Advertisements
Similar presentations
Test process essentials Riitta Viitamäki,
Advertisements

Testing and Quality Assurance
© 2008 All Right Reserved Fortify Software Inc. Hybrid 2.0 – In search of the holy grail… A Talk for OWASP BeNeLux by Roger Thornton Founder/CTO Fortify.
Engineering Secure Software. Does Security Even Matter?  At your table, introduce yourselves: Your name, degree, & app domain What is your favorite software.
Engineering Secure Software. The Power of Source Code  White box testing Testers have intimate knowledge of the specifications, design, Often done by.
Developer Testing and Debugging. Resources Code Complete by Steve McConnell Code Complete by Steve McConnell Safari Books Online Safari Books Online Google.
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
Testing and Debugging CS221 – 2/13/09. Airline Program.
1 Software Maintenance and Evolution CSSE 575: Session 8, Part 3 Predicting Bugs Steve Chenoweth Office Phone: (812) Cell: (937)
CS CS 5150 Software Engineering Lecture 21 Reliability 2.
Software Testing and Quality Assurance
Security Engineering II. Problem Sources 1.Requirements definitions, omissions, and mistakes 2.System design flaws 3.Hardware implementation flaws, such.
EE694v-Verification-Lect5-1- Lecture 5 - Verification Tools Automation improves the efficiency and reliability of the verification process Some tools,
Examining the Code [Reading assignment: Chapter 6, pp ]
Test Design Techniques
Securing Legacy Software SoBeNet User group meeting 25/06/2004.
Unit Testing & Defensive Programming. F-22 Raptor Fighter.
CSCE 548 Secure Software Development Risk-Based Security Testing.
Test Organization and Management
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
A Security Review Process for Existing Software Applications
Introduction Telerik Software Academy Software Quality Assurance.
CMSC 345 Fall 2000 Unit Testing. The testing process.
CSCE 548 Secure Software Development Test 1 Review.
Version 02U-1 Computer Security: Art and Science1 Penetration Testing by Brad Arkin Scott Stender and Gary McGraw.
Engineering Secure Software. A Ubiquitous Concern  You can make a security mistake at every step of the development lifecycle  Requirements that allow.
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 23 Reliability III.
From Quality Control to Quality Assurance…and Beyond Alan Page Microsoft.
CSCE 522 Secure Software Development Best Practices.
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.
Static Analysis James Walden Northern Kentucky University.
1 Test Selection for Result Inspection via Mining Predicate Rules Wujie Zheng
Code Reviews James Walden Northern Kentucky University.
(1) A beginners guide to testing Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu.
Architecture Analysis Techniques
CSCE 201 Secure Software Development Best Practices.
Software Quality Assurance and Testing Fazal Rehman Shamil.
T EST T OOLS U NIT VI This unit contains the overview of the test tools. Also prerequisites for applying these tools, tools selection and implementation.
DevCOP: A Software Certificate Management System for Eclipse Mark Sherriff and Laurie Williams North Carolina State University ISSRE ’06 November 10, 2006.
Engineering Secure Software. Does Security Even Matter?  Find two other people near you Introduce yourself What is your favorite software development.
Week # 4 Quality Assurance Software Quality Engineering 1.
What is a software? Computer Software, or just Software, is the collection of computer programs and related data that provide the instructions telling.
Steve Chenoweth Office Phone: (812) Cell: (937)
CSCE 548 Secure Software Development Risk-Based Security Testing
Security Testing Methods
Engineering Secure Software
Software Engineering (CSI 321)
Chapter 8 – Software Testing
Recall The Team Skills Analyzing the Problem
A Security Review Process for Existing Software Applications
CS5123 Software Validation and Quality Assurance
CSCE 548 Secure Software Development Test 1 Review
Speaker’s Name, SAP Month 00, 2017
Types of Testing Visit to more Learning Resources.
Engineering Secure Software
Software testing strategies 2
Engineering Secure Software
Engineering Secure Software
CS240: Advanced Programming Concepts
Engineering Secure Software
Automated test.
Applying Use Cases (Chapters 25,26)
Applying Use Cases (Chapters 25,26)
Engineering Secure Software
Engineering Secure Software
Engineering Secure Software
Improving Your Testing
Engineering Secure Software
08120: Programming 2: SoftwareTesting and Debugging
Presentation transcript:

White Box testing & Inspections Engineering Secure Software White Box testing & Inspections

The Power of Source Code White box testing Testers have intimate knowledge of the specifications, design, Often done by the original developers Security consultants often get source code access too Code Inspections aka “Technical Reviews”, “Code Reviews” Stepping through code with security in mind Test & inspect the threats Enumerated by abuse cases, threat models, architectural risks Defensive coding concerns Testing  Failure-finding technique Inspection  Fault-finding technique © 2011-2012 Andrew Meneely

What to test for? Test & inspect the security mitigations Bug in your mitigation  vulnerability Bug in your security feature  vulnerability Test for both types of vulnerabilities Low-level coding mistakes High-level design flaws Test at every scope Unit, integration, system Try to keep an equal effort emphasis on each Unit tests  bugs in mitigations & features Integration  interaction vulnerabilities

Who’s at the code inspection? Author Made significant contributions to the code recently Can answer any specific questions, or reveal blind spots People with readability, but objectivity e.g. close colleagues e.g. developer working on a similar feature on the same project, but different team e.g. system architect People experienced with security Consultants, if any Developers on previous vulnerabilities in this system

Make an Inspection Checklist What will you talk about? Keep a running checklist for the meeting Adapt the checklist for future inspection meetings At the meeting, briefly identify the following that are pertinent to this code Assets from risk analysis Threats from your threat models Malicious actors from your requirements Abuse and misuse cases from your requirements Walk through the functionality of the code Look for missing code more than wrong code “If they missed this, then they probably missed that”

More for the checklist Look for too much complexity Both structural and cognitive complexity Too much responsibility in one place Look for common defensive coding mistakes Look for opportunities to build security into the design e.g. repeated input validation? Make input validation the default e.g. file canonicalization is done all in one place e.g. using a third-party library

The Prioritization Problem What should we inspect? Can’t inspect everything Reacting to inspections can take some time Can be too repetitive Inspect what probably has vulnerabilities Three approaches: Code coverage – what have we not tested? Static analysis – what tools say is vulnerable Prediction – what history says is vulnerable

Code Coverage What has been executed as a result of our tests? e.g. have exceptions been tested? e.g. have we tested this input? Use a tool to record what code has been executed Levels: package, class, line, branch 80% is a common threshold for line coverage Benefits Reveals what testers forgot Relatively simple to deploy and execute Disadvantages Unit test coverage != well-tested (add system tests to your coverage!) Test coverage != security test coverage

eclEMMA EMMA for Eclipse Integration with IDE Connected to Junit Auto gen for statistics Auto color coding for coverage eclEMMA

Automated Static Analysis Analyzing code without executing it Manual static analysis == code inspection Think: sophisticated compiler warnings Automated Static Analysis tools Provide warnings of common coding mistakes Use a variety of methods Fancy grep searches Symbolic execution & model checking Data flow analysis Tools Non-security: FindBugs, PMD Security: Fortify, Coverity, JTest

ASA Benefits & Drawbacks Quick and easy Knowledge transfer from experts behind the tool Provides a specific context in the code to drive the discussion Drawbacks Huge false positive rates: >90% are FP in many cases Fault-finding  exploitable? Biased to code-level vulnerabilities Cannot possibly identify domain-specific risks Better for inspections than tests

Prediction-Based Prioritization Vulnerabilities are rare Typically, about 1% to 5% of source code files will require a post-release patch for a vulnerability Prediction is possible Good metrics Trained machine-learning models Many metrics are correlated with vulnerabilities Files with previous vulnerabilities Files with high code churn Files committed to by many developers e.g. 10+ developers coordinating on a single file? Improbable. Large files (==high cyclomatic complexity)