SlideShare a Scribd company logo
Fuzzing in Microsoft and
             FuzzGuru framework


                           John Neystadt
OWASP-IL
                           jney@microsoft.com
May-2007
                           Lead Program Manager
                           Forefront Edge, Microsoft
Agenda
• Overview
  – Introduction to Fuzzing
  – FuzzGuru Architecture
  – Demo
• Testing
  –   Designing Fuzzing Test
  –   Preparation for Fuzz Testing
  –   Performing Fuzz Testing
  –   Completing Fuzzing Coverage
  –   Fuzzing in ISA

                                     2
Introduction to Fuzzing
• Tired of Code Reviews?
   – Fuzz testing is about automatic testing of
     malformed input handling
   – Fuzzing Target is code, not data. Its white
     box testing - no need to exhaust all data
     combinations, that code doesn’t
     distinguish
   – In the past dumb fuzzing was made to
     randomly corrupt bits of data., This
     penetrates only top data handling layers,
     since something basic (checksum, first
     fields) would be broken and inner code
     paths wouldn’t be reached
   – Smart is about systematic testing of all
     code paths that process data. Corrupt
     fields one by one, preserving general
     validity of the packet (Content-Length,
     Checksums, Base64 encoding, etc)

                                                   3
Case for Fuzzing
• Over 70% of security vulnerabilities Microsoft
  patched in 2006 were found by fuzzing
• Many open-source tools and some commercial
  products that do fuzzing of specific protocols or
  formats are available

• SDL - Microsoft Security Development Lifecycle
   – Internal “security” bible mandatory for all Microsoft
     teams
   – Mandates fuzzing for Files, RPC, DCOM, Network,
     ActiveXs as part of product development lifecycle

                                                             4
What I wanted to know about
Fuzzing, but didn’t dare to ask
• Fuzzing finds Access Violations and Buffer Overruns, not
  functional problems
• Fuzzing requests usually fail, since they are malformed
• Often fuzzing bugs are in clean-up code paths: leaks,
  synchronization and timing issues.
• Fuzz both client and server code – simulating malicious
  server has high chance of finding bugs!
• If a bug happens when two independently fields are
  malformed, FuzzGuru will not find it
• Both C++ and C# (or Java) code should be fuzzed if it
  processes data from untrusted source

                                                        5
FuzzGuru Architecture
                          FuzzGuru Development Framework
        Development Guide                  Schema Editor                                 Simulator
    +Getting Started              +Define Data Schema()                     +Validate Schema Correctness()
    +SDK                          +Define Fuzzing Test Cases()              +Validate Template Parsing()
    +Samples                      +Import XML XSDs()                        +Simulate Fuzzing()
                                                                                                                                Fuzzing Stress Framework
                                      1. learn        2. define schema     4. simulate                                              Fuzzing Experiment Configuration Editor

                                                                            5. create fuzzing experiment configuration +Define Fuzzing Experiments()
      Input Templates
                                     3. prepare templates
+Valid files
                                                                                                                   6. run manual test
+Network captures
+Generated by test tool
                                  2.1 reuse existing schemas
                                                                                                                       Command Line (fgcmd.exe)        Fuzzing Experiment Runner GUI
Ready Fuzzing Schemas
                                                                                                                      +Run Experiment()                +Run in GUI()
                                                                            7. develop automation
            HTTP                                                                                                      +Trace to DBMON()                +View Traces in GUI()
            GZIP
                                                                Test Owner                                                                  «datatype»
            SMTP
                                                                                                                                       Fuzzing Experiments
             FTP                                                                            use as command line
                                   8. investigate the results
            DNS                                                                                                 +File Fuzzer (using fuzzing schema)
           SOCKS                                                                                                +XML Fuzzer (using XSD schema)
                                          9. extend the framework
            MIME                                                                                                +TCP/UDP Clients/Servers
                                                                                                                +TCP / UDP Man-in-the-middle (Redirector)
                                                            Test Automation                                     +Custom (implemented by user)
                                                                                                                +Run Fuzzing Stress()
                                                             Scripts or Test Harness
                                                                                                                +Repro Bugs()
                                                                                   implement custom experiments +Provide Traces()
   Investigate the results
+Fuzzing Traces
                                                                                                                                                                      «uses»
                                                                 Custom Test Tools
+Code Coverage Analysis
+Update Test Coverage                                                                                         use fuzzing API from test code



                                                                         Data Fuzzing Framework
      Extensibility Interfaces                                                                                                          Fuzzing API
                                                                                                                                                                  «datatype»
                 «datatype»                                      «datatype»                                        «datatype»
                                                                                                                                                                   Fuzzers
               Data Elements                                     Encoders                                          Relations
                                                                                                                                                        +String
  +String (ANSI, Unicode)                        +Unicode (UTF*) / Windows Char Set                 +Presence
                                                                                                                                                        +Numeric
  +Binary Data                                   +Base 64                                           +Buffer / Length
                                                                                                                                                        +Numeric String
  +Grouping Elements                             +Special XML Encoder                               +Group / Count
                                                                                                                                                        +Unicode-specific
  +XML                                           +Custom (implemented by user)                      +Custom (implemented by user)
                                                                                                                                                        +XML
  +Custom (implemented by user)
                                                                                                                                                        +Group Fuzzers
                                                                                                                                                        +Custom Fuzzers


                                                                                                                                                                                  6
Designing Fuzzing Test
•   Fuzzing a protocol - create schema or customize a ready one
     –   Define schema for parts of the protocol, need to be fuzzed
     –   More later
•   Defining fuzzing Test Cases
     –   Fuzzing Test Cases choose a subset of schema (elements and fuzzers) to be applied for
         relevant scenario
     –   FuzzGuru command line tool gets test case id as parameter
     –   FuzzGuru API requires test case id to generate malformed packets
     –   Test Case can be used for focused fuzzing to test specific fixes
•   Create fuzzing Templates
     –   Obtain real world data captures or generated by test programmatically
     –   Templates are “equivalence classes”, choose minimum number to cover all your scenarios
     –   Template must adhere to schema, you can use placeholder elements in schema to skip
         irrelevant parts
•   Use FuzzGuru GUI Simulator to verify test cases and templates
     –   Verify template is parsed correctly
     –   See which fuzzers are chosen (simulator trace)
     –   Inspect output to inspect malformed requests



                                                                                                  7
Manual or Automated
Fuzz Testing
•   FuzzGuru Experiments – ready tools for common fuzzing scenarios
     –   Gets schema, mutation template and test case name
     –   Ready tcp/udp server/client, man-in-the middle redirector, file, xml modes
     –   Extensive - can develop custom experiments
     –   Generates “stress” of upto 500 tcp cps or 11,000 udp packets
     –   Supports recording/playback of repro buffer
     –   Generates perf counters
     –   Writes fuzzing traces to dbmon

•   Manual Test Running (GUI)
     –   Define Experiment Configuration (FuzzGuru GUI, Tools | Experiment Configuration Editor)
     –   Run experiments interactively (FuzzGuru GUI, Tools | Experiment Runner)

•   Scriptable Automation
     –   Define Experiment Configuration (FuzzGuru GUI, Tools | Experiment Configuration Editor)
     –   Call experiments from command line interface (fgcmd.exe)

•   Integrate into your own test tools
     –   Call DataFuzzer APIs from your own test tool, providing it schema, mutation template and
         test case name

                                                                                                    8
Demo
• Run BinUrt2DemoApp.exe
• Run HTTP Server Attack Demo
     – See DemoReadme.mhtml => Part2 for instructions
• Results (5 minutes each run):
                                   Iterations
Scenario                                         Bugs found              Test Cases
                                                                         coverage
                                   6500                                  24%
Dumb Fuzzing without template                    0 out of 4
Dumb Fuzzing with template         11000         2 from 4                56%
                                                 (hits: 0, 0, 2, 10)
                                   700 (slow ) 2 from 4
Fuzzing with HTTP Demo                                                   80%
Schema without template                          (hits: 0, 0, 4, 8)
                                   10200
Fuzzing with HTTP Demo                           4 from 4                100%
Schema with one template (valid)                 (hits: 1, 7, 64, 143)

                                                                                  9
Completing Fuzzing Coverage
(Code Coverage)
 •   After running a fuzzing test for a first round it is important to inspect whether all code
     paths were covered
 •   Magellan Code Coverage tool set is recommended
 •   You should not hunt the numbers, rather review all uncovered code paths
      –   Fuzzing should traverse to all branches that depend on untrusted data
      –   All parsing code should be covered
      –   All error handling and cleanup code should be covered
 •   Note: If there is no code to handle malformed data exist, Code Coverage will not help
     you!
 •   To add coverage, you may need:
      –   Extend test matrix and fuzzing tests additional configurations of the feature
      –   Add additional fuzzing templates
      –   Extend FuzzGuru with custom fuzzers or elements
 •   Metrics
      –   Expected to reach 75-85% code coverage of parsers code blocks
      –   Per fuzzed DLL: fuzzing usually adds 3%-6% blocks and 3%-8% arcs additional coverage to
          compared to stress
      –   Per fuzzed source file: fuzzing usually significantly adds the coverage of ~13%.
      –   Per fuzzed function: fuzzing usually significantly adds the coverage of over 17%.


                                                                                              10

More Related Content

What's hot

Test-driven Development for TYPO3
Test-driven Development for TYPO3Test-driven Development for TYPO3
Test-driven Development for TYPO3Oliver Klee
 
Test-Driven Development for TYPO3 @ T3CON12DE
Test-Driven Development for TYPO3 @ T3CON12DETest-Driven Development for TYPO3 @ T3CON12DE
Test-Driven Development for TYPO3 @ T3CON12DEOliver Klee
 
JSR-303 Bean Validation API
JSR-303 Bean Validation APIJSR-303 Bean Validation API
JSR-303 Bean Validation API
Heiko Scherrer
 
Test-driven development for TYPO3 (T3DD11)
Test-driven development for TYPO3 (T3DD11)Test-driven development for TYPO3 (T3DD11)
Test-driven development for TYPO3 (T3DD11)Oliver Klee
 
Testing Spring Boot application in post-JUnit 4 world
Testing Spring Boot application in post-JUnit 4 worldTesting Spring Boot application in post-JUnit 4 world
Testing Spring Boot application in post-JUnit 4 world
Yura Nosenko
 
Whitebox testing of Spring Boot applications
Whitebox testing of Spring Boot applicationsWhitebox testing of Spring Boot applications
Whitebox testing of Spring Boot applications
Yura Nosenko
 
xUnit Style Database Testing
xUnit Style Database TestingxUnit Style Database Testing
xUnit Style Database Testing
Chris Oldwood
 
Ppl for students unit 4 and 5
Ppl for students unit 4 and 5Ppl for students unit 4 and 5
Ppl for students unit 4 and 5Akshay Nagpurkar
 
JUnit 5
JUnit 5JUnit 5
Test driven development
Test driven developmentTest driven development
Test driven development
christoforosnalmpantis
 

What's hot (10)

Test-driven Development for TYPO3
Test-driven Development for TYPO3Test-driven Development for TYPO3
Test-driven Development for TYPO3
 
Test-Driven Development for TYPO3 @ T3CON12DE
Test-Driven Development for TYPO3 @ T3CON12DETest-Driven Development for TYPO3 @ T3CON12DE
Test-Driven Development for TYPO3 @ T3CON12DE
 
JSR-303 Bean Validation API
JSR-303 Bean Validation APIJSR-303 Bean Validation API
JSR-303 Bean Validation API
 
Test-driven development for TYPO3 (T3DD11)
Test-driven development for TYPO3 (T3DD11)Test-driven development for TYPO3 (T3DD11)
Test-driven development for TYPO3 (T3DD11)
 
Testing Spring Boot application in post-JUnit 4 world
Testing Spring Boot application in post-JUnit 4 worldTesting Spring Boot application in post-JUnit 4 world
Testing Spring Boot application in post-JUnit 4 world
 
Whitebox testing of Spring Boot applications
Whitebox testing of Spring Boot applicationsWhitebox testing of Spring Boot applications
Whitebox testing of Spring Boot applications
 
xUnit Style Database Testing
xUnit Style Database TestingxUnit Style Database Testing
xUnit Style Database Testing
 
Ppl for students unit 4 and 5
Ppl for students unit 4 and 5Ppl for students unit 4 and 5
Ppl for students unit 4 and 5
 
JUnit 5
JUnit 5JUnit 5
JUnit 5
 
Test driven development
Test driven developmentTest driven development
Test driven development
 

Similar to Owasp Il 7 Fuzz Guru

Drupal & Continous Integration - SF State Study Case
Drupal & Continous Integration - SF State Study CaseDrupal & Continous Integration - SF State Study Case
Drupal & Continous Integration - SF State Study Case
Emanuele Quinto
 
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Software Testing wit...
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Software Testing wit...Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Software Testing wit...
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Software Testing wit...
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Hadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault InjectionHadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault Injection
Cloudera, Inc.
 
Fuzzing: The New Unit Testing
Fuzzing: The New Unit TestingFuzzing: The New Unit Testing
Fuzzing: The New Unit Testing
Dmitry Vyukov
 
MPD2011 | Александр Додатко "Процесс непрерывной интеграции для iOS проектов"
MPD2011 | Александр Додатко "Процесс непрерывной интеграции для iOS проектов"MPD2011 | Александр Додатко "Процесс непрерывной интеграции для iOS проектов"
MPD2011 | Александр Додатко "Процесс непрерывной интеграции для iOS проектов"ITGinGer
 
FUZZING & SOFTWARE SECURITY TESTING
FUZZING & SOFTWARE SECURITY TESTINGFUZZING & SOFTWARE SECURITY TESTING
FUZZING & SOFTWARE SECURITY TESTING
MuH4f1Z
 
Alm 4 Azure with screenshots
Alm 4 Azure with screenshotsAlm 4 Azure with screenshots
Alm 4 Azure with screenshots
Clemens Reijnen
 
Increase testability with code seams
Increase testability with code seamsIncrease testability with code seams
Increase testability with code seams
Llewellyn Falco
 
Grails unit testing
Grails unit testingGrails unit testing
Grails unit testing
pleeps
 
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaJavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and Karma
Christopher Bartling
 
Hadoop testing workshop - july 2013
Hadoop testing workshop - july 2013Hadoop testing workshop - july 2013
Hadoop testing workshop - july 2013
Ophir Cohen
 
Unit testing on embedded target with C++Test
Unit testing on embedded  target with C++TestUnit testing on embedded  target with C++Test
Unit testing on embedded target with C++Test
Engineering Software Lab
 
Testing NodeJS with Mocha, Should, Sinon, and JSCoverage
Testing NodeJS with Mocha, Should, Sinon, and JSCoverageTesting NodeJS with Mocha, Should, Sinon, and JSCoverage
Testing NodeJS with Mocha, Should, Sinon, and JSCoveragemlilley
 
In search of JavaScript code quality: unit testing
In search of JavaScript code quality: unit testingIn search of JavaScript code quality: unit testing
In search of JavaScript code quality: unit testingAnna Khabibullina
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
adrian_nye
 
Analysis of Testability of a Flight Software Product Line
Analysis of Testability of a Flight Software Product LineAnalysis of Testability of a Flight Software Product Line
Analysis of Testability of a Flight Software Product LineDharmalingam Ganesan
 
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Application Lifecycl...
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Application Lifecycl...Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Application Lifecycl...
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Application Lifecycl...
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Testing 101
Testing 101Testing 101
Testing 101
Noam Barkai
 

Similar to Owasp Il 7 Fuzz Guru (20)

Drupal & Continous Integration - SF State Study Case
Drupal & Continous Integration - SF State Study CaseDrupal & Continous Integration - SF State Study Case
Drupal & Continous Integration - SF State Study Case
 
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Software Testing wit...
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Software Testing wit...Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Software Testing wit...
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Software Testing wit...
 
Hadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault InjectionHadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault Injection
 
Fuzzing: The New Unit Testing
Fuzzing: The New Unit TestingFuzzing: The New Unit Testing
Fuzzing: The New Unit Testing
 
Gallio Crafting A Toolchain
Gallio Crafting A ToolchainGallio Crafting A Toolchain
Gallio Crafting A Toolchain
 
MPD2011 | Александр Додатко "Процесс непрерывной интеграции для iOS проектов"
MPD2011 | Александр Додатко "Процесс непрерывной интеграции для iOS проектов"MPD2011 | Александр Додатко "Процесс непрерывной интеграции для iOS проектов"
MPD2011 | Александр Додатко "Процесс непрерывной интеграции для iOS проектов"
 
FUZZING & SOFTWARE SECURITY TESTING
FUZZING & SOFTWARE SECURITY TESTINGFUZZING & SOFTWARE SECURITY TESTING
FUZZING & SOFTWARE SECURITY TESTING
 
Alm 4 Azure with screenshots
Alm 4 Azure with screenshotsAlm 4 Azure with screenshots
Alm 4 Azure with screenshots
 
Increase testability with code seams
Increase testability with code seamsIncrease testability with code seams
Increase testability with code seams
 
Grails unit testing
Grails unit testingGrails unit testing
Grails unit testing
 
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaJavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and Karma
 
Hadoop testing workshop - july 2013
Hadoop testing workshop - july 2013Hadoop testing workshop - july 2013
Hadoop testing workshop - july 2013
 
Unit testing on embedded target with C++Test
Unit testing on embedded  target with C++TestUnit testing on embedded  target with C++Test
Unit testing on embedded target with C++Test
 
Docker meetup
Docker meetupDocker meetup
Docker meetup
 
Testing NodeJS with Mocha, Should, Sinon, and JSCoverage
Testing NodeJS with Mocha, Should, Sinon, and JSCoverageTesting NodeJS with Mocha, Should, Sinon, and JSCoverage
Testing NodeJS with Mocha, Should, Sinon, and JSCoverage
 
In search of JavaScript code quality: unit testing
In search of JavaScript code quality: unit testingIn search of JavaScript code quality: unit testing
In search of JavaScript code quality: unit testing
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
Analysis of Testability of a Flight Software Product Line
Analysis of Testability of a Flight Software Product LineAnalysis of Testability of a Flight Software Product Line
Analysis of Testability of a Flight Software Product Line
 
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Application Lifecycl...
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Application Lifecycl...Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Application Lifecycl...
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: Application Lifecycl...
 
Testing 101
Testing 101Testing 101
Testing 101
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 

Owasp Il 7 Fuzz Guru

  • 1. Fuzzing in Microsoft and FuzzGuru framework John Neystadt OWASP-IL jney@microsoft.com May-2007 Lead Program Manager Forefront Edge, Microsoft
  • 2. Agenda • Overview – Introduction to Fuzzing – FuzzGuru Architecture – Demo • Testing – Designing Fuzzing Test – Preparation for Fuzz Testing – Performing Fuzz Testing – Completing Fuzzing Coverage – Fuzzing in ISA 2
  • 3. Introduction to Fuzzing • Tired of Code Reviews? – Fuzz testing is about automatic testing of malformed input handling – Fuzzing Target is code, not data. Its white box testing - no need to exhaust all data combinations, that code doesn’t distinguish – In the past dumb fuzzing was made to randomly corrupt bits of data., This penetrates only top data handling layers, since something basic (checksum, first fields) would be broken and inner code paths wouldn’t be reached – Smart is about systematic testing of all code paths that process data. Corrupt fields one by one, preserving general validity of the packet (Content-Length, Checksums, Base64 encoding, etc) 3
  • 4. Case for Fuzzing • Over 70% of security vulnerabilities Microsoft patched in 2006 were found by fuzzing • Many open-source tools and some commercial products that do fuzzing of specific protocols or formats are available • SDL - Microsoft Security Development Lifecycle – Internal “security” bible mandatory for all Microsoft teams – Mandates fuzzing for Files, RPC, DCOM, Network, ActiveXs as part of product development lifecycle 4
  • 5. What I wanted to know about Fuzzing, but didn’t dare to ask • Fuzzing finds Access Violations and Buffer Overruns, not functional problems • Fuzzing requests usually fail, since they are malformed • Often fuzzing bugs are in clean-up code paths: leaks, synchronization and timing issues. • Fuzz both client and server code – simulating malicious server has high chance of finding bugs! • If a bug happens when two independently fields are malformed, FuzzGuru will not find it • Both C++ and C# (or Java) code should be fuzzed if it processes data from untrusted source 5
  • 6. FuzzGuru Architecture FuzzGuru Development Framework Development Guide Schema Editor Simulator +Getting Started +Define Data Schema() +Validate Schema Correctness() +SDK +Define Fuzzing Test Cases() +Validate Template Parsing() +Samples +Import XML XSDs() +Simulate Fuzzing() Fuzzing Stress Framework 1. learn 2. define schema 4. simulate Fuzzing Experiment Configuration Editor 5. create fuzzing experiment configuration +Define Fuzzing Experiments() Input Templates 3. prepare templates +Valid files 6. run manual test +Network captures +Generated by test tool 2.1 reuse existing schemas Command Line (fgcmd.exe) Fuzzing Experiment Runner GUI Ready Fuzzing Schemas +Run Experiment() +Run in GUI() 7. develop automation HTTP +Trace to DBMON() +View Traces in GUI() GZIP Test Owner «datatype» SMTP Fuzzing Experiments FTP use as command line 8. investigate the results DNS +File Fuzzer (using fuzzing schema) SOCKS +XML Fuzzer (using XSD schema) 9. extend the framework MIME +TCP/UDP Clients/Servers +TCP / UDP Man-in-the-middle (Redirector) Test Automation +Custom (implemented by user) +Run Fuzzing Stress() Scripts or Test Harness +Repro Bugs() implement custom experiments +Provide Traces() Investigate the results +Fuzzing Traces «uses» Custom Test Tools +Code Coverage Analysis +Update Test Coverage use fuzzing API from test code Data Fuzzing Framework Extensibility Interfaces Fuzzing API «datatype» «datatype» «datatype» «datatype» Fuzzers Data Elements Encoders Relations +String +String (ANSI, Unicode) +Unicode (UTF*) / Windows Char Set +Presence +Numeric +Binary Data +Base 64 +Buffer / Length +Numeric String +Grouping Elements +Special XML Encoder +Group / Count +Unicode-specific +XML +Custom (implemented by user) +Custom (implemented by user) +XML +Custom (implemented by user) +Group Fuzzers +Custom Fuzzers 6
  • 7. Designing Fuzzing Test • Fuzzing a protocol - create schema or customize a ready one – Define schema for parts of the protocol, need to be fuzzed – More later • Defining fuzzing Test Cases – Fuzzing Test Cases choose a subset of schema (elements and fuzzers) to be applied for relevant scenario – FuzzGuru command line tool gets test case id as parameter – FuzzGuru API requires test case id to generate malformed packets – Test Case can be used for focused fuzzing to test specific fixes • Create fuzzing Templates – Obtain real world data captures or generated by test programmatically – Templates are “equivalence classes”, choose minimum number to cover all your scenarios – Template must adhere to schema, you can use placeholder elements in schema to skip irrelevant parts • Use FuzzGuru GUI Simulator to verify test cases and templates – Verify template is parsed correctly – See which fuzzers are chosen (simulator trace) – Inspect output to inspect malformed requests 7
  • 8. Manual or Automated Fuzz Testing • FuzzGuru Experiments – ready tools for common fuzzing scenarios – Gets schema, mutation template and test case name – Ready tcp/udp server/client, man-in-the middle redirector, file, xml modes – Extensive - can develop custom experiments – Generates “stress” of upto 500 tcp cps or 11,000 udp packets – Supports recording/playback of repro buffer – Generates perf counters – Writes fuzzing traces to dbmon • Manual Test Running (GUI) – Define Experiment Configuration (FuzzGuru GUI, Tools | Experiment Configuration Editor) – Run experiments interactively (FuzzGuru GUI, Tools | Experiment Runner) • Scriptable Automation – Define Experiment Configuration (FuzzGuru GUI, Tools | Experiment Configuration Editor) – Call experiments from command line interface (fgcmd.exe) • Integrate into your own test tools – Call DataFuzzer APIs from your own test tool, providing it schema, mutation template and test case name 8
  • 9. Demo • Run BinUrt2DemoApp.exe • Run HTTP Server Attack Demo – See DemoReadme.mhtml => Part2 for instructions • Results (5 minutes each run): Iterations Scenario Bugs found Test Cases coverage 6500 24% Dumb Fuzzing without template 0 out of 4 Dumb Fuzzing with template 11000 2 from 4 56% (hits: 0, 0, 2, 10) 700 (slow ) 2 from 4 Fuzzing with HTTP Demo 80% Schema without template (hits: 0, 0, 4, 8) 10200 Fuzzing with HTTP Demo 4 from 4 100% Schema with one template (valid) (hits: 1, 7, 64, 143) 9
  • 10. Completing Fuzzing Coverage (Code Coverage) • After running a fuzzing test for a first round it is important to inspect whether all code paths were covered • Magellan Code Coverage tool set is recommended • You should not hunt the numbers, rather review all uncovered code paths – Fuzzing should traverse to all branches that depend on untrusted data – All parsing code should be covered – All error handling and cleanup code should be covered • Note: If there is no code to handle malformed data exist, Code Coverage will not help you! • To add coverage, you may need: – Extend test matrix and fuzzing tests additional configurations of the feature – Add additional fuzzing templates – Extend FuzzGuru with custom fuzzers or elements • Metrics – Expected to reach 75-85% code coverage of parsers code blocks – Per fuzzed DLL: fuzzing usually adds 3%-6% blocks and 3%-8% arcs additional coverage to compared to stress – Per fuzzed source file: fuzzing usually significantly adds the coverage of ~13%. – Per fuzzed function: fuzzing usually significantly adds the coverage of over 17%. 10