Ethically Hacking a Mail Server: Finding Open Relays & Sending Ph
A mail server was misconfigured as an open relay, allowing unauthenticated users to send emails. The author used this to send phishing emails to an organisation's members.
In this blog, we’ll explore how surprisingly easy it can be to gain access to a live mail server, how I discovered an open relay, and how I was able to send phishing emails to an organization’s members. But don’t worry — we’ll also cover how to prevent such attacks!
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the SMTP server was configured to accept and forward mail from any sender without requiring authentication or restricting by IP address.
Impact
An attacker could send phishing emails to organisation members, potentially leading to credential theft or malware infection.
What the attacker needed
Access to the internet; target mail server with open relay
The fix
The server should be configured to disable open relay, require SMTP authentication, restrict access by IP, and monitor logs.
How it was found
- Use a Google dork to find webmail login pages.
- Connect to the mail server on port 25 using Telnet.
- Verify if the relay is open by issuing the VRFY command.
- Use Nmap scripts to confirm the open relay.
- Send an email using SMTP commands without authentication.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
An open relay is a mail server that lets anyone send email through it without logging in. This is dangerous because attackers can use it to send fake emails that look like they come from the organisation. The author found such a server and used it to send phishing messages.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.