SCAM 2008 - Beijing (China)1 The Evolution and Decay of Statically Detected Source Code Vulnerabilities Massimiliano Di Penta Luigi Cerulo Lerina Aversano.

Slides:



Advertisements
Similar presentations
Configuration management
Advertisements

Lectures on File Management
PROJECT RISK MANAGEMENT
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
An Empirical Study of the Reliability in UNIX Utilities Barton Miller Lars Fredriksen Brysn So Presented by Liping Cai.
Automated Software Testing: Test Execution and Review Amritha Muralidharan (axm16u)
Software Quality Assurance Plan
Creating Stronger, Safer, Web Facing Code JPL IT Security Mary Rivera June 17, 2011.
Critical Systems Validation CIS 376 Bruce R. Maxim UM-Dearborn.
Gray, the New Black Gray-Box Web Vulnerability Testing Brian Chess Founder / Chief Scientist Fortify Software, an HP Company June 22, 2011.
CMSC 414 Computer and Network Security Lecture 22 Jonathan Katz.
Using Programmer-Written Compiler Extensions to Catch Security Holes Authors: Ken Ashcraft and Dawson Engler Presented by : Hong Chen CS590F 2/7/2007.
Static code check – Klocwork
Testing Without Executing the Code Pavlina Koleva Junior QA Engineer WinCore Telerik QA Academy Telerik QA Academy.
CMSC 414 Computer and Network Security Lecture 24 Jonathan Katz.
SOFTWARE SECURITY JORINA VAN MALSEN 1 FLAX: Systematic Discovery of Client-Side Validation Vulnerabilities in Rich Web Applications.
Improving Network Applications Security: a New Heuristic to Generate Stress Testing Data Presented by Conrad Pack Del Grosso et al.
Parameterizing Random Test Data According to Equivalence Classes Chris Murphy, Gail Kaiser, Marta Arias Columbia University.
(c) 2007 Mauro Pezzè & Michal Young Ch 1, slide 1 Software Test and Analysis in a Nutshell.
BUILDING A SECURE STANDARD LIBRARY Information Assurance Project I MN Tajuddin hj. Tappe Supervisor Mdm. Rasimah Che Mohd Yusoff ASP.NET TECHNOLOGY.
Lecture 17 Software Security
Leveraging User Interactions for In-Depth Testing of Web Application Sean McAllister Secure System Lab, Technical University Vienna, Austria Engin Kirda.
Automatic Creation of SQL Injection and Cross-Site Scripting Attacks 2nd-order XSS attacks 1st-order XSS attacks SQLI attacks Adam Kiezun, Philip J. Guo,
Introduction to Network Defense
Software Dependability CIS 376 Bruce R. Maxim UM-Dearborn.
OOSE 01/17 Institute of Computer Science and Information Engineering, National Cheng Kung University Member:Q 薛弘志 P 蔡文豪 F 周詩御.
Secure Software Development Mini Zeng University of Alabama in Huntsville 1.
Introduction to Systems Analysis and Design Trisha Cummings.
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
Web Application Access to Databases. Logistics Test 2: May 1 st (24 hours) Extra office hours: Friday 2:30 – 4:00 pm Tuesday May 5 th – you can review.
Layered Approach using Conditional Random Fields For Intrusion Detection.
Preventing SQL Injection Attacks in Stored Procedures Alex Hertz Chris Daiello CAP6135Dr. Cliff Zou University of Central Florida March 19, 2009.
Software Inspection A basic tool for defect removal A basic tool for defect removal Urgent need for QA and removal can be supported by inspection Urgent.
Software Reliability SEG3202 N. El Kadri.
Computer Security and Penetration Testing
OSI and TCP/IP Models And Some Vulnerabilities AfNOG th May 2011 – 10 th June 2011 Tanzania By Marcus K. G. Adomey.
CSC-682 Cryptography & Computer Security Sound and Precise Analysis of Web Applications for Injection Vulnerabilities Pompi Rotaru Based on an article.
Watching Software Run Brian ChessNov 18, Success is foreseeing failure. – Henry Petroski.
1 Vulnerability Assessment of Grid Software James A. Kupsch Computer Sciences Department University of Wisconsin Condor Week 2007 May 2, 2007.
An Ad Hoc Writable Rule Language for White-Box Security Scanners Author:Sebastian Schinzel Referent:Prof. Dr. Alexander del Pino Korreferent:Prof. Dr.
Software Testing Yonsei University 2 nd Semester, 2014 Woo-Cheol Kim.
Systems II San Pham CS /20/03. Topics Operating Systems Resource Management – Process Management – CPU Scheduling – Deadlock Protection/Security.
CSCE 548 Secure Software Development Taxonomy of Coding Errors.
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.
Input Validation – common associated risks  ______________ user input controls SQL statements ultimately executed by a database server
Static Analysis James Walden Northern Kentucky University.
Security (Keep your site secure at extension level) Sergey Gorstka Fastw3b.
Lecture 16 Page 1 CS 236 Online Web Security CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
PwC New Technologies New Risks. PricewaterhouseCoopers Technology and Security Evolution Mainframe Technology –Single host –Limited Trusted users Security.
Examination of the Interplay of Reliability and Security using System Modeling Language (SysML). By Venkateswara Reddy Tallapu.
+ Moving Targets: Security and Rapid-Release in Firefox Presented by Carlos Bernal-Cárdenas.
Module: Software Engineering of Web Applications Chapter 3 (Cont.): user-input-validation testing of web applications 1.
Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software Paper by: James Newsome and Dawn Song.
EECS 354: Network Security Group Members: Patrick Wong Eric Chan Shira Schneidman Web Attacks Project: Detecting XSS and SQL Injection Vulnerabilities.
Security Attacks Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
SANS Top 25 Most Dangerous Programming Errors Catagory 1: Insecure Interaction Between Components These weaknesses are related to insecure ways.
Example – SQL Injection MySQL & PHP code: // The next instruction prompts the user is to supply an ID $personID = getIDstringFromUser(); $sqlQuery = "SELECT.
By Ramesh Mannava.  Overview  Introduction  10 secure software engineering topics  Agile development with security development activities  Conclusion.
Chapter 11 Software Security. Many vulnerabilities result from poor programming practices Consequence from insufficient checking and validation of data.
A Framework For Trusted Instruction Execution Via Basic Block Signature Verification Milena Milenković, Aleksandar Milenković, and Emil Jovanov Electrical.
Memory Protection through Dynamic Access Control Kun Zhang, Tao Zhang and Santosh Pande College of Computing Georgia Institute of Technology.
DOWeR Detecting Outliers in Web Service Requests Master’s Presentation of Christian Blass.
Chapter 25 – Configuration Management 1Chapter 25 Configuration management.
Web Application Security
Configuration Management
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
Web Application Security
Introduction to Systems Analysis and Design
Software Security Slide Set #10 Textbook Chapter 11 Clicker Questions
What Does it Mean to Get Gold in CII Badging?
Presentation transcript:

SCAM Beijing (China)1 The Evolution and Decay of Statically Detected Source Code Vulnerabilities Massimiliano Di Penta Luigi Cerulo Lerina Aversano RCOST – Dept. Of Engineering University of Sannio, Benevento (Italy)

SCAM Beijing (China)2 Motivations Vulnerable instructions in the source code are crucial problem for maintainers – Buffer overflows, SQL injections, cross-site scripting (XSS) – CERT reported buffer overflows as the major cause of software attacks – XSS attacks are now increasing and becoming predominant Existing approaches aim at testing them [Del Grosso et al., GECCO’05, COR’08] or protecting them [Wang et al., WCRE’05] Properly monitoring (and removal when needed) highly desirable to ensure security and reliability Static vulnerability detection tools exist Vulnerability maintenance not yet investigated – A related study was done for compiler warnings [Kim and Ernst, ESEC-FSE’07]

SCAM Beijing (China)3 Vulnerabilities we study Inspired from Krsul PhD Thesis  INPUT VALIDATION: concerns the incorrect validation of input data  XSS (XSS), SQL Injection (SQL), Command Injection (CI), File System Vulnerabilities (FS), Network Vulnerabilities (Net)  MEMORY SAFETY: concerns vulnerabilities dealing with memory access and allocation.  Buffer Overflow (BO), Input Allocation Problem (I), Type Mismatch (TM), Memory Access Problem (M)  RACE/CONTROL FLOW CONDITIONS: arise when separate processes or threads of execution depend on some shared state.  Race Check (RC), Control Flow Problem (CF)  OTHERS:  Dead Code (DC), Random Number Generators (RND)  Important Note: we study vulnerabilities as detected by static analysis tools (Splint, Rats, Pixy)  Same assumptions of Kim and Ernst  Further validation might be necessary

SCAM Beijing (China)4 Evolution Study  Goal: study the evolution of statically detected vulnerabilities with the purpose of determining their density trend and their permanence in the system. Quality focus: security and reliability.  Context: three network applications:  Squid: Web caching proxy (C)  Samba: file sharing and print service (C)  Horde: Web application framework including a Web mail (PHP)  Research Questions:  RQ1: How does the vulnerability density vary over the time?  RQ2: Are there vulnerability categories that tend to disappear quicker? – They can disappear because of (co-changes, changes, code removal)  RQ3: How can we model the vulnerability decay process?  Vulnerabilities detected using three different static analysis tools  Splint (flow analysis - C)  RATS (pattern-matching detector – C, PHP, other languages)  Pixy (XSS detector - PHP)

SCAM Beijing (China)5 Analysis process  Step 1: CVS/SVN Snapshots extraction and change set (snapshot) identification  Sequences of commits (same note and author) having a distance < 200 s  Step 2: Tracing source code line changes  Using the ldiff algorithm and tool [Canfora et al. MSR 2007]  Overcomes limitations of Unix diff to distinguish changes from add and del  Step 3: Identifying vulnerabilities in each snapshots  Step 4: Analyzing vulnerability lifetime (using Step 2 info)  When it is introduced  When it disappears (not detected anymore)  Change to vulnerable code and co-change

SCAM Beijing (China)6 RQ1: Evolution of vulnerability density Splint vulnerabilities tend to have a lower density (thorough analysis) Initially, a high number vulnerabilities detected by RATS – Pre-release, then vulnerabilities removed by security patches No trend detected (ADF test) Samba - Overall Squid – Buffer Overflows Buffer Overflows introduced at release 2.3 STABLE3 Then removed in the subsequent releases 2.4STABLE7 and 2.5STABLE7 with proper security patches – As documented in the system history

SCAM Beijing (China)7 RQ2: Vulnerability Decay Buffer Overflows tend to disappear significantly quicker than most of other vulnerabilities (M-W test) Vulnerability Decay in Squid Vulnerability Decay in Samba File System vulnerabilities the quickest to be fixed – Samba domain: sharing files and printers

SCAM Beijing (China)8 RQ3: Decay CDF Vulnerability decay distributed fitted Exponential or Weibull distributions in many cases – Distribution built using a Maximum Likelihood Estimator – Fitting tested using the Kolmogorov-Smirnov test Samba – Buffer Overflow CDF The likelihood a vulnerability has to disappear from the system exponentially decreases with the time. Samba – Control Flow Problem CDF Weibull (exp for k=1)

SCAM Beijing (China)9 Threats to validity  Construct validity (relationship between theory and observation)  Tools can exhibit false positives or false negatives  As said for now we focused on vulnerabilities “as detected”  Vulnerabilities can be removed “accidentally”  Reliability validity (can I replicate your study?)  Tools available (including ldiff)  Data extraction and analysis method fully detailed  Systems available  External validity (generalization of findings)  We analyzed 3 different systems  Further studies necessary  Also with more focus on XSS and SQL-injection

SCAM Beijing (China)10 Conclusions  We performed a fine-grained analysis on the evolution of statically detected source code vulnerabilities  Main insights:  Vulnerability density is often stationary  Often vulnerabilities introduced in pre-releases, then fixed with security patches  Vulnerability removal priority might depend on the particular harmfulness of the vulnerability – Different from system to system  Vulnerability decay can be modeled with Weibull/exponential distributions  A potential vulnerability surviving for a long time is unlikely to be removed – Perhaps because it is not dangerous  Work in progress:  Better validation (these are vulnerabilities as detected)  Further analyses on the cause of vulnerability removal

SCAM Beijing (China)11 A (potential) vulnerability remains in the system for a long time. Does this mean it is not dangerous? Thank you!