Part II: Vulnerability Study Chapter 14

Defense & Mitigation Strategies

Zero Trust architecture, network detection and response, incident handling, security operations, and comprehensive defense frameworks

Chapter 14: Defense & Mitigation Strategies

The Zero Trust Mandate

In May 2021, President Biden signed Executive Order 14028, mandating that U.S. federal agencies adopt Zero Trust architecture. This wasn’t just policy posturingβ€”it was a response to years of devastating breaches that traditional perimeter security had failed to prevent.

SolarWinds showed that attackers inside the network could move laterally for months. The Colonial Pipeline ransomware attack disrupted fuel supply to the eastern United States. Microsoft Exchange vulnerabilities exposed thousands of organizations. Each incident highlighted the same fundamental failure: once attackers got past the perimeter, they had free reign.

Zero Trust represents a paradigm shift: assume breach, verify explicitly, and enforce least privilege. But Zero Trust alone isn’t enough. Organizations need detection capabilities, incident response plans, and security operations that can identify and respond to threats in real-time.

This chapter synthesizes the defensive techniques introduced throughout Part II into a comprehensive security strategy, from architecture to operations.


Defense in Depth Revisited

Layered Security Model

Modern Defense in Depth

Modern Defense in Depth:
═══════════════════════════════════════════════════════════════════

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    GOVERNANCE & POLICY                          β”‚
β”‚  Security policies, standards, compliance, risk management      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    IDENTITY & ACCESS                            β”‚
β”‚  IAM, MFA, privileged access, zero trust principles             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    PERIMETER DEFENSE                            β”‚
β”‚  Firewalls, WAF, DDoS protection, email security                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    NETWORK SECURITY                             β”‚
β”‚  Segmentation, IDS/IPS, NDR, network monitoring                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    ENDPOINT SECURITY                            β”‚
β”‚  EDR, antimalware, patch management, hardening                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    APPLICATION SECURITY                         β”‚
β”‚  Secure development, code review, SAST/DAST, WAF rules          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    DATA SECURITY                                β”‚
β”‚  Encryption, DLP, classification, access controls               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              SECURITY OPERATIONS & RESPONSE                     β”‚
β”‚  SIEM, SOC, incident response, threat hunting                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Defense Categories

LayerPreventiveDetectiveResponsive
NetworkFirewall, segmentationIDS, NDRIsolation, blocking
EndpointAV, hardeningEDR, loggingQuarantine, wipe
IdentityMFA, least privilegeBehavior analyticsAccount disable
DataEncryption, DLPData monitoringAccess revocation
ApplicationInput validationWAF, RASPPatching, rollback

Zero Trust Architecture

Zero Trust Principles

Zero Trust Fundamentals

Zero Trust Fundamentals:
═══════════════════════════════════════════════════════════════════

CORE PRINCIPLES:
1. NEVER TRUST, ALWAYS VERIFY
   - Authenticate every access request
   - Continuous verification, not one-time

2. ASSUME BREACH
   - Design as if attacker is already inside
   - Limit blast radius of compromise

3. VERIFY EXPLICITLY
   - All data points: user, device, location, resource
   - Real-time risk assessment

4. LEAST PRIVILEGE ACCESS
   - Minimum necessary permissions
   - Just-in-time access

5. MICRO-SEGMENTATION
   - Segment by application, not network
   - Isolate workloads

Zero Trust Network Architecture

Traditional vs Zero Trust

Traditional vs Zero Trust:
═══════════════════════════════════════════════════════════════════

TRADITIONAL (Castle and Moat):
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        TRUSTED ZONE                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”             β”‚
β”‚  β”‚ Server  β”‚  β”‚ Server  β”‚  β”‚  User   β”‚  β”‚  User   β”‚             β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜             β”‚
β”‚                                                                 β”‚
β”‚     All internal traffic trusted                                β”‚
β”‚     Once inside, free lateral movement                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚ Firewall
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      UNTRUSTED ZONE (Internet)                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜


ZERO TRUST:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                    POLICY ENGINE                         β”‚   β”‚
β”‚  β”‚     Identity β”‚ Device β”‚ Location β”‚ Time β”‚ Risk Score     β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                             β”‚                                   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚  Server   │◄──  Policy Enforcement  β”œβ”€β–Ίβ”‚  Server   β”‚         β”‚
β”‚  β”‚ (Isolated)β”‚  β”‚       Point          β”‚  β”‚ (Isolated)β”‚         β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β”‚                             β”‚                                   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”‚
β”‚  β”‚   User    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€   User    β”‚          β”‚
β”‚  β”‚ (Verified)β”‚                           β”‚ (Verified)β”‚          β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚
β”‚                                                                 β”‚
β”‚  Every access verified β”‚ Micro-segmented β”‚ Logged               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Implementing Zero Trust

Zero Trust Implementation Phases

Zero Trust Implementation Phases:
═══════════════════════════════════════════════════════════════════

PHASE 1: VISIBILITY
─────────────────────
β–‘ Asset inventory (devices, applications, data)
β–‘ User and service account inventory
β–‘ Data classification
β–‘ Traffic flow mapping
β–‘ Current access patterns

PHASE 2: IDENTITY
─────────────────────
β–‘ Strong authentication (MFA everywhere)
β–‘ Identity governance
β–‘ Privileged access management
β–‘ Service identity (workload identity)
β–‘ Conditional access policies

PHASE 3: DEVICE
─────────────────────
β–‘ Device inventory and health checks
β–‘ Endpoint detection and response
β–‘ Device compliance enforcement
β–‘ Certificate-based device identity

PHASE 4: NETWORK
─────────────────────
β–‘ Micro-segmentation
β–‘ Software-defined perimeter
β–‘ Encrypted communications (TLS everywhere)
β–‘ Network detection and response

PHASE 5: APPLICATION & DATA
─────────────────────
β–‘ Application-aware policies
β–‘ API security
β–‘ Data loss prevention
β–‘ Encryption at rest and in transit

Network Detection and Response (NDR)

NDR Capabilities

NDR Architecture

NDR Architecture:
═══════════════════════════════════════════════════════════════════

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     NETWORK TRAFFIC                          β”‚
β”‚    β”Œβ”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”           β”‚
β”‚    β”‚ TAP β”‚   β”‚ TAP β”‚   β”‚ TAP β”‚   β”‚ TAP β”‚   β”‚ TAP β”‚           β”‚
β”‚    β””β”€β”€β”¬β”€β”€β”˜   β””β”€β”€β”¬β”€β”€β”˜   β””β”€β”€β”¬β”€β”€β”˜   β””β”€β”€β”¬β”€β”€β”˜   β””β”€β”€β”¬β”€β”€β”˜           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚         β”‚         β”‚         β”‚         β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚   NDR SENSOR     β”‚
              β”‚                  β”‚
              β”‚ β€’ Packet capture β”‚
              β”‚ β€’ Flow analysis  β”‚
              β”‚ β€’ Protocol decodeβ”‚
              β”‚ β€’ ML/Behavioral  β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚  NDR PLATFORM   β”‚
              β”‚                 β”‚
              β”‚ β€’ Correlation   β”‚
              β”‚ β€’ Threat intel  β”‚
              β”‚ β€’ Investigation β”‚
              β”‚ β€’ Response      β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

NDR Detection Categories

CategoryDetection MethodExamples
SignatureKnown patternsMalware C2, exploits
BehavioralAnomaly from baselineBeaconing, exfiltration
ML/AIModel-based detectionNovel threats, variants
Threat IntelIOC matchingKnown bad IPs, domains
ProtocolProtocol violationsDNS tunneling, HTTP anomalies

Open Source NDR Stack

# Zeek (Bro) - Network analysis framework
zeek -i eth0 local

# Outputs detailed logs:
# conn.log - Connections
# dns.log - DNS queries
# http.log - HTTP transactions
# ssl.log - SSL/TLS connections
# files.log - File transfers

# Suricata - IDS/IPS with NDR capabilities
suricata -c /etc/suricata/suricata.yaml -i eth0

# RITA - Beacon and C2 detection
rita import --database mydb zeek_logs/
rita html-report --database mydb

# Arkime (Moloch) - Full packet capture and search
arkime-capture -c /etc/arkime/config.ini

Security Information and Event Management (SIEM)

SIEM Architecture

Modern SIEM Architecture

Modern SIEM Architecture:
═══════════════════════════════════════════════════════════════════

DATA SOURCES:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚Firewall β”‚ β”‚  EDR    β”‚ β”‚  Cloud  β”‚ β”‚ Network β”‚ β”‚  Apps   β”‚
β”‚  Logs   β”‚ β”‚  Logs   β”‚ β”‚  Logs   β”‚ β”‚  Flow   β”‚ β”‚  Logs   β”‚
β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
     β”‚           β”‚           β”‚           β”‚           β”‚
     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚   COLLECTION    β”‚
              β”‚   & PARSING     β”‚
              β”‚ (Syslog, API,   β”‚
              β”‚  Agent)         β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚  NORMALIZATION  β”‚
              β”‚  & ENRICHMENT   β”‚
              β”‚ (Common schema, β”‚
              β”‚  threat intel)  β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚   ANALYTICS     β”‚
              β”‚   & DETECTION   β”‚
              β”‚ (Correlation,   β”‚
              β”‚  ML, Rules)     β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚ INVESTIGATION   β”‚
              β”‚ & RESPONSE      β”‚
              β”‚ (Case mgmt,     β”‚
              β”‚  SOAR)          β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Detection Rules (Sigma)

# Sigma rule example - DNS Tunneling Detection
title: DNS Query Length Anomaly
status: experimental
description: Detects DNS queries with unusually long subdomain
logsource:
  category: dns
detection:
  selection:
    query|re: '.{50,}\.'  # Subdomain > 50 chars
  condition: selection
fields:
  - query
  - src_ip
  - dst_ip
falsepositives:
  - CDN domains with long names
  - Legitimate encoded data
level: medium
tags:
  - attack.command_and_control
  - attack.t1071.004

# Convert to SIEM format
sigmac -t splunk rule.yml
sigmac -t elastic rule.yml

Key Detection Use Cases

Essential SIEM Detection Categories

Essential SIEM Detection Categories:
═══════════════════════════════════════════════════════════════════

AUTHENTICATION:
β–‘ Failed login threshold exceeded
β–‘ Login from new location/device
β–‘ Impossible travel
β–‘ Service account anomalies
β–‘ Brute force detection

NETWORK:
β–‘ Port scanning
β–‘ DNS anomalies (tunneling, DGA)
β–‘ Beaconing patterns
β–‘ Large data transfers
β–‘ Communication with threat intel IOCs

ENDPOINT:
β–‘ Suspicious process execution
β–‘ Persistence mechanisms
β–‘ Credential dumping tools
β–‘ Living off the land binaries (LOLBins)
β–‘ Lateral movement patterns

DATA:
β–‘ Unusual data access patterns
β–‘ Data exfiltration indicators
β–‘ Sensitive file access
β–‘ Permission changes

Incident Response

Incident Response Process

NIST Incident Response Lifecycle

NIST Incident Response Lifecycle:
═══════════════════════════════════════════════════════════════════

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                               β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚
β”‚   β”‚ PREPARATION  │─────►│ DETECTION &      β”‚                  β”‚
β”‚   β”‚              β”‚      β”‚ ANALYSIS         β”‚                  β”‚
β”‚   β”‚ β€’ IR plan    β”‚      β”‚                  β”‚                  β”‚
β”‚   β”‚ β€’ Team       β”‚      β”‚ β€’ Monitoring     β”‚                  β”‚
β”‚   β”‚ β€’ Tools      β”‚      β”‚ β€’ Triage         β”‚                  β”‚
β”‚   β”‚ β€’ Training   β”‚      β”‚ β€’ Investigation  β”‚                  β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β”‚          β–²                       β”‚                            β”‚
β”‚          β”‚                       β–Ό                            β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚
β”‚   β”‚ POST-INCIDENT│◄─────│ CONTAINMENT,     β”‚                  β”‚
β”‚   β”‚ ACTIVITY     β”‚      β”‚ ERADICATION,     β”‚                  β”‚
β”‚   β”‚              β”‚      β”‚ RECOVERY         β”‚                  β”‚
β”‚   β”‚ β€’ Lessons    β”‚      β”‚                  β”‚                  β”‚
β”‚   β”‚ β€’ Improve    β”‚      β”‚ β€’ Isolate        β”‚                  β”‚
β”‚   β”‚ β€’ Document   β”‚      β”‚ β€’ Remove threat  β”‚                  β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚ β€’ Restore        β”‚                  β”‚
β”‚                         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β”‚                                                               |
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Network-Focused IR Actions

Network Incident Response Playbook

Network Incident Response Playbook:
═══════════════════════════════════════════════════════════════════

DETECTION CONFIRMED:
1. β–‘ Document initial indicators
2. β–‘ Preserve volatile network data (connections, flows)
3. β–‘ Capture relevant traffic (if not already)
4. β–‘ Identify affected systems

CONTAINMENT:
1. β–‘ Isolate affected systems (VLAN, firewall rules)
2. β–‘ Block C2 communications
3. β–‘ Block attacker IPs at perimeter
4. β–‘ Disable compromised accounts
5. β–‘ Preserve evidence before changes

ERADICATION:
1. β–‘ Identify all compromised systems
2. β–‘ Remove malware/implants
3. β–‘ Reset credentials
4. β–‘ Patch vulnerabilities exploited
5. β–‘ Remove persistence mechanisms

RECOVERY:
1. β–‘ Restore from clean backups
2. β–‘ Rebuild if necessary
3. β–‘ Gradual reconnection with monitoring
4. β–‘ Validate security controls

POST-INCIDENT:
1. β–‘ Timeline documentation
2. β–‘ Root cause analysis
3. β–‘ Detection improvements
4. β–‘ Control gaps addressed

Containment Strategies

ScenarioContainment ActionConsiderations
Single host compromisedVLAN isolationPreserve for forensics
Lateral movement detectedSegment affected systemsMay disrupt business
C2 communicationsBlock at firewall/DNSMay alert attacker
Data exfiltrationTerminate connectionsEvidence preservation
Ransomware spreadingNetwork isolationImmediate action required

Network Hardening Checklist

Layer-by-Layer Hardening

Comprehensive Network Hardening

Comprehensive Network Hardening:
═══════════════════════════════════════════════════════════════════

LAYER 2 - DATA LINK:
β–‘ Port security enabled
β–‘ DHCP snooping enabled
β–‘ Dynamic ARP Inspection
β–‘ 802.1X authentication
β–‘ BPDU Guard on access ports
β–‘ Disable DTP (switchport nonegotiate)
β–‘ Change native VLAN
β–‘ Private VLANs where appropriate
β–‘ MAC address limits per port

LAYER 3 - NETWORK:
β–‘ Ingress/egress filtering (BCP38)
β–‘ Unicast RPF enabled
β–‘ ICMP rate limiting
β–‘ IP source routing disabled
β–‘ Directed broadcasts disabled
β–‘ RPKI for BGP validation
β–‘ BGP prefix filtering
β–‘ TTL security for BGP

LAYER 4 - TRANSPORT:
β–‘ SYN cookies enabled
β–‘ SYN flood protection
β–‘ Connection limits per source
β–‘ TCP timestamps considered
β–‘ Invalid flag combinations dropped

LAYER 7 - APPLICATION:
β–‘ DNS security (DNSSEC validation)
β–‘ Unnecessary services disabled
β–‘ Strong encryption only (TLS 1.2+)
β–‘ Certificate validation
β–‘ Rate limiting on services

INFRASTRUCTURE:
β–‘ Management network isolated
β–‘ Out-of-band management
β–‘ Strong device authentication
β–‘ Encrypted management protocols (SSH, HTTPS)
β–‘ Logging centralized
β–‘ NTP authenticated
β–‘ Configuration backups secured

Security Operations Center (SOC)

SOC Functions

SOC Operating Model

SOC Operating Model:
═══════════════════════════════════════════════════════════════════

TIER 1 - ALERT TRIAGE (24/7):
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β€’ Initial alert review                                          β”‚
β”‚ β€’ False positive identification                                 β”‚
β”‚ β€’ Basic investigation                                           β”‚
β”‚ β€’ Escalation to Tier 2                                          β”‚
β”‚ β€’ Metrics: Alerts per day, time to triage                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

TIER 2 - INCIDENT HANDLING:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β€’ Deep investigation                                            β”‚
β”‚ β€’ Malware analysis                                              β”‚
β”‚ β€’ Containment actions                                           β”‚
β”‚ β€’ Coordination with IT teams                                    β”‚
β”‚ β€’ Escalation to Tier 3                                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

TIER 3 - ADVANCED ANALYSIS:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β€’ Threat hunting                                                β”‚
β”‚ β€’ Advanced forensics                                            β”‚
β”‚ β€’ Threat intelligence                                           β”‚
β”‚ β€’ Detection engineering                                         β”‚
β”‚ β€’ Process improvement                                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

METRICS:
- MTTD (Mean Time to Detect)
- MTTR (Mean Time to Respond)
- Alert-to-incident ratio
- False positive rate
- Escalation accuracy

Detection Engineering

# Detection-as-Code Example
# Store in version control, test before deployment

name: lateral_movement_psexec
description: Detects PsExec-style lateral movement
mitre_attack:
  - T1569.002  # Service Execution
  - T1021.002  # SMB/Windows Admin Shares

data_sources:
  - windows_security_events
  - network_flows

detection_logic: |
  (EventID == 4648 AND LogonType == 3)  # Network logon
  AND (ProcessName CONTAINS "PSEXESVC" 
       OR ServiceName LIKE "PSEXE%")
  AND SourceIP != DestinationIP

response_actions:
  - alert_soc_tier2
  - isolate_source_host
  - preserve_evidence

testing:
  - atomic_red_team: T1569.002
  - validation_data: test_data/psexec_sample.json

Continuous Improvement

Security Metrics

Metric CategoryExample Metrics
DetectionMTTD, detection coverage, false positive rate
ResponseMTTR, containment time, escalation accuracy
PreventionPatch compliance, vulnerability age, pen test findings
CompliancePolicy violations, audit findings, training completion
RiskRisk score trend, accepted risks, risk treatment progress

Maturity Assessment

Security Program Maturity Levels

Security Program Maturity Levels:
═══════════════════════════════════════════════════════════════════

LEVEL 1 - INITIAL:
β€’ Ad-hoc security
β€’ Reactive only
β€’ No formal processes

LEVEL 2 - DEVELOPING:
β€’ Basic controls in place
β€’ Some documentation
β€’ Limited monitoring

LEVEL 3 - DEFINED:
β€’ Documented processes
β€’ Consistent implementation
β€’ Regular assessments

LEVEL 4 - MANAGED:
β€’ Metrics-driven
β€’ Continuous monitoring
β€’ Proactive threat hunting

LEVEL 5 - OPTIMIZING:
β€’ Continuous improvement
β€’ Threat intelligence integration
β€’ Automated response
β€’ Industry leadership

Key Takeaways

  1. Defense in depth remains essentialβ€”no single control is sufficient

  2. Zero Trust is a paradigm shiftβ€”verify explicitly, assume breach

  3. NDR complements EDRβ€”network visibility catches what endpoints miss

  4. Detection engineering is continuousβ€”adversaries evolve, so must detection

  5. Incident response requires preparationβ€”you can’t build the plane while flying

  6. Metrics drive improvementβ€”measure what matters, improve what you measure


Self-Assessment

  1. Comprehension: How does Zero Trust fundamentally differ from traditional perimeter security?

  2. Application: Design a detection strategy for DNS tunneling using your SIEM.

  3. What if: Your organization discovers a breach that’s been ongoing for 6 months. How does your incident response differ from a new breach?


Review Questions

  1. What are the core principles of Zero Trust architecture?
  2. How does NDR differ from traditional IDS/IPS?
  3. What are the phases of NIST incident response?
  4. Why is micro-segmentation important in modern networks?
  5. What metrics should a SOC track to measure effectiveness?
  6. How does detection engineering improve security over time?

Part II Conclusion

Throughout Part II, we’ve explored attacks at every layer of the network stackβ€”from physical access and Layer 2 manipulation to application exploitation and advanced persistent threats. Each attack technique reveals a corresponding defensive opportunity.

The security landscape continues to evolve. New protocols bring new vulnerabilities. Cloud and IoT expand the attack surface. Adversaries become more sophisticated. But the fundamental principles remain:

  • Know your assets and their vulnerabilities
  • Layer your defenses so no single failure is catastrophic
  • Monitor continuously for threats
  • Respond quickly when incidents occur
  • Learn and improve from every event

In Part III, we’ll put these concepts into practice with hands-on labs that build practical skills for both offensive testing and defensive operations.