Skip to content

Guide 09 of 12

Incident Response Playbooks and SOAR Automation

How to write SOC incident response playbooks that analysts actually use, and how to automate them with SOAR safely: what to automate, approval gates, tests.

Published on 7 min read
On this page
  1. Playbook, runbook, procedure
  2. Anatomy of a playbook
  3. Example: compromised cloud user account
  4. Writing playbooks that get used
  5. Where SOAR fits
  6. Testing automation
  7. Measuring playbooks and automation
  8. Communication and notification deadlines
  9. References

A playbook turns incident response from improvisation into a practiced routine. When a compromised account is reported at 23:40, the on-call analyst should not be deciding from scratch which logs to pull, who can approve disabling the account, or whether to notify legal. Those decisions were made calmly, in advance, and written down.

SOAR (Security Orchestration, Automation and Response) then takes the parts of those playbooks that are repetitive and deterministic and runs them in seconds. Automation without a good playbook just executes a bad process faster, so this guide starts with the playbook.

Playbook, runbook, procedure

Terminology varies; a useful split:

  • Playbook: the overall response to a type of incident (phishing, ransomware, compromised account). Covers phases, decisions, roles and communication.
  • Runbook: a concrete step-by-step procedure for one task inside a playbook ("revoke all sessions for an Entra ID user", "isolate a host in the EDR console").
  • Automation workflow: the machine-executable version of a runbook or part of a playbook.

NIST SP 800-61 Rev. 3 organizes response activities around the CSF 2.0 Respond and Recover functions (incident management, analysis, reporting and communication, mitigation, recovery). Older material uses the SP 800-61 Rev. 2 lifecycle of preparation, detection and analysis, containment, eradication and recovery, and post-incident activity; it is still a practical skeleton for a playbook.

Anatomy of a playbook

Keep each playbook short enough to use under pressure: two to four pages, with links to runbooks for details.

  1. Scope and triggers. Which alerts, reports or detections start this playbook.
  2. Severity criteria. How to classify within this incident type (one mailbox versus an executive, one host versus many).
  3. Roles. Who leads, who approves containment, who communicates.
  4. First 30 minutes. The checklist for initial scoping and immediate containment.
  5. Investigation. Questions to answer and where the data lives.
  6. Containment options. Each with impact, reversibility and who can authorize it.
  7. Eradication and recovery. What must be true before declaring the incident closed.
  8. Evidence. What to preserve, how, and chain-of-custody expectations if legal action is possible.
  9. Communication. Internal stakeholders, regulators, customers, law enforcement: who decides and the deadlines that may apply.
  10. Post-incident. Lessons learned, detection improvements, hardening actions.

Example: compromised cloud user account

A condensed version of a playbook most SOCs need.

Triggers: risky sign-in alert, impossible travel, MFA fatigue pattern, user report, inbox rule forwarding to an external address, OAuth consent to an unknown app.

First 30 minutes:

  1. Confirm with the user through a separate channel (phone, not email) whether they performed the activity.
  2. If not confirmed or clearly malicious: reset the password, revoke refresh tokens and sessions, and require MFA re-registration if the MFA method may be compromised.
  3. Check for persistence: new MFA methods, inbox rules, mailbox forwarding, OAuth app consents, app passwords, new devices registered.
  4. Identify the source IPs and user agents of the malicious sessions and search for them across all users.

In Microsoft Entra ID, for instance, revoking sessions with Microsoft Graph PowerShell looks like:

Connect-MgGraph -Scopes "User.ReadWrite.All"
Revoke-MgUserSignInSession -UserId "jdoe@corp.example"

and checking for inbox rules with Exchange Online PowerShell:

Get-InboxRule -Mailbox "jdoe@corp.example" |
  Select-Object Name, Enabled, ForwardTo, ForwardAsAttachmentTo, RedirectTo, DeleteMessage

Investigation questions: How did the attacker obtain access (phishing page, token theft, password spray)? What did they read, send or change? Did they access other applications through single sign-on? Did they target other users from this account (internal phishing)?

Closure criteria: all malicious sessions revoked, persistence removed, the access vector understood, other affected users identified, detections added for any gap found.

Writing playbooks that get used

  • Start from real incidents. Your last five incidents are the best source of what actually happens.
  • Write decisions, not just steps. "If the account is privileged, escalate to the incident manager and page the identity team" is more useful than another enrichment step.
  • Name the authority. Every disruptive action lists who can approve it, including out of hours. The SOC charter should pre-approve the common ones.
  • Keep them in version control alongside detections, and review them after every incident that used them.
  • Practice. Run tabletop exercises quarterly and rotate who leads. CISA's federal incident and vulnerability response playbooks are a good model for structure even outside government.

Where SOAR fits

SOAR platforms connect your security tools through APIs and run workflows when a trigger fires. Commercial examples include Splunk SOAR, Palo Alto Cortex XSOAR, Microsoft Sentinel automation with Logic Apps, Google SecOps SOAR and Tines; open source options include Shuffle, and case managers such as TheHive and DFIR-IRIS integrate with automation engines.

What to automate first

Rank candidates by frequency times time saved, weighted by risk of getting it wrong.

Safe and high value (automate early):

  • Enrichment: asset and identity lookup, indicator reputation, previous alerts.
  • Case creation and deduplication.
  • Phishing report handling: extract URLs and attachments, detonate in a sandbox, search for the same message in other mailboxes.
  • User confirmation via chat or email for low-risk anomalies.
  • Evidence collection: pull process trees, triage packages, mailbox audit logs into the case.

Disruptive (automate with approval gates):

  • Host isolation.
  • Account disable or session revocation.
  • Message purge across mailboxes.
  • Firewall or proxy blocks.

Rarely automate fully:

  • Actions on critical infrastructure (domain controllers, production databases, OT).
  • Bulk actions affecting many users.
  • Anything irreversible.

Approval gates

A pattern that works: the workflow prepares the action, posts a summary to the analyst or the on-call channel with "approve" and "reject" buttons, and executes on approval. For well-understood, high-confidence cases (EDR ransomware verdict on a workstation), you can pre-approve full automation, with an allowlist of assets that are never auto-isolated.

Interoperable playbooks

OASIS CACAO (Collaborative Automated Course of Action Operations) defines a standard JSON format for security playbooks, so they can be shared and executed across tools. Even if your SOAR does not import CACAO directly, its structure (workflow steps, conditions, agents, targets) is a good checklist for documenting automation in a vendor-neutral way.

Testing automation

Automation that runs in production must be tested like code:

  • Keep workflows in version control where the platform allows export.
  • Test against a staging tenant or test accounts before enabling.
  • Add rate limits and circuit breakers: a workflow should never disable more than a handful of accounts in a minute without a human.
  • Log every automated action into the case, with inputs and outputs.
  • Review automation failures weekly; integrations break silently when APIs change or credentials expire.

Measuring playbooks and automation

Useful signals: time from alert to containment per incident type, the share of incidents where the playbook was followed or deviated (and why), analyst time saved per automated workflow, and automation error rate. The metrics guide covers how to keep these honest.

Feed every post-incident review back into three places: the playbook, the detections, and the triage runbooks.

Communication and notification deadlines

Technical containment is only half of a serious incident. Several regimes impose reporting deadlines that start running while the SOC is still investigating, so every playbook for a potentially reportable incident should name who decides on notification and how they are reached. Examples that apply to many organizations:

  • GDPR (EU): a personal data breach must be notified to the competent supervisory authority without undue delay and, where feasible, within 72 hours of becoming aware of it (Article 33).
  • NIS2 (EU): essential and important entities send an early warning to their CSIRT or competent authority within 24 hours of becoming aware of a significant incident, followed by an incident notification within 72 hours and a final report within one month.
  • SEC (US public companies): a cybersecurity incident determined to be material is disclosed on Form 8-K, Item 1.05, within four business days of the materiality determination.

The SOC rarely makes these decisions, but it supplies the facts and the timestamps they rest on. Record when the organization became aware of the incident, what was known at each point, and who was informed. Keep that log in the case, not in chat threads that may be lost or compromised.

References

Filed underresponsesoc

Written by

Florian Amette

Security engineer writing practical, vendor-neutral guidance on building and running Security Operations Centers: detection engineering, SIEM, triage, incident response and SOC metrics.