SPF whitelist of mandrill leads to email forgery
The SPF record for hackerone.com included a shared Mandrill sending domain, allowing any Mandrill user to send email that appeared to come from hackerone.com addresses. An attacker could use this to send forged emails for phishing.
Originally disclosed on HackerOne
- Triaged in 4 days
- Fixed in 16 days
- Paid in 22 days
- Disclosed after 52 days
I just sent a forged email to [email protected] that appears to originate from [email protected]. I was able to do this because of the following SPF record:
dig txt hackerone.com hackerone.com. 299 IN TXT "v=spf1 include:_spf.google.com include:sendgrid.net include:mail.zendesk.com include:spf.mandrillapp.com ~all"
Using my own mandrill account I can send email which appears to originate from hackerone. This is useful in phishing, and this type of vulnerability is news worthy (http://bits.blogs.nytimes.com/2015/04/09/sendgrid-email-breach-was-used-to-attack-coinbase-a-bitcoin-exchange/).
The patch is pretty simple. Complete your mandril registration process. This will lock out other mandrill users from sending email that originates from *@hackerone.com.
Let me know if you need me to send another forged email, or if have any other questions.
Thanks, Mike Brooks from Bishop Fox.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The domain's SPF record authorised a shared Mandrill sending domain without completing Mandrill's domain ownership verification, so any Mandrill user could send as the domain.
Impact
An attacker could send forged emails that appear to come from the domain, which is useful for phishing.
What the attacker needed
A Mandrill account; target domain's SPF includes shared Mandrill domain
The fix
The domain owner should complete Mandrill's registration and verification process so that other Mandrill users cannot send email from the domain.
How it was found
- Check the domain's SPF record and note the shared Mandrill include.
- Use a personal Mandrill account to send an email with a From address at the target domain.
- Observe that the forged email is delivered and appears to originate from the target domain.
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 report has not been written yet. The Original tab links to the source.
SPF is an email security check that lists which servers are allowed to send email for a domain. If that list includes a service shared by many customers, anyone using that service can send email that looks like it comes from the domain. Here, the domain's SPF record trusted a shared Mandrill domain, so the reporter could send a fake email from a hackerone.com address.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.