Re: [dmarc-ietf] Protocols All The Way Down (long - sorry)

Jan Dušátko <jan@dusatko.org> Wed, 12 July 2023 09:40 UTC

Return-Path: <jan@dusatko.org>
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 DDAC4C151B01 for <dmarc@ietfa.amsl.com>; Wed, 12 Jul 2023 02:40:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=dusatko.org header.b="Gqg2FXWj"; dkim=pass (2048-bit key) header.d=dusatko.org header.b="c0SHHn9K"; dkim=pass (2048-bit key) header.d=dusatko.org header.b="ElJKR2qo"
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 XL-Lw99EAARu for <dmarc@ietfa.amsl.com>; Wed, 12 Jul 2023 02:40:50 -0700 (PDT)
Received: from vhost.cz (hermes.vhost.cz [82.208.29.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 0924BC151AFC for <dmarc@ietf.org>; Wed, 12 Jul 2023 02:40:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dusatko.org; s=key2048; t=1689154841; bh=55XrJLCAxWxuyKE8WubJzpfc5/nqBHy3JWJDOOxJgFI=; h=Date:Subject:To:References:From:In-Reply-To:From; b=Gqg2FXWj9Kz1Q5JnneHZW1vLa0BWb2vpR38rB9O/gzlp+zbEnVbt3cqBiKWePe2Ue LiRp7JjfdwURHpxjHLE/TtHT5lYb8fPLQvB4OFU9bUAPLfZhWcZfS40jOzgZCUqKDv ROri2c7iQpZWSXIGcGeBy+0/7m2tJBTGryxnP+2BjgzTyMJLrv+LOWiL7R71+qV/Fp CpTP4UopRhxPJDtGHbuyxG6vGOLTzz8i44OqrghENkJuUkkWAxAujA99dQk2qaxwT5 w9+2XYcDpKtXrcT6xd7qmbcE29ppVrc2QT4XMEsv2bX71vhZnF62BngTNyFZDyjfHh xronyXW2H2UwA==
Received: from localhost (localhost [127.0.0.1]) by hermes.vhost.cz (Postfix) with ESMTP id 9D9A080024 for <dmarc@ietf.org>; Wed, 12 Jul 2023 11:40:41 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at hermes.vhost.cz
Received: from vhost.cz ([127.0.0.1]) by localhost (hermes.vhost.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0nBSoYyhKbFi for <dmarc@ietf.org>; Wed, 12 Jul 2023 11:40:36 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dusatko.org; s=key2048; t=1689154836; bh=55XrJLCAxWxuyKE8WubJzpfc5/nqBHy3JWJDOOxJgFI=; h=Date:Subject:To:References:From:In-Reply-To:From; b=c0SHHn9KuUT24iqq00WyxJgUssd86k8xoprkwBqhZpNTChVM/o+HozzDjYbRGZKdG kPn2MFVs6V44iaK9MxzPJQyR1RhY9zxi11NIBQ5arpQ1fncp4O8QaH7JbXEovITXNH e+H6k4Uu9ZRU77tEIjvqNs6j7z5jp6ozjVmX1RJ3hCnvtjLpKRKA71lHLRHWTs0+OK 3neRGIOZsuXBbx0gmm/gGCxnM1/tEF8NdhMCkkvzEJlzPxd1EZJVrMFxIEftgya0ni 7Bm2WGNFdUK6D8Knxsr6q2lmHI4KcVxiBQlREafQUmSMiDcdDPoSMx4pPJ6Mdl2zWQ u+FHHSLDxAc3g==
Received: by hermes.vhost.cz (Postfix, from userid 115) id 11F2380097; Wed, 12 Jul 2023 11:40:36 +0200 (CEST)
X-Spam-Virus: _CLAMAVRESULT_
X-Spam-Pyzor: Reported 0 times.
X-Spam-DCC: :
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dusatko.org; s=key2048; t=1689154833; bh=55XrJLCAxWxuyKE8WubJzpfc5/nqBHy3JWJDOOxJgFI=; h=Date:Subject:To:References:From:In-Reply-To:From; b=ElJKR2qom9O3i5mD+gfX+0VqQnRdJfiYypm2XC5m8JLlQ8UTt8KLXEeRZpcwuG5rQ hZqNgQPLQN1MM/f4apLCqDzt+vo75m6YbPNMkXojOWS71O8srsT1cwaxtGRG32nlx5 tWGecC7iJPD2RfYj1/4Gti0/5AuVH15qUuoZFXcXpGwrvpatD872a+crooj+rCMmm2 YNpHhJvBCZt3teIQh6hglrzn+H85H4apXyejZOxO6NqNUbLC3H9/ZmqUF0okdB+C7w ovelUFQ6IziUYCNrgu9VPtmwAg4axhF+vbHDE13XyYnCS+U2n5W3FXxD7twwf7sMsE w3YEpo/syo+gg==
Received: from [192.168.1.160] (static-84-242-66-51.bb.vodafone.cz [84.242.66.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by hermes.vhost.cz (Postfix) with ESMTPSA id 6659F80024 for <dmarc@ietf.org>; Wed, 12 Jul 2023 11:40:33 +0200 (CEST)
Message-ID: <98f31c7c-f20b-0679-2cc2-a43ebfac6657@dusatko.org>
Date: Wed, 12 Jul 2023 11:40:30 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0
Content-Language: en-GB
To: dmarc@ietf.org
References: <45652091.fMDQidcC6G@l5580-debian> <CAAFsWK0Hdf8X=KDE_iJ7coFan-jGZi-oMaBgc3aH4s9P2bmxaQ@mail.gmail.com> <CAH48ZfxGkXKXwtcpJvvptZT8XAiggZAaAULTFXuMqCNhkoy1tA@mail.gmail.com>
From: Jan Dušátko <jan@dusatko.org>
In-Reply-To: <CAH48ZfxGkXKXwtcpJvvptZT8XAiggZAaAULTFXuMqCNhkoy1tA@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/dmarc/xpfvn_EV2uwxi8UZrZZm-cACWj4>
Subject: Re: [dmarc-ietf] Protocols All The Way Down (long - sorry)
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: Wed, 12 Jul 2023 09:40:54 -0000

Hi,
each mechanism approaches the problem in a different way:
- SPF authorizes selected hosts (machines approved to send mail)
- DKIM authenticates sender (proof of origin)
- ARC authenticate senders chain (also proof of origin, but also proof 
of whole communication chain)

we can also continue with other technologies, but this is not matter the 
DMARC story. For example S/MIME and GPG are from my perspective proof of 
will.

In a previous communication, I listed SPF as an obsolete technology. 
Also, this is matter of my perspective, due to problems in cloud systems 
where thousands of domains are on similar machines/address ranges. For 
this reason, SPF is currently limited in use, yet it still has its uses.

In a previous communication, I also reported on measurement statistics 
about saturation of specific technologies. These statistics are 
collected over domains. I will try to figure out the number of that 
domains, we did that analysis about one year ago. Total volume are about 
50 million e-mails per week. The problem with collecting this data is 
distribution across different mail systems on about 7000-8000 domains 
and another thousands of subdomains (oscillating in time).

 From my point of view, the biggest problem at the moment is the 
protection of the sender's brand, i.e. the ability to unambiguously 
identify from which source the email originated and whether it was 
counterfeit (has been e-mail forged or not?). Current technologies such 
as SPF, DKIM and ARC, DMARC try to ensure this protection, but the owner 
is limited in deciding how he can allow his authentication. Since he is 
dependent on the correct implementation of these technologies by the 
recipient, he should be able to define his requirements. He cannot 
enforce them, but any problems due to the poor authentication of the 
sender then go to the recipient.

Regards

Jan

Dne 12. 7. 2023 v 3:18 Douglas Foster napsal(a):
> So we disable SPF when the sender tells us to do so., but leave it enabled
> by default    That makes a lot of sense to me.
>
> When the domain passes SPF on a shared server farm, but provides no DKIM
> signatures, I currently have no choice other than to consider the message
> to be authenticated.  The AUTH token will provide that reason.
>
> Hosting services could insist that senders configure DKIM, but that seems
> to be a pipe dream.
>
> Doug
>
> On Tue, Jul 11, 2023, 8:50 PM Wei Chuang <weihaw=40google.com@dmarc.ietf.org>
> wrote:
>
>> The data we presented June 20th (archive
>> <https://mailarchive.ietf.org/arch/msg/dmarc/KeGbMfX91WJk_aziKsrRfI6AYkI/>)
>> also suggests that it is premature to drop SPF from DMARC.  However I
>> differ in believing that we should accept the spoofing risk demonstrated
>> recently via SPF, and that we shouldn't strive to reduce it by making
>> improvements to DMARC and possibly SPF.  One approach is to enable
>> different senders to distinguish their differing levels of risk and
>> infrastructure by letting them specify an "auth=" flag proposed on the
>> 20th
>> <https://mailarchive.ietf.org/arch/msg/dmarc/KeGbMfX91WJk_aziKsrRfI6AYkI/>.
>> For example a mom-and-pop sender on their own infrastructure with their own
>> IPs will have a different profile than a risky, enterprise sender on shared
>> IPs.  The former would be reasonably safe using SPF and would benefit most
>> from using it.  The latter should use DKIM authentication only due to the
>> risk of SPF upgrade spoofing and the phishing exposure.  I describe some
>> additional ideas about how to use "auth=" flag with different risk and
>> infrastructure stratification on the DKIM list on July 3rd (archive
>> <https://mailarchive.ietf.org/arch/msg/ietf-dkim/6ms55apP0RtLzr34CCgjWRYkVsA/>
>> ).
>>
>> And FWIW I don't think mom-and-pop senders will find it that hard to adopt
>> DKIM if sufficiently motivated.  For example for BIMI on Gmail, we now
>> require DKIM-only authentication.  Indeed a new BIMI sender that I perceive
>> to be running literally a "mom-and-pop" produce shop was using SPF
>> authentication and was confused as to why their logo wasn't showing.  After
>> explaining the requirement they were able to move to DKIM authentication in
>> one day.  Yes, it did take explaining twice what was happening, but they
>> were able to deploy DKIM on their own and got their logo to show up.
>>
>> Also can we do more to harden SPF?  The SPF upgrade attacks needs three
>> things:
>>
>>     - IPs shared by multiple sending domains
>>     - Some sender uses those IPs that permits spam and phish traffic
>>     - Those multiple sending domains have SPF policies that include those
>>     IPs
>>
>> Perhaps one way to harden to SPF for DMARC is to detect if the IPs are
>> shared.  The authenticator in addition to regular to SPF validation, might
>> be able to use reverse PTR lookup and match the SPF record domain name (or
>> match some subset like the org domain) to forward validate.  Only one
>> domain can claim ownership for the IPs and be allowed to SPF authenticate
>> for DMARC.
>>
>> -Wei
>>
>> On Mon, Jul 10, 2023 at 5:38 PM Scott Kitterman <sklist@kitterman.com>
>> wrote:
>>
>>> I've been thinking about the thread on ditching SPF relative to DMARC.
>>>
>>> DMARC is built on other protocols.  Piles of them.
>>>
>>> DMARC is built most directly on DNS, DKIM, and SPF.  It is also built on
>>> SMTP
>>> and Email.  DKIM and SPF are also built on DNS and SMTP (SPF) or Email
>>> (DKIM).
>>> These protocols are built on others.  All of them have flaws and
>>> limitations.
>>>
>>> As an example, although each of the three top level protocols in this
>>> particular stack depend on data from DNS being reliable, they merely
>>> counsel
>>> caution about DNS spoofing, they don't mandate DNSSEC.  Note that other
>>> protocols have different choices in this regard (e.g. DANE).
>>>
>>> We accept the risk of DNS spoofing associated with non-DNSSEC secured DNS
>>> because the view is that the benefit to deployability of SPF, DKIM, and
>>> DMARC
>>> is sufficient to offset the risks.
>>>
>>> What are the risks?  Since DNS spoofing is not particularly easy since
>>> Dan
>>> Kaminsky got everyone to implement source port randomization [1].  I
>>> think
>>> it's reasonable to assume if an actor is going to the trouble to spoff
>>> SPF/
>>> DKIM/DMARC records, then it's to try and get a 'bad' message to appear
>>> authentic.  I'm not aware of this being a significant problem (probably
>>> since
>>> there are easier ways to do it), so I think the design decision to not
>>> limit
>>> these protols to DNSSEC protected domains is a reasonable one.
>>>
>>> Similarly, SPF pass results can be leveraged to a DMARC a DMARC pass
>>> result if
>>> an actor can manage to get a third party provider to accept mail to be
>>> sent
>>> with the victim domain's mail from when that domain has listed that third
>>> party as a source of authorized mail.  RFC 7208 warns about this risk {2}.
>>>
>>> DKIM has different risks.  The cryptographic mechanism used by DKIM is
>>> meant to
>>> provide strong, but limited duration assurance that an email was sent
>>> through
>>> a mail server authorized to do so and additionally that it has not been
>>> modified in certain ways since.  This has not always worked out well
>>> [3].  It
>>> only took the IETF six years to address the issue [4].  Additionally, for
>>> some
>>> types of senders, they can be vulnerable to replay if they sign on 'bad'
>>> message in error.  This is an issue that was identified during DKIM's
>>> development and warned about in the protocol documentation [5].
>>>
>>> This might all seem terrible, but it's really not.  If you look that the
>>> goals
>>> of DMARC (current draft section 2.1), they are modest.  Specific to this
>>> particular question:
>>>
>>>     *  Allow Domain Owners and PSOs to assert their desired message
>>>        handling for authentication failures for messages purporting to
>>>        have authorship within the domain.
>>>
>>>     *  Reduce the amount of successfully delivered spoofed emails.
>>>
>>> The risks associated with all the above issues are that there are cases
>>> where
>>> 'bad' messages pass DMARC and so the domain owner/PSO policy is not
>>> applied.
>>> Given that none of these protocols are perfect (and the risks extend much
>>> further than these I've highlighted), there are always going to be
>>> messages
>>> that get marked DMARC pass that are 'bad'.  Fundamentally 'good' and
>>> 'bad'
>>> aren't fully reducible to a protocol and the gaps between the protocol
>>> and
>>> human judgement will always exist.
>>>
>>> Any message that passes DMARC should still be sugject to the normal spam/
>>> phising prevent processing done by receivers.  Just because you got an
>>> email
>>> from bigbank.example which passed DMARC, doesn't mean that it might not
>>> have
>>> been sent through a compromised desktop in bigbank.example's office that
>>> has the
>>> least professionally run information secuirty opreation.
>>>
>>> DMARC is going to have false positives and false negatives and those need
>>> to
>>> be considered by implementers when assessing how to use DMARC.  The
>>> 'problem'
>>> with DMARC (including the 'problem' with SPF in DMARC) only arises when
>>> DMARC
>>> results are used in ways that were never intended.  By design and based
>>> on the
>>> goals of DMARC, a DMARC pass result doesn't carry any guarantee that any
>>> particular email was in fact sent legitimately by the organization that
>>> claimed to send it, but unfortunately, people are assuming it does [6].
>>>
>>> As I've said before, I don't think dropping SPF from DMARC is a good idea
>>> and
>>> I don't think it will usefully solve the problem that proponents of
>>> dropping
>>> think it will solve.  I do think we need to do something in the draft to
>>> address the overall question of the reliability of the DMARC assertion
>>> that a
>>> particular message is authorized/has been authenticated.
>>>
>>> The think that the current security considerations are insufficient and
>>> we can
>>> address these concerns by expanding on them.  Currently, the DMARCbis
>>> Security
>>> Considerations start with:
>>>
>>>> 11.1.  Authentication Methods
>>>>
>>>>     Security considerations from the authentication methods used by DMARC
>>>>     are incorporated here by reference.
>>> I would assess that as necessary, but not sufficient.  Here's my proposal
>>> for
>>> expanding 11.1:
>>>
>>>
>>> 11.1.  Authentication Methods
>>>
>>>     Security considerations from the authentication methods used by DMARC
>>>     are incorporated here by reference.  See [RFC6376 Section 8] and [RFC
>>> 7208,
>>>     Section 11].  Failures in the underlying methods can result in
>>> incorrect
>>>     DMARC results.  The impact of such incorrect results is that sender's
>>> DMARC
>>>     policy would not be applied in some cases where that is desirable.
>>> Since
>>>     DMARC itself associates no positive attribute with a DMARC pass
>>> result, the
>>>     impact of these cases is generally minor.  Any domain owner that
>>> intends to
>>>     make use of positive DMARC results as an overall indication of domain
>>>     reputation will need to carefully assess the impacts of these risks to
>>> such
>>>     an assertion.
>>>
>>> Something like that.  I think this topic should be on the meeting agenda
>>> too.
>>>
>>> Scott K
>>>
>>>
>>> [1] https://lwn.net/Articles/289138/
>>> [2] https://datatracker.ietf.org/doc/html/rfc7208#section-11.4
>>> [3] https://www.wired.com/2012/10/dkim-vulnerability-widespread/
>>> [4] https://datatracker.ietf.org/doc/html/rfc8301
>>> [5] https://datatracker.ietf.org/doc/html/rfc6376#section-8.6
>>> [6]
>>> https://datatracker.ietf.org/doc/draft-brand-indicators-for-message-identification/
>>>
>>>
>>> _______________________________________________
>>> dmarc mailing list
>>> dmarc@ietf.org
>>> https://www.ietf.org/mailman/listinfo/dmarc
>>>
>> _______________________________________________
>> dmarc mailing list
>> dmarc@ietf.org
>> https://www.ietf.org/mailman/listinfo/dmarc
>>