Mailsploit: is there a problem with DMARC?

If you are looking for a yes or no answer, the answer is: NO! You can now relax and go grab a cup of coffee. But if you want to learn more, carry on reading.

Rather sensationalist articles recently posted in a number of media outlets claim DMARC can be bypassed due to shortcomings in the way that email clients handle the ‘from’ header. However, after examining the evidence given we’d argue that it’s not a DMARC shortcoming, rather a matter of poor implementation by email clients.

If you compare this to the recent password bug with the Mac High Sierra OS I don’t think we saw anyone claiming that this meant the very concept of passwords is flawed. Instead, people inherently understood that Apple had simply made a mistake when they implemented an update.

So what’s Mailsploit?

Mailsploit is a bug with some email clients where an attacker can trick a naively implemented email header parser into presenting the wrong information to a user.

The method used is not new and exploits like character encoding, cross-site-scripting (XSS) and null byte injections have all long been known by the software community and basic security checks in the development process of those email clients could have prevented this problem.

How does the Mailsploit exploit work?

The attacker encodes the ‘from’ header using base64 or quoted-printable to include the spoofed email address, i.e.:

From: =?utf-8?b?cG90dXNAd2hpdGVob3VzZS5nb3Y=?==?utf-8?Q?=00?==?utf-8?b?cG90dXNAd2hpdGVob3VzZS5nb3Y=?=@mailsploit.com

The right way of parsing the string above would be to decode ‘cG90dXNAd2hpdGVob3VzZS5nb3Y=’ which results in ‘potus@whitehouse.gov’ and ’00’ which is a null byte (represented as ), resulting in the following email address:

potus@whitehouse.govpotus@whitehouse.gov@mailsploit.com

This email address is not valid per its RFC and should be presented as an error.

What actually happens is that some email clients will stop at the null byte and ignore all the rest, incorrectly displaying the email as ‘potus@whitehouse.gov.’ Other clients will parse the whole thing but stop at the first string that looks like a valid email address, again ‘potus@whitehouse.gov.’

Is DMARC the one to blame?

No, if the parser was correctly implemented the email would have failed to deliver. As per the list published by Sabri Haddouche enterprise providers like Google or Microsoft Office 365 are not affected by it (and affected clients have either fixed it or are in the process of fixing it) so this is no more than another software bug.

The DMARC protocol is innocent. It still remains effective. If you’d like to check your current SPF, DKIM, and DMARC setup quickly and easily, use our free investigate tool.

check email setup

PUBLISHED BY

Randal Pinto

6 Dec. 2017

SHARE ARTICLE:

Categories

Recent Posts

VIEW ALL
Cybersecurity

Strengthening U.S. political campaigns against cyber threats: The urgent need for DMARC…

Sean Costigan

Securing political campaigns from cyber threats has never been more urgent. It is critical to secure communications that handle sensitive exchanges with voters, contributors, donations and coordinate complex operations. Campaigns make exceptionally rich targets for cyber espionage and exploitation, with our open-source research, demonstrating nearly 75% of US Senate campaign websites having not achieved…

Read more
Certificates

Apple & Chrome propose reduced certificate lifetime

Jack Lilley

The lifetime of SSL/ TLS certificates continues to grow shorter. Chrome initially proposed reducing certificate lifespans to 90 days to enhance security and mitigate risks associated with compromised certificates. Apple took this initiative further, proposing a draft ballot to shorten the maximum validity period for public SSL/TLS certificates to just 45 days by 2027.…

Read more
AI

Skill up your security: How defenders can harness AI

Jack Lilley

How can defenders identify and resolve security issues faster with Red Sift Radar, and what does it have to do with the movie Tenet? That was the key theme of this year’s 16th e-Crimes & Cybersecurity Mid-Year Summit education session, featuring Billy McDiarmid. If you missed the event, don’t worry—we’ve got you covered with…

Read more
Cybersecurity

Behind the Screens: North Korea’s Focus on DMARC in Email Espionage

Sean Costigan

If you missed our recent virtual fireside chat “Behind the Screens: North Korea’s Focus on DMARC in Email Espionage,” or couldn’t attend due to geographical restrictions, we’ve got you covered.  Joined by cybersecurity experts from the Federal Bureau of Investigation (FBI) and Stanford University, together with Red Sift, the session explored how the North…

Read more