Application Security Testing How to find software vulnerabilities before you ship or procure code



Similar documents
Code Dx: Visual analytics for triage of source code vulnerabilities

Integrating Application Security into the Mobile Software Development Lifecycle. WhiteHat Security Paper

Mean Time to Fix (MTTF) IT Risk s Dirty Little Secret Joe Krull, CPP, CISSP, IAM, CISA, A.Inst.ISP, CRISC, CIPP

How to start a software security initiative within your organization: a maturity based and metrics driven approach OWASP

Protect Your Organization With the Certification That Maps to a Master s-level Education in Software Assurance

A Strategic Approach to Web Application Security The importance of a secure software development lifecycle

WHITEPAPER. Nessus Exploit Integration

Streamlining Application Vulnerability Management: Communication Between Development and Security Teams

Adobe Systems Incorporated

Six Essential Elements of Web Application Security. Cost Effective Strategies for Defending Your Business

Black Box versus White Box: Different App Testing Strategies John B. Dickson, CISSP

Development. Resilient Software. Secure and. Mark S. Merkow Lakshmikanth Raghavan. CRC Press. Taylor& Francis Croup. Taylor St Francis Group,

SAST, DAST and Vulnerability Assessments, = 4

Reducing Application Vulnerabilities by Security Engineering

Enterprise Application Security Program

Web application security: automated scanning versus manual penetration testing.

WebGoat for testing your Application Security tools

ensuring security the way how we do it

HP ESP Partner Enablement Fortify Proof of Concept Boot Camp Training

Creating Stronger, Safer, Web Facing Code. JPL IT Security Mary Rivera June 17, 2011

elearning for Secure Application Development

The Top Web Application Attacks: Are you vulnerable?

Software Development: The Next Security Frontier

The Web AppSec How-to: The Defenders Toolbox

SAFECode Security Development Lifecycle (SDL)

MANAGED SECURITY TESTING

Learning objectives for today s session

Development Testing for Agile Environments

IBM Rational AppScan: Application security and risk management

PCI-DSS and Application Security Achieving PCI DSS Compliance with Seeker

white SECURITY TESTING WHITE PAPER

White Paper. Guide to PCI Application Security Compliance for Merchants and Service Providers

How To Ensure That Your Computer System Is Safe

Web application testing

A Strategic Approach to Web Application Security

HP Fortify application security

From the Bottom to the Top: The Evolution of Application Monitoring

How To Check Code Coverage In A Black Box Test

Secure Code Development

HP Application Security Center

D. Best Practices D.1. Assurance The 5 th A

Integrating Tools Into the SDLC

Secure in 2010? Broken in 2011!

BUILDING AN OFFENSIVE SECURITY PROGRAM BUILDING AN OFFENSIVE SECURITY PROGRAM

How to achieve PCI DSS Compliance with Checkmarx Source Code Analysis

Magento Security and Vulnerabilities. Roman Stepanov

OWASP Top Ten Tools and Tactics

Network Security Audit. Vulnerability Assessment (VA)

TOOL EVALUATION REPORT: FORTIFY

Is your software secure?

HP Fortify Application Security Lucas v. Stockhausen PreSales Manager HP Fortify EMEA Enterprise Security

White Paper. Automating Your Code Review: Moving to a SaaS Model for Application Security

DFW INTERNATIONAL AIRPORT STANDARD OPERATING PROCEDURE (SOP)

Passing PCI Compliance How to Address the Application Security Mandates

HP Fortify Software Security Center

Introduction to Web Application Security. Microsoft CSO Roundtable Houston, TX. September 13 th, 2006

Secure in 2010? Broken in 2011! Matias Madou, PhD Principal Security Researcher

DEVELOPING SECURE SOFTWARE

FINAL DoIT v.4 PAYMENT CARD INDUSTRY DATA SECURITY STANDARDS APPLICATION DEVELOPMENT AND MAINTENANCE PROCEDURES

The AppSec How-To: Achieving Security in DevOps

Microsoft Security Development Lifecycle for IT. Rob Labbé Application Consulting and Engineering Services

Software security specification and verification

Bringing Security Testing to Development. How to Enable Developers to Act as Security Experts

Survey on Application Security Programs and Practices

Threat Modeling/ Security Testing. Tarun Banga, Adobe 1. Agenda

1000 Projects later. Security Code Scans at SAP

Software & Supply Chain Assurance: Mitigating Risks Attributable to Exploitable ICT / Software Products and Processes

Kenna Platform Security. A technical overview of the comprehensive security measures Kenna uses to protect your data

How To Protect Your Data From Attack

IMPROVING VULNERABILITY MANAGEMENT EFFECTIVENESS WITH APPLICATION SECURITY MONITORING

Detecting and Exploiting XSS with Xenotix XSS Exploit Framework

Juniper Networks Secure

Real-time hybrid analysis:

Starting your Software Security Assurance Program. May 21, 2015 ITARC, Stockholm, Sweden

Development Processes (Lecture outline)

Attack Vector Detail Report Atlassian

WEB SECURITY CONCERNS THAT WEB VULNERABILITY SCANNING CAN IDENTIFY

Securing Your Web Application against security vulnerabilities. Ong Khai Wei, IT Specialist, Development Tools (Rational) IBM Software Group

Detecting Web Application Vulnerabilities Using Open Source Means. OWASP 3rd Free / Libre / Open Source Software (FLOSS) Conference 27/5/2008

Security Testing of Java web applications Using Static Bytecode Analysis of Deployed Applications

Transcription:

Application Security Testing How to find software vulnerabilities before you ship or procure code Anita D Amico, Ph.D. Hassan Radwan 1

Overview Why Care About Application Security? Quality vs Security Application Security Techniques Manual Code Reviews Static Application Security Testing Dynamic Application Security Testing How to Incorporate Application Security into Your Organization 2

About Code Dx, Inc. DHS goal: Secure the software supply chain DHS funded Secure Decisions to develop innovative technologies to improve and expand security testing of software applications. Led to new open source and commercial solutions; formation of new company Code Dx, Inc. Co-organizer for OWASP Long Island chapter Based in Northport & Clifton Park, NY See http://securedecisions.com for more cybersecurity innovations. 3

Developers of freely available community resources Code-Pulse.com CWEvis.org in https://continuousassurance.org 5

Why Care About Application Security? 6

Data Breaches Impact 350 million accounts impacted Annual global cost of cybercrime is > $400 b Net Losses: Estimating the Global Cost of Cybercrime, Center for Strategic and International Studies, June 2014 7

Web App Attacks: A favorite method of organized crime This year, organized crime became the most frequently seen threat actor for Web App Attacks. Verizon Data Breach Report 2015 Web Applications are used to perpetrate 31% of breaches into Financial Services 8 8

Software flaws are at root of most cyber incidents 90% of security incidents result from exploits against defects in software Build Security In Website, DHS https://buildsecurityin.us-cert.gov/bsi/mission.html Bug Bounties Google pays white hat hackers up to $20k to find vulnerabilities in its Web browser, before attackers do Microsoft offers as much as $150k 9

YOU RE NOT AS SECURE AS YOU MAY THINK! 11

Quality vs Security 12

Example Quality and Security Issues Example Quality Issues Confusing code Performance issues Concurrency issues Example Security Issues SQL Injection Cross-site scripting (XSS) Cross-site request forgery (CSRF) Memory leaks Null pointer Redundant & dead code Buffer overflows Using hard coded passwords Sensitive data exposure 13

Quality is Security Quality and security are closely intertwined 2011 Firefox study found that 82% of vulnerable source files were also faulty files Software Engineering Institute in 2014 study concluded that: Over half of security vulnerabilities are also quality defects There is a direct correlation between the number of quality defects in a system and the number of security vulnerabilities 14

QUALITY SECURITY QUALITY CODE LEADS TO MORE SECURE CODE 15

Application Security Testing Techniques 16

Application Security Testing Techniques Manual code reviews Static Application Security Testing (SAST) Dynamic Application Security Testing (DAST) 17

Code Reviews Established practice for improved code quality Beneficial to both quality and security Useful to detect fundamental structural flaws Certain security issues can only be detected via manual reviews 18

Static Application Security Testing (SAST) Automated Statically scans source or binary files Detect potential vulnerabilities Potential vulnerabilities need manual verification Many SAST tools available, open source & commercial Dependency checking for known vulnerabilities 19

SAST Workflow 1. Input selection, source and/or binary files 2. SAST tools scan input files 3. SAST tools present list of potential vulnerabilities 4. Manual potential vulnerability triage 5. Remediation of confirmed vulnerabilities 20

Typical SAST result listing with filtering workflow 21

Typical detailed view with source listing and remediation guidance 22

Dynamic Application Security Testing (DAST) Application penetration testing Manual and/or Automated Dynamically scan application at runtime Attempt to penetrate an application by detecting and exploiting vulnerabilities Typically performed in the run up to releases Many DAST tools available, open source & commercial OWASP ZAP 23

DAST Workflow 1. Application staging 2. DAST tools manually/automatically tuned to identify the attack surface 3. DAST tools perform active probing for vulnerabilities 4. Identified vulnerabilities reported 5. Remediation of vulnerabilities 24

Typical DAST scanning screen 25

Typical detailed view with remediation guidance 26

How to Incorporate Application Security into Your Organization 27

Before you Test: SDLC Application security cannot be a final after-thought Incorporate security into all aspects of the SDLC Learn from the processes that are out there OpenSAMM, BSIMM, Microsoft Security DLC Source: Microsoft Security Development Lifecycle SAST + Code Reviews 28

Test Early, Fix Early 29

Before you Test: Educate Stakeholders and development teams need to see value in application security: Pay now or pay more later Integrate application security tools into the developers IDEs Many resources available to offer guidance 30

Best practice: Use multiple static analysis tools and combine results Different tools identify different problems D A C B One tool on average detects 14% weaknesses Kris Britton and Chuck Willis, Sticking to the Facts: Scientific Study of Static Analysis Tools, Sept 2011: http://vimeo.com/32421617 Non-overlap: Hits reported by one tool and no others (84%) Overlap: Hits reported by more than one tool (16%) 2 tools 3 tools 4 tools All 5 tools Paul E. Black, Evaluating Static Analysis Tools, 8 July 2009: http://samate.nist.gov/docs/eval_sa_tools_mit_ll_july_2009.ppt 31

Use software vulnerability management system to combine/normalize multiple results <BugInstance type="np_null_on_some_path" priority="1" abbrev="np" category="correctness"> <Class classname="com.securedecisions.tva.model.linksettransform.linksetaggregator"> <SourceLine classname="com.securedecisions.tva.model.linksettransform.linksetaggregator" start="58" end="670" sourcefile="linksetaggregator.java" sourcepath="com/securedecisions/tva/model/linksettransform/linksetaggregator.java"/> FindBugs Output </Class> <Method classname="com.securedecisions.tva.model.linksettransform.linksetaggregator" name="createfromexploit" signature="(lcom/securedecisions/tva/model/xml/ag/linkdocument$link;lcom/securedecisions/tva/model/xml/pdag/protectiondomaindocument$protectiondomain;z)lcom/securedecisions/tva/m odel/xml/pdag/exploitdocument$exploit;" isstatic="false"> <SourceLine classname="com.securedecisions.tva.model.linksettransform.linksetaggregator" start="540" end="563" startbytecode="0" endbytecode="479" sourcefile="linksetaggregator.java" sourcepath="com/securedecisions/tva/model/linksettransform/linksetaggregator.java"/> </Method> <LocalVariable name="machine" register="5" pc="124" role="local_variable_value_of"/> <SourceLine classname="com.securedecisions.tva.model.linksettransform.linksetaggregator" Tool A Tool B start="550" end="550" Tool startbytecode="125" C endbytecode="125" Tool D sourcefile="linksetaggregator.java" sourcepath="com/securedecisions/tva/model/linksettransform/linksetaggregator.java" role="source_line_deref"/> <SourceLine classname="com.securedecisions.tva.model.linksettransform.linksetaggregator" start="549" end="549" startbytecode="85" endbytecode="85" sourcefile="linksetaggregator.java" sourcepath="com/securedecisions/tva/model/linksettransform/linksetaggregator.java" role="source_line_known_null"/> </BugInstance> ndlerequest" namespace="org.owasp.webgoat.lessons.crosssitescripting" enclosingclass="crosssitescripting"/> <Vulnerability> <ClassInfo> <ClassID>FE4EADF2-7055-4C36-863E-5A01C4A0E1A4</ClassID> <Kingdom>Encapsulation</Kingdom> <Type>System Information Leak</Type> <AnalyzerName>semantic</AnalyzerName> <DefaultSeverity>3.0</DefaultSeverity> </ClassInfo> <InstanceInfo> <InstanceID>0010C1C949B6B1146790E9BA51866F0D</InstanceID> <InstanceSeverity>3.0</InstanceSeverity> <Confidence>5.0</Confidence> working with different tool vendors Fortify isoutput a confusing and challenging and time-consuming process: the engines work differently, which is good since they catch different types of problems </InstanceInfo> <AnalysisInfo> <Unified> <Context> http://swreflections.blogspot.com/2009_04_01_archive.html <Function name="handlerequest" namespace="org.owasp.webgoat.lessons.crosssitescripting" enclosingclass="crosssitescripting"/> <FunctionDeclarationSourceLocation path="java/org/owasp/webgoat/lessons/crosssitescripting/crosssitescripting.java" line="234" lineend="296" colstart="2" colend="0"/> </Context> <ReplacementDefinitions> Jim Bird, Building Real Software 32

Best practice: Tune DAST pen testing tools to maximize code coverage 1 st scan 2 nd scan Tuning DAST tools improves amount of code covered when penetration testing applications Code coverage illustration prepared using OWASP Code Pulse Code-Pulse.com 3 rd scan 33

Recommendations Adopt all three techniques in limited doses initially Manual Static Application Security Testing (SAST) Dynamic Application Security Testing (DAST) Use a vulnerability management system to combine and normalize results of different techniques Examples: Code Dx, Thread Fix, Risk I/O Don t get overwhelmed, focus on a subset of the initial findings Example: Filter weaknesses to focus only on OWASP Top Ten ( https://www.owasp.org/index.php/category:owasp_top_ten_project#tab=owasp_top_10_for_2013 ) Integrate the tooling into your SDLC 34

Anita D Amico anita.damico@codedx.com @AnitaDamico Hassan Radwan hassan.radwan@codedx.com @leradwan 35