/secskills-defense:analyzing-phishing-emailsfrom secskills-defense
Triage and forensically analyze reported phishing emails safely — extract raw messages, verify SPF/DKIM/DMARC, detect spoofing, unwrap redirects, decode quishing QR codes, and pull IOCs for hunting.
Ships in secskills-defense. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
An email is a stack of claims — who sent it, where it came from, that its links are safe — and phishing analysis is checking each claim against evidence the sender could not forge: the Received chain, the authentication results, and the true destination of every link and attachment. The From header is a display, not a fact. Anyone can type any address into it; your job is to find the evidence that agrees or disagrees.
.eml or .msg file to analyze offlineanalyzing-malwareinvestigating-m365-entraperforming-social-engineeringresponding-to-incidentsanalyzing-network-trafficTreat every reported message as live. The failure mode is not misreading a header; it is clicking a link in a production mail client or double-clicking an attachment on your own host.
.eml/.msg, not a forwarded copy.
Forwarding rewrites headers and strips the evidence you need.http → hxxp, . → [.], @ → [at]. So http://evil.com/login
becomes hxxp://evil[.]com/login. Defanging prevents an accidental click
downstream and stops link-preview bots from detonating it for you.analyzing-malware for the build.The visible email is a rendering. You need the source with all headers.
.msg, or in OWA use "View message source"..eml..msg → readable: msgconvert sample.msg produces a .eml (RFC822).emldump.py sample.eml lists MIME parts and indices;
emldump.py -s 4 -d sample.eml dumps part 4 (an attachment) without opening
it. A .msg is an OLE compound file — oledump.py (DidierStevens) lists its
streams.mha / MXToolbox Header
Analyzer for a parsed hop table.Keep the original file hashed and untouched; work on copies.
The Received: headers are added by each mail server the message passes
through, newest at the top. Read them bottom-up: the bottom-most
Received is the originating server — the earliest, least-forgeable hop.
Received: from mail.contoso.com (mail.contoso.com [203.0.113.9])
by mx.recipient.com ... ; Tue, 21 Jul 2026 09:14:02 +0000 <- final hop
Received: from smtp.sketchy-vps.ru ([185.220.101.5])
by mail.contoso.com ... ; Tue, 21 Jul 2026 09:13:58 +0000 <- origin
[bracketed IP]. Geolocate
and WHOIS it (whois 185.220.101.5), check reputation, and reconcile it
against the claimed sender. A "From: [email protected]" that originates on a
Russian VPS is your finding.Received lines to fabricate a
reputable origin. Only hops added by servers you trust are reliable — trust
breaks at the first server outside your control. A hop that references a
server not present in the next hop's by is invented.From domain should tell one coherent story. They usually do not in a
phish.SPF, DKIM, and DMARC are the forgery-resistant checks. The receiving server
records them in Authentication-Results. Read it, and re-verify rather than
trusting a summary.
Authentication-Results: mx.recipient.com;
spf=pass (sender IP is 185.220.101.5) smtp.mailfrom=bounce.sketchy-vps.ru;
dkim=pass header.d=sketchy-vps.ru header.s=selector1;
dmarc=fail (p=reject sp=reject dis=none) header.from=contoso.com
Return-Path / smtp.mailfrom
/ MAIL FROM), not the visible From. Values: pass (IP is authorized
for the envelope domain), fail (hard -all reject), softfail
(~all, suspicious but delivered), neutral/none (no policy). Check the
domain's record: dig txt contoso.com and read the v=spf1 ... string.dkim=pass proves the message was signed by the key at d='s selector and
not modified. The load-bearing question is alignment: does header.d=
match the From domain? A valid signature from d=mailer-xyz.com on a
message claiming From: contoso.com is not contoso. Re-verify with
dkimverify < sample.eml (dkimpy) and fetch the key via
dig txt selector1._domainkey.contoso.com.From via alignment and applies the
domain owner's policy. dmarc=pass requires SPF or DKIM to pass AND be
aligned with header.from. Read the policy: dig txt _dmarc.contoso.com
→ v=DMARC1; p=reject; .... p=reject/quarantine with dmarc=fail means
the owner told you to distrust it.ARC-Seal/ARC-Authentication-Results) preserves upstream auth
results across forwarders that would otherwise break SPF/DKIM. Use it to see
how auth looked before a mailing list or gateway relayed the message.Return-Path/envelope-from is what bounces go to
and what SPF checks; the header From: is what the user sees. Phishers make
them differ — a benign-looking From with a throwaway envelope domain that
happens to pass SPF is the classic pattern.Much phishing passes authentication because it comes from a real mailbox on a lookalike domain. The auth checks pass for that domain; the deception is visual.
From: "IT Helpdesk" <[email protected]>. The name
is a free-text label; read the actual address.cont0so.com, contoso-support.com,
contoso.co. Diff against the real domain character by character.а
for Latin a). Punycode-encoded domains appear in headers as
xn-- — e.g. xn--cntoso-.... Decode with idn /
python3 -c "print('xn--80ak6aa92e.com'.encode().decode('idna'))" and
compare the rendered form.From: [email protected] but
Reply-To: [email protected]. The reply silently goes to the attacker —
a hallmark of BEC.Message-ID sanity: format is <unique@sending-domain>. The domain
should match the sending infrastructure. A Message-ID domain that disagrees
with the origin, or a malformed/duplicated ID, suggests a spoofing tool.X-Originating-IP: some webmail stamps the true client IP here — pivot on
it, but note it is client-suppliable and can be forged.X-Mailer / User-Agent: reveals the sending client. Bulk-phish kits and
scripts (PHPMailer, Python, custom mailers) look nothing like Outlook or
the claimed sender's normal stack.X- headers and Received paths. Their
presence on a "personal" note from your CEO is a contradiction.Every link is a claim about where it goes. Resolve it without visiting it.
bit.ly/t.co with
curl -sI hxxp://bit[.]ly/xyz (read Location:, do not follow) or a
preview service. Chase every hop to the real landing page.https://*.safelinks.protection.outlook.com/?url=<encoded>&...
— URL-decode the url= parameter.https://urldefense.com/v3/__<encoded>__;... —
decode with the published urldefense decoder (v2/v3 schemes differ).
These wrappers hide the destination; always extract the original.emldump.py -s N -d), then decode:
zbarimg qr.png or python3 -c "from PIL import Image; import pyzbar.pyzbar as z; print(z.decode(Image.open('qr.png')))". Analyze the
decoded URL like any other.Identify and defang before anything executes.
sha256sum att.ext && file att.ext. Extract with
emldump.py -s N -d sample.eml > att.ext — never by double-clicking..html that assembles a
payload in-browser via a Blob), ISO/IMG/VHD (mount bypasses MOTW), LNK
shortcuts, OneNote (.one) with embedded scripts, and password-protected
archives (password in the email body defeats gateway scanning).exiftool att.docx for metadata and authoring
fingerprints; oleid att.xls and olevba --deobf att.xls /
oledump.py att.doc for macros; rtfobj att.rtf for embedded objects.analyzing-malware for
sandboxed detonation, unpacking, and C2 extraction. This skill's job is safe
extraction and triage, not detonation.Extract a clean, defanged indicator set for blocking and hunting:
From/cousin
domains, Reply-To, Message-ID domain, mailer fingerprints.Package these for producing-threat-intelligence when the phish is part of a
tracked campaign, and for reporting-security-findings for the writeup.
One report is rarely the only recipient. Find the rest before you close.
Search-UnifiedAuditLog and Content Search / New-ComplianceSearch
for the subject, sender, and URL across all mailboxes; hard-delete or
quarantine matches via Get-QuarantineMessage / eDiscovery purge.investigating-m365-entra for tenant-side hunting (sign-ins, inbox rules,
OAuth grants) and to responding-to-incidents for the broader response.From. A passing SPF on a lookalike or throwaway envelope
domain is exactly what a competent phish shows. Check DMARC alignment.d=
domain signed it. If d= isn't aligned with the From domain, it's signed
by someone else. Alignment is the question, not signature validity.dmarc=fail
with p=reject is the sender's domain telling you to distrust it.From header
is free text. Without aligned SPF/DKIM and a plausible origin hop, an
internal-looking From means nothing.Generated from secskills-core/ttp-index.json — edit that file, then run
python3 scripts/sync_attack.py --write. Re-verify IDs against the
current ATT&CK release before citing them in a report.
Reconnaissance (TA0043)
performing-social-engineeringInitial Access (TA0001)
performing-social-engineeringperforming-social-engineering, analyzing-malwareperforming-social-engineeringDetection content for any of these: engineering-detections. Proactive search: hunting-threats. Post-compromise: responding-to-incidents.
analyzing-malware — sandboxed detonation and C2 extraction of attachmentsinvestigating-m365-entra — tenant-side hunting when the phish succeededperforming-social-engineering — building phishing campaigns (offensive)analyzing-network-traffic — callback traffic from a detonated payloadproducing-threat-intelligence — pivoting IOCs into tracked campaignsreporting-security-findings — writing up the triage and verdictoletools (olevba, oleid, rtfobj), oledump.py/emldump.py (DidierStevens
suite), msgconvert (Email::Outlook::Message, Perl), and exiftool for
message and attachment parsingWhat SKILL.md sets; muted values are Claude Code's defaults
22 skills in this plugin
/analyzing-disk-imagesPerform dead-disk forensics on an acquired disk image using The Sleuth Kit, Plaso, and bulk_extractor — verify integrity and mount read-only, map partitions, recover deleted files, build a file-system and super-timeline, carve unallocated space, mine registry hives and OS artifacts, and detect anti-forensics. Use when handed a .E01/.dd/.raw/.vmdk/.vhdx disk image or forensic acquisition to examine, recovering deleted files, building a file-system timeline, or carving artifacts from unallocated space./analyzing-linux-persistenceSystematically identify and analyze persistence mechanisms on Linux systems during DFIR investigations -- sweep systemd units, cron jobs, shell initialization, SSH config, kernel modules, LD_PRELOAD, package manager hooks, udev rules, container entrypoints, and XDG autostart entries. Use when investigating a compromised Linux host, performing forensic analysis of a Linux disk image, looking for backdoors or unauthorized access mechanisms, or determining how an attacker maintained access./analyzing-malwareAnalyze suspected malware safely — containment, static triage, sandboxed detonation, unpacking, capability and C2 extraction, IOC production, and YARA rule authoring. Use when handed a suspicious file, hash, or sample, when triaging an alert artifact, or when producing detection content from a specimen./analyzing-memory-imagesAnalyze volatile memory images (RAM dumps) using Volatility 3 — process enumeration, injected code detection, credential extraction, network artifacts, rootkit analysis, and timeline construction from memory-resident data. Use when examining a memory capture from a compromised host, hunting for injected code or hollowed processes, extracting credentials or network state from RAM, or detecting kernel-level rootkits./analyzing-network-trafficAnalyze packet captures and network telemetry for intrusion evidence — capture and handling, the Wireshark/tshark triage funnel, Zeek log mining, Suricata rule runs, beacon and DNS-tunnel detection, TLS/JA3 fingerprinting, HTTP and file carving, exfiltration hunting, and IOC handoff. Use when a `.pcap` or `.pcapng` capture lands on your desk, when a suspected C2 beacon needs confirming, when there is data exfiltration to investigate, when malware network behaviour must be characterized from what it emitted, when a Zeek or Suricata alert needs running down, or when DNS tunneling or unusual TLS is suspected./analyzing-shellcodeAnalyze raw shellcode and position-independent code — extracting the bytes, guessing architecture, disassembling at the right base, decoding self-decoder stubs, resolving hashed Windows APIs, emulating to the decoded stage, and pulling C2 and stage IOCs. Use when handed a raw blob of position-independent code, an extracted payload with no PE/ELF header, shellcode lifted from an exploit or a macro/loader, a `\x`-escaped or base64 buffer, a suspected Cobalt Strike or Metasploit stager, or an egg-hunter.npx claudepluginhub trilwu/secskills --plugin secskills-defense2 plugins ship this exact skill · first indexed Jul 31, 2026
Other plugins' skills for the same job