• No results found

Gold Standard Benchmark for Static Source Code Analyzers

N/A
N/A
Protected

Academic year: 2021

Share "Gold Standard Benchmark for Static Source Code Analyzers"

Copied!
19
0
0

Loading.... (view fulltext now)

Full text

(1)

CYBER SECURITY DIVISION

2013 PRINCIPAL INVESTIGATORS’

Gold Standard Benchmark for Static

Source Code Analyzers

Kestrel Technology, LLC

Dr. Henny B. Sipma

(2)

Kestrel Technology

9/12/2013 CYBER SECURITY DIVISION 2013 PRINCIPAL INVESTIGATORS’ MEETING 1 1

Core activity:

Tool: CodeHawk

Languages supported: C, Java, x86 executables

Underlying technology: Abstract interpretation (Cousot,Cousot, 1977)

C: Language-level properties: memory safety, null-dereference

(application-independent, mathematically well-defined properties)

Java: Information flow analysis, resource analysis, integer overflow, error handling X86: Memory safety, information extraction

Founded: 2000

Location: Palo Alto, CA

Sound static analysis (mathematical proof of safety)

(3)

Software infrastructure:

A need for software security metrics

9/12/2013 CYBER SECURITY DIVISION 2013 PRINCIPAL INVESTIGATORS’ MEETING 2

Cement is everywhere. Our very lives depend on cement, yet we don't worry about it: such is the legacy of Joseph Bazalgette, who introduced

measurement and strict quality controls

Like cement, software is everywhere: our very lives are becoming more and more dependent on software.

Unlike cement, for more than 50 years

software has been continuously released and added to the national infrastructure, plagued by design and implementation defects that were largely detectable and preventable, but were not. Why not?

not safe from continuous attacks from all over the world

Physically safe in the largest buildings, but …

(4)

Customer Need

9/12/2013 CYBER SECURITY DIVISION 2013 PRINCIPAL INVESTIGATORS’ MEETING 3

We need the ability to

measure the effectiveness

of the tools that are

used for software assurance

We need the ability to measure software quality

in terms of

False positives:

bugs that turn out not to be bugs

False negatives:

bugs that are missed

(5)

Problems with measurement

9/12/2013 CYBER SECURITY DIVISION 2013 PRINCIPAL INVESTIGATORS’ MEETING 4

Did software get worse?

Did detection technology get better? Some combination of the two?

From the 2012 Coverity Scan Report (May 2013):

(number of defects per 1000 LOC)

What is the "real" number? What is a defect?

(6)

Compounding problem:

Economic incentives favor less assurance

9/12/2013 2013 DHS S&T/DoD ASD (R&E) CYBER SECURITY SBIR WORKSHOP 5 Tool A Tool B

false positives

false negatives

Reality

Customer sees

Tool A Tool B

(7)

Our Solution:

Measure memory-safety defects

9/12/2013 2013 DHS S&T/DoD ASD (R&E) CYBER SECURITY SBIR WORKSHOP 6

Define Defect

mathematical

definition

based on

• C standard semantics (37 cases of memory-related undefined behavior) • Semantic explication of C semantics by George Necula (Berkeley, 2002)

covers all of C plus gcc extensions

Measure Defects

mathematical

proof

based on

• Primary proof obligations (for all memory accesses and related instructions) • Sound static analysis to discharge proof obligations of safe memory accesses • Demonstrate vulnerability in remaining cases

(8)

Our Solution:

Measure memory-safety defects

9/12/2013 2013 DHS S&T/DoD ASD (R&E) CYBER SECURITY SBIR WORKSHOP 7

Define Defect

mathematical

definition

based on

• C standard semantics (37 cases of memory-related undefined behavior) • Semantic explication of C semantics by George Necula (Berkeley, 2002)

covers all of C plus gcc extensions

Measure Defects

mathematical

proof

based on

• Primary proof obligations (for all memory accesses and related instructions) • Sound static analysis to discharge proof obligations of safe memory accesses • Demonstrate vulnerability in remaining cases

(9)

Approach: Capability and Technology

9/12/2013 2013 DHS S&T/DoD ASD (R&E) CYBER SECURITY SBIR WORKSHOP 8

Kestrel Technology's Core Capability:

powerful and scalable, sound static analysis engine:

 based on theory of abstract interpretation (Cousot, Cousot 1977)

generates invariants (over-approximation of program behaviors for all possible inputs

Technology: Distributed Proof Structure

structural induction over the control flow graph of all functions  assume-guarantee reasoning based on

• function summaries (contracts) • data structure invariants

• global data invariants

 hierarchy of primary and secondary proof obligations

 local invariant generation

(10)

Apply to six benchmark programs

9/12/2013 2013 DHS S&T/DoD ASD (R&E) CYBER SECURITY SBIR WORKSHOP 9

lighttpd webserver designed and optimized for high-performance environments used by several popular websites, including

YouTube and Wikipedia 144 files 38 KLOC

nagios tool for IT-infrastructure monitoring with more than a million users, including Comcast, Philips, Siemens, Thales,

McAfee 73 files 65 KLOC

naim console chat client for AOL instant messaging (AIM) and internet relay chat (IRC) 44 files 23 KLOC

irssi terminal-based IRC client for UNIX systems 347 files 53 KLOC

pvm package that lets heterogeneous collections of Unix and Windows computers to be used as a single large parallel

computer, developed by Oak Ridge Nat'l Labs 320 files 72 KLOC

(11)

Apply to six benchmark programs

9/12/2013 2013 DHS S&T/DoD ASD (R&E) CYBER SECURITY SBIR WORKSHOP 10

lighttpd

(SATE 2008)

webserver designed and optimized for high-performance environments used by several popular websites, including

YouTube and Wikipedia 144 files 38 KLOC

nagios

(SATE 2008)

tool for IT-infrastructure monitoring with more than a million users, including Comcast, Philips, Siemens, Thales,

McAfee 73 files 65 KLOC

naim

(SATE 2008) console chat client for AOL instant messaging (AIM) and internet relay chat (IRC) 44 files 23 KLOC

irssi

(SATE 2009) terminal-based IRC client for UNIX systems 347 files 53 KLOC

pvm

(SATE 2009)

package that lets heterogeneous collections of Unix and Windows computers to be used as a single large parallel

computer, developed by Oak Ridge Nat'l Labs 320 files 72 KLOC

dovecot

(12)

Approach: Architecture

9/12/2013 CYBER SECURITY DIVISION 2013 PRINCIPAL INVESTIGATORS’ MEETING 11

Tool Report C program Interactive Proof Assistant Progress Monitor Scoring Tool 3rd party tool results CHCIL parser XML library function summaries linking units compilation units XML representation of code and proofs

(13)

Approach: Scoring tool

9/12/2013 CYBER SECURITY DIVISION 2013 PRINCIPAL INVESTIGATORS’ MEETING 12

Tool Report Scoring Tool 3rd party tool results XML representation of code and proofs Scoring Tool:

o Import results for all primary and secondary proof obligations

o Import 3rd party analysis tool results o Compare

o Establish correspondence and report

false negatives  false positives

 adequacy of bug placement

 Identify strengths and weaknesses of 3rd party analysis tool

XML representation of code and proofs XML representation of code and proofs Programs: o lighttpd o nagios o naim o irssi o pvm o dovecot on Apply to results from

any static analysis tool in the SWAMP

(14)

Benefit: Ability to grade tools

9/12/2013 CYBER SECURITY DIVISION 2013 PRINCIPAL INVESTIGATORS’ MEETING 13

Email client Webserver Network infra- structure Chat client Tool B Tool C Tool A results for A results for B results for C report card for A report card for B report card for C

(15)

Collaboration

(rather than Competition)

9/12/2013 CYBER SECURITY DIVISION 2013 PRINCIPAL INVESTIGATORS’ MEETING 14

Other government organizations:

NIST

(Dr. Paul E. Black)

Vendors of bug-finding tools:

Identify strengths and weaknesses in bug-finding tools

Improve bug-finding tools

(16)

Current Status: Accomplishments

9/12/2013 CYBER SECURITY DIVISION 2013 PRINCIPAL INVESTIGATORS’ MEETING 15

Theoretical foundations of memory-safety defect measurement

shared and discussed with Dr. Paul E. Black (NIST)

relationship to 27 CWE's

illustrative application to lighttpd

Software architecture and implementation (in progress)

xml representation of CIL semantic constructs

xml library function summaries

interactive proof assistant

progress monitor

Benchmark programs (in progress)

(17)

Schedule and Milestones

9/12/2013 2013 DHS S&T/DoD ASD (R&E) CYBER SECURITY SBIR WORKSHOP 16 XML representation of code and proofs XML representation of code and proofs XML representation of code and proofs IPA PM

Dec Mar June Sep

Sep lighttpd nagios naim irssi pvm dovecot Tool Report Scoring Tool

(18)

Technology Transition

8/713 CYBER SECURITY DIVISION 2013 PRINCIPAL INVESTIGATORS’ MEETING 17

SWAMP

XML C prog ram CHCIL Tool Report Scoring Tool

Ability to score and evaluate static analysis tools

Preprocessed programs to

 lower entry barrier for new tool developers

facilitate collaborative

(19)

Contact Information

9/12/2013 CYBER SECURITY DIVISION 2013 PRINCIPAL INVESTIGATORS’ MEETING 18

Team:

Henny Sipma, Principal Investigator

Rich Barry, Program Manager

Eric Bush

Arnaud Venet (Consultant)

Contact Information:

[email protected]

Kestrel Technology, LLC 3260 Hillview Ave

Palo Alto, CA 94304 tel. (650) 320 8487

References

Related documents

The case of OpenSSH server: Figure 1(a) depicts the average (over 15 attacks) number of copies of private keys found from the disclosed memory on the USB device,.. with respect to

Avon has selected Elavon as its preferred supplier for this service to Avon Representatives and if you decide to apply for MobileMerchant, you will deal with Elavon

Fixed costs were up by about NOK 60 million compared to the first quarter of 2008 mainly due to higher maintenance and salary costs and costs related the build up of

development of dedicated freight routes, longer, faster and heavier trains that are tailored to commercial needs and supported by spatial planning around development of modern

SERVPERF versus SERVQUAL: reconciling performance based and perceptions minus expectations measurement of service quality, Journal of Marketing, Vol.. Service quality measurement

The performers of these primordial, magical, and (later) sacred chants paid as much attention to the way tone was reached as to the tone itself — just as a true lover considers

Table 2 reports the segmentation performance produced by majority voting, joint label fusion using a single imaging modal- ity and joint label fusion using two imaging modalities

specification can include a template (between { } ) Post and Put operations can have a payload: The format of that payload can be specified in a @Consumes(<format>) annotation