Re: [Ntp] Rate limiting: DDoS, KoD, Pool, NAT

Philip Prindeville <philipp@redfish-solutions.com> Tue, 08 December 2020 17:38 UTC

Return-Path: <philipp@redfish-solutions.com>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E219F3A105E for <ntp@ietfa.amsl.com>; Tue, 8 Dec 2020 09:38:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 W-e6vIaWNjEn for <ntp@ietfa.amsl.com>; Tue, 8 Dec 2020 09:38:56 -0800 (PST)
Received: from mail.redfish-solutions.com (mail.redfish-solutions.com [45.33.216.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7A2B43A1058 for <ntp@ietf.org>; Tue, 8 Dec 2020 09:38:56 -0800 (PST)
Received: from [192.168.3.4] ([192.168.3.4]) (authenticated bits=0) by mail.redfish-solutions.com (8.16.1/8.16.1) with ESMTPSA id 0B8Hcts4123895 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 8 Dec 2020 10:38:55 -0700
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.20.0.2.21\))
From: Philip Prindeville <philipp@redfish-solutions.com>
In-Reply-To: <20201208022803.02B0440605C@ip-64-139-1-69.sjc.megapath.net>
Date: Tue, 08 Dec 2020 10:38:55 -0700
Cc: ntp@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <284E5B37-59C1-4E1E-ACD3-C131540ABEA9@redfish-solutions.com>
References: <20201208022803.02B0440605C@ip-64-139-1-69.sjc.megapath.net>
To: Hal Murray <hmurray@megapathdsl.net>
X-Mailer: Apple Mail (2.3654.20.0.2.21)
X-Scanned-By: MIMEDefang 2.84 on 192.168.1.3
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/LJPuMo-wusHWt30NE2DjDfCtfIg>
Subject: Re: [Ntp] Rate limiting: DDoS, KoD, Pool, NAT
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Dec 2020 17:38:58 -0000


> On Dec 7, 2020, at 7:28 PM, Hal Murray <hmurray@megapathdsl.net> wrote:
> 
> [Context is putting the requester's address in the cookie so that a bad guy 
> can't get cookies from a server and then use them to DDoS somebody by 
> reflecting off a NTP+NTS server.]
> 
> philipp@redfish-solutions.com said:
>>> In the normal case, the IP Address in the cookie would match
>>> the IP Address in the packet so there is no information leaked.
> 
>> What about port-forwarding to a server behind a NATting firewall?  I.e.
>> 45.33.216.244. 
> 
> I don't see any information leaked.  The NTP server doesn't know it's a NAT 
> box.  The NTS-KE step would put the address of the NAT box into the initial 
> cookies.  When the cookie came back from the NAT box, the address would match 
> and the returned new cookie would have the same address in it.
> 
> If the client got a new IP Address via DHCP or whatever and was still behind 
> the same NAT box, things would keep working.
> 
> ----------
> 
> The case where that would get leakage would be when the client goes from, for 
> example, work to home.  If it uses work cookies from home, the server would 
> drop the requests due to address mismatch.  That would happen with/without NAT 
> at home or work.  If the server logged that mismatch that info could be used 
> to track somebody.  If the server drops the packet without logging the info is 
> gone.
> 
> There is potential leakage from statistical counters.  If you can watch the 
> counters you might be able to correlate with the packet that just arrived.  
> But if you can see the arriving packets, you can probably see the lack of 
> responses.  The IP Address within the cookie would be encrypted so seeing the 
> packet on the wire doesn't tell you where the cookie came from.
> 
> ----------
> 
> Your question actually says "server behind a NATting firewall".  The answer above was for the case of a client behind the NAT box.
> 
> I don't see any leaks if the server is behind a NAT box.  Do you have anything in mind?  I don't see any way for the client to determine that there is NAT involved.


My point was that the address stuffed into the cookie/nonce would mismatch the address in the source address of the IP packet once it got SNAT’d.

It sounded like you were tacitly counting on the two being a match.

-Philip


> 
> Autokey didn't work through NAT boxes.  I never got far enough with Autokey to understand the details.  I assume an IP Address was tangled in the crypto.
> 
> NTS and shared-key both work and are well tested through NAT.
> 
> 
> -- 
> These are my opinions.  I hate spam.
> 
> 
> 
> _______________________________________________
> ntp mailing list
> ntp@ietf.org
> https://www.ietf.org/mailman/listinfo/ntp