Software Security

Get Started. It's Free
or sign up with your email address
Rocket clouds
Software Security by Mind Map: Software Security

1. Part 1: Software Security Fundamentals

1.1. 1. Defining a Discipline

1.1.1. The Security Problem

1.1.1.1. The Trinity of Trouble: Why the Problem is Growing

1.1.1.1.1. Connectivity

1.1.1.1.2. Extensibility

1.1.1.1.3. Complexity

1.1.1.2. Basic Science

1.1.2. Security Problems in Software

1.1.2.1. Bugs and Flaws and Defects, Oh My!

1.1.2.1.1. Defect

1.1.2.1.2. Bug

1.1.2.1.3. Flaw

1.1.2.1.4. Risk

1.1.2.2. The Range of Defects

1.1.2.3. The Problem with Application Security

1.1.2.3.1. Application Security Testing Tools: Good or Bad?

1.1.2.4. Software Security and Operations

1.1.2.4.1. Security versus Software

1.1.3. Solving the Problem: The Three Pillars of Software Security

1.1.3.1. Pillar 1: Applied Risk Management

1.1.3.2. Pillar 2: Software Security Touchpoints

1.1.3.2.1. Microsoft's Trustworthy Computing Initiative

1.1.3.3. Pillar 3: Knowledge

1.1.4. The Rise of Security Engineering

1.1.4.1. Software Security Is Everyone's Job

1.2. 2. A Risk Management Framework

1.2.1. Putting Risk Management into Practice

1.2.2. How to use This Chapter

1.2.3. The Five Stages of Activity

1.2.3.1. Stage 1: Understand the Business Context

1.2.3.2. Stage 2: Identify the Business and Technical Risks

1.2.3.3. Stage 3: Synthesize and Rank the Risks

1.2.3.4. Stage 4: Define the Risk Mitigation Strategy

1.2.3.5. Stage 5: Carry Out Fixes and Validate

1.2.3.6. Measuring and Reporting on Risk

1.2.4. The RMF Is a Multilevel Loop

1.2.5. Applying the RMF: KillerAppCo's iWare 1.0 Server

1.2.5.1. Understanding the Business Context

1.2.5.1.1. Gathering the Artifacts

1.2.5.1.2. Conducting Project Research

1.2.5.2. Identifying the Business and Technical Risks

1.2.5.2.1. Developing Risk Questionaires

1.2.5.2.2. Interviewing the Target Project Team

1.2.5.2.3. Analyzing the Research and Interview Data

1.2.5.2.4. Uncovering Technical Risks

1.2.5.2.5. Analyzing Software Artifacts

1.2.5.3. Synthesizing and Ranking the Risks

1.2.5.3.1. Reviewing the Risk Data

1.2.5.3.2. Conducting the Business and Technical Peer Review

1.2.5.4. Defining the Risk Mitigation Strategy

1.2.5.4.1. Brainstorming on Risk Mitigation

1.2.5.4.2. Authoring the Risk Analysis Report

1.2.5.4.3. Producing Final Deliverables

1.2.5.5. Carrying Out Fixes and Validating

1.2.6. The Importance of Measurement

1.2.6.1. Measuring Return

1.2.6.2. Measurement and Metrics in the RMF

1.2.7. The Cigital Workbench

1.2.8. Risk Management Is a Framework for Software Security

2. Part 2: Seven Touchpoints for Software Security

2.1. 3. Introduction to Software Security Touchpoints

2.1.1. Flyover: Seven Terrific Touchpoints

2.1.1.1. 1. Code Review (Tools)

2.1.1.2. 2. Architectural Risk Analysis

2.1.1.3. 3. Penetration Testing

2.1.1.4. 4. Risk-Based Security Testing

2.1.1.5. 5. Abuse Cases

2.1.1.6. 6. Security Requirements

2.1.1.7. 7. Security Operations

2.1.1.8. *. External Analysis

2.1.1.9. Security Requirments

2.1.1.10. Why Only Seven?

2.1.2. Black and White: Two Threads Inextricably Interwined

2.1.3. Moving Left

2.1.4. Touchpoints as Best Practices

2.1.4.1. Coder's Corner

2.1.5. Who Should Do Software Security?

2.1.5.1. Building a Software Security Group

2.1.5.1.1. Don't start with security people

2.1.5.1.2. Software Security in the Academy

2.1.5.1.3. Start with software people

2.1.5.2. Software Security Is a Multidisciplinary Effort

2.1.5.2.1. Creativity in a New Discipline

2.1.6. Touchpoints to Success

2.2. 4. Code Review with a Tool

2.2.1. Catching Implementation Bugs Early (with a Tool)

2.2.1.1. Binary Analysis?!

2.2.2. Aim for Good, Not Perfect

2.2.3. Ancient History

2.2.4. Approaches to Static Analysis

2.2.4.1. A History of Rule Coverage

2.2.4.2. Modern Rules

2.2.5. Tools from Researchland

2.2.5.1. Modern Security Rules Schema

2.2.5.2. A Complete Modern Rule

2.2.6. Commercial Tool Vendors

2.2.6.1. Commercial Source Code Analyzers

2.2.6.2. Key Characteristics of a Tool

2.2.6.2.1. Be designed for security

2.2.6.2.2. Support multiple tiers

2.2.6.2.3. Be extensible

2.2.6.2.4. Be useful for security analysts and developers alike

2.2.6.2.5. Support existing development processes

2.2.6.2.6. Make sense to multiple stakeholders

2.2.6.3. Three Characteristics to Avoid

2.2.6.3.1. Too many false positives

2.2.6.3.2. Spotty integration with IDEs

2.2.6.3.3. Single-minded support for C

2.2.6.4. The Fortify Source Code Analysis Suite

2.2.6.4.1. The Fortify Knowledge Base

2.2.6.4.2. Using Fortify

2.2.7. Touchpoint Process: Code Review

2.2.8. Use a Tool to Find Security Bugs

2.3. 5. Architectural Risk Analysis

2.3.1. Common Themes among Security Risk Analysis Approaches

2.3.1.1. Basic substeps

2.3.1.1.1. Learn as much as possible about the target of analysis

2.3.1.1.2. Discuss security issues surrounding the software

2.3.1.1.3. Determine probability of compromise

2.3.1.1.4. Perform impact analysis

2.3.1.1.5. Rank risks

2.3.1.1.6. Develop a mitigation strategy

2.3.1.1.7. Report findings

2.3.1.2. Risk Analysis in Practice

2.3.1.3. Risk Analysis Fits in the RMF

2.3.2. Traditional Risk Analysis Terminology

2.3.3. Knowledge Requirement

2.3.4. The Necessity of a Forest-Level View

2.3.5. A Traditional Example of a Risk Calculation

2.3.6. Limitations of Traditional Approaches

2.3.7. Modern Risk Analysis

2.3.8. Touchpoint Process: Architectural Risk Analysis

2.3.9. Getting Started with Risk Analysis

2.3.10. Architectural Risk Analysis Is a necessity

2.4. 6. Software Penetration Testing

2.4.1. Software Penetration Testing

2.4.2. Penetration Testing Today

2.4.3. Software Penetration Testing a Better Approach

2.4.4. Incorporating Findings Back into Development

2.4.5. Using Penetration Tests to Assess the Application Landscape

2.4.6. Proper Penetration Testing Is Good

2.5. 7. Risk-Based Security Testing

2.5.1. From Outside → In to Inside → Out

2.5.2. What's So Different about Security?

2.5.3. Risk Management and Security Testing

2.5.4. How to Approach Security Testing

2.5.4.1. Who

2.5.4.2. How

2.5.4.3. An Example: Java Card Security Testing

2.5.4.3.1. Automating Security Testing

2.5.4.3.2. Results: Nonfunctional Security Testing Is Essential

2.5.4.4. Coder's Corner

2.5.5. Thinking about (Malicious) Input

2.5.5.1. eXtreme Programming and Security Testing

2.5.6. Getting Over Input

2.5.7. Leapfrogging the Penetration Test

2.6. 8. Abuse Cases

2.6.1. Holding Software Vendors Accountable

2.6.2. Security Is Not a Set of Features

2.6.3. What You Can't Do

2.6.4. Creating Useful Abuse Cases

2.6.4.1. But No One Would Ever Do That!

2.6.5. Touchpoint Process: Abuse Case Development

2.6.5.1. Creating Anti-Requirements

2.6.5.1.1. Coders Corner

2.6.5.2. Creating an Attack Model

2.6.6. An Abuse Case Example

2.6.6.1. Attack Patterns from Exploiting Software

2.6.6.1.1. Make the client invisible

2.6.6.1.2. Target programs that write to privileged OS resources

2.6.6.1.3. Use a user-supplied configuration file to run commands that elevate privilege

2.6.6.1.4. make use of configuration file search paths

2.6.6.1.5. direct access to executable files

2.6.6.1.6. embedding scripts within scripts

2.6.6.1.7. leverage executable code in nonexecutable files

2.6.6.1.8. argument injection

2.6.6.1.9. command delimiters

2.6.6.1.10. multiple parsers and double escapes

2.6.6.1.11. user-supplied variable passed to filesystem calls

2.6.6.1.12. postfix NULL terminator

2.6.6.1.13. postfix, null terminate, and backslash

2.6.6.1.14. relative path traversal

2.6.6.1.15. client-controlled environment variables

2.6.6.1.16. user-supplied global variables (DEBUG=1, PHP Globals,...)

2.6.6.1.17. session id, resource id, and blind trust

2.6.6.1.18. analog in-band switching signals (aka "Blue Boxing")

2.6.6.1.19. Attack pattern fragment: manipulating terminal devices

2.6.6.1.20. simple script injection

2.6.6.1.21. embedding scripts in nonscript elements

2.6.6.1.22. XSS in HTTP headers

2.6.6.1.23. HTTP query strings

2.6.6.1.24. User-controlled filenames

2.6.6.1.25. passing local filenames to functions that expect a URL

2.6.6.1.26. Meta-characters in E-mail Headers

2.6.6.1.27. Filesystem function injection, content based

2.6.6.1.28. Client-side injection, buffer overflow

2.6.6.1.29. cause web server misclassification

2.6.6.1.30. Alternate Encoding of the leading ghost characters

2.6.6.1.31. using slashes in alternate encoding

2.6.6.1.32. using escaped slashes in alternate encoding

2.6.6.1.33. unicode encoding

2.6.6.1.34. UTF-8 encoding

2.6.6.1.35. URL encoding

2.6.6.1.36. Alternative IP addresses

2.6.6.1.37. slashes and URL encoding combined

2.6.6.1.38. web logs

2.6.6.1.39. overflow binary resource files

2.6.6.1.40. overflow variables and tags

2.6.6.1.41. overflow symbolic links

2.6.6.1.42. MIME conversion

2.6.6.1.43. HTTP cookies

2.6.6.1.44. Filter failure through buffer overflow

2.6.6.1.45. Buffer overflow with environment variables

2.6.6.1.46. Buffer overflow in an API call

2.6.6.1.47. Buffer overflow in local command-line utilities

2.6.6.1.48. parameter expansion

2.6.6.1.49. String format overflow in syslog()

2.6.7. Abuse Cases Are Useful

2.7. 9. Software Security Meets Security Operations

2.7.1. Don't Stand So Close to Me

2.7.2. Kumbaya (for Software Security)

2.7.2.1. Requirements: Abuse Cases

2.7.2.2. Design: Business Risk Analysis

2.7.2.3. Design: Architectural Risk Analysis

2.7.2.4. Test Planning: Security Testing

2.7.2.5. Implementation: Code Review

2.7.2.6. System Testing: Penetration Testing

2.7.2.6.1. Know When Enough Is Too Much

2.7.2.7. Fielded System: Deployment and Operations

2.7.3. Come Together (Right Now)

2.7.3.1. The Infosec Boogey Man

2.7.3.2. Coders Corner

2.7.4. Future's So Bright, I Gotta Wear Shades

3. Part 3: Software Security Grows Up

3.1. 10. An Enterprise Software Security Program

3.1.1. The Business Climate

3.1.2. Building Blocks of Change

3.1.2.1. Overcoming Common Pitfalls

3.1.2.1.1. Over-reliance on Late-Lifecycle Testing

3.1.2.1.2. Management without Measurement

3.1.2.1.3. Training without Assessment

3.1.2.1.4. Lack of High-Level Commitment

3.1.2.2. Cigital change program maturity path sequence (6 phases)

3.1.2.2.1. Stop the bleeding

3.1.2.2.2. Harvest the low-hanging fruit

3.1.2.2.3. Establish a foundation

3.1.2.2.4. Craft core competencies

3.1.2.2.5. Develop differentiators

3.1.2.2.6. Build out nice-to-haves

3.1.3. Building an Improvement Program

3.1.4. Establishing a Metrics Program

3.1.4.1. A Three-Step Enterprise Rollout

3.1.5. Continous Improvement

3.1.6. What about COTS (and Existing Software Applications)?

3.1.6.1. An Enterprise Information Architecture

3.1.7. Adopting a Secure Development Lifecycle

3.2. 11. Knowledge for Software Security

3.2.1. Experience, Expertise, and Security

3.2.2. Security Knowledge: A Unified View

3.2.2.1. Software Security Unified Knowledge Architecture

3.2.2.2. A Bird's-Eye View of Software Security Knowledge Catalogs

3.2.2.2.1. Principles

3.2.2.2.2. Guidelines

3.2.2.2.3. Rules

3.2.2.2.4. Attack patterns

3.2.2.2.5. Historical risks

3.2.2.2.6. Vulnerabilities

3.2.2.2.7. Exploits

3.2.3. Security Knowledge and the Touchpoints

3.2.4. The Department of Homeland Security Build Security In Portal

3.2.4.1. Knowledge Catalog: Principle Item: Principle of Least Privilege

3.2.4.1.1. A Principle

3.2.4.1.2. A Rule

3.2.4.2. Aspects of Software Assurance

3.2.4.2.1. Best Practices

3.2.4.2.2. Knowledge

3.2.4.2.3. Tools

3.2.4.2.4. Business case

3.2.4.2.5. Dynamic navigation

3.2.5. Knowledge Management Is Ongoing

3.2.6. Software Security Now

3.3. 12. A Taxonomy of Coding Errors

3.3.1. On Simplicity: Seven Plus of Minus Two

3.3.1.1. Input Validation and Representation

3.3.1.2. API Abuse

3.3.1.3. Security Features

3.3.1.4. Time and State

3.3.1.5. Error Handling

3.3.1.6. Code Quality

3.3.1.7. Encapsulation

3.3.1.8. Environment

3.3.2. The Phyla

3.3.2.1. Input Validation and Representation

3.3.2.1.1. Buffer Overflow

3.3.2.1.2. Command Injection

3.3.2.1.3. Cross-Site Scripting

3.3.2.1.4. Format String

3.3.2.1.5. HTTP Response Splitting

3.3.2.1.6. Illegal Pointer Value

3.3.2.1.7. Integer Overflow

3.3.2.1.8. Log Forging

3.3.2.1.9. Path Traversal

3.3.2.1.10. Process Control

3.3.2.1.11. Resource Injection

3.3.2.1.12. Setting Manipulation

3.3.2.1.13. SQL Injection

3.3.2.1.14. String Termination Error

3.3.2.1.15. Struts

3.3.2.1.16. Unsafe JNI

3.3.2.1.17. Unsafe Reflection

3.3.2.1.18. XML Validation

3.3.2.2. API Abuse

3.3.2.2.1. Dangerous Function

3.3.2.2.2. Directory Restriction

3.3.2.2.3. Heap Inspection

3.3.2.2.4. J2EE Bad Practices

3.3.2.2.5. Often misused

3.3.2.2.6. Unchecked Return Value

3.3.2.3. Security Features

3.3.2.3.1. Insecure Randomness

3.3.2.3.2. Least Privilege Violation

3.3.2.3.3. Missing Access Control

3.3.2.3.4. Password Management

3.3.2.3.5. Privacy Violation

3.3.2.4. Time and State

3.3.2.4.1. Deadlock

3.3.2.4.2. Failure to Begin a New Session upon Authentication

3.3.2.4.3. File Access Race Condition: TOCTOU

3.3.2.4.4. Insecure Temporary File

3.3.2.4.5. J2EE Bad Practices

3.3.2.4.6. Signal Handling Race Conditions

3.3.2.5. Error Handling

3.3.2.5.1. Catch NullPointerException

3.3.2.5.2. Empty Catch Block

3.3.2.5.3. Overly Broad Catch Block

3.3.2.5.4. Overly Broad Throws Declaration

3.3.2.5.5. Unchecked Return Value

3.3.2.6. Code Quality

3.3.2.6.1. Double Free

3.3.2.6.2. Inconsistent Implementations

3.3.2.6.3. Memory Leak

3.3.2.6.4. Null Dereference

3.3.2.6.5. Obsolete

3.3.2.6.6. Undefined Behavior

3.3.2.6.7. Uninitialized Variable

3.3.2.6.8. Unreleased Resource

3.3.2.6.9. Use After Free

3.3.2.7. Encapsulation

3.3.2.7.1. Comparing Classes by Name

3.3.2.7.2. Data Leaking Between Users

3.3.2.7.3. Leftover Debug Code

3.3.2.7.4. Mobile Code

3.3.2.7.5. Private Array-Typed Field Returned from a Public Method

3.3.2.7.6. Public Data Assigned to Private Array-Typed Field

3.3.2.7.7. System Information Leak

3.3.2.7.8. Trust Boundary Violation

3.3.2.8. Environment

3.3.2.8.1. ASP .NET Misconfiguration

3.3.2.8.2. Insecure Compiler Optimization

3.3.2.8.3. J2EE Misconfiguration

3.3.2.9. More Phyla Needed

3.3.3. A Complete Example

3.3.3.1. Often Misused: Authentication

3.3.3.1.1. Abstract

3.3.3.1.2. Explanation

3.3.3.1.3. Recommendations

3.3.4. Lists, Piles, and Collections

3.3.4.1. Academic Literature

3.3.4.1.1. Vulnerabilities

3.3.4.1.2. Attacks

3.3.4.1.3. Toward a Taxonomy

3.3.4.2. Nineteen Sins Meet Seven Kingdoms

3.3.4.2.1. Input Validation and Representation

3.3.4.2.2. API Abuse

3.3.4.2.3. Security Features

3.3.4.2.4. Time and State

3.3.4.2.5. Error Handling

3.3.4.2.6. Code Quality

3.3.4.2.7. Encapsulation

3.3.4.2.8. Environment

3.3.4.3. Seven Kingdoms and the OWASP Ten

3.3.4.3.1. Input Validation and Representation

3.3.4.3.2. API Abuse

3.3.4.3.3. Security Features

3.3.4.3.4. Time and State

3.3.4.3.5. Error Handling

3.3.4.3.6. Code Quality

3.3.4.3.7. Encapsulation

3.3.4.3.8. Environment

3.3.5. Go Forth (with the Taxonomy) and Prosper

3.3.5.1. Taxonomy goals

3.3.5.1.1. Simple

3.3.5.1.2. Intuitive to a developer

3.3.5.1.3. Practical (rather than theoretical and comprehensive)

3.3.5.1.4. Amenable to automatic identification of errors with static analysis tools

3.3.5.1.5. Adaptable with respect to changes in trends that happen over time