analyzing-email-headers-for-phishing-investigation

analyzing-email-headers-for-phishing-investigation is a skill for Claude Code from killvxk/cybersecurity-skills-zh. It costs 54 tokens per session (3,342 once invoked), scanned A, original, Apache-2.0.

An email-forensics guide for tracing where a suspicious message came from and checking whether its sender details are genuine. It uses SPF, DKIM, and DMARC, which are standards that help verify email senders.

In plain words
What is it for?
Examining original EML or MSG headers, checking DNS records, reviewing mail relays, and investigating phishing incidents.
Why use it?
It helps investigators separate legitimate messages from forged or phishing emails and follow the message’s delivery path.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cybersecurity-skills-zh plugin — 58 skills shipped together

Good fit Examining original EML or MSG headers, checking DNS records, reviewing mail relays, and investigating phishing incidents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/killvxk/cybersecurity-skills-zh/analyzing-email-headers-for-phishing-investigation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add killvxk/cybersecurity-skills-zh --skill analyzing-email-headers-for-phishing-investigation
Clone the repo
git clone --depth 1 https://github.com/killvxk/cybersecurity-skills-zh

Made for: Claude Code.

Or install cybersecurity-skills-zh, the plugin that ships this one along with the rest of its 58 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyzing-email-headers-for-phishing-investigation

README.md
[![agentmods](https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-email-headers-for-phishing-investigation/github.svg)](https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-email-headers-for-phishing-investigation)
Your own site
<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-email-headers-for-phishing-investigation"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-email-headers-for-phishing-investigation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analyzing-email-headers-for-phishing-investigation

Your own site · 80×15
<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-email-headers-for-phishing-investigation"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-email-headers-for-phishing-investigation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,342 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.03342
Opus 5 $0.00027 $0.01671
Sonnet 5 $0.00011 $0.00668
Haiku 4.5 $0.00005 $0.00334

Measured 12d ago against content hash 2fa97c79e93a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

analyzing-email-headers-for-phishing-investigation scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/agent.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s "https://api.abuseipdb.com/api/v2/check?ipAddress=${SENDING_IP}" \
skills/analyzing-email-headers-for-phishing-investigation/SKILL.md · 313 lines

How it starts

The opening of the file, as written. The whole thing — 313 lines — stays where its author put it; the contents beside it link to each section on GitHub.

分析电子邮件头部用于钓鱼调查

适用场景

  • 调查疑似钓鱼(Phishing)邮件以确定其真实来源时
  • 验证发件人真实性并检测电子邮件伪造时
  • 用户点击钓鱼链接后的事件响应期间
  • 追踪可疑邮件的投递路径和中继服务器时
  • 验证 SPF、DKIM 和 DMARC 对齐以识别伪造时

前置条件

  • 来自可疑邮件的原始邮件头部(EML 或 MSG 格式)
  • 了解 SMTP 协议和电子邮件头部字段
  • 访问 DNS 查询工具(dig、nslookup)用于 SPF/DKIM/DMARC 验证
  • 电子邮件头部分析工具(MHA、emailheaders.net 相关概念)
  • 带邮件解析库的 Python 用于自动化分析
  • 访问威胁情报(Threat Intelligence)平台进行 IP/域名声誉查询

工作流程

步骤 1:提取原始电子邮件头部

# 从 Outlook 导出: 打开邮件 > 文件 > 属性 > Internet 头部
# 从 Gmail 导出: 打开邮件 > 三个点 > 显示原始邮件
# 从 Thunderbird 导出: 查看 > 消息源码

# 如果从取证镜像处理 EML 文件
cp /mnt/evidence/Users/suspect/AppData/Local/Microsoft/Outlook/phishing_email.eml \
   /cases/case-2024-001/email/

# 如果处理 PST 文件,提取单个消息
pip install pypff
python3 << 'PYEOF'
import pypff

pst = pypff.file()
pst.open("/cases/case-2024-001/email/outlook.pst")
root = pst.get_root_folder()

def extract_messages(folder, path=""):
    for i in range(folder.get_number_of_sub_messages()):
        msg = folder.get_sub_message(i)
        headers = msg.get_transport_headers()
        subject = msg.get_subject()
        if headers:
            filename = f"/cases/case-2024-001/email/msg_{i}_{subject[:30]}.txt"
            with open(filename, 'w') as f:
                f.write(headers)
    for i in range(folder.get_number_of_sub_folders()):
        extract_messages(folder.get_sub_folder(i))

extract_messages(root)
PYEOF

步骤 2:解析电子邮件头部链

# 使用 Python email 库解析头部
python3 << 'PYEOF'
import email
from email import policy

with open('/cases/case-2024-001/email/phishing_email.eml', 'r') as f:
    msg = email.message_from_file(f, policy=policy.default)

print("=== 关键头部字段 ===")
print(f"From:          {msg['From']}")
print(f"To:            {msg['To']}")
print(f"Subject:       {msg['Subject']}")
print(f"Date:          {msg['Date']}")
print(f"Message-ID:    {msg['Message-ID']}")
print(f"Reply-To:      {msg['Reply-To']}")
print(f"Return-Path:   {msg['Return-Path']}")
print(f"X-Mailer:      {msg['X-Mailer']}")
print(f"X-Originating-IP: {msg['X-Originating-IP']}")

print("\n=== Received 头部(从底部到顶部 = 时间顺序)===")
received_headers = msg.get_all('Received')
if received_headers:
    for i, header in enumerate(reversed(received_headers)):
        print(f"\n跳 {i+1}: {header.strip()}")

print("\n=== 认证结果 ===")
auth_results = msg.get_all('Authentication-Results')
if auth_results:
    for result in auth_results:
        print(result)

print(f"\nARC-Authentication-Results: {msg.get('ARC-Authentication-Results', '不存在')}")
print(f"Received-SPF: {msg.get('Received-SPF', '不存在')}")
print(f"DKIM-Signature: {msg.get('DKIM-Signature', '不存在')}")
PYEOF

Read the full file on GitHub · 313 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 313 lines · 54 tokens per session scan A 2fa97c79e93a

Subscribe to this mod's changes

analyzing-email-headers-for-phishing-investigation is a skill published in the GitHub repository killvxk/cybersecurity-skills-zh (45 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 54 tokens to every session and 3,342 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

analyzing-email-headers-for-phishing-investigation

Parse and analyze email headers (Received chain, Return-Path, Message-ID) to trace the true origin of a phishing email and validate SPF, DKIM, and DMARC results to confirm or rule out sender spoofing. Use when triaging a suspicious or reported email, investigating a phishing incident, or verifying whether a message's…

mukul975/Anthropic-Cybersecurity-Skills · 84 tokens

analyzing-email-headers-for-phishing-investigation

Parse and analyze email headers to trace the origin of phishing emails, verify sender authenticity, and identify spoofing through SPF, DKIM, and DMARC validation.

xalgorix/xalgorix · 44 tokens

analyzing-email-headers-for-phishing-investigation

Use when parse and analyze email headers to trace the origin of phishing emails, verify sender authenticity, and identify spoofing through SPF, DKIM, and DMARC validation. Use when working with analyzing email headers for phishing investigation.

oyi77/1ai-skills · 57 tokens

analyzing-email-headers-for-phishing-investigation

Parse and analyze email headers to trace the origin of phishing emails, verify sender authenticity, and identify spoofing through SPF, DKIM, and DMARC validation.

plurigrid/asi · 44 tokens

analyzing-email-headers-for-phishing-investigation

Parse and analyze email headers to trace the origin of phishing emails, verify sender authenticity, and identify spoofing through SPF, DKIM, and DMARC validation.

26zl/cybersec-toolkit · 44 tokens

analyzing-email-headers-for-phishing-investigation

Parse and analyze email headers to trace the origin of phishing emails, verify sender authenticity, and identify spoofing through SPF, DKIM, and DMARC validation.

balsm-health/Balsm-AI · 44 tokens