Lesson 08 AI-Driven Incident Response
Theme:
Lesson 08 · Slide 1

AI-Driven Incident Response

Using AI as your co-pilot to detect, contain, eradicate, and recover from security incidents faster and more effectively.

What You Will Learn

  • IR frameworks (NIST & SANS)
  • AI-assisted triage and containment
  • Evidence collection with AI documentation
  • Post-incident analysis and runbooks

CTF Challenge

Respond to an active security incident — identify, contain, and eradicate the threat using AI-assisted IR techniques.

⚠ Educational Use Only

Incident response procedures are for authorized security operations and CTF competitions. In real incidents, follow your organization's established IR procedures and legal requirements.

Lesson 08 · Slide 2

Why AI in Incident Response?

Modern SOCs face alert volumes that overwhelm human analysts. AI transforms IR from a reactive scramble into a structured, accelerated workflow.

Notes: AI augments human decision-making — it does not replace the incident commander. Final containment and eradication decisions must have human approval.
Lesson 08 · Slide 3

NIST SP 800-61: The Foundation

NIST Special Publication 800-61 Rev. 2 defines the standard incident response lifecycle used across government and industry.

PhasePurposeAI Role
PreparationBuild IR capability before incidents occurGenerate playbooks, train scenarios
Detection & AnalysisIdentify and validate incidentsAlert correlation, log analysis, severity scoring
Containment, Eradication & RecoveryStop the threat, remove it, restore servicesRecommend containment actions, verify eradication
Post-Incident ActivityLearn and improveRoot cause analysis, lessons-learned reports

Key NIST Principle

IR is a cycle, not a one-time event. Lessons from each incident feed back into preparation for the next.

Lesson 08 · Slide 4

SANS 6-Step IR Process

The SANS Institute breaks IR into six discrete phases — more granular than NIST, making it ideal for operational playbooks.

  1. Preparation — Policies, tools, team training, communication plans
  2. Identification — Detect anomalies, validate alerts, determine scope
  3. Containment — Short-term and long-term isolation of affected systems
  4. Eradication — Remove root cause: malware, backdoors, compromised credentials
  5. Recovery — Restore systems, verify integrity, monitor for re-infection
  6. Lessons Learned — Post-mortem, documentation, process improvements

NIST vs SANS

NIST combines Containment, Eradication, and Recovery into one phase. SANS separates them for clearer operational focus.

AI Advantage

AI can track which phase you are in and provide phase-specific recommendations, preventing analysts from jumping ahead.

Lesson 08 · Slide 5

Phase 1: Preparation

Effective incident response starts long before the first alert fires. AI accelerates preparation by generating and maintaining IR documentation.

AI-Assisted Preparation Tasks

# AI-assisted playbook generation prompt
prompt = """Generate an IR playbook for ransomware incidents targeting
our environment:
- 200 Windows endpoints on 10.0.0.0/16
- Active Directory domain: corp.example.com
- Critical assets: SQL Server (10.0.5.10), File Server (10.0.5.20)
- Backup system: Veeam with air-gapped copies

Include: detection signatures, containment steps, eradication
checklist, recovery procedures, and communication templates."""

response = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=4096,
    messages=[{"role": "user", "content": prompt}]
)
Lesson 08 · Slide 6

Phase 2: Identification — AI-Powered Triage

The identification phase is where AI delivers the most immediate value: transforming a flood of alerts into actionable intelligence.

Alert Classification Pipeline

def ai_triage_alert(alert_data):
    """Use AI to classify and prioritize a security alert."""
    prompt = f"""Analyze this security alert and provide:
1. Classification (True Positive / False Positive / Needs Investigation)
2. Severity (Critical / High / Medium / Low)
3. Attack category (MITRE ATT&CK technique if applicable)
4. Recommended immediate actions
5. Related IOCs to search for

Alert Data:
{json.dumps(alert_data, indent=2)}

Context: Enterprise network, 500 employees, Windows/Linux mixed env.
Normal business hours: 08:00-18:00 EST."""

    response = client.messages.create(
        model="claude-sonnet-4-20250514",
        max_tokens=1024,
        messages=[{"role": "user", "content": prompt}]
    )
    return parse_triage_response(response.content[0].text)
Notes: Always validate AI triage decisions against your SIEM data. AI may lack context about known maintenance windows or authorized penetration tests.
Lesson 08 · Slide 7

Severity Assessment Matrix

AI can apply a consistent severity assessment framework to every alert, reducing the variability between analyst shift handoffs.

FactorCriticalHighMediumLow
Data at riskPII / financial / classifiedInternal sensitiveInternal generalPublic data
Systems affectedDomain controller / authProduction serversDev/stagingIndividual workstation
Lateral movementConfirmed spreadIndicators presentPossibleIsolated
Active exfiltrationConfirmed outboundSuspicious DNS/HTTPAnomalous trafficNone detected
Business impactRevenue-generating downMajor function impairedMinor disruptionNo impact

AI Scoring Prompt Pattern

Feed the matrix to the AI as system context, then provide raw alert data. Ask the AI to score each factor and compute an overall severity with justification.

Lesson 08 · Slide 8

Real-Time Analysis: Incident Timeline

During an active incident, AI can continuously build and maintain a timeline from multiple log sources. Here is an example of an AI-generated incident timeline:

Time (UTC)SourceEventSeverity
14:23:01EDRSuspicious PowerShell execution on WS-042Medium
14:23:18AD LogsService account svc_backup authenticates from WS-042High
14:24:05FirewallWS-042 connects to 185.220.101.x:443 (known C2)Critical
14:25:33EDRMimikatz signature detected in memory on WS-042Critical
14:26:10AD Logssvc_backup queries all domain admin group membersCritical
14:28:44SIEMLateral movement: svc_backup authenticates to SRV-DB-01Critical
14:30:02DLPLarge data transfer initiated from SRV-DB-01 to external IPCritical

AI Insight

Attack pattern identified: Initial access via compromised workstation → credential harvesting (Mimikatz) → privilege escalation (service account abuse) → lateral movement → data exfiltration. Matches MITRE ATT&CK chain: T1059.001 → T1003.001 → T1078.002 → T1021.002 → T1041.

Lesson 08 · Slide 9

AI as an IR Co-Pilot: Live Analysis

During an active incident, feed real-time data to AI for continuous analysis and recommendations.

class IRCoPilot:
    """AI-driven incident response co-pilot."""

    def __init__(self, client):
        self.client = client
        self.timeline = []
        self.context = []

    def analyze_event(self, event):
        """Analyze a new event in the context of the ongoing incident."""
        self.timeline.append(event)
        prompt = f"""You are an incident response co-pilot assisting a
SOC analyst during an active security incident.

INCIDENT TIMELINE SO FAR:
{json.dumps(self.timeline, indent=2)}

NEW EVENT:
{json.dumps(event, indent=2)}

Provide:
1. How this event relates to the existing incident timeline
2. Updated threat assessment (escalate/maintain/de-escalate)
3. Immediate recommended actions (be specific with commands)
4. What evidence to collect NOW before it is lost
5. Predicted next attacker actions based on the pattern"""

        response = self.client.messages.create(
            model="claude-sonnet-4-20250514",
            max_tokens=2048,
            messages=[{"role": "user", "content": prompt}]
        )
        return response.content[0].text
Lesson 08 · Slide 10

Phase 3: Containment Strategies

Containment is about stopping the bleeding. AI helps choose the right containment strategy based on the attack type, affected systems, and business impact.

Short-Term Containment

  • Network isolation (VLAN change)
  • Firewall block rules
  • Account disable/lockout
  • Process termination
  • DNS sinkhole for C2 domains

Long-Term Containment

  • Rebuild from clean image
  • Network segmentation changes
  • Credential rotation (bulk)
  • Certificate revocation
  • Firewall policy hardening

Critical Decision Point

AI can recommend containment actions, but a human must authorize execution. Isolating a production database server has business consequences that AI cannot fully evaluate.

Lesson 08 · Slide 11

AI-Assisted Containment Commands

AI generates specific, copy-paste-ready containment commands tailored to the incident context.

Network Isolation

# Isolate compromised host via firewall (iptables)
sudo iptables -I FORWARD -s 10.0.1.42 -j DROP
sudo iptables -I FORWARD -d 10.0.1.42 -j DROP
sudo iptables -I INPUT -s 10.0.1.42 -j DROP

# Allow only IR team access for forensics
sudo iptables -I INPUT -s 10.0.1.42 -d 10.99.0.0/24 -j ACCEPT

# Block C2 domain at DNS level
echo "address=/malicious-c2.example.com/127.0.0.1" >> /etc/dnsmasq.d/ir-blocks.conf
sudo systemctl restart dnsmasq

Account Lockout

# Disable compromised service account in Active Directory
Disable-ADAccount -Identity "svc_backup"

# Force password reset for potentially compromised accounts
Get-ADGroupMember "Domain Admins" | Set-ADUser -ChangePasswordAtLogon $true

# Revoke all active sessions for the compromised user
Revoke-AzureADUserAllRefreshToken -ObjectId (Get-AzureADUser `
    -SearchString "svc_backup").ObjectId
Lesson 08 · Slide 12

AI Containment Decision Engine

Structure AI recommendations as scored options so the incident commander can make informed decisions quickly.

def recommend_containment(incident_data):
    prompt = f"""Based on this active incident, recommend containment
strategies ranked by effectiveness and business impact.

INCIDENT SUMMARY:
- Type: {incident_data['type']}
- Affected systems: {incident_data['systems']}
- Current spread: {incident_data['spread_status']}
- Business-critical systems at risk: {incident_data['critical_assets']}
- Current business hours: {incident_data['is_business_hours']}

For each option provide:
| Option | Action | Effectiveness | Business Impact | Risk |

Also provide the exact commands/steps to execute each option."""

    response = client.messages.create(
        model="claude-sonnet-4-20250514",
        max_tokens=2048,
        messages=[{"role": "user", "content": prompt}]
    )
    return response.content[0].text

# Example output table from AI:
# | Option | Action                    | Effectiveness | Business Impact | Risk   |
# |--------|---------------------------|---------------|-----------------|--------|
# | 1      | Isolate WS-042 + SRV-DB   | High          | High (DB down)  | Low    |
# | 2      | Block C2 IP at perimeter   | Medium        | None            | Medium |
# | 3      | Disable svc_backup account | High          | Medium          | Low    |
# | RECOMMENDED: Execute options 2 + 3 immediately, option 1 after backup |
Lesson 08 · Slide 13

Phase 4: Eradication

Eradication removes the root cause of the incident. AI helps ensure nothing is missed by systematically checking for persistence mechanisms.

AI-Driven Eradication Checklist

eradication_prompt = """Given the following incident details, generate
a comprehensive eradication checklist:

Attack type: Credential theft + lateral movement
Compromised accounts: svc_backup, jsmith
Malware found: Mimikatz (memory-resident), Cobalt Strike beacon
Affected systems: WS-042, SRV-DB-01
C2 infrastructure: 185.220.101.0/24

For each item, provide:
- Specific check to perform
- Command or tool to use
- How to verify successful eradication
- Common places attackers hide persistence"""

Common Persistence Locations to Check

Lesson 08 · Slide 14

Phase 5: Recovery

Recovery restores affected systems to normal operation. AI assists with verification procedures and monitoring for re-infection.

AI-Assisted Recovery Workflow

  1. System restoration — Rebuild from known-good images or restore from verified backups
  2. Credential rotation — AI generates a comprehensive list of credentials to reset based on blast radius analysis
  3. Integrity verification — Compare file hashes against known-good baselines
  4. Monitoring enhancement — AI generates custom detection rules for re-infection indicators
  5. Staged reconnection — Bring systems back online incrementally with enhanced monitoring
# AI-generated YARA rule for post-recovery monitoring
recovery_prompt = """Based on the IOCs from this incident, generate:
1. YARA rules to detect the malware variants observed
2. Sigma rules for the behavioral patterns identified
3. Network signatures (Snort/Suricata) for C2 communication
4. A 30-day enhanced monitoring plan

IOCs:
- File hash: a1b2c3d4e5f6... (Cobalt Strike beacon)
- C2 domains: update.legit-software[.]com, cdn.trusted-host[.]net
- User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT)
- Named pipe: \\.\pipe\msse-1234-server"""
Lesson 08 · Slide 15

Evidence Collection & Chain of Custody

Proper evidence handling can make or break a legal case. AI helps document everything meticulously while analysts focus on technical collection.

AI-Documented Evidence Log

Evidence IDTypeSourceCollected ByHash (SHA-256)Time (UTC)
EV-001Memory dumpWS-042J. Analysta3f8c2...e91b15:02:33
EV-002Disk imageWS-042J. Analyst7b2d41...f03a15:45:10
EV-003Network PCAPFW-CoreK. Engineerd9e1a7...c44f15:12:08
EV-004AD event logsDC-01K. Engineer1f5e83...b27d15:20:55
EV-005Malware sampleWS-042J. Analystc2a9f1...88e316:01:22

AI Chain of Custody Documentation

AI automatically logs every evidence interaction: who accessed it, when, what tools were used, and hash verification at each step. This creates a defensible audit trail.

Lesson 08 · Slide 16

Evidence Collection Commands

AI provides the exact forensic collection commands and automatically documents each step with timestamps and hashes.

Volatile Evidence (Collect First!)

# Memory acquisition (Linux)
sudo dd if=/dev/mem of=/evidence/mem_dump_$(hostname)_$(date +%s).raw
sha256sum /evidence/mem_dump_*.raw >> /evidence/hashes.txt

# Network connections snapshot
ss -tunapeo > /evidence/netstat_$(date +%s).txt
ip route show > /evidence/routes_$(date +%s).txt

# Running processes with full details
ps auxef > /evidence/processes_$(date +%s).txt
ls -la /proc/*/exe 2>/dev/null > /evidence/proc_links_$(date +%s).txt

Disk Evidence

# Create forensic disk image with hash verification
sudo dc3dd if=/dev/sda of=/evidence/disk_image.dd \
    hash=sha256 log=/evidence/dc3dd_log.txt

# Verify image integrity
sha256sum /evidence/disk_image.dd
# Compare against dc3dd output hash
Notes: Order of volatility matters: memory first, then network state, then running processes, then disk. AI should enforce this ordering in its recommendations.
Lesson 08 · Slide 17

Communication Templates: Stakeholder Notifications

AI drafts communication at each stage of the incident, ensuring consistent, professional messaging tailored to each audience.

Initial Notification (Technical Team)

Subject: [IR-2024-042] Active Security Incident - SEVERITY: CRITICAL

Status: Active - Containment in progress
Incident Commander: Sarah Chen
Bridge Line: +1-555-0142 / PIN: 8834

Summary: At 14:23 UTC, EDR detected credential theft activity on WS-042. Attacker has obtained svc_backup credentials and moved laterally to SRV-DB-01. Data exfiltration to external IP confirmed.

Immediate Actions Taken: C2 IP blocked at perimeter, svc_backup account disabled, WS-042 network-isolated.

Required: All domain admin accounts — verify your recent logon activity. Report any anomalies to IR bridge immediately.

Lesson 08 · Slide 18

Communication Templates: Executive & Legal

Executive Briefing (AI-Drafted)

Subject: Security Incident Briefing - Action Required

A security incident involving unauthorized access to an internal database server was detected today at 2:23 PM. The security team has contained the threat and is working to determine the full scope of impact. Customer-facing services remain operational.

Business impact: Internal database server temporarily offline for forensic analysis. Estimated restoration: 4-6 hours.
Customer impact: Under investigation. Preliminary analysis suggests customer PII may have been accessed.
Next update: 6:00 PM today or sooner if status changes.

Legal / Compliance Notification

Regulatory consideration: If PII exposure is confirmed, GDPR Article 33 requires notification to supervisory authority within 72 hours of becoming aware. AI should flag applicable notification deadlines based on data types and jurisdictions involved.

Lesson 08 · Slide 19

AI-Assisted Communication Generator

def generate_ir_communication(incident, audience, phase):
    """Generate audience-appropriate incident communications."""
    prompt = f"""Draft an incident response communication for:

Audience: {audience}  # "technical", "executive", "legal", "customers"
IR Phase: {phase}     # "detection", "containment", "eradication", "recovery"

Incident Details:
- ID: {incident['id']}
- Type: {incident['type']}
- Severity: {incident['severity']}
- Affected systems: {incident['systems']}
- Data at risk: {incident['data_types']}
- Current status: {incident['status']}
- Business impact: {incident['business_impact']}

Guidelines:
- Technical audience: Include IOCs, affected systems, required actions
- Executive audience: Focus on business impact, timeline, decisions needed
- Legal audience: Include data types, jurisdictions, regulatory deadlines
- Customer audience: Transparent but measured, include protective steps

Use professional tone. Do not speculate beyond confirmed facts.
Include a "Next Update" timestamp."""

    response = client.messages.create(
        model="claude-sonnet-4-20250514",
        max_tokens=1024,
        messages=[{"role": "user", "content": prompt}]
    )
    return response.content[0].text
Lesson 08 · Slide 20

Phase 6: Lessons Learned

The most frequently skipped IR phase is also the most valuable. AI ensures thorough post-incident analysis by structuring the review process.

AI-Driven Root Cause Analysis

rca_prompt = """Perform a root cause analysis for this security incident.
Use the "5 Whys" technique and provide a fishbone (Ishikawa) diagram
structure.

INCIDENT TIMELINE:
{full_timeline}

ATTACK CHAIN:
1. Phishing email delivered to jsmith@corp.example.com
2. User clicked link, downloaded malicious macro document
3. Macro executed PowerShell downloader
4. Cobalt Strike beacon established C2 channel
5. Mimikatz extracted svc_backup credentials from memory
6. Lateral movement to SRV-DB-01 via SMB
7. Database export and exfiltration via HTTPS to external IP

Provide:
- Root cause identification (technical and process failures)
- Contributing factors
- Specific, actionable recommendations with priority
- Metrics to track improvement
- Detection gaps that allowed each step"""
Lesson 08 · Slide 21

Root Cause Analysis: 5 Whys Example

AI applies structured analytical frameworks to produce actionable findings from incident data.

LevelQuestionAnswer
Why 1Why was data exfiltrated?Attacker had database access via svc_backup credentials
Why 2Why did the attacker have those credentials?Mimikatz extracted them from WS-042 memory
Why 3Why were privileged credentials cached on a workstation?svc_backup had interactive logon rights and was used for manual backup tasks
Why 4Why was a service account used interactively?No PAM solution; team used shared credentials for convenience
Why 5Why was there no PAM solution?PAM project was deprioritized in Q2 budget cycle

Root Cause

Technical: Privileged service account with interactive logon rights cached on standard workstation. Process: Lack of privileged access management controls. Recommendation: Deploy PAM, enforce credential tiering, remove interactive logon for service accounts.

Lesson 08 · Slide 22

Lessons Learned Documentation

AI generates comprehensive post-incident reports that capture institutional knowledge and drive security improvements.

lessons_prompt = """Generate a Lessons Learned report for incident
IR-2024-042 using this structure:

1. EXECUTIVE SUMMARY (3-4 sentences)
2. INCIDENT METRICS
   - Time to detect (TTD)
   - Time to contain (TTC)
   - Time to eradicate (TTE)
   - Time to recover (TTR)
   - Total incident duration
3. WHAT WENT WELL
4. WHAT NEEDS IMPROVEMENT
5. ACTION ITEMS (owner, priority, deadline)
6. DETECTION GAP ANALYSIS
7. UPDATED RISK ASSESSMENT

Incident data: {incident_full_record}
Timeline: {incident_timeline}
Team feedback: {team_survey_responses}

Format as a professional report suitable for CISO review."""

Key Metrics from Our Example Incident

TTD: 7 minutes | TTC: 12 minutes | TTE: 4.5 hours | TTR: 18 hours | Total: 23 hours

Industry average for similar incidents without AI: TTD: 197 days. AI-assisted IR can compress timelines by orders of magnitude.

Lesson 08 · Slide 23

Building IR Runbooks with AI

IR runbooks are step-by-step procedures for specific incident types. AI can generate, maintain, and improve runbooks based on lessons learned from actual incidents.

Runbook Structure

runbook:
  name: "Ransomware Response"
  version: 2.3
  last_updated: "2024-11-15"
  author: "IR Team + AI Assistant"
  severity_default: "Critical"

  triggers:
    - "EDR alert: ransomware behavior detected"
    - "Multiple file extension changes in short period"
    - "Ransom note file detected (README.txt, DECRYPT_FILES.html)"

  immediate_actions:
    - step: "Isolate affected system from network"
      command: "netsh advfirewall set allprofiles state on"
      timeout: "30 seconds"
      escalate_if_fails: true

    - step: "Identify ransomware variant"
      tool: "Upload sample to VirusTotal / ID Ransomware"
      ai_assist: "Analyze ransom note and file extensions for variant ID"

    - step: "Check for lateral spread indicators"
      command: "Get-ADComputer -Filter * | Test-Connection -Count 1"
      ai_assist: "Query SIEM for similar IOCs on other endpoints"

  containment:
    - step: "Block C2 at perimeter firewall"
    - step: "Disable affected user accounts"
    - step: "Snapshot affected VMs before further action"
Lesson 08 · Slide 24

AI Runbook Generator

def generate_runbook(incident_type, environment):
    """Generate a tailored IR runbook for a specific incident type."""
    prompt = f"""Create a detailed IR runbook for: {incident_type}

Environment context:
{json.dumps(environment, indent=2)}

The runbook must include:
1. TRIGGERS - What alerts/events activate this runbook
2. SEVERITY CLASSIFICATION - How to determine initial severity
3. IMMEDIATE ACTIONS (first 15 minutes)
4. INVESTIGATION STEPS (with specific commands for our OS mix)
5. CONTAINMENT OPTIONS (ranked by impact)
6. ERADICATION CHECKLIST
7. RECOVERY PROCEDURES
8. COMMUNICATION TEMPLATES (by audience)
9. EVIDENCE COLLECTION REQUIREMENTS
10. POST-INCIDENT TASKS

For each step provide:
- Description of what to do and why
- Exact command(s) to execute
- Expected output / success criteria
- What to do if the step fails
- Escalation criteria

Format as YAML for integration with our SOAR platform."""

    response = client.messages.create(
        model="claude-sonnet-4-20250514",
        max_tokens=4096,
        messages=[{"role": "user", "content": prompt}]
    )
    return response.content[0].text
Notes: AI-generated runbooks should be reviewed by senior IR staff and tested in tabletop exercises before being approved for production use.
Lesson 08 · Slide 25

Runbook Library: Common Incident Types

Build a library of AI-generated runbooks covering your most common and most critical incident types.

Incident TypeTypical SeverityKey Containment ActionAI Value-Add
RansomwareCriticalNetwork isolationVariant ID, decryptor search
Phishing (credential theft)HighPassword reset, session revokeAnalyze phishing kit, find other victims
Insider threatHighAccount suspensionBehavioral analysis, data access audit
DDoS attackHighTraffic filtering, CDN scalingTraffic pattern analysis, source attribution
Supply chain compromiseCriticalVendor isolation, dependency auditImpact blast radius analysis
Data exfiltrationCriticalEgress blockingData classification, scope assessment
CryptominingMediumProcess terminationIdentify entry point, check for persistence
Lesson 08 · Slide 26

Integrating AI into Your IR Workflow

Practical architecture for embedding AI into your existing incident response tools and processes.

Integration Points

Architecture Principle

AI should be in the loop (providing recommendations) not on the loop (making autonomous decisions). All containment and eradication actions require human approval before execution.

Notes: Start small: integrate AI triage first, measure improvement in MTTD/MTTC, then expand to other IR phases.
Lesson 08 · Slide 27

IR Playbook Snippet: Phishing Response

A condensed example of an AI-generated IR playbook for a phishing incident with credential compromise.

playbook: phishing_credential_compromise
phase: identification
steps:
  - action: "Extract IOCs from reported phishing email"
    ai_prompt: |
      Analyze this email header and body. Extract:
      - Sender IP and domain (check SPF/DKIM/DMARC)
      - All URLs (defang them)
      - Attachment hashes
      - Social engineering technique used
    output: ioc_list

  - action: "Search for other recipients"
    command: |
      # Exchange Online
      Get-MessageTrace -SenderAddress "phish@evil.com" \
        -StartDate (Get-Date).AddDays(-7) -EndDate (Get-Date)
    ai_assist: "Analyze results to determine campaign scope"

  - action: "Check for credential submission"
    command: |
      # Search proxy logs for phishing URL access
      grep -i "evil-login-page.com" /var/log/proxy/access.log
    ai_assist: "Identify users who visited the credential harvesting page"

  - action: "Determine which users submitted credentials"
    ai_prompt: |
      Given proxy logs showing these users visited the phishing URL,
      analyze POST request sizes to determine who likely submitted
      credentials vs. who just loaded the page.
Lesson 08 · Slide 28

Handling AI Limitations in IR

AI is a powerful tool but has critical limitations that must be understood during incident response.

AI Limitations

  • Hallucination risk — AI may generate plausible but incorrect IOCs or commands
  • Context window limits — Large log volumes may exceed token limits
  • No real-time access — AI cannot query your SIEM directly (without tool use)
  • Stale threat intel — Training data has a knowledge cutoff
  • Confidentiality — Sending sensitive incident data to cloud AI has privacy implications

Mitigations

  • Verify all commands before execution
  • Chunk large logs and summarize iteratively
  • Use tool/function calling to give AI safe access to systems
  • Supplement with live threat feeds
  • Use local/private AI models for sensitive incidents
Notes: For classified or highly sensitive incidents, consider running local LLMs (Llama, Mistral) that keep all data on-premises. The trade-off is reduced capability vs. full data sovereignty.
Lesson 08 · Slide 29

CTF Challenge: Active Incident Response

You are the on-call SOC analyst. An active security incident has been detected. Use AI-assisted IR techniques to respond.

Scenario

At 02:17 UTC, your SIEM fires multiple alerts. A workstation (WS-117, user: mwilliams) is exhibiting the following behaviors:

  • PowerShell executing base64-encoded commands
  • DNS queries to x8f2.update-service[.]xyz every 60 seconds (beaconing)
  • SMB connections to three file servers: FS-01, FS-02, FS-03
  • Windows Event Log cleared on WS-117
  • New scheduled task created: "SystemHealthCheck" running every 5 minutes
  • Large ZIP file (2.3 GB) copied to WS-117 from FS-02
Lesson 08 · Slide 30

CTF Challenge: Your Mission

Tasks

  1. Identification — Use AI to analyze the alert data. Classify the incident type, determine severity, and map to MITRE ATT&CK techniques
  2. Timeline — Construct a detailed incident timeline from the provided log data using AI assistance
  3. Containment — Propose and justify at least 3 containment actions with exact commands. Rank them by priority
  4. Evidence — List all evidence to collect, in order of volatility. Provide collection commands and chain-of-custody entries
  5. Communication — Draft notifications for: (a) the IR team, (b) the CISO, and (c) the affected user's manager
  6. Eradication Plan — Detail how you would eradicate the threat, including persistence mechanism checks
  7. Lessons Learned — Write a preliminary post-incident report with root cause hypothesis and 3 improvement recommendations

Scoring Criteria

Completeness (all IR phases addressed) | Technical accuracy (valid commands and techniques) | AI utilization (effective prompting) | Communication quality (audience-appropriate messaging) | Documentation (evidence handling and chain of custody)

Lesson 08 · Slide 31

CTF Hint: MITRE ATT&CK Mapping

Map each observed behavior to MITRE ATT&CK techniques to understand the full attack chain.

Observed BehaviorMITRE TechniqueTactic
Base64-encoded PowerShellT1059.001Execution
DNS beaconing to suspicious domainT1071.004Command & Control
SMB connections to file serversT1021.002Lateral Movement
Event log clearedT1070.001Defense Evasion
Scheduled task persistenceT1053.005Persistence
Large file stagingT1074.001Collection

Attack Stage Assessment

The attacker is in the Collection / Exfiltration preparation stage. The 2.3 GB ZIP file indicates data staging before exfiltration. Containment is urgent — you may still prevent data leaving the network.

Lesson 08 · Slide 32

Key Takeaways

Next Lesson

Lesson 09 will cover AI-Powered Threat Hunting — proactively searching for threats that evade automated detection using AI-driven hypothesis generation and investigation.

1 / ?