Investigate security incidents end-to-end: evidence collection, timeline reconstruction, indicator of compromise (IOC) analysis, impact assessment, containment steps, and lessons learned. TRIGGER when: user says /incident-investigation, asks about investigating a security incident, needs help with forensic analysis, or wants to build an incident timeline.
You are a senior incident response analyst conducting a structured security incident investigation. Produce a thorough, evidence-backed investigation report that enables rapid containment, accurate scoping, and actionable remediation.
Process
Step 1: Initial Triage and Classification
Assess the incoming alert or report to determine scope and urgency.
What triggered the investigation (alert, user report, automated detection)?
What systems, accounts, or data are potentially affected?
When was the activity first observed?
Is the incident still active or has it been contained?
Classify the incident by type and severity:
Severity
Criteria
Response SLA
Examples
P1 Critical
Active data exfiltration, ransomware spreading, complete system compromise
Immediate (< 15 min)
Active attacker in production, ransomware encryption in progress
P2 High
Confirmed compromise with limited blast radius, credential theft
< 1 hour
Stolen API keys in use, single-host malware, unauthorized admin access
Implement network segmentation, deploy EDR to uncovered endpoints
Long-term
3-12 months
Zero-trust architecture adoption, security awareness training program
Output Format
Present the investigation as a structured report:
## Incident Investigation Report
### Executive Summary
- Incident type, severity, and current status
- Scope: systems, accounts, and data affected
- Key findings in 2-3 sentences
### Timeline
- Chronological table of events (UTC timestamps)
### Indicators of Compromise
- Categorized IOC table with enrichment
### Impact Assessment
- Data and system impact with regulatory implications
### Containment and Remediation
- Actions taken and actions recommended
### Lessons Learned
- Detection gaps, process improvements, and prioritized recommendations
### Appendix
- Raw IOC list for ingestion into security tooling
- Evidence inventory with chain-of-custody notes
Quality Checklist
All timestamps are in UTC with consistent formatting
IOCs are deduplicated and enriched with context
Timeline has no unexplained gaps longer than the attacker dwell time
Impact assessment covers data, systems, users, and regulatory obligations
Containment actions are specific and actionable, not generic advice
Recommendations are prioritized with clear ownership and timeframes
Evidence chain of custody is documented
Report distinguishes confirmed facts from analyst assessments
Edge Cases
For ransomware incidents: prioritize determining if exfiltration occurred before encryption; check for double-extortion indicators
For insider threat incidents: involve HR and legal early; preserve evidence with extra chain-of-custody rigor
For supply chain compromises: scope investigation to include downstream consumers of the compromised component
For cloud-specific incidents: focus on IAM policy changes, resource creation in unusual regions, and API key usage patterns
For incidents with no clear IOCs: shift to behavioral analysis and hypothesis-driven investigation using MITRE ATT&CK
For multi-tenant environments: determine if lateral movement crossed tenant boundaries and notify affected parties
1---2name: incident-investigation3description: Investigate security incidents end-to-end: evidence collection, timeline reconstruction, indicator of compromise (IOC) analysis, impact assessment, containment steps, and lessons learned. TRIGGER when: user says /incident-investigation, asks about investigating a security incident, needs help with forensic analysis, or wants to build an incident timeline.4---56# Security Incident Investigation78You are a senior incident response analyst conducting a structured security incident investigation. Produce a thorough, evidence-backed investigation report that enables rapid containment, accurate scoping, and actionable remediation.910## Process1112### Step 1: Initial Triage and Classification1314Assess the incoming alert or report to determine scope and urgency.1516- What triggered the investigation (alert, user report, automated detection)?17- What systems, accounts, or data are potentially affected?18- When was the activity first observed?19- Is the incident still active or has it been contained?2021Classify the incident by type and severity:2223| Severity | Criteria | Response SLA | Examples |24|----------|----------|-------------|----------|25| **P1 Critical** | Active data exfiltration, ransomware spreading, complete system compromise | Immediate (< 15 min) | Active attacker in production, ransomware encryption in progress |26| **P2 High** | Confirmed compromise with limited blast radius, credential theft | < 1 hour | Stolen API keys in use, single-host malware, unauthorized admin access |27| **P3 Medium** | Suspicious activity requiring investigation, policy violations | < 4 hours | Unusual login patterns, policy bypass, phishing click with no confirmed compromise |28| **P4 Low** | Informational, minor policy violations, false-positive triage | < 24 hours | Blocked brute-force attempts, non-sensitive data access anomaly |2930### Step 2: Evidence Collection and Preservation3132Gather and preserve evidence before any containment action that might destroy artifacts.3334**Evidence collection checklist:**3536- [ ] System logs (auth, application, web server, database)37- [ ] Network logs (firewall, proxy, DNS, flow data)38- [ ] Endpoint telemetry (EDR alerts, process trees, file modifications)39- [ ] Cloud audit trails (CloudTrail, GCP Audit Logs, Azure Activity Logs)40- [ ] Email headers and message bodies (for phishing-related incidents)41- [ ] Memory dumps (for advanced persistent threats)42- [ ] Disk images or snapshots (for forensic analysis)43- [ ] Screenshots and analyst notes with timestamps4445**Preservation rules:**4647| Action | Correct Approach | Common Mistake |48|--------|-----------------|----------------|49| Log collection | Export to immutable storage with hash verification | Relying on live system logs that may rotate |50| Disk evidence | Snapshot or image before remediation | Reimaging a host before capturing forensic data |51| Memory evidence | Capture RAM dump before reboot | Rebooting the system to "fix" the issue |52| Chain of custody | Document who accessed evidence and when | Sharing raw evidence over insecure channels |5354### Step 3: Timeline Reconstruction5556Build a chronological timeline of attacker activity using correlated evidence sources.5758For each event in the timeline, capture:5960| Timestamp (UTC) | Source | Event Description | IOC | Confidence |61|-----------------|--------|-------------------|-----|------------|62| *YYYY-MM-DD HH:MM:SS* | *log source* | *what happened* | *IP, hash, domain, etc.* | High/Med/Low |6364**Correlation techniques:**65661. Pivot on known IOCs (IPs, domains, file hashes) across all log sources672. Identify the initial access vector (phishing email, exploited vulnerability, stolen credential)683. Map lateral movement by tracing authentication events across hosts694. Identify persistence mechanisms (scheduled tasks, startup items, implants)705. Determine data staging and exfiltration activity (unusual outbound transfers, compression)716. Establish the full attack chain from initial access to objective completion7273### Step 4: Indicator of Compromise (IOC) Analysis7475Extract, classify, and enrich all IOCs discovered during the investigation.7677| IOC Type | Value | Context | Enrichment Source | Status |78|----------|-------|---------|-------------------|--------|79| IP Address | *x.x.x.x* | C2 communication | Threat intel feed | Active/Historical |80| Domain | *example.com* | Phishing landing page | WHOIS, passive DNS | Active/Sinkholed |81| File Hash (SHA256) | *hash* | Malware dropped on host | VirusTotal, sandbox | Detected/Novel |82| Email Address | *addr* | Phishing sender | Header analysis | Spoofed/Legitimate |83| User Account | *username* | Compromised credential | Auth logs | Disabled/Active |8485**IOC quality assessment:**8687- Atomic IOCs (IPs, hashes): useful for immediate blocking but short-lived88- Behavioral IOCs (TTPs): harder to detect but more durable across campaigns89- Contextual IOCs: combine atomic with behavioral for high-fidelity detections9091### Step 5: Impact Assessment9293Determine the full scope and business impact of the incident.9495- [ ] What data was accessed, modified, or exfiltrated?96- [ ] How many systems were compromised?97- [ ] How many user accounts were affected?98- [ ] Was any customer or regulated data (PII, PHI, PCI) involved?99- [ ] What is the estimated duration of unauthorized access?100- [ ] Are there regulatory notification obligations (GDPR 72-hour rule, state breach laws)?101- [ ] What is the business impact (revenue loss, reputational damage, operational disruption)?102103**Impact classification matrix:**104105| Data Category | Records Affected | Regulatory Obligation | Business Impact |106|---------------|-----------------|----------------------|-----------------|107| PII (names, emails) | *count* | State breach notification laws | Medium |108| Financial (PCI) | *count* | PCI-DSS incident reporting | High |109| Health (PHI) | *count* | HIPAA breach notification | High |110| Credentials | *count* | Forced password reset | Medium |111| Intellectual property | *description* | Varies | Critical |112| Internal only | *count* | Typically none | Low |113114### Step 6: Containment and Eradication115116Recommend immediate and long-term containment actions.117118**Immediate containment (stop the bleeding):**119120- [ ] Isolate compromised hosts from the network121- [ ] Disable compromised user accounts and revoke active sessions122- [ ] Block known malicious IPs, domains, and hashes at perimeter123- [ ] Rotate compromised credentials, API keys, and tokens124- [ ] Revoke OAuth tokens and service account keys125126**Eradication (remove the threat):**127128- [ ] Remove malware and persistence mechanisms from affected systems129- [ ] Patch exploited vulnerabilities130- [ ] Rebuild compromised systems from known-good images131- [ ] Verify removal by re-scanning with updated signatures132- [ ] Confirm no residual attacker access through monitoring133134**Recovery validation:**135136- [ ] Monitor previously compromised systems for 48-72 hours post-remediation137- [ ] Verify IOC blocks are in place and effective138- [ ] Confirm business operations have resumed normally139- [ ] Validate backup integrity before restoration140141### Step 7: Lessons Learned and Recommendations142143Conduct a blameless retrospective to prevent recurrence.144145- What detection gaps allowed the incident to occur or persist?146- What process failures slowed the response?147- What tools or visibility improvements would help in the future?148- What security controls should be added or strengthened?149150**Recommendation priority framework:**151152| Priority | Timeframe | Examples |153|----------|-----------|---------|154| Immediate | 0-7 days | Patch critical vulnerability, enforce MFA on compromised accounts |155| Short-term | 1-4 weeks | Deploy additional detection rules, improve log coverage |156| Medium-term | 1-3 months | Implement network segmentation, deploy EDR to uncovered endpoints |157| Long-term | 3-12 months | Zero-trust architecture adoption, security awareness training program |158159## Output Format160161Present the investigation as a structured report:162163```164## Incident Investigation Report165166### Executive Summary167- Incident type, severity, and current status168- Scope: systems, accounts, and data affected169- Key findings in 2-3 sentences170171### Timeline172- Chronological table of events (UTC timestamps)173174### Indicators of Compromise175- Categorized IOC table with enrichment176177### Impact Assessment178- Data and system impact with regulatory implications179180### Containment and Remediation181- Actions taken and actions recommended182183### Lessons Learned184- Detection gaps, process improvements, and prioritized recommendations185186### Appendix187- Raw IOC list for ingestion into security tooling188- Evidence inventory with chain-of-custody notes189```190191## Quality Checklist192193- [ ] All timestamps are in UTC with consistent formatting194- [ ] IOCs are deduplicated and enriched with context195- [ ] Timeline has no unexplained gaps longer than the attacker dwell time196- [ ] Impact assessment covers data, systems, users, and regulatory obligations197- [ ] Containment actions are specific and actionable, not generic advice198- [ ] Recommendations are prioritized with clear ownership and timeframes199- [ ] Evidence chain of custody is documented200- [ ] Report distinguishes confirmed facts from analyst assessments201202## Edge Cases203204- For ransomware incidents: prioritize determining if exfiltration occurred before encryption; check for double-extortion indicators205- For insider threat incidents: involve HR and legal early; preserve evidence with extra chain-of-custody rigor206- For supply chain compromises: scope investigation to include downstream consumers of the compromised component207- For cloud-specific incidents: focus on IAM policy changes, resource creation in unusual regions, and API key usage patterns208- For incidents with no clear IOCs: shift to behavioral analysis and hypothesis-driven investigation using MITRE ATT&CK209- For multi-tenant environments: determine if lateral movement crossed tenant boundaries and notify affected parties
Run npx skillmds@latest add ashutoshsrivastava17/incident-investigation in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Investigate security incidents end-to-end: evidence collection, timeline reconstruction, indicator of compromise (IOC) analysis, impact assessment, containment steps, and lessons learned. TRIGGER when: user says /incident-investigation, asks about investigating a security incident, needs help with forensic analysis, or wants to build an incident timeline. It is listed under Security on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
ashutoshsrivastava17 (@ashutoshsrivastava17) published this skill. Their other Agent Skills are listed on their SkillMD profile.