Infosec ExchangeErik van Straten (@ErikvanStraten@infosec.exchange)Myth#3: DMARC prevents phishing
A LinkedIn article [0] regarding DMARC, DKIM and SPF, written by Roger A. Grimes [1] is, IMO, an interesting read. However, I do not agree with Roger that DMARC is a succes (Note: Roger informed us about it on Mar 04, see [2]).
Here's my advice: *DO* implement SPF, DKIM and DMARC - both on your sending and receiving mail servers (and consider SRS, see below).
Implementing these measures (as a sender), IS important to prevent receiving mailservers (often operated by big tech) from blocking your mails.
Also, it is considered BCP (Best Current Practice) to implement them on your recieving mail servers, and to honor the treatment of received mails as specified by the sender.
However, w.r.t. recipients being able to distinguish between (phishing) emails SPOOFING your domain, versus emails ACTUALLY originating from your sending domain: keep your expectations at the level "FORGET IT".
Details follow below, see also [3].
[0] https://www.linkedin.com/pulse/phishers-abusing-legitimate-neglected-domains-pass-dmarc-roger-grimes-wrl3e/
[1] @rogeragrimes
[2] https://infosec.exchange/@rogeragrimes/112037240888788307
[3] "Forward Pass: On the Security Implications of Email Forwarding Mechanism and Policy"
Authors: Enze Liu, Gautam Akiwate, Mattijs Jonker, Ariana Mirian, Grant Ho, Geoffrey M. Voelker, Stefan Savage
https://arxiv.org/abs/2302.07287
ANTI-SPOOFING PROTOCOLS
There are, and have been, a lot of (proposed) anti-email-abuse protocols, including SPF, micropayments [4], "Caller ID" [5][6], FairUCE [7], DomainKeys, DKIM, DMARC and ARC.
[4] https://techmonitor.ai/technology/gates_backs_away_from_postage_stamps_idea_in_spam_vision
[5] https://news.microsoft.com/2004/02/24/bill-gates-outlines-technology-vision-to-help-stop-spam/
[6] https://www.zdnet.com/article/anti-spam-firms-test-caller-id-for-email/
[7] https://www.crn.com/news/security/159904438/ibm-to-spam-spammers
NOT ANTISPAM
Most, if not all, of these protocols were advertised as ANTI-SPAM MEASURES (by marketeers, including Bill Gates [5], who apparently failed to understand anything about them): they definitely ARE NOT THAT. In fact, many of the protocols mentioned are dead and burried, and the rest of them are, IMO, seriously ill.
They are NOT antispam measures for multiple reasons, perhaps most inportantly because spammers *DO* buy their own (possibly look-a-like) domain names, and correctly set up SPF, DKIM and DMARC for those donains, and send mail from there.
In fact, it may be even EASIER for spammers to set those things up than for decent domain owners, for example because the length (and nesting) of SPF records in DNS is limited.
All protocols mentioned were, in fact, DESIGNED to prevent SPOOFING (forging, counterfeiting) of the sender domain (my prediction, in 2005, that SPF and FairUCE would NOT prevent spam, was spot on; see [8] - in Dutch).
[8] (Dutch) https://www.security.nl/posting/10403/Waarom+SPF+en+FairUCE+op+termijn+geen+spam+bestrijden
ANTI-SPOOFING PROBLEMS
Not only do the protocols mentioned not stop spam, they also, IMO unfortunately, too often, do not effectively prevent sender (domain) spoofing.
Below I'll describe most of the (important, leaving out minor-) problems of SPF, DKIM and DMARC that I'm aware of.
PROBLEM #1: MUA'S AND PEOPLE
An increasing number of people use MUAs (Mail User Agents, i.e. the program used by the recipient) that DO NOT show (display) the SMTP sender address (containing the sender domain) in received emails.
This renders all of these measures pointless; if the recipient does not evualuate the sender domain name, ANYONE may have sent the email.
Furthermore, PROVIDED THAT a MUA reveals the sender domain name, AND the recipient takes notice of it, AND the recipient knows how to interpret DNS domain names
(i.e.
accounts.google.com differs from
accounts-google.com (impersonator)
),
AND *magically* knows that a sender domain, such as "paypal.co.uk", ACTUALLY belongs to paypal.com - EVEN IF PayPal clearly states (on their website) that all legit mail from PayPal uses paypal.com as it's sender domain, ONLY THEN the recipient may be able to distinguish between legit and spoofed sender domains.
IMO this is an EPIC FAIL, in particular because many organizations use multiple, different, sending domains (e.g. for conducting surveys).
People are TOUGHT that domain names are unpredictable (i.e. that microsoftonline.com belongs to the same owners as microsoft.com, but not e.g. microsoft-sso[.]net [9]).
[9]: see the IOC's at the bottom of https://www.group-ib.com/blog/0ktapus/
PROBLEM #2: SPF & FORWARDING
A serious side effect of SPF is that it breaks forwarding (legitimate relaying) of emails.
Note: when mentioning possible email addresses below, I use ".tld" i(nstead of the actual TLD, such as .gov or .com)
For example, if a Fox News reporter "rep@foxnews.tld" mistakenly still (or wishfull thinkingly) sends an email to "trump@whitehouse.tld", and the Whitehouse's mail server forwards the mail to "trump@mar-el-lago.tld", then the Mar-el-Lago mail server's SPF implementation will typically block the mail while responding:
"The IP address of whitehouse.gov
is not permitted to send mail from
foxnews.com."
The usual "SOLUTION" for this problem (called SRS = Sender Rewriting Scheme), is rather messy. Each potentially forwarding mail server, such as the whitehouse.gov's, will have to become STATEFUL.
Effectively, for each to-be-forwarded email, the server must create a kind of email account (temporary and unique) with a name like "GUID_on_behalf_of_rep_at_foxnews@whitehouse.tld".
This is necessary because a return path for error messages (such as mailbox full) must exist, as well as for other SMTP notifications (e.g. mail was read) generated at the Mar-el-Lago mail server.
The whitehouse.gov mail server must also associate the temporary account name with the originating email address (in order for mails received by the "GUID..." account to be forwarded back to "rep@foxnews.tld").
IMPORTANT note: YOU are not in control of, potentially forwarding, receiving email servers. You may not know that they don't use SRS until you find out that your email was undeliverable.
PROBLEM #3: MAILLISTS AND DKIM
Mailing list servers tend to modify emails in such a way that DKIM signature checks fail. For example, regularly "Cryptography list" emails, forwarded by the metzdowd.com mailserver, end up in my spambox with the subject line altered: "[DKIM] " is inserted at the beginning of that header line.
PROBLEM #4: DMARC: SPF *OR* DKIM
The DMARC protocol is essential because, in contrast to SPF (and partially DKIM), it checks the domain name IN THE "FROM: " FIELD. That field is usually visible in MUA's,; note that SPF checks are based on the "envelope-from" domain name, which may be empty (in SMTP error messages, in order to prevent endless loops) and therefore is not fully reliable, and typically invisible in MUA's.
In fact, in most (mobile) MUA's the user has no way to visualize email headers (even forwarding a probably scam-mail with headers is hard or impossible).
Probably because of problems #2 and #3, DMARC is still happy if EITHER the SPF or the DKIM check (performed by the receiving mail server) fails - that is, AT LEAST ONE of the SPF and DKIM checks must succeed for the DMARC check to return a positive result.
PROBLEM #5: MS SAFE SENDERS
Likely as a result of user complaints regarding not receiving mails because of DMARC failures, Microsoft USED to tell recipients to add legit senders to their list of "Safe senders".
This, of course, was stupid. It meant fully bypassing SPF, DKIM and DMARC, by also delivering SPOOFED mails to the user's inbox. For example DocuSign advises customers to add docusign.com to their list of Safe Senders [10] - which used to make it easy for scammers to spoof their sender domain name.
Apparenly Microsoft changed this behavior last summer: [11]. However, other recipient mail servers may still have such measures in place.
[10] https://support.docusign.com/s/articles/Why-am-I-not-getting-DocuSign-email-notifications?language=en_US
[11] https://techcommunity.microsoft.com/t5/exchange-team-blog/announcing-new-dmarc-policy-handling-defaults-for-enhanced-email/ba-p/3878883
PROBLEM #6: BEC
Compromised sender email accounts, but also compromised "trusted third party bulk mail serviced" (example: [12]) are a big problem.
[12] https://www.bleepingcomputer.com/news/security/hacked-sendgrid-accounts-used-in-phishing-attacks-to-steal-logins/
PROBLEM #7: VARIOUS OPINIONS
In discussions between MTA admins regarding SPF, DKIM and DMARC, I notice significant differences in opinions which settings to use on sending MTAs (Mail Transfer Agents = mail servers) and on receiving MTA's, such as whether to use ~ or – for SPF on the sending server. Your mileage may vary...
In the end, of course you are not only depending on the configuration of potentially FORWARDING mail servers, but, most importantly, on those of RECEIVING MTAs.
There's not much you can do if a receiving provider (such as Microsoft) decides to (albeit conditionally) deliver mail with an SMTP sender address spoofing YOUR domain to inboxes of your recepients. In fact, admins of receiving MTAs may change settings at any time without notice (to senders AND recipients).
CONCLUSION
Don't be tempted to believe that SPF, DKIM and DMARC, will prevent each recipient, in any case, to be able to distinguish between SPOOFED emails (seemingly sent by you) and emails that were REALLY sent by you.
Any AUTHENTICATION check (verification of an identity) that DOES NOT effectively prevent IMPERSONATION, is hardly useful - if at all.
Edit 20240306 11:40 UTC: Changed title (old: "Myth#3: DMARC stops spoofing") and edited the first paragraph.
#SPF #DKIM #DMARC #spoofing #phishing #dmarcBypass #Outlook #Microsoft #Microsoft365 #SMTP #fakeSender #forgedSender #forgedEmail #spoofedEmail #FairUCE #antiSpam #antiSpoofing #antiSpoof