Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save richinseattle/ba9ac82f3a44c614aa96f312f435d252 to your computer and use it in GitHub Desktop.
Save richinseattle/ba9ac82f3a44c614aa96f312f435d252 to your computer and use it in GitHub Desktop.

Revisions

  1. richinseattle revised this gist Jan 11, 2017. 1 changed file with 2 additions and 2 deletions.
    Original file line number Diff line number Diff line change
    @@ -52,7 +52,7 @@ This class is meant for professional developers or security researchers looking

    ### Prerequisite Knowledge

    Students should be prepared to tackle challenging and diverse subject matter and be comfortable writing functions in in C/C++ and python to complete exercises involving completing plugins for the discussed platforms. Attendees should have basic experience with debugging native x86/x64 memory corruption vulnerabilities on Linux or Windows.
    Students should be prepared to tackle challenging and diverse subject matter and be comfortable with C/C++ and python to complete exercises involving writing plugins for the discussed platforms. Attendees should have basic experience with debugging native x86/x64 memory corruption vulnerabilities on Linux or Windows.



    @@ -107,7 +107,7 @@ _Afternoon_

    - Evolutionary Fuzzing
    - Code coverage driven fuzzing
    - Modifying targets for optimal evolutionary fuzzing
    - Modifying and analyzing targets for optimal evolutionary fuzzing
    - Best practices for high performance

    - Interactive and scripted crash debugging
  2. richinseattle revised this gist Jan 11, 2017. 1 changed file with 55 additions and 58 deletions.
    113 changes: 55 additions & 58 deletions Vulnerability Discovery and Triage Automation Training - rjohnson.md
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ Jan 11, 2017



    **Overview**
    ### Overview

    This class is designed to introduce students to the best tools and technology available for automating vulnerability discovery and crash triage with a focus on delivering a practical approach to applying this technology in real deployments at any scale.

    @@ -20,13 +20,13 @@ This class will focus on x86/x64 architecture and target Windows and Linux envir



    **Who Should Attend**
    ### Who Should Attend

    This class is meant for professional developers or security researchers looking to add an automation component to their software security analysis. Students wanting to learn a programmatic and tool driven approach to analyzing software vulnerabilities and crash triage will benefit from this course.



    **Key Learning Objectives**
    ### Key Learning Objectives

    - Learn an effective strategy for using the latest tools and technology to discover vulnerabilities
    - Understand applications of static analysis for bug hunting
    @@ -50,88 +50,85 @@ This class is meant for professional developers or security researchers looking



    **Prerequisite Knowledge**
    ### Prerequisite Knowledge

    Students should be prepared to tackle challenging and diverse subject matter and be comfortable writing functions in in C/C++ and python to complete exercises involving completing plugins for the discussed platforms. Attendees should have basic experience with debugging native x86/x64 memory corruption vulnerabilities on Linux or Windows.



    **Hardware / Software Requirements**
    ### Hardware / Software Requirements

    Students should have the latest VMware Player, Workstation, or Fusion working on their machine



    **Agenda**
    ### Agenda

    Day 1: Program Analysis
    **Day 1: Program Analysis**

    Morning:
    Strategies for automating vulnerability discovery
    _Morning_

    - Analyze properties of memory corruption vulnerabilities
    - Understand capabilities and applications of program analysis
    - Strategies for automating vulnerability discovery
    - Analyze properties of memory corruption vulnerabilities
    - Understand capabilities and applications of program analysis

    Programmatic analysis of C/C++ source code
    - Programmatic analysis of C/C++ source code
    - Introduction to advanced pattern matching and AST search
    - Introduction to using dataflow analysis for bug detection
    - Introduction to writing clang-analyzer plugins
    - Exercise: writing clang analyzer plugins

    - Introduction to advanced pattern matching and AST search
    - Introduction to using dataflow analysis for bug detection
    - Introduction to writing clang-analyzer plugins
    - Exercise: writing clang analyzer plugins
    _Afternoon_

    Afternoon:
    Dynamic memory analysis for blackbox bug hunting
    - Dynamic memory analysis for blackbox bug hunting
    - Effectively instrument Linux and Windows with binary translation
    - Introduction to Valgrind and Dr. Memory
    - Code coverage with PIN, DynamoRIO, and DynInst
    - Introduction to dynamic taint analysis with BAP
    - Exercise: writing property checks for taint analysis

    - Effectively instrument Linux and Windows with binary translation
    - Introduction to Valgrind and Dr. Memory
    - Code coverage with PIN, DynamoRIO, and DynInst
    - Introduction to dynamic taint analysis with BAP
    - Exercise: writing property checks for taint analysis
    **Day 2: Fuzzing & Triage I**

    _Morning_

    Day 2: Fuzzing & Triage I
    - Attack surface analysis for blackbox vulnerability research
    - Enumerating trust boundaries
    - Enumerating inputs
    - Leveraging graph reachability analysis

    Morning:
    Attack surface analysis for blackbox vulnerability research
    - Best practices for generational and mutational fuzzing
    - Triggering vulnerabilities through fuzzing
    - Effective mutation engines
    - Effective corpus generation
    - Creating protocol and file format grammars
    - Crash detection

    - Enumerating trust boundaries
    - Enumerating inputs
    - Leveraging graph reachability analysis
    _Afternoon_

    Best practices for generational and mutational fuzzing
    - Evolutionary Fuzzing
    - Code coverage driven fuzzing
    - Modifying targets for optimal evolutionary fuzzing
    - Best practices for high performance

    - Triggering vulnerabilities through fuzzing
    - Effective mutation engines
    - Effective corpus generation
    - Creating protocol and file format grammars
    - Crash detection
    - Interactive and scripted crash debugging
    - Root cause identification for memory corruption bug classes
    - Memory debuggers and code coverage
    - Debugger plugins and scripting APIs

    Afternoon:
    Evolutionary Fuzzing
    **Day 3: Fuzzing & Triage II**

    - Code coverage driven fuzzing
    - Modifying targets for optimal evolutionary fuzzing
    - Best practices for high performance
    _Morning_

    Interactive and scripted crash debugging
    - Advanced Fuzzing

    - Root cause identification for memory corruption bug classes
    - Memory debuggers and code coverage
    - Debugger plugins and scripting APIs
    - Fuzzing kernels and other architectures with QEMU
    - Hybrid fuzzing with concolic execution
    - Browser and language interpreter fuzzing

    _Afternoon_

    Day 3: Fuzzing & Triage II
    - Advanced crash analysis

    Morning:
    Advanced Fuzzing

    - Fuzzing kernels and other architectures with QEMU
    - Hybrid fuzzing with concolic execution
    - Browser and language interpreter fuzzing

    Afternoon:
    Advanced crash analysis

    - Reverse debugging
    - Dynamic taint analysis and graph slicing
    - Forward symbolic execution for exploitability analysis
    - Reverse debugging
    - Dynamic taint analysis and graph slicing
    - Forward symbolic execution for exploitability analysis
  3. richinseattle revised this gist Jan 11, 2017. 1 changed file with 62 additions and 81 deletions.
    143 changes: 62 additions & 81 deletions Vulnerability Discovery and Triage Automation Training - rjohnson.md
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,8 @@ Richard Johnson

    Jan 11, 2017



    **Overview**

    This class is designed to introduce students to the best tools and technology available for automating vulnerability discovery and crash triage with a focus on delivering a practical approach to applying this technology in real deployments at any scale.
    @@ -16,141 +18,120 @@ Finally we approach crash analysis through the lens of scriptable debuggers and

    This class will focus on x86/x64 architecture and target Windows and Linux environments, however some discussion regarding applications to ARM and mobile platforms will also be included and all of the concepts if not the direct tools will be useful in other environments.



    **Who Should Attend**

    This class is meant for professional developers or security researchers looking to add an automation component to their software security analysis. Students wanting to learn a programmatic and tool driven approach to analyzing software vulnerabilities and crash triage will benefit from this course.



    **Key Learning Objectives**

    Learn an effective strategy for using the latest tools and technology to discover vulnerabilities
    - Learn an effective strategy for using the latest tools and technology to discover vulnerabilities
    - Understand applications of static analysis for bug hunting
    - Learn how to decompose programs and analyze them with powerful frameworks

    Understand applications of static analysis for bug hunting
    - Learn how to write basic clang-analyzer plugins

    Learn how to decompose programs and analyze them with powerful frameworks
    - Introduction to intermediate languages for program analysis

    Learn how to write basic clang-analyzer plugins
    - Introduction to graph search, transformation, and slicing

    Introduction to intermediate languages for program analysis
    - Leverage dynamic binary translation for efficient tracing and deep program inspection

    Introduction to graph search, transformation, and slicing
    - Master the latest fuzzing techniques and strategies for file and network fuzzing

    Leverage dynamic binary translation for efficient tracing and deep program inspection
    - Learn grammar fuzzing, evolutionary fuzzing, in-memory fuzzing, and symbolic fuzzing

    Master the latest fuzzing techniques and strategies for file and network fuzzing
    - Best practices for corpus generation, fuzzer deployment, and targeting

    Learn grammar fuzzing, evolutionary fuzzing, in-memory fuzzing, and symbolic fuzzing
    - Apply powerful techniques like taint analysis and graph slicing towards crash analysis

    Best practices for corpus generation, fuzzer deployment, and targeting

    Apply powerful techniques like taint analysis and graph slicing towards crash analysis

    **Prerequisite Knowledge**

    Students should be prepared to tackle challenging and diverse subject matter and be comfortable writing functions in in C/C++ and python to complete exercises involving completing plugins for the discussed platforms. Attendees should have basic experience with debugging native x86/x64 memory corruption vulnerabilities on Linux or Windows.



    **Hardware / Software Requirements**

    Students should have the latest VMware Player, Workstation, or Fusion working on their machine



    **Agenda**

    Day 1: Program Analysis

    Morning:

    Strategies for automating vulnerability discovery

    Analyze properties of memory corruption vulnerabilities

    Understand capabilities and applications of program analysis
    - Analyze properties of memory corruption vulnerabilities
    - Understand capabilities and applications of program analysis

    Programmatic analysis of C/C++ source code

    Introduction to advanced pattern matching and AST search

    Introduction to using dataflow analysis for bug detection

    Introduction to writing clang-analyzer plugins

    Exercise: writing clang analyzer plugins
    - Introduction to advanced pattern matching and AST search
    - Introduction to using dataflow analysis for bug detection
    - Introduction to writing clang-analyzer plugins
    - Exercise: writing clang analyzer plugins

    Afternoon:

    Dynamic memory analysis for blackbox bug hunting

    Effectively instrument Linux and Windows with binary translation

    Introduction to Valgrind and Dr. Memory

    Code coverage with PIN, DynamoRIO, and DynInst
    - Effectively instrument Linux and Windows with binary translation
    - Introduction to Valgrind and Dr. Memory
    - Code coverage with PIN, DynamoRIO, and DynInst
    - Introduction to dynamic taint analysis with BAP
    - Exercise: writing property checks for taint analysis

    Introduction to dynamic taint analysis with BAP

    Exercise: writing property checks for taint analysis

    Day 2: Fuzzing & Triage I

    Morning:

    Attack surface analysis for blackbox vulnerability research
    Morning:
    Attack surface analysis for blackbox vulnerability research

    Enumerating trust boundaries
    - Enumerating trust boundaries
    - Enumerating inputs
    - Leveraging graph reachability analysis

    Enumerating inputs
    Best practices for generational and mutational fuzzing

    Leveraging graph reachability analysis
    - Triggering vulnerabilities through fuzzing
    - Effective mutation engines
    - Effective corpus generation
    - Creating protocol and file format grammars
    - Crash detection

    Best practices for generational and mutational fuzzing

    Triggering vulnerabilities through fuzzing

    Effective mutation engines

    Effective corpus generation

    Creating protocol and file format grammars

    Crash detection

    Afternoon:

    Evolutionary Fuzzing

    Code coverage driven fuzzing

    Modifying targets for optimal evolutionary fuzzing

    Best practices for high performance

    Interactive and scripted crash debugging
    Afternoon:
    Evolutionary Fuzzing

    Root cause identification for memory corruption bug classes
    - Code coverage driven fuzzing
    - Modifying targets for optimal evolutionary fuzzing
    - Best practices for high performance

    Memory debuggers and code coverage
    Interactive and scripted crash debugging

    Debugger plugins and scripting APIs
    - Root cause identification for memory corruption bug classes
    - Memory debuggers and code coverage
    - Debugger plugins and scripting APIs


    Day 3: Fuzzing & Triage II

    Morning:

    Advanced Fuzzing

    Fuzzing kernels and other architectures with QEMU

    Hybrid fuzzing with concolic execution
    Morning:
    Advanced Fuzzing

    Browser and language interpreter fuzzing
    - Fuzzing kernels and other architectures with QEMU
    - Hybrid fuzzing with concolic execution
    - Browser and language interpreter fuzzing

    Afternoon:

    Advanced crash analysis

    Reverse debugging

    Dynamic taint analysis and graph slicing

    Forward symbolic execution for exploitability analysis
    Afternoon:
    Advanced crash analysis

    - Reverse debugging
    - Dynamic taint analysis and graph slicing
    - Forward symbolic execution for exploitability analysis
  4. richinseattle created this gist Jan 11, 2017.
    156 changes: 156 additions & 0 deletions Vulnerability Discovery and Triage Automation Training - rjohnson.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,156 @@
    ## Vulnerability Discovery and Triage Automation Training

    Richard Johnson

    Jan 11, 2017

    **Overview**

    This class is designed to introduce students to the best tools and technology available for automating vulnerability discovery and crash triage with a focus on delivering a practical approach to applying this technology in real deployments at any scale.

    Through an applied understanding of introductory program analysis and binary translation, techniques for finding various bug classes and methods for improved crash debugging will be discussed. We will analyze the properties of memory corruption from integer overflows, uninitialized variables, use-after-free and look at applying tools such as compiler plugins, binary instrumentation frameworks, memory debuggers, and fuzzers to discovering each one.

    Next take a deep dive into fuzzing, covering all aspects of this practical approach to finding bugs. As the most approachable and versatile of the available tools, the student will apply various fuzzing techniques to several real world pieces of software. Students will learn strategies for analyzing attack surface, writing grammars, and generating effective corpus. We will explore in detail the latest innovations such as harnessing code coverage for guided evolutionary fuzzing and symbolic reasoning for concolic fuzzing.

    Finally we approach crash analysis through the lens of scriptable debuggers and program analysis. We will once again look at properties of how memory corruption manifests in a crashing condition. We will apply tools like reverse debugging and memory debugging scripts to assist in interactively diagnosing root cause of crashes. Then we will leverage the power of dynamic taint tracking and graph slicing to help isolate the path of user controlled input in the program and identify the exact input bytes influencing a crash. Finally we will look at possible ways to aid in determining severity of a vulnerability.

    This class will focus on x86/x64 architecture and target Windows and Linux environments, however some discussion regarding applications to ARM and mobile platforms will also be included and all of the concepts if not the direct tools will be useful in other environments.

    **Who Should Attend**

    This class is meant for professional developers or security researchers looking to add an automation component to their software security analysis. Students wanting to learn a programmatic and tool driven approach to analyzing software vulnerabilities and crash triage will benefit from this course.

    **Key Learning Objectives**

    Learn an effective strategy for using the latest tools and technology to discover vulnerabilities

    Understand applications of static analysis for bug hunting

    Learn how to decompose programs and analyze them with powerful frameworks

    Learn how to write basic clang-analyzer plugins

    Introduction to intermediate languages for program analysis

    Introduction to graph search, transformation, and slicing

    Leverage dynamic binary translation for efficient tracing and deep program inspection

    Master the latest fuzzing techniques and strategies for file and network fuzzing

    Learn grammar fuzzing, evolutionary fuzzing, in-memory fuzzing, and symbolic fuzzing

    Best practices for corpus generation, fuzzer deployment, and targeting

    Apply powerful techniques like taint analysis and graph slicing towards crash analysis

    **Prerequisite Knowledge**

    Students should be prepared to tackle challenging and diverse subject matter and be comfortable writing functions in in C/C++ and python to complete exercises involving completing plugins for the discussed platforms. Attendees should have basic experience with debugging native x86/x64 memory corruption vulnerabilities on Linux or Windows.

    **Hardware / Software Requirements**

    Students should have the latest VMware Player, Workstation, or Fusion working on their machine

    **Agenda**

    Day 1: Program Analysis

    Morning:

    Strategies for automating vulnerability discovery

    Analyze properties of memory corruption vulnerabilities

    Understand capabilities and applications of program analysis

    Programmatic analysis of C/C++ source code

    Introduction to advanced pattern matching and AST search

    Introduction to using dataflow analysis for bug detection

    Introduction to writing clang-analyzer plugins

    Exercise: writing clang analyzer plugins

    Afternoon:

    Dynamic memory analysis for blackbox bug hunting

    Effectively instrument Linux and Windows with binary translation

    Introduction to Valgrind and Dr. Memory

    Code coverage with PIN, DynamoRIO, and DynInst

    Introduction to dynamic taint analysis with BAP

    Exercise: writing property checks for taint analysis

    Day 2: Fuzzing & Triage I

    Morning:

    Attack surface analysis for blackbox vulnerability research

    Enumerating trust boundaries

    Enumerating inputs

    Leveraging graph reachability analysis

    Best practices for generational and mutational fuzzing

    Triggering vulnerabilities through fuzzing

    Effective mutation engines

    Effective corpus generation

    Creating protocol and file format grammars

    Crash detection

    Afternoon:

    Evolutionary Fuzzing

    Code coverage driven fuzzing

    Modifying targets for optimal evolutionary fuzzing

    Best practices for high performance

    Interactive and scripted crash debugging

    Root cause identification for memory corruption bug classes

    Memory debuggers and code coverage

    Debugger plugins and scripting APIs


    Day 3: Fuzzing & Triage II

    Morning:

    Advanced Fuzzing

    Fuzzing kernels and other architectures with QEMU

    Hybrid fuzzing with concolic execution

    Browser and language interpreter fuzzing

    Afternoon:

    Advanced crash analysis

    Reverse debugging

    Dynamic taint analysis and graph slicing

    Forward symbolic execution for exploitability analysis