Re: [dmarc-ietf] DMARC2 & SPF Dependency Removal

Wei Chuang <weihaw@google.com> Tue, 20 June 2023 07:29 UTC

Return-Path: <weihaw@google.com>
X-Original-To: dmarc@ietfa.amsl.com
Delivered-To: dmarc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 79824C151072 for <dmarc@ietfa.amsl.com>; Tue, 20 Jun 2023 00:29:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -15.487
X-Spam-Level:
X-Spam-Status: No, score=-15.487 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TRACKER_ID=0.1, T_KAM_HTML_FONT_INVALID=0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001, URI_DOTEDU=1.999, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iXnpbNQqztwR for <dmarc@ietfa.amsl.com>; Tue, 20 Jun 2023 00:29:33 -0700 (PDT)
Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 535BEC14F73E for <dmarc@ietf.org>; Tue, 20 Jun 2023 00:29:33 -0700 (PDT)
Received: by mail-qt1-x82e.google.com with SMTP id d75a77b69052e-3ff2ad25d87so01cf.0 for <dmarc@ietf.org>; Tue, 20 Jun 2023 00:29:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1687246172; x=1687850972; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=tvoarZ141SsR/e105ExBbYefaOOjH3MIxKsGTP6j8Ws=; b=bPom+ybuBozuNrowS0CdFwEE2m67vqNR0X8F/I9K9JsqnA+JBbscyA72eiDAtSbJj5 5shAE2ydVG6a7RBzvFNFaTyw+yi3vWptfyBJJlZ7sk7U1dmTquVK5GqcG7nmL0Mjsq9+ b9oF+cFBlelDl/G1d4ksFbAmiGdTmFE7oBdnmUplLSRG0aniiyHSNOYko/h3rwH5OKho wFGrMyt6WDVRsXFpFoNOFHP0OayxNIMFhiXFAk0KRQtQsnn/YzbSVZejEm9txVQF9k9m rwe2ieEI0VB1S7yWRoaftTjzCgJT5XIBEAhdFQ2wSnFaB0CCXfkvzUaGzFkL25Xca8VT q2lQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687246172; x=1687850972; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tvoarZ141SsR/e105ExBbYefaOOjH3MIxKsGTP6j8Ws=; b=X+yBL3CY8CGzMJeK/F2YZNHF1fU67qiBbNrX6Lt9GetWtDRVuq8TzPWq1rzocfTdI8 6cidhHNpYmsd/mhPe7Lu3Skff6NZddAbtjOIoiqNIFD1RNeNoCEhR0gCDGE7/Afp5FYU aKfEjuZnj9kfb6wVWnRzGi5i3AMdabiFl+KY0/5YyO9iiB9ER5Ll1sBKORmJ0+7J3w1e 2f7VJfGOEfraqTOGMFYgHax5LpUdpojjxyNs6dCOBWBsW/D1l8FxYP5XJm2aSp8A7EqF sqYCfuc1GZk2JhJBY8mIx40nK21wXmAiCw8ZOyl4DUYHrPj5oykRnemR5kXogJvj+zcI XLOQ==
X-Gm-Message-State: AC+VfDxcku7mPHlLkZBpBJHzH2OwciGNyc06MJV/4OJt9N1a3dar5PQ0 BNbQVzPPJVNsSmypOpn3KzG2B6SaLx6aE+vPOhgao2R7PMZFUZ1hKbb65g==
X-Google-Smtp-Source: ACHHUZ5Ryy9O3SDuQcBIH+qYQrwu5p8lqey7pb1kgG4PrsHgxaO3Auv0dlDrNya9IU4zLH7E9ZRzvvTBl6/LBkYv2v8=
X-Received: by 2002:a05:622a:191c:b0:3fd:e5c9:47cd with SMTP id w28-20020a05622a191c00b003fde5c947cdmr103765qtc.1.1687246171091; Tue, 20 Jun 2023 00:29:31 -0700 (PDT)
MIME-Version: 1.0
References: <30BB83B2-B454-41B8-992B-8E2569802D9C@1und1.de> <D225D7FC-C570-4B63-A694-9F16DB1F33E1@kitterman.com> <CALaySJKwuOK-81dW2H9dtURxa5mLQDUNo+MWcs+Hho8N+yP9qg@mail.gmail.com> <2817813.dRqVH37e0G@localhost> <CALaySJJbPFBAV_7mZaARYWuMzuX+74r2Cm0jD+z92_iuFRn_MQ@mail.gmail.com> <25736.57534.195344.782189@fireball.acr.fi> <1ec42959-977a-9ce0-907a-83a5eb2b6ef2@tana.it> <25739.5435.550786.601699@fireball.acr.fi> <25739.33240.127804.524371@fireball.acr.fi> <5d9a0b0f-8777-2494-d779-376c6ab8b37d@tana.it> <xtudkqv5sqxs4c2nnilna5lf4b266br4xwdjwoq4fdyjpgzjln@xdb5rldfeini>
In-Reply-To: <xtudkqv5sqxs4c2nnilna5lf4b266br4xwdjwoq4fdyjpgzjln@xdb5rldfeini>
From: Wei Chuang <weihaw@google.com>
Date: Tue, 20 Jun 2023 00:29:13 -0700
Message-ID: <CAAFsWK2dmKRbkyZCdJTgYEPoCR-TmcJVqUc+9-PWEiEfiOHGFg@mail.gmail.com>
To: dmarc@ietf.org
Content-Type: multipart/alternative; boundary="000000000000ada81505fe8a9c0b"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dmarc/KeGbMfX91WJk_aziKsrRfI6AYkI>
Subject: Re: [dmarc-ietf] DMARC2 & SPF Dependency Removal
X-BeenThere: dmarc@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Domain-based Message Authentication, Reporting, and Compliance \(DMARC\)" <dmarc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dmarc>, <mailto:dmarc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dmarc/>
List-Post: <mailto:dmarc@ietf.org>
List-Help: <mailto:dmarc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dmarc>, <mailto:dmarc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Jun 2023 07:29:39 -0000

As DMARC is intended to protect the From header from spoofing, we support
moving DMARCbis authentication to DKIM-only due to the recent demonstration
of such spoofing that was enabled by an SPF upgrade attack as described in
[1].  That paper cites the vulnerability of Federal government, financial,
commercial and other senders to phishing attacks.  (Anecdotally we spot
checked some 10 financial companies for a different reason, and found 3 of
them were similarly vulnerable).  So it's really important to mitigate this
vulnerability from DMARCbis.  That said, we really want to emphasize that
SPF is still very useful and important for email authentication as it is a
rather important part of a portfolio of authentication signals for Gmail,
and has a complementary role to DKIM in our system.   In fact, our
forwarders guidance calls for supporting DKIM and SPF [2], and this is
really true for any traffic (forwarded or from some originator) to Gmail.

Our email authentication numbers roughly look similar to other large
senders.  Our DMARC percentages are as follows (queried over a week), and
qualified as accepted messages.

DmarcPolicy

count

REJECT

45.60%

absent

22.73%

NONE

18.78%

QUARANTINE

12.89%

100.00%

We then look at DKIM and SPF authentication rates (and independent of
DMARC).  The following numbers come from deeper in the delivery pipeline
after being accepted and evaluating DMARC policy.  We see that SPF provides
coverage for DKIM authentication gaps.  The following table shows the
percentage of messages with SPF pass (true/false) and RFC8601
<https://datatracker.ietf.org/doc/html/rfc8601#section-2.7.1> DKIM
authentication-results.  Of this traffic, DKIM is not passing for 5.56% and
there's SPF coverage for 4.78%.  A large cause for this is messages that
were not DKIM signed but could be validated with SPF at 3.91%.

ConcatSpfPassDkimAuthResults

SUM of

TRUE,PASS

92.58%

TRUE,NEUTRAL

3.91%

FALSE,PASS

1.85%

FALSE,NEUTRAL

0.72%

TRUE,FAIL

0.69%

TRUE,TEMPERROR

0.17%

FALSE,FAIL

0.05%

FALSE,TEMPERROR

0.02%

TRUE,POLICY

0.00%

FALSE,POLICY

0.00%

Grand Total

100.00%

When we break up this traffic by distinct domain counts, the view is
different.  There notably appears to be many more senders for DKIM than SPF
which is surprising (DKIM: 73.26%, SPF 35.34%).  We haven't analyzed this
further but there may be many more DKIM capable senders than previously
thought.  Unfortunately one hypothesis is that many of these senders are
spammers that are able to use authentication more proactively than regular
senders.  Even so, the DKIM not passing rate is 26.74%, and SPF can provide
coverage for 17.41%.

ConcatSpfPassDkimAuthResults

SUM of

FALSE,PASS

55.33%

TRUE,PASS

17.93%

TRUE,NEUTRAL

15.30%

FALSE,NEUTRAL

7.58%

TRUE,FAIL

1.09%

TRUE,TEMPERROR

0.98%

FALSE,FAIL

0.97%

FALSE,TEMPERROR

0.76%

TRUE,POLICY

0.04%

FALSE,POLICY

0.02%

Grand Total

100.00%

Because from these numbers, we can see that SPF does provide significant
coverage when DKIM is not present, so we need to find a bridging process if
we are to move to DKIM-only for DMARCbis.  Our proposal would be for
DMARCbis to maintain the default for SPF and DKIM support, and to support
senders that want to drop SPF as one of their DMARC authentication methods
to avoid the SPF upgrade vulnerability.  We could have a DMARC policy tag
for authentication e.g. "auth=" that describes the permitted authentication
methods the sender supports and receiver MUST use for validation.   DKIM or
SPF are represented as tags "dkim" and "spf", and if multiple tags are
present then they are comma separated and any one passing is considered
passing authentication.  Also at least one authentication method MUST be
present.  Other authentication methods could be added in the future as it
is our hope that there will be some other authentication method to improve
upon and someday replace SPF.  overall.  If "auth=" is missing, then DMARC
falls back to supporting SPF and DKIM.

The proposed deployment process would be that senders at higher risk from
>From header spoofing will invest in deploying DKIM and will declare
authentication as DKIM-only.  SMB senders can still bootstrap their DMARC
deployment by using SPF but hopefully will lower their risk by avoiding the
SPF include policy patterns described in [1].  In order to bring together
these new configurations over the long term, DMARCbis might want to define
a "DMARC2" configuration that symbolically defines the end authentication
goal e.g. it might be the "retirement" of SPF.

-Wei on behalf of the Gmail security team

[1] https://www.sysnet.ucsd.edu/~voelker/pubs/forwarding-eurosp23.pdf
[2]
https://support.google.com/mail/answer/175365?sjid=1196932423118655843-NA

On Mon, Jun 19, 2023 at 11:42 AM Patrick Ben Koetter <p=
40sys4.de@dmarc.ietf.org> wrote:

> * Alessandro Vesely <vesely@tana.it>:
> > On Thu 15/Jun/2023 23:25:44 +0200 Tero Kivinen wrote:
> > >
> > > I rerun the statistics and yes, there is 0.84% cases where dkim
> > > failed, but spf returned either pass, softfail or neutral.
> >
> > Many thanks.  That figure seems to be more or less in agreement with what
> > others here have obtained on smaller samples.  However small, it may
> confer
> > to SPF the role of a stabilizer in DMARC mail flows.
>
> The number of IP addresses in SPF-Records published by VLMPs foils the
> idea of
> "a controlled and limited number of host allowed to send on behalf of a
> senderdomain". Given the (internal routing) challenges you face when you
> try
> to publish a limited, dedicated IP range per tenant only, I do not see the
> current problem we have with SPF, when it comes to use SPF as identity
> anchor for email authentication, go away in the future. To me SPF
> destabilizes
> email authentication. It should not be used in future version of DMARC
> anymore.
>
> But why is it so many hang to SPF?
>
> My personal experience as a consultant is many domain owners prefer SPF
> over
> DKIM because SPF is easier to implement. They don't care about the one
> being
> the superior identity anchor to the other. They want to send. They want
> deliverability. And they want to get it done as soon as possible at the
> least
> investment. Business. Efficency.
>
> As long as I can think of generating and handling DKIM keys has been a
> pain.
> There's SHA1 and SHA256, then RSA and ED25519, then there's quite a
> variety of
> flags to publish (test mode, email usage only, ...) and even if you
> managed to
> get all of that right you are likey to fail when it comes to publish the
> DNS
> TXT record. It's overly long requires multiline quoting etc. pp. and I've
> seen
> experienced DNS operators fail repeatedly to get it right at first attempt.
>
> Many get publishing DKIM keys wrong, but that doesn't hurt them as long as
> SPF
> passes during DMARC authentication. They can send. They get deliverability.
> Why bother with DKIM problems?
>
> If we drop SPF in DMARCv2 SPF in all its dominance will suddenly be absent
> and
> DKIM with all its implementational problems will suddenly be fully exposed.
> And people will suddenly be forced to implement DKIM and suffer from all
> the
> pain I've described above. I do expect them to be not amused - to put it
> friendly.
>
> I suggest that we do not only drop SPF, but also come up with better ways
> (simplification, tools, exchange formats) to implement DKIM in order to
> allow
> for a smooth transition.
>
> p@rick
>
>
> --
> [*] sys4 AG
>
> https://sys4.de, +49 (89) 30 90 46 64 <+49%2089%2030904664>
> Schleißheimer Straße 26/MG,80333 München
>
> Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
> Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief
> Aufsichtsratsvorsitzender: Florian Kirstein
>
> _______________________________________________
> dmarc mailing list
> dmarc@ietf.org
> https://www.ietf.org/mailman/listinfo/dmarc
>