Re: [dmarc-ietf] Ticket #111 - MX/A/AAAA test needs justification

Douglas Foster <dougfoster.emailstandards@gmail.com> Sat, 08 May 2021 19:46 UTC

Return-Path: <dougfoster.emailstandards@gmail.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 D9EAB3A0E52 for <dmarc@ietfa.amsl.com>; Sat, 8 May 2021 12:46:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.837
X-Spam-Level:
X-Spam-Status: No, score=-1.837 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, HTML_OBFUSCATE_05_10=0.26, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fmhQXzBFK2lo for <dmarc@ietfa.amsl.com>; Sat, 8 May 2021 12:46:51 -0700 (PDT)
Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D67C93A0D42 for <dmarc@ietf.org>; Sat, 8 May 2021 12:46:50 -0700 (PDT)
Received: by mail-oi1-x232.google.com with SMTP id u16so12044352oiu.7 for <dmarc@ietf.org>; Sat, 08 May 2021 12:46:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=b4+J0OXjQpNp6nDsiwK4JQGTmq6vLyR2O1NTUEpSwC0=; b=p1ThhhCSG+tIDdO/R36kXZr4hjNUreOTJZ0hBQMFHNp35fy9pngm0mzQI8xxJzgyLL 4Wsg0P6IrzcoKts+WkONIX3BRDzRU778/JU/7Q3tqsvMv/PhMibJvQBH6eHW/BjX7xpZ tnSEtIGNfPvJNKlus2r1yBMS5SkShuYwHIqT14ryGRSfDUh4DTRa2DVE0h/8s21SD0QG +APiwSTQeJmNMKkrpZyPnT021ea9JS30Yp4bZFN9cIH1ToNFRB1wymmyx6X0x/KoDHUp KYqfZ/siKMfj81QnSf/fafeTlEPQWz2cMV8M7sPvW7viA6juTiqQ2Oc1nThcDasG0xV7 2/9Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=b4+J0OXjQpNp6nDsiwK4JQGTmq6vLyR2O1NTUEpSwC0=; b=gL/Fq6YcqmYQ8J3fFN62XZEpCkom4FD50ZdFa249GwOJs1pTzc9MO4v+Ptt/NMdNkZ X8Lg8kzaT6MR3CEKQyOw8pOmavEbLcbGZ/eB4kuTbVKSCJY8+hvyB+mF2MAaFm+7J+cR E9y05+1rDz7Qydqa/V3YkB6vHktGidVfHafQhNjFAi/ffzWwPxlqYLoYRHjqK2nqI5To Awh/tEuCuXD5qWlcLCCcCAwh6c+R19fXU8c35EHDiv3kM3z4cQBLEK5sksaL8Y1s151T YyhjKkcu1ia1cb3GTcqwP/IgSWZYwNty8qVa2I6UgxzEfhHnc1Pi8KJhmD7dbyERGyWG suLg==
X-Gm-Message-State: AOAM531QrkTTCm7nLWprvCpQVY3rnNiMfWkgpNSfiKOFX6sDzhnzjHUK K6P3z5/iakACFDPp2A8fF0U3w4NE5OqCUXKZyuzq+xuY1gw=
X-Google-Smtp-Source: ABdhPJzls6n9GZwZpypJk4j9L5a+E+TzJnW/GI/iYVpHkQ4nrrVAawkkoNJLLwC+eJzyYlxw5MNcwilAo6Ro3mWz8e4=
X-Received: by 2002:aca:f157:: with SMTP id p84mr19006538oih.73.1620503209269; Sat, 08 May 2021 12:46:49 -0700 (PDT)
MIME-Version: 1.0
References: <CAH48Zfz67fFkyPMhvcQ6JHJLSwH9UAtENrDrzDC=1p-CHJ9oPg@mail.gmail.com> <20210507014508.78064719D42@ary.qy> <CAOZAAfMA4t_prVSKHLq_oifoTh=dLWs9uOjxeMsysZQQ7gqvvg@mail.gmail.com> <CAH48Zfz3ABtxLTOrwVj_YKwkz=4rVpFhDB1-QMRzQFdJbvpwiw@mail.gmail.com> <CAL0qLwZLTyPBj3Mq+spq1ZfFeQoBHeypzREQ68DPMXN5f0HROg@mail.gmail.com>
In-Reply-To: <CAL0qLwZLTyPBj3Mq+spq1ZfFeQoBHeypzREQ68DPMXN5f0HROg@mail.gmail.com>
From: Douglas Foster <dougfoster.emailstandards@gmail.com>
Date: Sat, 08 May 2021 15:46:39 -0400
Message-ID: <CAH48Zfx5LLvdr-igdu_WQv9g-rMBqtFigj5FEZsccozBZk=YNg@mail.gmail.com>
To: IETF DMARC WG <dmarc@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000025606705c1d6ceac"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dmarc/g-xC9vU0EfIv-ubx5dFw3uTgkMs>
Subject: Re: [dmarc-ietf] Ticket #111 - MX/A/AAAA test needs justification
X-BeenThere: dmarc@ietf.org
X-Mailman-Version: 2.1.29
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: Sat, 08 May 2021 19:46:54 -0000

Justification and Implementation of the NP Policy

The NP Policy is used to hinder attacks of type “Invention”, as defined
below:

·         *Impersonation* attacks utilize an existing subdomain of the
parent.  The domain owner can hinder impersonation attacks using DMARC and
SPF policies published on the subdomain, as well as with the SP clause of
the parent domain’s DMARC policy.   The number of existing subdomains is
finite, although it may be a large number in some cases.

·         *Invention* attacks utilize a non-existent subdomain of the
parent.   Therefore, no SPF or DMARC policy is available on the
subdomain.   The domain owner can hinder impersonation attacks by
converting them to existing domains, or by publishing a parent domain DMARC
policy with SP>none (in the current specification) or NP>none (in the
proposed specification.)    The number of non-existent subdomains is
essentially infinite, limited only by the available character set, the
64-character length of a segment, and the 255-character limit of a full
domain.

Most recipient systems operate on a default-open basis, meaning that
messages which have no negative indicators are allowed through.   Attackers
using false identity will choose a parent domain with a favorable
reputation, so that the parent domain will be unlikely to cause a message
to be blocked.

However, recipient systems will also learn from messages received, so the
feasibility of false-identity attacks will diminish with repeated use of
any single identity.    Since invention attacks draw from an essentially
infinite pool of possible identifiers, the possibility of an
invention-based attacks is of significant concern to the recipient.

When a DMARC policy uses SP>none, both impersonation and invention attack
types are hindered.   However, operational reports indicate that SP>none is
often the last step in a long DMARC implementation process.   Without an NP
policy, invention attacks remain viable as long as SP=none.

The new NP policy reverses this process.   Once all subdomains are
considered to exist in DNS, the organization policy can be set to NP>none,
hindering invention attacks.    Since unused domains have no users,
organizational resistance to setting NP=reject should be minimal.
 Hindering invention attacks can now become one of the first steps in the
DMARC rollout process, rather than one of the last.
Test Design Considerations One-sided error curve

When designing a non-existent test, the test needs to have a one-sided
error curve.  The test must be trusted to produce no false classifications
of existing domains as non-existent, because such errors will lead to an
abandonment of the test and a return to infinite possibilities.
Operators should be able to accept a test which sometimes accepts a
non-existent domain as existent, because such events can be handled by
exception as needed.
Ambiguous Results – the A/AAAA query type

The A and AAAA tests are examples of an ambiguous test.   When a result is
returned, the result could be one of two things:

1.       The first segment represents a host record in a parent domain
<hostname>.parentdomain, or

2.       The first segment represents a null host name so that the host
name is the domain name
<null host><subdomain>.parentdomain

When the goal is to determine whether a specific identifier represents a
DNS domain, the A record must be coupled with another test to resolve the
ambiguity.
Ambiguous Results - Wildcards

Wildcards are another source of ambiguity.  If a query for
“subdomain.parentdomain” returns a result, it may be appropriate to requery
using “*.parentdomain”.  If the wildcard does not exist, then the subdomain
is confirmed to exist.  If a wildcard is confirmed, then the results are
ambiguous and disposition must be made based on the unresolved ambiguity.
Testing for non-existence:  The TXT test

One way to test for non-existent domain is to type for type=TXT,
query=domainname.   If the query returns NXDOMAIN, non-existence is fully
confirmed.   If the test returns NODATA or result data, then the domain is
tentatively confirmed to exist.    A wildcard test is recommended to
determine whether existence is fully confirmed (no wildcard) or ambiguous
(wildcard detected.)

The elegance of this test is that it is simple and lightweight, requiring
at most 2 DNS lookups.   Result possibilities are:

·         NXDOMAIN – domain does not exist

·         Confirmed – domain existence is confirmed without wildcard

·         Ambiguous – domain existence is confirmed with wildcard.

·         TempError – any DNS error, including DNS SEC failures that cause
server error.
Testing for non-existence:  The Mail Enabled Test

An alternative test examines DNS for the presence of MX, A/AAAA, and
possibly SPF records.  If any of these are found, the domain is assumed to
exist, and if none are found, the domain is assumed to not exist.    This
test is based on the assumption that any domain used in a FROM domain must
also have a server infrastructure for receiving messages to that domain.
Consequently, the validity of this test depends on the validity of that
assumption.

Because the Mail Enabled test involves specific content, the level of
content checking will affect the results.   Since RFC 7505 documents a way
to use MX records to indicate non-mail status, results should at minimum be
tested for this condition.    More thorough testing would verify that each
host name resolves to an IP address, and that returned IP addresses are, or
at least include, routable addresses.

Because this test involves substantially more DNS queries, it is more
susceptible to TempError results.

Possible test results include:

·         Confirmed – one of the required queries returned acceptable
results

·         Non-Existent – all queries returned NXDomain, NoData, or a
RFC7505-compliant non-mail MX record.

·         PermError – one or more queries returned non-resolvable host
names, or host names that resolved to non-routable IP addresses

·         TempError – any other DNS error, including DNS SEC failures that
cause server error.
The Edge Case – Requirements on Domain Owners

Assume that the marketing department wants to send messages from a new
subdomain, with address NoReply@promotions.example.com, using a third-party
mailing service.   The domain will not be used for any other purpose and
does not require a server infrastructure at this time.

Requirements to satisfy the TXT test:
Before using the new subdomain in a FROM address, the subdomain must be
registered in DNS.   No assumptions are imposed about DNS content.

Requirements to satisfy the Mail Enabled:
Before using the new subdomain in a FROM address, the subdomain must either
have an actual mail infrastructure implemented and published in DNS, or at
least a placeholder set of DNS entries which create the appearance that an
actual mail infrastructure exists.   However, the use of placeholder data
may have unpredictable effects on subdomain reputation.



On Fri, May 7, 2021 at 5:43 PM Murray S. Kucherawy <superuser@gmail.com>
wrote:

> On Thu, May 6, 2021 at 8:14 PM Douglas Foster <
> dougfoster.emailstandards@gmail.com> wrote:
>
>> My argument is that that A/AAAA/MX has no useful relevance to determining
>> whether the RFC5322.FROM address of a message should be evaluated based on
>> SP or NP. NP is described as testing "non-existent", rather than "possibly
>> able to receive mail". We need a test that evaluates whether the domain
>> exists or not, and is maximally protected from false positives caused by
>> host names and wildcards.
>>
>> If this group is convinced that A/AAAA/MX is meaningful for the distinction between SP and NP, I am asking someone to provide the justification and define the algorithm.  Right now I have seen neither.
>>
>>
> I continue to be unclear on why you think that test suite against a name
> is inadequate.  Can you demonstrate a live case of a false positive or
> false negative?  Perhaps an actual example will help to move this from the
> abstract to the concrete.
>
> In the meantime, here's what I think is the justification: If you try to
> send me mail apparently from a domain that appears to have no email-related
> presence in the DNS, that strikes me as a reasonable situation in which to
> bounce such a message, and accordingly, a viable test for DMARC to use.
> It's also relatively cheap, given that the DNS is a globally distributed
> highly resilient database specifically built to answer such questions.  An
> "email-related presence" is the three RRTYPEs that SMTP specifically uses
> in trying to make use of a reverse path, and since this is an email
> application, that also strikes me as reasonable.
>
> You could (and some have) go one step further and attempt to make a
> connection to whatever address that test resolved, on port 25, and see if
> something answers.  You could go even further and try to interact via SMTP
> with the server you find there, and test to see if the RFC5322.From address
> responds 250 to RCPT.  But those are far more heavyweight tests, which can
> add substantial time to DMARC processing, and such tests can get you
> blocked from further interaction with those sites as they look like
> address  harvesting probes.
>
> Wildcards are a fact of life.  We will make no progress asserting that
> everyone has to stop using them because they muddy DMARC's waters.  DMARC
> could confirm on getting a positive MX reply that there is (or is not) a
> wildcard MX in play, but I don't know how you would use that information
> because the answer is the same both for "real" names and "fake" ones.  Is
> this the basis for your position that the triple query done today is
> inadequate?
>
> -MSK
>