SlideShare ist ein Scribd-Unternehmen logo
1 von 48
Downloaden Sie, um offline zu lesen
Secure Programming
   with Static Analysis

  Brian Chess

brian@fortify.com
Software Systems that are
•  Ubiquitous
•  Connected
•  Dependable


                 Complexity


                              Unforeseen
                              Consequences
Software Security Today


 
   The line between secure/insecure is often subtle
    
   Many seemingly non-security decisions affect
       security
 
   Small problems can hurt a lot
 
   Smart people make dumb mistakes
    
   As a group, programmers tend to make the same
       security mistakes over and over
 
   We need non-experts to get security right
Success is foreseeing failure.
              – Henry Petroski
Non-functional Security Failures

 Generic Mistakes
   
   Input validation
   
   Memory safety (buffer overflow)
   
   Handling errors and exceptions
   
   Maintaining privacy

 Common Software Varieties
   
   Web applications
   
   Network services / SOA
   
   Privileged programs
Buffer Overflow


 MSDN sample code for function DirSpec:

int main(int argc, char *argv[]) {
  ...
  char DirSpec[MAX_PATH + 1];
  printf (quot;Target dir is %s.nquot;, argv[1]);
  strncpy (DirSpec, argv[1], strlen(argv[1])+1);
Cross-Site Scripting

 <c:if
    test=quot;${param.sayHello}quot;>
   Hello ${param.name}!
 </c:if>


 “We never intended the code that's in
  there to actually be production-
  ready code”
              - Ryan Asleson
Wrong Answers
     Try Harder                  Fix It Later            Test Your Way Out
                                                         •  Do a penetration test
                            •  Code as usual.
 • Our people are smart
                                                         on the final version.
                            •  Build a better firewall
 and work hard.
                                                         •  Scramble to patch
                            (app firewall, intrusion
 • Just tell them to stop
                                                         findings.
                            detection, etc.)
 making mistakes.

                                                           ________________
                              ________________
   ________________


                                                         • Pen testing is good for
                            • More walls don’t help
 • Not everyone is going
                                                         demonstrating the
                            when the software is
 to be a security expert.
                                                         problem.
                            meant to communicate.
 • Getting security right
                                                         • Doesn’t work for the
                            • Security team can’t
 requires feedback.
                                                         same reason you can’t
                            keep up.
                                                         test quality in.
Security in the Development Lifecycle
Security in the Development Lifecycle




  Plan                     Test           Field
              Build


                            •  Firewalls
                            •  Intrusion Detection
                            •  Penetration Testing
Security in the Development Lifecycle




  Plan                             Test            Field
                  Build


 •  Risk Assessment
 •  Code Review
 •  Security Testing

             Effective security from non-experts
Overview

         Introduction
 
    
         Static Analysis: The Big Picture
 
    
         Inside a Static Analysis Tool
 
    
         Static Analysis in Practice
 
    
         What Next?
 
    
         Parting Thoughts
 
    
Static Analysis: The Big Picture
Static Analysis Defined

 
   Analyze code without executing it
 
   Able to contemplate many more possibilities than
    you could execute with conventional testing
 
   Doesn’t know what your code is supposed to do
 
   Must be told what to look for
chainsaw
The Many Faces of Static Analysis

         Type checking
 
    
         Style checking
 
    
         Program understanding
 
    
         Program verification / Property checking
 
    
         Bug finding
 
    
         Security review
 
    
Why Static Analysis is Good for Security

         Fast compared to manual code review
 
    
         Fast compared to testing
 
    
         Complete, consistent coverage
 
    
         Brings security knowledge with it
 
    
         Makes review process easier for non-experts
 
    
Prehistoric static analysis tools




             RATS



                                    Flawfinder

                           ITS4
Prehistoric static analysis tools

 Glorified grep
 (+) Good
    
   Help security experts audit code
    
   A place to collect info about bad coding practices
 (-) Bad
    
   NOT BUG FINDERS
    
   Not helpful without security expertise



                                                 RATS

                                                               Flawfinder

                                                        ITS4
Advanced Static Analysis Tools: Prioritization


 int main(int argc, char* argv[]) {
     char buf1[1024];
     char buf2[1024];
     char* shortString = quot;a short stringquot;;
     strcpy(buf1, shortString); /* eh. */
     strcpy(buf2, argv[0]);     /* !!! */
     ...
What You Won’t Find

 
   Architecture errors
    
   Microscope vs. telescope
 
   Bugs you’re not looking for
    
   Bug categories must be predefined
 
   System administration mistakes
 
   User mistakes
Security vs. Quality

 
   Bug finding tools focus on high confidence results
    
   Bugs are cheap (plentiful)
    
   Bug patterns, bug idioms
    
   False alarms are killers
 
   Security tools focus on high risk results
    
   More human input required
    
   The bugs you miss are the killers
Inside a Static Analysis Tool
Under the Hood
Critical Attributes

 
   Analysis algorithms
    
   Uses the right techniques to find and prioritize issues
 
   Language support
    
   Understands the relevant languages/dialects
 
   Capacity
    
   Ability to gulp down millions of lines of code
 
   Rule set
    
   Modeling rules, security properties
 
   Results management
    
   Allow human to review results
    
   Prioritization of issues
    
   Control over what to report
Building a Model

 
   Front end looks a lot like a compiler
 
   Language support
    
   One language/compiler is straightforward
    
   Lots of combinations is harder
 
   Could analyze compiled code…
    
   Everybody has the binary
    
   No need to guess how the compiler works
    
   No need for rules
 
   …but
    
   Decompilation can be difficult
    
   Loss of context hurts. A lot.
    
   Remediation requires mapping to source anyway
Analysis Techniques


  
   Taint propagation
     
   Trace potentially tainted data through the
        program
     
   Report locations where an attacker could take
        advantage of a vulnerable function or construct
     buff = getInputFroNetwork();
     copyBuffer( newBuff, buff );
     exec( newBuff );         (command injection)

  
   Many other approaches, no one right answer
Only Two Ways to Go Wrong


   False positives
   
   Incomplete/inaccurate model
                                     The tool that
   
   Conservative analysis         cried “wolf!”
                                                       Missing a

   False negatives
                                                     detail can kill.
   
   Incomplete/inaccurate model
   
   Missing rules
   
   “Forgiving” analysis




                                                              Auditor
                               Developer
Rules
 
   Specify
    
   Security properties
    
   Behavior of library code

          buff = getInputFromNetwork();
          copyBuffer(newBuff, buff);
          exec(newBuff);

 
   Three rules to detect the vulnerability
 1) getInputFromNetwork() postcondition:
       return value is tainted
 2) copyBuffer(arg1, arg2) postcondition:
       arg1 array values set to arg2 array values
 3) exec(arg) precondition:
        arg must not be tainted
Displaying Results

 
   Must convince programmer that there’s a bug in the code
 
   Different interfaces for different scenarios:
    
   Security auditor parachutes in to 2M line program
    
   Programmer reviews own code                         Your Code
    
   Programmers share code review responsibilities        Sucks.
 
   Interface is just as important as analysis
                                                               OK
 
   Don’t show same bad result twice



                                           Bad interface
Static Analysis in Practice
Two Ways to Use the Tools


   Analyze completed programs
           Fancy penetration test. Bleah.
   
    
           Results can be overwhelming
   
    
           Most people have to start here
   
    
           Good motivator
   
    



   Analyze as you write code
   
   Run as part of build
   
   Nightly/weekly/milestone
   
   Fix as you go
Typical Objections and Their True Meanings

            Objection                          Translation
“It takes too long to run.”         “I think security is optional, so I
                                    don’t want to do it.”

“It has too many false positives.” “I think security is optional, so I
                                   don’t want to do it.”

“It doesn’t fit with the way I      “I think security is optional, so I
work.”                              don’t want to do it.”
Metrics


   ?? Defect Density  Vulnerability Density ??

   NOT A GOOD RISK BAROMETER

   Good for answering questions such as
   
   Which bugs do we write most often?
   
   How much remediation effort is required?
Adopting a Static Analysis Tool

 1) Some culture change required
    
   More than just another tool
    
   Often carries the banner for software security
    
   Pitfall: the tool doesn’t solve the problem by itself

 2) Go for the throat
    
   Tools detect lots of stuff. Turn most of it off.
    
   Focus on easy-to-understand, highly relevant problems.
 3) Do training up front
    
   Software security training is paramount
    
   Tool training is helpful too
Adopting a Static Analysis Tool

  4) Measure the outcome
    
   Keep track of tool findings
    
   Keep track of outcome (issues fixed)

  5) Make it your own
    
   Invest in customization
    
   Map tool against internal security standards.
        
   The tools reinforce coding guidelines
        
   Coding guidelines are written with automated checking in mind


 6) The first time around is the worst
    
   Budget 2x typical cycle cost
    
   Typical numbers: 10% of time for security, 20% for the
       first time
What Next?
Seven Pernicious Kingdoms

 
   Catalog, define, and categorize common mistakes
 
   http://www.fortify.com/vulncat




                                
   Error handling
     
   Input validation and
        representation          
   Code quality
     
   API abuse              
   Encapsulation
     
   Security features
                                * Environment
     
   Time and state
Finding Bugs, Making Friends


   Sponsor open source project FindBugs
  
   Quality-oriented bug finding for Java

   Academic program
  
   Free Fortify Source Code Analysis licenses
     for .edu

   Java Open Review
  
   http://opensource.fortifysoftware.com

   Support electronic voting machine review
  
   California
  
   Florida
  
   more to come!
Security Testing

 
   Most widely used security testing techniques are
    about controllability
    
   Fuzzing (random input)
    
   Shooting dirty data (input that often causes trouble)
 
   A different take: improve observability
    
   Instrument code to observe runtime behavior:
               Fortify Tracer
 
   Benefits
    
   Security-oriented code coverage
    
   Vastly improved error reporting
    
   Finds more bugs
 
   Uses rule set from static analysis tool!
Detecting Attacks at Runtime

 
   If you can find bugs, can you fix them?
 
   Instrument program, watch it run:
         Fortify Defender
 
   More context than external systems
 
   Flexible response: log, block, etc
 
   Low performance overhead is a must
 
   Potential to detect misuse in addition to bugs
Parting Thoughts
Conventions
                               Algorithms
                  Design



Data                           Protocols
               <Your Code>
Structures




                             Platform
   Libraries     Language
Conventions
                               Algorithms
                  Design



Data                           Protocols
               <Your Code>
Structures




                             Platform
   Libraries     Language
The Buck Stops With Your Code


   Security problems everywhere you look
  
   Languages, libraries, frameworks, etc.

   Right answer
  
   Better languages, libraries, frameworks, etc.

   Realistic answer
  
   Build secure programs out of insecure pieces
                                                                     Algorithms
                                        Conventions       Design




                                       Data                            Protocols
                                       Structures
                                                      <Your Code>




                                                                    Platform
                                          Libraries
                                                        Language
Summary

        Mistakes happen. Plan for them.

    
        Security is now part of programming

    
        For code auditors: tools make code review efficient

    
        For programmers: tools bring security expertise

    

   Critical components of a good tool:
        
   Algorithm
        
   Rules
        
   Interface
        
   Adoption Plan
Brian Chess
        

brian@fortify.com

Weitere ähnliche Inhalte

Was ist angesagt?

Static Analysis Security Testing for Dummies... and You
Static Analysis Security Testing for Dummies... and YouStatic Analysis Security Testing for Dummies... and You
Static Analysis Security Testing for Dummies... and YouKevin Fealey
 
Static analysis as means of improving code quality
Static analysis as means of improving code quality Static analysis as means of improving code quality
Static analysis as means of improving code quality Andrey Karpov
 
Security Code Review: Magic or Art?
Security Code Review: Magic or Art?Security Code Review: Magic or Art?
Security Code Review: Magic or Art?Sherif Koussa
 
Applications secure by default
Applications secure by defaultApplications secure by default
Applications secure by defaultSecuRing
 
Securing your web applications a pragmatic approach
Securing your web applications a pragmatic approachSecuring your web applications a pragmatic approach
Securing your web applications a pragmatic approachAntonio Parata
 
4 colin walls - self-testing in embedded systems
4   colin walls - self-testing in embedded systems4   colin walls - self-testing in embedded systems
4 colin walls - self-testing in embedded systemsIevgenii Katsan
 
Challenges in High Accuracy of Malware Detection
Challenges in High Accuracy of Malware DetectionChallenges in High Accuracy of Malware Detection
Challenges in High Accuracy of Malware DetectionMuhammad Najmi Ahmad Zabidi
 
Root via SMS: 4G access level security assessment, Sergey Gordeychik, Alexand...
Root via SMS: 4G access level security assessment, Sergey Gordeychik, Alexand...Root via SMS: 4G access level security assessment, Sergey Gordeychik, Alexand...
Root via SMS: 4G access level security assessment, Sergey Gordeychik, Alexand...Sergey Gordeychik
 
IDA Vulnerabilities and Bug Bounty  by Masaaki Chida
IDA Vulnerabilities and Bug Bounty  by Masaaki ChidaIDA Vulnerabilities and Bug Bounty  by Masaaki Chida
IDA Vulnerabilities and Bug Bounty  by Masaaki ChidaCODE BLUE
 
100% Code Coverage in Real World Software
100% Code Coverage in Real World Software100% Code Coverage in Real World Software
100% Code Coverage in Real World SoftwareAndreas Czakaj
 
Simplified Security Code Review Process
Simplified Security Code Review ProcessSimplified Security Code Review Process
Simplified Security Code Review ProcessSherif Koussa
 
PVS-Studio and static code analysis technique
PVS-Studio and static code analysis techniquePVS-Studio and static code analysis technique
PVS-Studio and static code analysis techniqueAndrey Karpov
 
Root via sms. 4G security assessment
Root via sms. 4G security assessment Root via sms. 4G security assessment
Root via sms. 4G security assessment Sergey Gordeychik
 
Much ado about randomness. What is really a random number?
Much ado about randomness. What is really a random number?Much ado about randomness. What is really a random number?
Much ado about randomness. What is really a random number?Aleksandr Yampolskiy
 
Talos: Neutralizing Vulnerabilities with Security Workarounds for Rapid Respo...
Talos: Neutralizing Vulnerabilities with Security Workarounds for Rapid Respo...Talos: Neutralizing Vulnerabilities with Security Workarounds for Rapid Respo...
Talos: Neutralizing Vulnerabilities with Security Workarounds for Rapid Respo...Zhen Huang
 
Network Attack Injection
Network Attack InjectionNetwork Attack Injection
Network Attack InjectionJoao Antunes
 

Was ist angesagt? (20)

Static Analysis Security Testing for Dummies... and You
Static Analysis Security Testing for Dummies... and YouStatic Analysis Security Testing for Dummies... and You
Static Analysis Security Testing for Dummies... and You
 
Static analysis as means of improving code quality
Static analysis as means of improving code quality Static analysis as means of improving code quality
Static analysis as means of improving code quality
 
Security Code Review: Magic or Art?
Security Code Review: Magic or Art?Security Code Review: Magic or Art?
Security Code Review: Magic or Art?
 
Applications secure by default
Applications secure by defaultApplications secure by default
Applications secure by default
 
Securing your web applications a pragmatic approach
Securing your web applications a pragmatic approachSecuring your web applications a pragmatic approach
Securing your web applications a pragmatic approach
 
4 colin walls - self-testing in embedded systems
4   colin walls - self-testing in embedded systems4   colin walls - self-testing in embedded systems
4 colin walls - self-testing in embedded systems
 
Challenges in High Accuracy of Malware Detection
Challenges in High Accuracy of Malware DetectionChallenges in High Accuracy of Malware Detection
Challenges in High Accuracy of Malware Detection
 
Root via SMS: 4G access level security assessment, Sergey Gordeychik, Alexand...
Root via SMS: 4G access level security assessment, Sergey Gordeychik, Alexand...Root via SMS: 4G access level security assessment, Sergey Gordeychik, Alexand...
Root via SMS: 4G access level security assessment, Sergey Gordeychik, Alexand...
 
IDA Vulnerabilities and Bug Bounty  by Masaaki Chida
IDA Vulnerabilities and Bug Bounty  by Masaaki ChidaIDA Vulnerabilities and Bug Bounty  by Masaaki Chida
IDA Vulnerabilities and Bug Bounty  by Masaaki Chida
 
ProActive Security
ProActive SecurityProActive Security
ProActive Security
 
100% Code Coverage in Real World Software
100% Code Coverage in Real World Software100% Code Coverage in Real World Software
100% Code Coverage in Real World Software
 
Simplified Security Code Review Process
Simplified Security Code Review ProcessSimplified Security Code Review Process
Simplified Security Code Review Process
 
PVS-Studio and static code analysis technique
PVS-Studio and static code analysis techniquePVS-Studio and static code analysis technique
PVS-Studio and static code analysis technique
 
Root via sms. 4G security assessment
Root via sms. 4G security assessment Root via sms. 4G security assessment
Root via sms. 4G security assessment
 
L27
L27L27
L27
 
Much ado about randomness. What is really a random number?
Much ado about randomness. What is really a random number?Much ado about randomness. What is really a random number?
Much ado about randomness. What is really a random number?
 
Talos: Neutralizing Vulnerabilities with Security Workarounds for Rapid Respo...
Talos: Neutralizing Vulnerabilities with Security Workarounds for Rapid Respo...Talos: Neutralizing Vulnerabilities with Security Workarounds for Rapid Respo...
Talos: Neutralizing Vulnerabilities with Security Workarounds for Rapid Respo...
 
.NET for hackers
.NET for hackers.NET for hackers
.NET for hackers
 
Network Attack Injection
Network Attack InjectionNetwork Attack Injection
Network Attack Injection
 
Static Code Analysis
Static Code AnalysisStatic Code Analysis
Static Code Analysis
 

Andere mochten auch

Programming languages shape computational thinking
Programming languages shape computational thinkingProgramming languages shape computational thinking
Programming languages shape computational thinkingEelco Visser
 
GaneData Company Presentation
GaneData Company Presentation GaneData Company Presentation
GaneData Company Presentation Jennifer Pratt
 
Social and Cloud Marketing Impact on Businesses
Social and Cloud Marketing Impact on BusinessesSocial and Cloud Marketing Impact on Businesses
Social and Cloud Marketing Impact on BusinessesSaumya Verma
 
SENSIO Technologies Corporate Presentation May 2011
SENSIO Technologies Corporate Presentation  May 2011SENSIO Technologies Corporate Presentation  May 2011
SENSIO Technologies Corporate Presentation May 2011SENSIO
 
BPF-Delivering-the-Goods-Dec-15-web
BPF-Delivering-the-Goods-Dec-15-webBPF-Delivering-the-Goods-Dec-15-web
BPF-Delivering-the-Goods-Dec-15-webDavid Smith
 
Consumer Goods Companies’ IT Investments
Consumer Goods Companies’ IT InvestmentsConsumer Goods Companies’ IT Investments
Consumer Goods Companies’ IT InvestmentsJulia Chistyakova
 
Dinerware Software Guide
Dinerware Software GuideDinerware Software Guide
Dinerware Software Guidebethhaldane
 
Programme Paris Retail Week 2016
Programme Paris Retail Week 2016Programme Paris Retail Week 2016
Programme Paris Retail Week 2016Paris Retail Week
 
BAD OBTETRIC HISTORY
BAD OBTETRIC HISTORYBAD OBTETRIC HISTORY
BAD OBTETRIC HISTORYYogesh Patel
 
RaspberryPi + IoT - Lab to switch on and off a light bulb
RaspberryPi + IoT - Lab to switch on and off a light bulbRaspberryPi + IoT - Lab to switch on and off a light bulb
RaspberryPi + IoT - Lab to switch on and off a light bulbJeff Prestes
 
Modern Static Code Analysis in PHP
Modern Static Code Analysis in PHPModern Static Code Analysis in PHP
Modern Static Code Analysis in PHPVladimir Reznichenko
 
Bad obstetric history
Bad obstetric historyBad obstetric history
Bad obstetric historylimgengyan
 
Anemia in pregnancy &role of parenteral iron therapy
Anemia in pregnancy &role of parenteral iron therapyAnemia in pregnancy &role of parenteral iron therapy
Anemia in pregnancy &role of parenteral iron therapysusanta12
 
History taking in obgyn
History taking in obgynHistory taking in obgyn
History taking in obgyngulmakaikhalid
 
Impact of Rubella on Pregnancy With Respect to IgM Immunolobulin
Impact of Rubella on Pregnancy With Respect to IgM ImmunolobulinImpact of Rubella on Pregnancy With Respect to IgM Immunolobulin
Impact of Rubella on Pregnancy With Respect to IgM Immunolobulinpaperpublications3
 
Product catalogue europe en_2016
Product catalogue europe en_2016Product catalogue europe en_2016
Product catalogue europe en_2016Ignacio Gonzalez
 

Andere mochten auch (18)

Programming languages shape computational thinking
Programming languages shape computational thinkingProgramming languages shape computational thinking
Programming languages shape computational thinking
 
GaneData Company Presentation
GaneData Company Presentation GaneData Company Presentation
GaneData Company Presentation
 
Social and Cloud Marketing Impact on Businesses
Social and Cloud Marketing Impact on BusinessesSocial and Cloud Marketing Impact on Businesses
Social and Cloud Marketing Impact on Businesses
 
SENSIO Technologies Corporate Presentation May 2011
SENSIO Technologies Corporate Presentation  May 2011SENSIO Technologies Corporate Presentation  May 2011
SENSIO Technologies Corporate Presentation May 2011
 
BPF-Delivering-the-Goods-Dec-15-web
BPF-Delivering-the-Goods-Dec-15-webBPF-Delivering-the-Goods-Dec-15-web
BPF-Delivering-the-Goods-Dec-15-web
 
Consumer Goods Companies’ IT Investments
Consumer Goods Companies’ IT InvestmentsConsumer Goods Companies’ IT Investments
Consumer Goods Companies’ IT Investments
 
Dinerware Software Guide
Dinerware Software GuideDinerware Software Guide
Dinerware Software Guide
 
Programme Paris Retail Week 2016
Programme Paris Retail Week 2016Programme Paris Retail Week 2016
Programme Paris Retail Week 2016
 
BAD OBTETRIC HISTORY
BAD OBTETRIC HISTORYBAD OBTETRIC HISTORY
BAD OBTETRIC HISTORY
 
RaspberryPi + IoT - Lab to switch on and off a light bulb
RaspberryPi + IoT - Lab to switch on and off a light bulbRaspberryPi + IoT - Lab to switch on and off a light bulb
RaspberryPi + IoT - Lab to switch on and off a light bulb
 
XDS - Cross-Enterprise Document Sharing
XDS - Cross-Enterprise Document SharingXDS - Cross-Enterprise Document Sharing
XDS - Cross-Enterprise Document Sharing
 
Modern Static Code Analysis in PHP
Modern Static Code Analysis in PHPModern Static Code Analysis in PHP
Modern Static Code Analysis in PHP
 
Bad obstetric history
Bad obstetric historyBad obstetric history
Bad obstetric history
 
Anemia in pregnancy &role of parenteral iron therapy
Anemia in pregnancy &role of parenteral iron therapyAnemia in pregnancy &role of parenteral iron therapy
Anemia in pregnancy &role of parenteral iron therapy
 
History taking in obgyn
History taking in obgynHistory taking in obgyn
History taking in obgyn
 
Determinants of Anemia in Antenatal Cases: A Cross-sectional Analysis
Determinants of Anemia in Antenatal Cases: A Cross-sectional Analysis Determinants of Anemia in Antenatal Cases: A Cross-sectional Analysis
Determinants of Anemia in Antenatal Cases: A Cross-sectional Analysis
 
Impact of Rubella on Pregnancy With Respect to IgM Immunolobulin
Impact of Rubella on Pregnancy With Respect to IgM ImmunolobulinImpact of Rubella on Pregnancy With Respect to IgM Immunolobulin
Impact of Rubella on Pregnancy With Respect to IgM Immunolobulin
 
Product catalogue europe en_2016
Product catalogue europe en_2016Product catalogue europe en_2016
Product catalogue europe en_2016
 

Ähnlich wie Secure Programming With Static Analysis

Static Analysis Techniques For Testing Application Security - Houston Tech Fest
Static Analysis Techniques For Testing Application Security - Houston Tech FestStatic Analysis Techniques For Testing Application Security - Houston Tech Fest
Static Analysis Techniques For Testing Application Security - Houston Tech FestDenim Group
 
Secrets of Top Pentesters
Secrets of Top PentestersSecrets of Top Pentesters
Secrets of Top Pentestersamiable_indian
 
Securing Rails
Securing RailsSecuring Rails
Securing RailsAlex Payne
 
Agile Software Development with Intrinsic Quality
Agile Software Development with Intrinsic QualityAgile Software Development with Intrinsic Quality
Agile Software Development with Intrinsic QualityDemetrius Nunes
 
Presentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss ToolsPresentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss ToolsGanesh Samarthyam
 
How the JDeveloper team test JDeveloper at UKOUG'08
How the JDeveloper team test JDeveloper at UKOUG'08How the JDeveloper team test JDeveloper at UKOUG'08
How the JDeveloper team test JDeveloper at UKOUG'08kingsfleet
 
Test Automatici^2 per applicazioni Web
Test Automatici^2 per applicazioni WebTest Automatici^2 per applicazioni Web
Test Automatici^2 per applicazioni WebStefano Rodighiero
 
High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
High-Octane Dev Teams: Three Things You Can Do To Improve Code QualityHigh-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
High-Octane Dev Teams: Three Things You Can Do To Improve Code QualityAtlassian
 
Challenges In Managing Embedded Product Development
Challenges In Managing Embedded Product DevelopmentChallenges In Managing Embedded Product Development
Challenges In Managing Embedded Product DevelopmentAtul Nene
 
Web 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web AppsWeb 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web Appsadunne
 
Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)Nate Lawson
 
The Most Important Thing: How Mozilla Does Security and What You Can Steal
The Most Important Thing: How Mozilla Does Security and What You Can StealThe Most Important Thing: How Mozilla Does Security and What You Can Steal
The Most Important Thing: How Mozilla Does Security and What You Can Stealmozilla.presentations
 
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...Atlassian
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client DevelopmentTamir Khason
 
Applying formal methods to existing software by B.Monate
Applying formal methods to existing software by B.MonateApplying formal methods to existing software by B.Monate
Applying formal methods to existing software by B.MonateMahaut Gouhier
 
Creating Practical Security Test-Cases for Web Applications
Creating Practical Security Test-Cases for Web ApplicationsCreating Practical Security Test-Cases for Web Applications
Creating Practical Security Test-Cases for Web ApplicationsRafal Los
 

Ähnlich wie Secure Programming With Static Analysis (20)

Static Analysis Techniques For Testing Application Security - Houston Tech Fest
Static Analysis Techniques For Testing Application Security - Houston Tech FestStatic Analysis Techniques For Testing Application Security - Houston Tech Fest
Static Analysis Techniques For Testing Application Security - Houston Tech Fest
 
Secrets of Top Pentesters
Secrets of Top PentestersSecrets of Top Pentesters
Secrets of Top Pentesters
 
Securing Rails
Securing RailsSecuring Rails
Securing Rails
 
Agile Software Development with Intrinsic Quality
Agile Software Development with Intrinsic QualityAgile Software Development with Intrinsic Quality
Agile Software Development with Intrinsic Quality
 
Presentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss ToolsPresentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss Tools
 
How the JDeveloper team test JDeveloper at UKOUG'08
How the JDeveloper team test JDeveloper at UKOUG'08How the JDeveloper team test JDeveloper at UKOUG'08
How the JDeveloper team test JDeveloper at UKOUG'08
 
Test Automatici^2 per applicazioni Web
Test Automatici^2 per applicazioni WebTest Automatici^2 per applicazioni Web
Test Automatici^2 per applicazioni Web
 
Recent Rogueware
Recent RoguewareRecent Rogueware
Recent Rogueware
 
High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
High-Octane Dev Teams: Three Things You Can Do To Improve Code QualityHigh-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
 
Challenges In Managing Embedded Product Development
Challenges In Managing Embedded Product DevelopmentChallenges In Managing Embedded Product Development
Challenges In Managing Embedded Product Development
 
Web 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web AppsWeb 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web Apps
 
Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)
 
Test
TestTest
Test
 
The Most Important Thing: How Mozilla Does Security and What You Can Steal
The Most Important Thing: How Mozilla Does Security and What You Can StealThe Most Important Thing: How Mozilla Does Security and What You Can Steal
The Most Important Thing: How Mozilla Does Security and What You Can Steal
 
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client Development
 
Desk Maintenance
Desk MaintenanceDesk Maintenance
Desk Maintenance
 
Applying formal methods to existing software by B.Monate
Applying formal methods to existing software by B.MonateApplying formal methods to existing software by B.Monate
Applying formal methods to existing software by B.Monate
 
Creating Practical Security Test-Cases for Web Applications
Creating Practical Security Test-Cases for Web ApplicationsCreating Practical Security Test-Cases for Web Applications
Creating Practical Security Test-Cases for Web Applications
 
Jdj Foss Java Tools
Jdj Foss Java ToolsJdj Foss Java Tools
Jdj Foss Java Tools
 

Mehr von ConSanFrancisco123

Open Ap Is State Of The Market
Open Ap Is State Of The MarketOpen Ap Is State Of The Market
Open Ap Is State Of The MarketConSanFrancisco123
 
Yahoo Pipes Middleware In The Cloud
Yahoo Pipes Middleware In The CloudYahoo Pipes Middleware In The Cloud
Yahoo Pipes Middleware In The CloudConSanFrancisco123
 
Yellowpagescom Behind The Curtain
Yellowpagescom Behind The CurtainYellowpagescom Behind The Curtain
Yellowpagescom Behind The CurtainConSanFrancisco123
 
Teamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any TimeTeamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any TimeConSanFrancisco123
 
Agility Possibilities At A Personal Level
Agility Possibilities At A Personal LevelAgility Possibilities At A Personal Level
Agility Possibilities At A Personal LevelConSanFrancisco123
 
Res Tful Enterprise Development
Res Tful Enterprise DevelopmentRes Tful Enterprise Development
Res Tful Enterprise DevelopmentConSanFrancisco123
 
Behind The Scenes At My Spacecom
Behind The Scenes At My SpacecomBehind The Scenes At My Spacecom
Behind The Scenes At My SpacecomConSanFrancisco123
 
Making Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software DevelopmentMaking Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software DevelopmentConSanFrancisco123
 
Agile Software Development In The Large
Agile Software Development In The LargeAgile Software Development In The Large
Agile Software Development In The LargeConSanFrancisco123
 
Introduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome ThemIntroduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome ThemConSanFrancisco123
 
Business Natural Languages Development In Ruby
Business Natural Languages Development In RubyBusiness Natural Languages Development In Ruby
Business Natural Languages Development In RubyConSanFrancisco123
 
Orbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And ChangeOrbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And ChangeConSanFrancisco123
 
Introduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered AboutIntroduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered AboutConSanFrancisco123
 

Mehr von ConSanFrancisco123 (20)

Open Ap Is State Of The Market
Open Ap Is State Of The MarketOpen Ap Is State Of The Market
Open Ap Is State Of The Market
 
Yahoo Pipes Middleware In The Cloud
Yahoo Pipes Middleware In The CloudYahoo Pipes Middleware In The Cloud
Yahoo Pipes Middleware In The Cloud
 
Ruby V Ms A Comparison
Ruby V Ms A ComparisonRuby V Ms A Comparison
Ruby V Ms A Comparison
 
Yellowpagescom Behind The Curtain
Yellowpagescom Behind The CurtainYellowpagescom Behind The Curtain
Yellowpagescom Behind The Curtain
 
Teamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any TimeTeamwork Is An Individual Skill How To Build Any Team Any Time
Teamwork Is An Individual Skill How To Build Any Team Any Time
 
Agility Possibilities At A Personal Level
Agility Possibilities At A Personal LevelAgility Possibilities At A Personal Level
Agility Possibilities At A Personal Level
 
Res Tful Enterprise Development
Res Tful Enterprise DevelopmentRes Tful Enterprise Development
Res Tful Enterprise Development
 
Gallio Crafting A Toolchain
Gallio Crafting A ToolchainGallio Crafting A Toolchain
Gallio Crafting A Toolchain
 
10 Ways To Improve Your Code
10 Ways To Improve Your Code10 Ways To Improve Your Code
10 Ways To Improve Your Code
 
Http Status Report
Http Status ReportHttp Status Report
Http Status Report
 
Behind The Scenes At My Spacecom
Behind The Scenes At My SpacecomBehind The Scenes At My Spacecom
Behind The Scenes At My Spacecom
 
Building Blueprint With Gwt
Building Blueprint With GwtBuilding Blueprint With Gwt
Building Blueprint With Gwt
 
Security Cas And Open Id
Security Cas And Open IdSecurity Cas And Open Id
Security Cas And Open Id
 
Soa And Web Services Security
Soa And Web Services SecuritySoa And Web Services Security
Soa And Web Services Security
 
Making Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software DevelopmentMaking Threat Modeling Useful To Software Development
Making Threat Modeling Useful To Software Development
 
Agile Software Development In The Large
Agile Software Development In The LargeAgile Software Development In The Large
Agile Software Development In The Large
 
Introduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome ThemIntroduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome Them
 
Business Natural Languages Development In Ruby
Business Natural Languages Development In RubyBusiness Natural Languages Development In Ruby
Business Natural Languages Development In Ruby
 
Orbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And ChangeOrbitz World Wide An Architectures Response To Growth And Change
Orbitz World Wide An Architectures Response To Growth And Change
 
Introduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered AboutIntroduction Architectures Youve Always Wondered About
Introduction Architectures Youve Always Wondered About
 

Kürzlich hochgeladen

Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Kürzlich hochgeladen (20)

Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

Secure Programming With Static Analysis

  • 1. Secure Programming with Static Analysis Brian Chess
 brian@fortify.com
  • 2.
  • 3. Software Systems that are •  Ubiquitous •  Connected •  Dependable Complexity Unforeseen Consequences
  • 4. Software Security Today   The line between secure/insecure is often subtle   Many seemingly non-security decisions affect security   Small problems can hurt a lot   Smart people make dumb mistakes   As a group, programmers tend to make the same security mistakes over and over   We need non-experts to get security right
  • 5. Success is foreseeing failure. – Henry Petroski
  • 6. Non-functional Security Failures Generic Mistakes   Input validation   Memory safety (buffer overflow)   Handling errors and exceptions   Maintaining privacy Common Software Varieties   Web applications   Network services / SOA   Privileged programs
  • 7. Buffer Overflow MSDN sample code for function DirSpec: int main(int argc, char *argv[]) { ... char DirSpec[MAX_PATH + 1]; printf (quot;Target dir is %s.nquot;, argv[1]); strncpy (DirSpec, argv[1], strlen(argv[1])+1);
  • 8. Cross-Site Scripting <c:if test=quot;${param.sayHello}quot;> Hello ${param.name}! </c:if> “We never intended the code that's in there to actually be production- ready code” - Ryan Asleson
  • 9. Wrong Answers Try Harder Fix It Later Test Your Way Out •  Do a penetration test •  Code as usual. • Our people are smart on the final version. •  Build a better firewall and work hard. •  Scramble to patch (app firewall, intrusion • Just tell them to stop findings. detection, etc.) making mistakes. ________________ ________________ ________________ • Pen testing is good for • More walls don’t help • Not everyone is going demonstrating the when the software is to be a security expert. problem. meant to communicate. • Getting security right • Doesn’t work for the • Security team can’t requires feedback. same reason you can’t keep up. test quality in.
  • 10. Security in the Development Lifecycle
  • 11. Security in the Development Lifecycle Plan Test Field Build •  Firewalls •  Intrusion Detection •  Penetration Testing
  • 12. Security in the Development Lifecycle Plan Test Field Build •  Risk Assessment •  Code Review •  Security Testing Effective security from non-experts
  • 13. Overview Introduction   Static Analysis: The Big Picture   Inside a Static Analysis Tool   Static Analysis in Practice   What Next?   Parting Thoughts  
  • 14. Static Analysis: The Big Picture
  • 15. Static Analysis Defined   Analyze code without executing it   Able to contemplate many more possibilities than you could execute with conventional testing   Doesn’t know what your code is supposed to do   Must be told what to look for
  • 17. The Many Faces of Static Analysis Type checking   Style checking   Program understanding   Program verification / Property checking   Bug finding   Security review  
  • 18. Why Static Analysis is Good for Security Fast compared to manual code review   Fast compared to testing   Complete, consistent coverage   Brings security knowledge with it   Makes review process easier for non-experts  
  • 19. Prehistoric static analysis tools RATS Flawfinder ITS4
  • 20. Prehistoric static analysis tools Glorified grep (+) Good   Help security experts audit code   A place to collect info about bad coding practices (-) Bad   NOT BUG FINDERS   Not helpful without security expertise RATS Flawfinder ITS4
  • 21. Advanced Static Analysis Tools: Prioritization int main(int argc, char* argv[]) { char buf1[1024]; char buf2[1024]; char* shortString = quot;a short stringquot;; strcpy(buf1, shortString); /* eh. */ strcpy(buf2, argv[0]); /* !!! */ ...
  • 22. What You Won’t Find   Architecture errors   Microscope vs. telescope   Bugs you’re not looking for   Bug categories must be predefined   System administration mistakes   User mistakes
  • 23. Security vs. Quality   Bug finding tools focus on high confidence results   Bugs are cheap (plentiful)   Bug patterns, bug idioms   False alarms are killers   Security tools focus on high risk results   More human input required   The bugs you miss are the killers
  • 24. Inside a Static Analysis Tool
  • 26. Critical Attributes   Analysis algorithms   Uses the right techniques to find and prioritize issues   Language support   Understands the relevant languages/dialects   Capacity   Ability to gulp down millions of lines of code   Rule set   Modeling rules, security properties   Results management   Allow human to review results   Prioritization of issues   Control over what to report
  • 27. Building a Model   Front end looks a lot like a compiler   Language support   One language/compiler is straightforward   Lots of combinations is harder   Could analyze compiled code…   Everybody has the binary   No need to guess how the compiler works   No need for rules   …but   Decompilation can be difficult   Loss of context hurts. A lot.   Remediation requires mapping to source anyway
  • 28. Analysis Techniques   Taint propagation   Trace potentially tainted data through the program   Report locations where an attacker could take advantage of a vulnerable function or construct buff = getInputFroNetwork(); copyBuffer( newBuff, buff ); exec( newBuff ); (command injection)   Many other approaches, no one right answer
  • 29. Only Two Ways to Go Wrong   False positives   Incomplete/inaccurate model The tool that   Conservative analysis cried “wolf!” Missing a   False negatives detail can kill.   Incomplete/inaccurate model   Missing rules   “Forgiving” analysis Auditor Developer
  • 30. Rules   Specify   Security properties   Behavior of library code buff = getInputFromNetwork(); copyBuffer(newBuff, buff); exec(newBuff);   Three rules to detect the vulnerability 1) getInputFromNetwork() postcondition: return value is tainted 2) copyBuffer(arg1, arg2) postcondition: arg1 array values set to arg2 array values 3) exec(arg) precondition: arg must not be tainted
  • 31. Displaying Results   Must convince programmer that there’s a bug in the code   Different interfaces for different scenarios:   Security auditor parachutes in to 2M line program   Programmer reviews own code Your Code   Programmers share code review responsibilities Sucks.   Interface is just as important as analysis OK   Don’t show same bad result twice Bad interface
  • 32. Static Analysis in Practice
  • 33. Two Ways to Use the Tools   Analyze completed programs Fancy penetration test. Bleah.   Results can be overwhelming   Most people have to start here   Good motivator     Analyze as you write code   Run as part of build   Nightly/weekly/milestone   Fix as you go
  • 34. Typical Objections and Their True Meanings Objection Translation “It takes too long to run.” “I think security is optional, so I don’t want to do it.” “It has too many false positives.” “I think security is optional, so I don’t want to do it.” “It doesn’t fit with the way I “I think security is optional, so I work.” don’t want to do it.”
  • 35. Metrics   ?? Defect Density  Vulnerability Density ??   NOT A GOOD RISK BAROMETER   Good for answering questions such as   Which bugs do we write most often?   How much remediation effort is required?
  • 36. Adopting a Static Analysis Tool 1) Some culture change required   More than just another tool   Often carries the banner for software security   Pitfall: the tool doesn’t solve the problem by itself 2) Go for the throat   Tools detect lots of stuff. Turn most of it off.   Focus on easy-to-understand, highly relevant problems. 3) Do training up front   Software security training is paramount   Tool training is helpful too
  • 37. Adopting a Static Analysis Tool 4) Measure the outcome   Keep track of tool findings   Keep track of outcome (issues fixed) 5) Make it your own   Invest in customization   Map tool against internal security standards.   The tools reinforce coding guidelines   Coding guidelines are written with automated checking in mind 6) The first time around is the worst   Budget 2x typical cycle cost   Typical numbers: 10% of time for security, 20% for the first time
  • 39. Seven Pernicious Kingdoms   Catalog, define, and categorize common mistakes   http://www.fortify.com/vulncat   Error handling   Input validation and representation   Code quality   API abuse   Encapsulation   Security features * Environment   Time and state
  • 40. Finding Bugs, Making Friends   Sponsor open source project FindBugs   Quality-oriented bug finding for Java   Academic program   Free Fortify Source Code Analysis licenses for .edu   Java Open Review   http://opensource.fortifysoftware.com   Support electronic voting machine review   California   Florida   more to come!
  • 41. Security Testing   Most widely used security testing techniques are about controllability   Fuzzing (random input)   Shooting dirty data (input that often causes trouble)   A different take: improve observability   Instrument code to observe runtime behavior: Fortify Tracer   Benefits   Security-oriented code coverage   Vastly improved error reporting   Finds more bugs   Uses rule set from static analysis tool!
  • 42. Detecting Attacks at Runtime   If you can find bugs, can you fix them?   Instrument program, watch it run: Fortify Defender   More context than external systems   Flexible response: log, block, etc   Low performance overhead is a must   Potential to detect misuse in addition to bugs
  • 44. Conventions Algorithms Design Data Protocols <Your Code> Structures Platform Libraries Language
  • 45. Conventions Algorithms Design Data Protocols <Your Code> Structures Platform Libraries Language
  • 46. The Buck Stops With Your Code   Security problems everywhere you look   Languages, libraries, frameworks, etc.   Right answer   Better languages, libraries, frameworks, etc.   Realistic answer   Build secure programs out of insecure pieces Algorithms Conventions Design Data Protocols Structures <Your Code> Platform Libraries Language
  • 47. Summary Mistakes happen. Plan for them.   Security is now part of programming   For code auditors: tools make code review efficient   For programmers: tools bring security expertise     Critical components of a good tool:   Algorithm   Rules   Interface   Adoption Plan
  • 48. Brian Chess 
 brian@fortify.com