Phishing & Email Investigation
Overview
Phishing remains the leading initial access vector for attackers - responsible for the majority of data breaches, ransomware infections, and business email compromise incidents. The ability to quickly and accurately investigate suspicious emails is one of the most critical skills a SOC analyst can have.
This guide walks through the full email investigation process - from reading raw email headers to analyzing malicious URLs and attachments - giving analysts a structured methodology to triage, investigate, and respond to phishing reports effectively.
Phishing Investigation - Quick Reference
| Step | Action | Tool |
|---|---|---|
| 1 | Obtain raw email with full headers | Email client / EML export |
| 2 | Analyze email headers - trace delivery path | MXToolbox, Google Header Analyzer |
| 3 | Check SPF, DKIM, DMARC authentication results | Headers, MXToolbox |
| 4 | Identify and analyze URLs | VirusTotal, URLScan.io, URLVoid |
| 5 | Analyze attachments in sandbox | Any.run, VirusTotal, Hybrid Analysis |
| 6 | Check sender reputation and domain age | Whois, MXToolbox, Shodan |
| 7 | Determine scope - how many recipients | SIEM / Email gateway |
| 8 | Contain - block sender, pull emails, reset credentials if clicked | Email gateway, AD/IdP |
| 9 | Document findings and escalate if needed | Ticketing system |
Email Header Analysis
Email headers contain the full delivery trail of a message - every server that handled the email leaves a trace. Reading headers is the foundation of any phishing investigation and reveals the true origin of a message regardless of what the visible From field says.
How to Get Full Email Headers
| Email Client | How to Access Headers |
|---|---|
| Gmail | Open email → Three dots menu → Show original |
| Outlook (Desktop) | File → Properties → Internet headers |
| Outlook (Web) | Three dots → View → View message source |
| Apple Mail | View → Message → All Headers |
| Thunderbird | View → Message Source (Ctrl+U) |
| Microsoft 365 Admin | Exchange Admin Center → Mail flow → Message trace |
Key Email Header Fields
| Header Field | Description | What to Look For |
|---|---|---|
From | Display name and email address shown to recipient | Spoofed domains, lookalike addresses, display name tricks |
Reply-To | Where replies are sent - can differ from From | Different domain than From = suspicious |
Return-Path | Bounce address - often reveals true sender | Mismatch with From domain = likely spoofed |
Received | Server delivery chain - read bottom to top | Unexpected foreign IPs, unusual mail servers |
X-Originating-IP | IP address of the original sending client | VPN/TOR/datacenter IPs, geographic anomalies |
Message-ID | Unique identifier for the email | Malformed IDs can indicate spam tools |
X-Mailer | Email client used to send | Mass mailer tools, unusual sending software |
Date | Timestamp when email was sent | Future dates, timezone anomalies |
Authentication-Results | SPF, DKIM, DMARC pass/fail results | Any fail result is a major red flag |
Reading the Received Chain
The Received headers show every mail server that handled the message. Read them from bottom to top - the bottom entry is where the email originated, the top entry is where it was delivered.
# Example Received chain - read BOTTOM to TOP
# Bottom = origin, Top = destination
Received: from mail.yourcompany.com (10.0.0.5) ← 3. Delivered to your server
by mx.yourcompany.com; Wed, 26 Aug 2026 14:32:01 +0000
Received: from smtp-relay.sendgrid.net (167.89.x.x) ← 2. Passed through relay
by mail.yourcompany.com; Wed, 26 Aug 2026 14:31:58 +0000
Received: from attacker-server.ru (185.220.x.x) ← 1. TRUE ORIGIN
by smtp-relay.sendgrid.net; Wed, 26 Aug 2026 14:31:55 +0000
# Key fields to extract from each Received header:
# - Hostname claimed by sending server
# - Actual IP address in parentheses
# - Timestamp
# Cross-reference claimed hostname vs actual IP using reverse DNS
SPF / DKIM / DMARC
Email authentication protocols are the primary technical defense against sender spoofing. Understanding pass/fail results is essential for accurate phishing triage.
SPF - Sender Policy Framework
SPF specifies which mail servers are authorized to send email on behalf of a domain. A receiving server checks whether the sending IP is listed in the sender domain's SPF DNS record.
| SPF Result | Meaning | Threat Level |
|---|---|---|
pass | Sending IP is authorized by the domain's SPF record | Low |
fail | Sending IP is explicitly not authorized - likely spoofed | High |
softfail | IP not authorized but domain hasn't set hard fail policy | Medium |
neutral | Domain made no assertion about the IP | Low-Medium |
none | No SPF record exists for the domain | Medium |
permerror | SPF record has a permanent error | Medium |
DKIM - DomainKeys Identified Mail
DKIM adds a cryptographic signature to outgoing emails. The receiving server verifies the signature using the public key published in the sender's DNS records. A valid DKIM signature proves the email content was not modified in transit and originated from the claimed domain.
| DKIM Result | Meaning | Threat Level |
|---|---|---|
pass | Signature valid - email not tampered with, domain verified | Low |
fail | Signature invalid - email may have been modified or forged | High |
none | No DKIM signature present | Medium |
temperror | Temporary DNS lookup failure - retry | Low |
DMARC - Domain-based Message Authentication
DMARC builds on SPF and DKIM by allowing domain owners to specify what should happen to emails that fail authentication - none (monitor), quarantine (spam), or reject (block).
# Example DMARC DNS record
_dmarc.example.com TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com; ruf=mailto:dmarc@example.com; pct=100"
# Key tags:
# p=none → Monitor only, no enforcement (weak)
# p=quarantine → Failed emails go to spam
# p=reject → Failed emails are rejected outright (strongest)
# rua → Aggregate report email address
# ruf → Forensic report email address
# pct → Percentage of mail subjected to policy
Phishing Indicators Checklist
Use this checklist when triaging a reported suspicious email. The more indicators present, the higher the confidence it is malicious.
Sender Indicators
- Display name spoofing - "PayPal Security" <attacker@evil.com> - display name looks legitimate but email domain doesn't match
- Lookalike domain - paypa1.com, paypal-security.com, microsoft-support.net
- Newly registered domain - domain registered within days or weeks of the email
- Free email provider - legitimate companies don't send transactional email from gmail.com or yahoo.com
- Reply-To mismatch - From and Reply-To use different domains
- SPF/DKIM/DMARC failures - any authentication failure is significant
- Unusual sending IP - foreign country, TOR exit node, datacenter IP unrelated to claimed sender
Content Indicators
- Urgency and pressure - "Your account will be suspended in 24 hours", "Act immediately"
- Generic greeting - "Dear Customer", "Dear User" instead of your name
- Grammar and spelling errors - especially in subject line or early in body
- Unexpected request - wire transfer, gift card purchase, credential reset not initiated by user
- Mismatched branding - logos slightly off, wrong colors, outdated design
- Hover URL mismatch - link text says paypal.com but href points elsewhere
- Shortened URLs - bit.ly, tinyurl, or other shorteners hiding destination
- Unusual attachment type - .iso, .img, .vhd, .lnk, .hta, password-protected zip
- Request for credentials - any email asking you to enter a password is suspicious
Technical Indicators
| Indicator | Description | Severity |
|---|---|---|
| HTML only email | No plain text version - common in bulk phishing tools | Low |
| Tracking pixels | 1x1 images used to confirm email opened | Low |
| Base64 encoded content | Obfuscated email body to bypass filters | Medium |
| Redirect chains | Multiple URL redirects to hide final destination | High |
| Credential harvesting page | URL loads a login page mimicking legitimate service | Critical |
| Malicious macro | Office document with VBA macro requesting enable content | Critical |
| Living-off-the-land attachment | .lnk, .hta, .iso files executing system commands | Critical |
URL Analysis
Malicious URLs are present in the vast majority of phishing emails. Safe analysis requires using tools that visit the URL in an isolated environment - never click directly from your workstation.
URL Analysis Tools
| Tool | Purpose | URL |
|---|---|---|
| URLScan.io | Screenshots page, extracts IPs, domains, resources loaded | urlscan.io |
| VirusTotal | Multi-engine URL scanning, domain reputation | virustotal.com |
| URLVoid | Blacklist check across multiple threat intelligence sources | urlvoid.com |
| Browserling | Visit URL in isolated cloud browser | browserling.com |
| Any.run | Interactive sandbox - click through the full phishing flow | any.run |
| Google Safe Browsing | Check if URL is in Google's malware/phishing database | transparencyreport.google.com |
| Whois / RDAP | Domain registration date and registrant info | who.is / rdap.org |
URL Defanging
When sharing or documenting malicious URLs in reports, always defang them to prevent accidental clicks and ensure the URL isn't rendered as a hyperlink.
# Defanging conventions
# Replace . with [.]
# Replace http with hxxp
# Replace :// with ://
# Original (dangerous)
http://malicious-domain.com/steal-creds
# Defanged (safe to share)
hxxp://malicious-domain[.]com/steal-creds
# Python defang
url = "http://malicious.com/phish"
defanged = url.replace("http", "hxxp").replace(".", "[.]")
print(defanged) # hxxp://malicious[.]com/phish
Lookalike Domain Detection
# Common lookalike techniques to check
paypal.com → paypa1.com (character substitution - l→1)
microsoft.com → mlcrosoft.com (character swap)
amazon.com → amazon-support.com (subdomain trick)
apple.com → apple.com.verify-account.net (domain after legitimate name)
google.com → goog1e.com (homoglyph - l→1)
bankofamerica.com → bankofamerica.secure-login.com
# Tools for detecting lookalikes
dnstwist - generates and checks permutations of a domain
URLCrazy - similar domain generation
# Check registration date - recent = suspicious
Attachment Analysis
Malicious attachments are the second most common phishing delivery method after links. Never open attachments from suspicious emails directly - always analyze in an isolated sandbox environment.
Suspicious Attachment Types
| File Type | Risk | Common Malware Technique |
|---|---|---|
| .docm / .xlsm | Critical | VBA macros executing PowerShell or downloading payloads |
| .lnk | Critical | Windows shortcuts executing hidden commands |
| .iso / .img | Critical | Disk images bypassing email attachment filters |
| .hta | Critical | HTML application executing scripts with elevated trust |
| High | Embedded links, JavaScript, or exploit code | |
| .zip / .rar (password protected) | High | Bypasses email AV scanning - password in email body |
| .js / .vbs | Critical | Script files executing malicious code directly |
| .exe / .msi | Critical | Direct malware delivery - usually blocked by email gateways |
Safe Attachment Analysis Tools
| Tool | Purpose | Cost |
|---|---|---|
| Any.run | Interactive sandbox - watch malware execute in real time | Free/Paid |
| VirusTotal | Multi-engine static analysis, community reports | Free |
| Hybrid Analysis | Full behavioral sandbox analysis with network capture | Free |
| Joe Sandbox | Deep behavioral analysis with MITRE ATT&CK mapping | Free/Paid |
| Cuckoo Sandbox | Open source self-hosted malware sandbox | Free |
| oletools | Analyze Office documents for macros without opening | Free |
| pdfid / pdf-parser | Analyze PDF structure without executing | Free |
| ExifTool | Extract metadata from files - reveals authorship info | Free |
# Analyze Office document for macros without opening
pip install oletools
olevba suspicious.docm # Extract and display VBA macro code
oleid suspicious.docm # Quick indicator check
# Analyze PDF without opening
pdfid suspicious.pdf # Check for JavaScript, actions, embedded files
pdf-parser suspicious.pdf # Deep structure analysis
# Get file metadata
exiftool suspicious.pdf # Author, creation date, software used
exiftool suspicious.docx # May reveal attacker's username or company
# Hash the file for IOC sharing
sha256sum suspicious.docm
md5sum suspicious.docm
# Check hash on VirusTotal
# https://www.virustotal.com/gui/file/[SHA256HASH]
Business Email Compromise (BEC)
BEC is a sophisticated form of phishing where attackers impersonate executives, vendors, or trusted partners to trick employees into transferring funds, sharing sensitive data, or changing payment details. BEC attacks cause billions in losses annually and often have no malicious links or attachments - making them harder to detect with technical controls alone.
Common BEC Scenarios
| BEC Type | Description | Red Flags |
|---|---|---|
| CEO Fraud | Attacker impersonates CEO requesting urgent wire transfer or gift cards | Urgency, secrecy request, unusual payment method |
| Vendor Impersonation | Attacker poses as known vendor requesting bank account change | New bank details, different email domain, urgency |
| Attorney Impersonation | Attacker poses as lawyer demanding confidential wire transfer | Legal urgency, secrecy, time pressure |
| Employee Payroll Diversion | Attacker poses as employee requesting direct deposit account change | Unusual request channel, timing before payday |
| Account Compromise | Attacker uses legitimate compromised email account to send BEC | SPF/DKIM pass but unusual request, sent from mobile |
BEC Detection Indicators
- Lookalike executive email - john.smith@company-corp.com instead of john.smith@company.com
- Reply-To different from From - email appears to come from CEO but replies go elsewhere
- Unusual request via email - finance requests should follow established out-of-band verification procedures
- Secrecy requested - "Don't tell anyone", "Keep this between us" - major red flag
- Urgency combined with unusual payment - gift cards, wire transfers, cryptocurrency
- Email sent outside business hours - late night or weekend urgency is a classic BEC tactic
- New or changed payment details - always verify vendor bank changes via phone using a known number
Investigation Tools
| Tool | Purpose | Cost |
|---|---|---|
| MXToolbox | Email header analysis, blacklist check, SPF/DKIM/DMARC lookup | Free |
| Google Admin Toolbox | Email header analyzer with visual delivery chain | Free |
| PhishTool | Purpose-built phishing investigation platform | Free/Paid |
| VirusTotal | URL, file, and IP/domain reputation scanning | Free |
| URLScan.io | Safe URL browsing with screenshot and resource analysis | Free |
| Any.run | Interactive malware sandbox for attachments and URLs | Free/Paid |
| Hybrid Analysis | Free behavioral sandbox for file analysis | Free |
| dnstwist | Detect lookalike/typosquatted domains | Free |
| oletools | Office document macro analysis without execution | Free |
| SpamAssassin | Open source spam and phishing scoring engine | Free |
| EmailRep.io | Email address reputation check | Free |
| IPQS | IP, URL, email, and phone reputation scoring | Free/Paid |
Investigation Workflow
PHISHING INVESTIGATION WORKFLOW
1. RECEIVE & TRIAGE (< 5 minutes)
├── Obtain raw email with full headers (EML format preferred)
├── Note: did user click link or open attachment?
├── Note: how many recipients received this email?
└── Assign severity: Low / Medium / High / Critical
2. HEADER ANALYSIS (5-10 minutes)
├── Extract: From, Reply-To, Return-Path, X-Originating-IP
├── Trace Received chain - identify true origin IP
├── Check SPF / DKIM / DMARC results
├── Look up sending IP reputation (VirusTotal, AbuseIPDB)
└── Check sender domain registration date (Whois)
3. CONTENT ANALYSIS (5-10 minutes)
├── Identify all URLs - defang before documenting
├── Identify all attachments - note file types and hashes
├── Check for urgency, generic greeting, grammar issues
└── Assess BEC indicators if no links/attachments
4. URL ANALYSIS (5-15 minutes)
├── Submit all URLs to URLScan.io
├── Check each URL on VirusTotal
├── Verify destination - credential harvesting page?
└── Check for redirect chains
5. ATTACHMENT ANALYSIS (10-20 minutes)
├── Hash file (SHA256) and check VirusTotal
├── Submit to Any.run or Hybrid Analysis sandbox
├── For Office docs: run olevba to extract macros
└── Document all IOCs: IPs, domains, hashes, URLs
6. SCOPE ASSESSMENT
├── Query email gateway - how many mailboxes received this?
├── Query SIEM - did any user click the link?
├── Query SIEM - did any user open the attachment?
└── Identify all potentially affected users
7. CONTAINMENT
├── Block sender domain/IP in email gateway
├── Pull/quarantine emails from all mailboxes
├── If link was clicked: isolate endpoint, reset credentials
├── If attachment opened: isolate endpoint, full IR process
└── Notify affected users
8. DOCUMENTATION & ESCALATION
├── Document all findings and IOCs
├── Escalate based on severity and user interaction
└── Submit IOCs to threat intel platform (MISP/OpenCTI)
Reporting & Escalation
Escalation Criteria
| Scenario | Severity | Action |
|---|---|---|
| Phishing email received, no interaction | Low | Block IOCs, pull email, document, close |
| User clicked link, no credentials entered | Medium | Isolate if possible, check for drive-by download, monitor |
| User entered credentials on phishing page | High | Immediate credential reset, MFA review, full investigation |
| User opened malicious attachment | High | Isolate endpoint, full IR process, check for lateral movement |
| BEC - wire transfer or data sent | Critical | Contact bank immediately, executive notification, legal/compliance |
| Widespread campaign - multiple users affected | Critical | Full incident response, executive notification, possible breach notification |
Phishing Report Template
PHISHING INVESTIGATION REPORT
Ticket: [ID]
Date: [Date]
Analyst: [Name]
Severity: Low / Medium / High / Critical
SUMMARY
Brief description of the phishing attempt and outcome.
EMAIL DETAILS
From: attacker@evil.com
Display Name: PayPal Security
Reply-To: different@other.com
Subject: Urgent: Your account has been suspended
Date Received: 2026-08-26 14:32:01 UTC
Recipients: [N] users
AUTHENTICATION RESULTS
SPF: FAIL
DKIM: NONE
DMARC: FAIL
SENDER ANALYSIS
Sending IP: 185.220.x.x (TOR exit node)
Domain Age: 3 days (registered 2026-08-23)
Blacklisted: Yes (VirusTotal 12/89)
INDICATORS OF COMPROMISE
URLs:
hxxp://paypa1[.]com/verify (VirusTotal: 45/89 malicious)
Attachments:
invoice.docm (SHA256: abc123...) - VBA macro detected
IPs:
185.220.x.x
Domains:
paypa1[.]com
USER INTERACTION
[N] users clicked the link
[N] users entered credentials
[N] users opened attachment
CONTAINMENT ACTIONS TAKEN
✓ Sender domain blocked in email gateway
✓ Emails pulled from [N] mailboxes
✓ Credentials reset for affected users
✓ IOCs submitted to threat intel platform
RECOMMENDATIONS
- Enable MFA for all users
- Conduct phishing awareness training
- Review email gateway filtering rules