Companies have been adding tags to emails from outside of the company for a few years now (If you’re not already doing this, it’s worth considering). These are typically warning messages such as “EXTERNAL EMAIL – PROCEED WITH CAUTION” and are added to the top of received emails.
In an effort to improve email security, they serve as a way of both reminding people that emails from outside the company are usually more dangerous, and flag forgeries pretending to be internal messages.
While these messages do rely on people taking notice of them, we’ve seen a lower number of people executing our payloads when these messages are enabled, which is fantastic! While they shouldn’t be used as the sole form of email security, they do offer one more reminder for users to be careful.
From an attacker’s perspective, these warnings are an absolute pain when it comes to our phishing, ransomware or red teaming engagements. But there is one common mistake we’ve repeatedly seen that can easily be exploited:
If the warning is added without setting the background color of the warning element, it’s possible to simply change the background color of the email body element and effectively hide the warning. Another aspect can then be added inside the body to create a section with a more normal color. There are some limitations to this method due to the nuances of email HTML; while setting the background color of the email body is supported, changing the margin and padding of the body element is not (this was disabled in Outlook a few years ago). Any attempt to change these parameters is ignored. In practice, this means there will be a small border around the content, but we have seen increased rates of payload execution with a border instead of a warning.
There are multiple methods to improve email security and protect against this type of attack:
|Add background colour to warning element||Changing the background colour of the body won’t ever prevent the warning being read||Adds clutter to the reply chain (the same as without background colour)|
|Force all messages into plaintext||You can’t hide the message without HTML to control colours||Email formatting is likely to be impacted|
|Custom Outlook “Message Classifications” to add warnings within the Outlook UI||More professional look, no reply clutter||Not compatible with all email clients. Mainly only supported by Outlook|
|SPF with -all directive||Should block all emails originating from a forged internal email address.||Doesn’t account for homoglyph/punycode attacks, typos being exploited in domain names|
SureCloud is a provider of Cybersecurity services and cloud-based, integrated Risk Management products, which reinvent the way you manage risk. Certified by the National Cyber Security Centre (NCSC) & CREST and delivered using the innovative Pentest-as-a-Service (underpinned by a highly configurable technology platform), SureCloud acts as an extension of your in-house security team and ensures you have everything you need to improve your risk posture.