smtp-penetration-testing
하는 일
이 스킬은 AI 에이전트가 SMTP 메일 서버를 보안 테스트하도록 안내합니다. 회사의 메일 인프라를 평가할 서면 허가를 받은 보안 테스터를 위한 스킬입니다.
사용하는 경우
- ✓메일 서버가 스팸 전송에 악용될 수 있는지 확인해야 할 때.
- ✓서버가 어떤 이메일 주소가 존재하는지 드러내는지 확인하고 싶을 때.
- ✓고객 프로젝트에서 메일 서버 보안을 평가할 때.
스킬 링크
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/security/smtp-penetration-testing/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“우리 메일 서버의 오픈 릴레이 설정과 사용자 열거 문제를 확인해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 서버 배너를 가져오고, 릴레이와 사용자 조회 동작을 테스트한 뒤, 취약한 설정을 강화 방법과 함께 보고합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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
- 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
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 di
자주 묻는 질문
오픈 릴레이는 무엇인가요?
누구의 이메일이든 받아서 전달하는 메일 서버로, 스팸 발송자가 악용할 수 있습니다.
비밀번호 테스트도 포함되나요?
네. 스킬은 이메일 자격 증명에 대한 무차별 대입 테스트를 언급하며, 이는 허가를 받았을 때만 해야 합니다.
어떤 도구를 언급하나요?
Nmap, Netcat, Hydra, smtp-user-enum, Metasploit을 언급합니다.
상세 정보
작성자의 원본 설명
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 credentials", or "assess mail server security". It provides comprehensive techniques for testing SMTP server security.
인기도
- GitHub 스타
- 33k
- 순위
- #9072
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
owasp-security
33k웹 앱, API, 모바일, 컨테이너, AI 에이전트를 위한 OWASP 보안 지침을 따르도록 해서, 흔한 약점을 찾고 수정안을 제안하게 합니다.
agent-management
33k에이전트가 AI Maestro 명령줄을 사용해 AI 에이전트를 만들고, 나열하고, 일시 정지하고, 깨우고, 이름을 바꾸고, 삭제하도록 돕습니다.
agent-messaging
33k에이전트가 Agent Messaging Protocol로 AI 에이전트 사이에 서명된 메시지를 보내고, 받고, 답하도록 돕습니다. 대부분 내 컴퓨터에서 작동합니다.
docs-search
33k에이전트가 자동 생성된 코드 문서에서 함수 시그니처, 클래스 정의, 주석을 검색하도록 해서, 코드를 바꾸기 전에 실제 API를 확인하게 합니다.