Security Code Analysis Tools


  • Final goal of the security code review process is to:
    • improve the overall security of the product
    • provide output that can be used by the devs to make changes or mitigations
  • Each approach to software security analysis has different advantages

Advantages of Static Code Analysis

  1. Access to the actual instructions the software will be executing
    • No need to guess or interpret behavior
    • Full access to all the software’s possible behaviors
  2. Can find the exact location of weaknesses in the code
  3. Can be conducted by trained software assurance developers who fully understand code
  4. Allows quick turnaround for fixes
  5. Relatively fast if automated tools are used
  6. Automated tools can scan the entire code base
  7. Automated tools can provide mitigation recommendations, reducing research time
  8. Permits weaknesses to be found earlier in the development lifecycle, reducing the cost to fix

Limitations of Static Code Analysis

  1. Requires access to source code or at least binary code
    • typically needs access to enough software artifacts to execute a build
  2. Typically requires proficiency in running software builds
  3. Will not find issues related to operational deployment environments
  4. Time-consuming if conducted manually
  5. Automated tools do not support all programming languages
  6. Automate tools produce false positives and false negatives
  7. Are not enough trained personnel to thoroughly conduct static code analysis
  8. Automated tools can provide a false sense of security that everything is being addressed
  9. Automated tools are only as good as the rules they are using to scan with
  10. Does not find vulnerabilities introduced in the runtime environment

Advantages of Dynamic Code Analysis

  1. No access to actual instructions being executed
    • tool is exercising the application
    • Pattern matching on requests and responses
  2. Requires only a running system to perform a test
  3. No requirement to have access to source code or binary code
  4. No need to understand how to write software or execute builds
  5. Tests a specific operational deployment
    • Can find infrastructure, configuration, and patch errors that static analysis tools will miss
  6. Identifies vulnerabilities in a runtime environment
  7. Automated tools provide flexibility on what to scan for
  8. Allows for analysis of applications without access to the actual code
  9. Identifies vulnerabilities that might have been false negatives in the static code analysis
  10. Permits validation of static code analysis findings
  11. Can be conducted on any application

Limitations of Dynamic Code Analysis

  1. Automated tools provide a false sense of security that everything is being addressed
  2. Automated tools produce false positives and false negatives
  3. Automated tools are only as good as the rules they are using to scan with
  4. not enough trained personnel to thoroughly conduct dynamic code analysis
  5. more difficult to trace the vulnerability back to the exact location in the code, taking longer to fix the problem

Advantages of Fuzzing

  1. the test design is extremely simple, and free of preconceptions about system behavior
  2. systematical/random approach allows this method to find bugs that would often be missed by human eyes
  3. Bugs found using fuzz testing are frequently severe, exploitable bugs that could be used by a real attacker

Limitations of Fuzzing

  1. Fuzzers usually tend to find simple bugs
    • the more a fuzzer is protocol-aware, the fewer weird errors it will find
  2. when you do some black-box testing, you usually attack a closed system, which increases the difficulty of evaluating the danger/impact of the found vulnerability
  3. main problem with fuzzing to find program faults is that it generally finds only very simple fault
    • problem itself is exponential
      • every fuzzer takes shortcuts to find something interesting in a timeframe that a human cares about

Advantages of Manual Code Review

  1. Requires no supporting technology
  2. Can be applied to a variety of situations
  3. Flexible
  4. Promotes teamwork
  5. Early in the SDLC

Limitations of Manual Code Review

  1. Can be time-consuming
  2. Supporting material not always available
  3. Requires significant human thought and skill to be effective