Skip to content
Tutorials Center
My learning

Topics

Lesson 29 of 37 ยท Playbooks and Automation

A Phishing Response Playbook

Build a phishing response playbook step by step: intake, header and link analysis, verdict, blast radius, purge and user follow-up, with a runnable email parser.

Phishing is still the most common way attackers get a first foothold, which makes it the most common playbook in almost every SOC. Users report suspicious emails (often with a "report phishing" button), and the SOC has to decide quickly: is it malicious, who else got it, did anyone click, and what must be removed or reset?

This lesson builds a complete phishing playbook and a small analyzer that works on a made-up message. It reads email text only: it opens no links, runs no attachments and contacts nothing. Real analysis of live samples should happen in an isolated, approved environment such as your email security tool or a sandbox.

The playbook at a glance

flowchart TD
    A["User reports email"] --> B["Acknowledge and collect original message"]
    B --> C["Extract headers, sender, links, attachments"]
    C --> D["Enrich: reputation, sandbox, similar messages"]
    D --> E{"Verdict"}
    E -- "Benign or spam" --> F["Reply to user, close, feed spam filter"]
    E -- "Malicious" --> G["Find all recipients"]
    G --> H["Purge from mailboxes and block indicators"]
    H --> I{"Anyone clicked or opened?"}
    I -- "No" --> J["Close with report"]
    I -- "Yes" --> K["Treat as incident: reset credentials, scan endpoint"]

The second half of the flow is where most of the value is: a phish sent to 300 people is one incident, not 300 reports.

Phishing response steps

Intake Get the original message
Analyze Headers, links, files
Verdict Benign, spam or malicious
Remediate Purge, block, reset

Then tell the reporter what you found.

1 / 2

Step 1: intake

Ask users to report using a standard button or forward the message as an attachment so the original headers are preserved. Forwarding inline strips them. Acknowledge the report quickly; people who get a reply keep reporting.

Step 2: analysis

Headers

  • From, Reply-To and Return-Path: do they match? A Reply-To pointing to a different domain is a classic sign.
  • Authentication results: SPF, DKIM and DMARC outcomes added by your gateway. A failure on a message claiming to be from your own company is highly suspicious, but passes do not prove safety, since attackers also register domains and configure them correctly.
  • Received chain: shows the servers a message passed through.
  • Look-alike domains: examp1e.example or example-support.example versus the real domain.
  • Urgency, fear, or reward ("your account will be closed today").
  • Display text that differs from the real link target.
  • Shortened URLs, odd subdomains, login pages for services your company does not use.

Attachments

Be careful with macros in office files, scripts, shortcut files, and archives with passwords. Detonate in a sandbox rather than opening on a workstation.

Try it: pull the facts out of a message

The parser below uses Python's standard email library on an invented message and flags several classic warning signs. It is a teaching aid, not a replacement for a mail security gateway.

Python Analyze a sample message (text only)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Step 3: verdict

Use clear categories so the response is consistent:

  • Malicious: credential harvesting, malware delivery, business email compromise. Purge and block.
  • Spam / graymail: unwanted but harmless. Train the filter and close.
  • Legitimate: for example a real vendor notice. Explain to the user and close.

Step 4: blast radius

One report means little. Search the mail logs for the same sender, subject, link domain or attachment hash across all recipients, and across a window wider than the report time. Then check who interacted: web proxy and DNS logs for visits to the link domain, endpoint logs for the attachment hash, authentication logs for logins right after a click.

Python Who received it and who clicked?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The POST is the dangerous part: it suggests alice typed something into the fake login page. Her password and active sessions must be reset, and her account's recent sign-ins reviewed (see triage and containment).

Step 5: remediate

  • Purge the message from every mailbox with the mail platform's search-and-delete feature (soft-delete or quarantine first when possible).
  • Block the sender, domain and URL at the mail gateway and web proxy; add to watchlists.
  • Reset credentials and revoke sessions for anyone who submitted data; check for mailbox rules and new MFA devices.
  • Scan endpoints of anyone who opened an attachment.
  • Report takedown requests for fraudulent sites to the registrar or host, if your policy allows.

Step 6: close the loop

Tell the reporter what happened in plain words and thank them. Record indicators, verdict and counts, and use the case in awareness training (with names removed). A reporting culture is a security control.

Run simulated phishing exercises only with approval from management and HR, and use the results to teach, not punish.

Common mistakes

  • Opening links or attachments on an ordinary workstation instead of a sandbox.
  • Purging one mailbox and forgetting the other 299.
  • Not checking whether someone already clicked before closing.
  • Trusting "SPF pass" as proof of safety.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why ask users to forward suspicious email as an attachment?

    Inline forwarding rewrites headers; an attached message preserves them.
  2. 2. A Reply-To address on a different domain than From is...

    Attackers use it to collect replies; combined with other signs it is a strong indicator.
  3. 3. After finding a malicious phish, what should come next?

    The blast radius decides how many mailboxes and accounts need action.
  4. 4. A proxy log shows a POST to the phishing page from a user's machine. What does it suggest?

    A POST to a credential-harvesting page often carries typed data.

Summary

  • A phishing playbook runs intake, analysis, verdict, blast-radius search, remediation and feedback.
  • Check headers, authentication results, link targets and attachments, but only in safe, approved environments.
  • Search logs for every recipient and for anyone who clicked, posted data or opened files.
  • Purge, block, reset and tell the reporter; learn from each case.

Next: Automating Enrichment and Response