Skip to content
Misconfiguration Write-up Intermediate

Ghost Sender: Why Your Email Gateway Isn’t Protecting Exchange

Microsoft Exchange Online accepts unauthenticated SMTP connections directly to the tenant, bypassing the external MX gateway and all its security controls. An attacker can send spoofed emails that appear internal, with no SPF, DKIM, or DMARC enforcement, landing in the inbox without warnings.

Sanaullah Aman Korai Follow

Published on sanaullahamankorai.medium.com

Let’s be real: when I first heard about Ghost Sender, I thought, “There’s no way this works. SPF, DKIM, and DMARC would catch it.”

Sanaullah Aman Korai, on sanaullahamankorai.medium.com

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

Impact

An attacker could send spoofed emails that bypass all gateway security controls, including DLP, sandboxing, URL rewriting, and external sender banners, potentially leading to phishing, malware delivery, or business email compromise.

What the attacker needed

External MX record pointing to a third-party gateway; No Partner Organization connector or priority-0 rule; Ability to send SMTP from a clean IP

The fix

Configure a Partner Organization connector restricted to your gateway's IP addresses, or a priority-0 transport rule that rejects messages from non-gateway IPs, or point your MX directly to Exchange Online Protection.

How it was found

  1. Resolve the Microsoft Exchange Online tenant address for the target domain.
  2. Open a raw SMTP connection to that address on port 25.
  3. Send a spoofed email from an internal-looking sender to a recipient.
  4. Observe that the email is accepted and delivered to the inbox without authentication checks.

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.

When a company uses an external email filter (gateway), they change their MX record to point to it. But Microsoft Exchange Online still accepts email sent directly to its own servers, ignoring the gateway. This means an attacker can send a fake email that looks like it came from inside the company, and it will be delivered without any security checks.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

More by Sanaullah Aman Korai

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.