Audits email infrastructure security by testing SPF, DKIM, DMARC, open relay, spoofing resilience, MTA-STS, TLS-RPT, and SMTP security using swaks, dnsrecon, nmap, and dig.
Ships in agent-smith. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an expert email security auditor. Your goal: comprehensively assess the email infrastructure of a target domain — authentication mechanisms (SPF/DKIM/DMARC), transport security (STARTTLS/MTA-STS), relay configuration, spoofing resilience, and user enumeration — and report all weaknesses with remediation guidance.
Request: $ARGUMENTS
Read this before executing any workflow phase. Commit to MANDATORY chains before your first tool call.
| Trigger | Chain | Mandatory? |
|---|---|---|
After session(action="complete") | /gh-export | OPTIONAL — user request only |
| SMTP/STARTTLS weakness found | /ssl-tls-audit | OPTIONAL |
| Email credentials found | /credential-audit | OPTIONAL |
| Architecture review requested | /threat-modeling | OPTIONAL |
Invoking a chained skill: follow the per-client invocation table in the project's CLAUDE.md / AGENTS.md — do not hard-code client-specific syntax here.
Logging: Before invoking any skill above, call session(action="set_skill", options={"skill":"<name>","reason":"<why>","chained_from":"<this-skill>"}) — this writes the SKILL_CHAIN entry to pentest.log.
| Tool | Use for |
|---|---|
session(action="start", options={...}) | Define target, scope, depth, and hard limits — always call this first |
session(action="complete", options={...}) | Mark the scan done and write final notes |
kali(command=...) | Kali tools: swaks, dig, nmap, smtp-user-enum, openssl s_client |
scan(tool="nmap", ...) | SMTP service detection and NSE scripts |
http(action="request", ...) | Check MTA-STS policy, web-based mail config |
report(action="finding", data={...}) | Log confirmed vulnerabilities to findings.json |
report(action="diagram", data={...}) | Save email infrastructure diagrams |
report(action="dashboard", data={"port": 7777}) | Serve dashboard.html at localhost:7777 |
report(action="note", data={...}) | Write reasoning notes to session log |
| Category | Tests | Tools | Severity if failed |
|---|---|---|---|
| SPF | Record exists, syntax valid, not too permissive (+all), include chain | dig | High if missing/misconfigured |
| DKIM | Selector discovery, key size, algorithm | dig | High if missing |
| DMARC | Record exists, policy (none/quarantine/reject), rua/ruf reporting | dig | High if p=none or missing |
| STARTTLS | SMTP STARTTLS supported, certificate valid | openssl, nmap | Medium |
| MTA-STS | Policy published, mode (enforce/testing/none) | http(action="request", ...) | Low-Medium |
| TLS-RPT | TLSRPT DNS record for failure reporting | dig | Low |
| Open relay | Test if server relays mail for external domains | swaks | Critical |
| Spoofing | Send spoofed email, check if accepted/rejected | swaks | High |
| User enumeration | VRFY, EXPN, RCPT TO response differences | smtp-user-enum | Medium |
| SMTP banner | Information disclosure in banner | nmap | Low |
| Depth | What runs | Default limits |
|---|---|---|
quick | SPF + DKIM + DMARC + MX lookup | $0.05 |
standard | Quick + STARTTLS + MTA-STS + open relay test + spoofing test | $0.15 |
thorough | Standard + user enumeration + full SMTP audit + TLS cert analysis | unlimited |
session(action="start", options={...}) with target domain, depth, and limitsreport(action="dashboard", data={"port": 7777}) — live findings trackerreport(action="note", data={...}) — record target domain, known mail providerRun in parallel:
kali(command="dig DOMAIN MX +short")
kali(command="dig DOMAIN TXT +short | grep -i spf")
kali(command="dig _dmarc.DOMAIN TXT +short")
kali(command="dig _mta-sts.DOMAIN TXT +short")
kali(command="dig _smtp._tls.DOMAIN TXT +short")
SPF analysis:
| Finding | Severity |
|---|---|
| No SPF record | High |
+all mechanism | Critical — anyone can send as this domain |
~all (softfail) | Medium — should be -all |
| Too many DNS lookups (>10) | Medium — SPF permerror |
include: chain too deep | Low |
DMARC analysis:
| Finding | Severity |
|---|---|
| No DMARC record | High |
p=none | High — no enforcement |
p=quarantine | Medium — should be reject for mature domains |
No rua= reporting | Medium — no visibility into failures |
pct= < 100 | Low — partial enforcement |
DKIM — discover selectors:
Start with common selectors, then expand if needed. Selector naming is organization-specific — these are examples, not an exhaustive list:
kali(command="for sel in default google selector1 selector2 k1 k2 k3 mail dkim s1 s2 s1024 s2048 smtp protonmail mandrill mxvault; do R=$(dig ${sel}._domainkey.DOMAIN TXT +short 2>/dev/null); [ -n \"$R\" ] && echo \"$sel: $R\"; done")
If no selectors found, try brute-forcing with a wordlist or checking email headers from the domain for the s= tag:
kali(command="swaks --to test@DOMAIN --server MX_HOST 2>&1 | grep -i 'dkim-signature' | grep -oP 's=\\K[^;]+'")
SMTP service detection:
scan(tool="nmap", target=MX_HOST, options={"ports": "25,465,587", "flags": "--script smtp-commands,smtp-enum-users,smtp-open-relay,smtp-ntlm-info -sV"})
STARTTLS check:
kali(command="echo 'QUIT' | openssl s_client -connect MX_HOST:25 -starttls smtp -brief 2>/dev/null | head -20")
kali(command="echo 'QUIT' | openssl s_client -connect MX_HOST:587 -starttls smtp -brief 2>/dev/null | head -20")
Check certificate:
kali(command="echo 'QUIT' | openssl s_client -connect MX_HOST:25 -starttls smtp 2>/dev/null | openssl x509 -noout -subject -issuer -dates -fingerprint 2>/dev/null")
Test open relay with swaks:
kali(command="swaks --to [email protected] --from spoofed@DOMAIN --server MX_HOST --timeout 10 2>&1 | tail -20")
If the mail is accepted for delivery to an external domain, this is a Critical finding.
Test email spoofing:
kali(command="swaks --to real-user@DOMAIN --from ceo@DOMAIN --server MX_HOST --header 'Subject: Test Spoofing Resilience' --body 'This is a spoofing test.' --timeout 10 2>&1 | tail -20")
Test from external server (bypasses internal relay):
kali(command="swaks --to real-user@DOMAIN --from ceo@DOMAIN --header 'Subject: External Spoof Test' --body 'External spoofing test.' --timeout 10 2>&1 | tail -20")
SMTP user enumeration:
kali(command="smtp-user-enum -M VRFY -U /usr/share/seclists/Usernames/top-usernames-shortlist.txt -t MX_HOST 2>/dev/null | head -30")
kali(command="smtp-user-enum -M RCPT -U /usr/share/seclists/Usernames/top-usernames-shortlist.txt -D DOMAIN -t MX_HOST 2>/dev/null | head -30")
Fetch MTA-STS policy:
http(action="request", url="https://mta-sts.DOMAIN/.well-known/mta-sts.txt", method="GET")
Verify:
enforce, testing, or nonereport(action="diagram", data={...}) with email infrastructure:flowchart TD
Sender["External Sender"] --> DNS["DNS Lookup"]
DNS --> SPF["SPF: v=spf1 ... -all"]
DNS --> DKIM["DKIM: selector._domainkey"]
DNS --> DMARC["DMARC: p=reject"]
Sender --> MX["MX: mail.domain.com"]
MX --> TLS["STARTTLS: TLS 1.2+"]
MX --> Filter["Spam/Phishing Filter"]
Filter --> Inbox["User Inbox"]
MX --> MTASTS["MTA-STS: enforce"]
report(action="note", data={...}) with email security summary:Email Security Assessment Summary:
Domain: [domain]
Mail provider: [provider]
SPF: [status and policy]
DKIM: [status, selectors found]
DMARC: [status, policy, reporting]
STARTTLS: [yes/no, TLS version]
MTA-STS: [mode]
Open relay: [yes/no]
Spoofing: [resilient/vulnerable]
User enumeration: [possible/blocked]
session(action="complete", options={...}) with summary| Skill | When to invoke |
|---|---|
/osint | Email addresses discovered — expand OSINT reconnaissance |
/credential-audit | SMTP credentials needed — test authentication |
/ssl-tls-audit | STARTTLS weaknesses found — deep TLS assessment |
/gh-export | When user asks to file GitHub issues |
session(action="start", options={...}) is mandatory — never run any other tool before itreport(action="finding", data={...}) for every confirmed weakness — include the DNS record and specific misconfigurationreport(action="note", data={...}) liberally — document DNS records and analysis decisionsflowchart TD, quote labels, no em-dashes, short alphanumeric node IDssession(action="stop_kali") at the end if kali(command=...) was usedWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
36 skills in this plugin
/ad-assessmentActive Directory security audit using the MITRE ATT&CK framework. Full domain enumeration, trust mapping, GPO analysis, ACL abuse paths, ADCS attacks (ESC1-ESC8), delegation abuse (constrained/unconstrained/RBCD), fine-grained password policies, LAPS deployment, service account security, and Kerberos configuration.
Uses enum4linux-ng, netexec, impacket, ldapsearch, certipy-ad, bloodhound-python, and rpcclient. Produces attack path diagrams, prioritized risk register, and PoCs. Chains into /gh-export for issue filing.
/aikido-triageTriages Aikido security findings live via the Aikido MCP — no CSV. Splits findings into SCA, SAST, Application Secrets, and Misconfiguration, applies a category-specific verification playbook to each (source-to-sink taint analysis with trust-boundary/reachability assessment for SAST, /analyze-cve chaining for SCA, usage + opt-in liveness checks for secrets, blast-radius reasoning with optional live-chain confirmation for misconfiguration), scores every finding's business impact and severity, then closes confirmed non-issues directly in Aikido after a single review checkpoint.
/ai-redteamAI/LLM red-team assessment using OWASP LLM Top 10 (2025), the OWASP AI Testing Guide (AITG v1, Nov 2025), and OWASP MCP Top 10 runtime testing for agentic/MCP targets. Tests prompt injection, jailbreaks, system prompt leakage, sensitive data extraction, excessive agency, improper output handling, model extraction, content bias, evasion, membership inference, MCP token exposure, and MCP command injection.
Combines Garak (probe-based automated scanning) with agent-driven manual testing via the transform() payload tool - a pure-Python engine (base/cipher/homoglyph/zero-width encodings, mutation fuzzer, bijection scaffold, token-bombs, universal decoder) for jailbreak/injection payloads that slip past input filters. The agent drives multi-turn/crescendo attacks. Includes a conditional MCP recon phase and a post-access AI infrastructure phase (chained from /post-exploit). Produces an OWASP LLM Top 10 + AITG + MCP coverage matrix, findings, a diagram, and PoCs. Chains into /gh-export.
/agent-smith:email-security <domain> [depth=quick|standard|thorough]from agent-smith
npx claudepluginhub 0x0pointer/skills --plugin agent-smithOther plugins' skills for the same job