Finding and Defending Against Modern Software Vulnerabilities
Introduction: The Patch Is Not the Goal
- What This Book Covers
- Who Should Read This Book
- How to Use This Book
- The Central Argument
Chapter 1: The Anatomy of a Software Vulnerability
- What Is a Vulnerability
- Vulnerabilities, Threats, Risks and Attacks
- The Persistence Problem
- Classes, Patterns and Taxonomies
- From Bug to Vulnerability to Exploit
Chapter 2: Attack Surfaces, Trust Boundaries and Security Architecture
- Defining and Mapping Attack Surfaces
- Trust Boundaries and the Principle of Least Privilege
- Defense in Depth and Security Layers
- Secure Architecture Patterns
- The Cost of Architectural Debt
Chapter 3: Threat Modeling and Risk Assessment
- What Threat Modeling Actually Does
- Structured Threat Modeling Frameworks
- Attack Trees and Attack Graphs
- Quantitative and Qualitative Risk Assessment
- Integrating Threat Models into Development
Chapter 4: The Vulnerability Lifecycle
- When Vulnerabilities Are Introduced
- Discovery Channels
- Disclosure Policies and Coordinated Disclosure
- Patch Development and Deployment
- Exploitation and Afterlife
Chapter 5: Memory Corruption Foundations
- Stack, Heap and Program Memory
- Undefined Behavior and the C Memory Model
- Compiler Optimizations and Security
- Hardware Mitigations and ASLR
- The Exploitation Chain
Chapter 6: Buffer Overflows and Stack Exploitation
- Stack-Based Buffer Overflows
- Return Address Hijacking
- Shellcode and Code Injection
- Stack Canaries and Stack Protectors
- Modern Stack Exploitation Bypasses
Chapter 7: Heap Exploitation and Use-After-Free
- How Heaps Work and Why They Are Dangerous
- Use-After-Free Vulnerabilities
- Double-Free and Heap Metadata Corruption
- Heap Spraying and Feng Shui
- Hardened Allocators and Heap Protections
Chapter 8: Race Conditions and Concurrency Vulnerabilities
- Time-of-Check to Time-of-Use
- Thread Safety and Locking Failures
- File System and Network Race Conditions
- Kernel and Privileged Context Races
- Detecting and Preventing Race Conditions
Chapter 9: Injection Vulnerabilities
- The Injection Paradigm
- SQL Injection Mechanics
- OS Command and Shell Injection
- Path Traversal and Directory Escapes
- Parameterization and Safe Patterns
Chapter 10: Broken Authentication and Authorization
- Authentication Design Failures
- Session Management Vulnerabilities
- Broken Access Control and Privilege Escalation
- Insecure Direct Object References
- JWT and Modern Authentication Pitfalls
Chapter 11: Cross-Site Scripting and Browser-Based Attacks
- The XSS Spectrum
- DOM-Based XSS and Client-Side Injection
- Same-Origin Policy and Its Evasion
- Content Security Policy
- Prototype Pollution and JavaScript Risks
Chapter 12: Cross-Site Request Forgery and API Vulnerabilities
- Cross-Site Request Forgery
- REST API Vulnerability Patterns
- GraphQL-Specific Risks
- WebSockets and Real-Time API Flaws
- API Authentication and Rate Limiting Failures
Chapter 13: Insecure Deserialization and Data Processing
- Why Deserialization Is Dangerous
- Java Deserialization Gadget Chains
- PHP and Python Deserialization Flaws
- Server-Side Template Injection
- XML External Entity and Markup Processing
Chapter 14: Cryptographic Vulnerabilities
- Algorithmic and Protocol Weaknesses
- Key Management Failures
- Implementation Vulnerabilities
- Side-Channel Attacks
- Cryptographic Agility and Migration
Chapter 15: Server-Side Request Forgery and Network-Level Flaws
- Server-Side Request Forgery
- HTTP Request Smuggling
- DNS Rebinding and Resolution Attacks
- Proxy and Load Balancer Vulnerabilities
Chapter 16: Cloud, Container and Microservice Vulnerabilities
- Cloud Provider Misconfigurations
- Container Escape Vulnerabilities
- Kubernetes Security Issues
- Microservice Authentication and Segmentation
- Infrastructure as Code Risks
Chapter 17: Mobile and Cross-Platform Vulnerabilities
- Mobile Attack Surfaces
- Insecure Data Storage and Transmission
- Inter-Process Communication Vulnerabilities
- WebView and JavaScript Bridge Flaws
- Cross-Platform Framework Risks
Chapter 18: Operating System and Firmware Vulnerabilities
- Kernel Vulnerabilities and Privilege Escalation
- Driver-Level Security Failures
- Bootloader and UEFI Vulnerabilities
- Firmware and Embedded System Flaws
- Hardware-Assisted Security and Its Limits
Chapter 19: Software Supply Chain and Dependency Vulnerabilities
- The Dependency Problem
- Package Repository Compromise
- Build System and CI/CD Vulnerabilities
- Software Composition Analysis
- Supply Chain Attack Defense Strategies
Chapter 20: AI and Machine Learning System Vulnerabilities
- Adversarial Examples and Model Evasion
- Data Poisoning and Training Attacks
- Model Extraction and Inversion
- Prompt Injection and LLM-Specific Flaws
- Securing AI Systems and Pipelines
Chapter 21: Static Analysis and Source Code Auditing
- Static Analysis Fundamentals
- Tool Categories and Techniques
- Manual Code Review Methodology
- Integrating SAST into CI/CD
- False Positives, False Negatives and Validation
Chapter 22: Dynamic Analysis, Fuzzing and Runtime Instrumentation
- Dynamic Analysis Approaches
- Fuzzing Methodology and Tools
- Runtime Instrumentation Techniques
- Combining Dynamic and Static Analysis
Chapter 23: Reverse Engineering and Binary Analysis
- Reverse Engineering Fundamentals
- Static and Dynamic Binary Analysis
- Vulnerability Identification in Compiled Code
- The Skills Required for Binary Analysis
Chapter 24: The Vulnerability Management Lifecycle
- Discovery and Triage
- Severity Assessment and Exploitability Analysis
- Risk-Based Prioritization
- Remediation Planning
- Deployment and Regression Testing
- Post-Remediation Monitoring and Continuous Improvement
Chapter 25: Beyond Patching, Root Cause Elimination and Architectural Resilience
- The Limits of Patching
- Root Cause Analysis and Elimination
- Attack Surface Reduction
- Architectural Security and Defense in Depth
- Resilience When Patches Are Unavailable
- The Patching-Plus Strategy
Chapter 26: Integrating Security into the Software Development Lifecycle
- SDLC Integration Frameworks
- DevSecOps Practices
- Secure Coding Standards and Training
- Security Testing Automation
- Security Ownership Models
Chapter 27: Organizational, Policy and Regulatory Dimensions
- Vulnerability Disclosure Programs
- Coordinated Vulnerability Disclosure
- Incident Response and Vulnerability Management
- Regulatory and Compliance Considerations
- Security Metrics and Governance
- Cultural Factors
Chapter 28: Emerging Threats and Future Directions
- AI-Powered Attacks and Defenses
- Increased Automation in Vulnerability Exploitation
- Quantum Computing and Cryptography
- IoT, Edge Computing and Operational Technology
- The Future of Vulnerability Research and Management