Re: [tram] stun amplification vulnerability
Dan Wing <danwing@gmail.com> Tue, 12 October 2021 15:50 UTC
Return-Path: <danwing@gmail.com>
X-Original-To: tram@ietfa.amsl.com
Delivered-To: tram@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D15703A1547 for <tram@ietfa.amsl.com>; Tue, 12 Oct 2021 08:50:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 JYUOXEXqxqvP for <tram@ietfa.amsl.com>; Tue, 12 Oct 2021 08:50:11 -0700 (PDT)
Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) (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 36F9F3A116A for <tram@ietf.org>; Tue, 12 Oct 2021 08:50:11 -0700 (PDT)
Received: by mail-pj1-x1030.google.com with SMTP id d13-20020a17090ad3cd00b0019e746f7bd4so2234950pjw.0 for <tram@ietf.org>; Tue, 12 Oct 2021 08:50:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=tJ3vwNYN7cNhUbaVhIPoR1iJL0ge1YX0TlMMIu78xXc=; b=Sdp+j1M2byK4ery173DVRYM3MXDRmjbemZ+t944IeCPMogagosjgUJVuEDZPDXfjPM rfABx/73IvMuQb8gQriGks+HCL+j4naohwvZMR4jgYsJxAItnDR3Eg+p77e8z/yewg0S psmomEEYa3SR03bUbX442W4pRU1xdpLPC0h0qNXL3m/PKyCpDL8fnnjS7mR31JvE2yPa fmfiC2ZdZ4dS1YmsCliWiphFsrAVRzwom8Kwq5fCxmoE+BlTGv2IZHwac/NDLoHTWRGj Zj0fCsT0Skg2ocE+ANaBZal8mJzUVPMMWO1ht/sim1eavh14ofbahC637bLMkfHdt70q RBCw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=tJ3vwNYN7cNhUbaVhIPoR1iJL0ge1YX0TlMMIu78xXc=; b=cGLaQGstcbuX1hLSGjmouIupQhF7nRN+cYqRHRfLdfaUPl4B73f60vo4blqFSPRJuq /hdMJfRB+2OHM+uUG4qkyiPzw7KKDNTr3h52ZKqeAqpE+lrgZP9XPzyTzQ9OLZo0bCDF tJCII4OadYwMsWOuw1lPk9hfhMv3wjU98RD8y/+nkR7iBC97vDr/4pS/aMuxLucp7FEA xpogkyPcnkm0PzM+BIdSSl8ofFHnj6s7hqXyya1Su6t4xFXtjgfu/FKMXTNIgaVdYRsv mE4LjeCV5UXz1WofnEHIn1666djm4RAlEoryLSUL15jifeHkeSPzPQJjTmtV9UM/gsZX LJnw==
X-Gm-Message-State: AOAM530mcnuhFYoigQN5EmAg/zSJ3J3zPfPHvCEBO6xypuNvww/x8PAx KkF/iidA0LYugqQqPMm46rvNvAVE0/k=
X-Google-Smtp-Source: ABdhPJzdtUaD+/B6V6OONsYuwUvXXhXnrae0Aj/Z9BbzgXgmw05U4fKuloOL8DIuFdqF5LV9/QmR9Q==
X-Received: by 2002:a17:903:1c2:b0:13f:2893:de99 with SMTP id e2-20020a17090301c200b0013f2893de99mr17501740plh.80.1634053810298; Tue, 12 Oct 2021 08:50:10 -0700 (PDT)
Received: from smtpclient.apple (47-208-218-46.trckcmtc01.res.dyn.suddenlink.net. [47.208.218.46]) by smtp.gmail.com with ESMTPSA id b8sm12115866pfm.65.2021.10.12.08.50.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Oct 2021 08:50:09 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
From: Dan Wing <danwing@gmail.com>
In-Reply-To: <27d1ef5c-0105-ab6a-485a-78ddc9f6bde5@majd.eu>
Date: Tue, 12 Oct 2021 08:50:08 -0700
Cc: tram@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <63872467-CBB8-4F1E-A29F-602FEC2ECAAE@gmail.com>
References: <27d1ef5c-0105-ab6a-485a-78ddc9f6bde5@majd.eu>
To: Mészáros Mihály <misi@majd.eu>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/tram/1R0VJjmJVf9r4IyFhuNhPeCm91c>
Subject: Re: [tram] stun amplification vulnerability
X-BeenThere: tram@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussing the creation of a Turn Revised And Modernized \(TRAM\) WG, which goal is to consolidate the various initiatives to update TURN and STUN." <tram.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tram>, <mailto:tram-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tram/>
List-Post: <mailto:tram@ietf.org>
List-Help: <mailto:tram-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tram>, <mailto:tram-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Oct 2021 15:50:16 -0000
Reducing the attributes in STUN responses could break existing implementations that expect attributes in the response. But if you control those existing implementations, you could of course be confident the reduced STUN response works with those clients. Rate limiting at the server so only, say, 5 responses are sent to an IP address per minute seems it would be pretty effective, and would require the attacker to involve a lot of different STUN servers for a successful attack (as you explained). This doesn't require validating client interoperability. Such rate limiting is mentioned briefly in https://datatracker.ietf.org/doc/html/rfc5389#section-16.1.2, but the mitigation described is source address filtering rather than rate limiting. Another approach is requiring the request to be larger than the response by using the PADDING attribute in the request. PADDING was defined by RFC8780 for a different purpose, but seems it could be useful here so attackers are required to expend the same bandwidth as the STUN server, so you're at 1x amplification factor. -d > On Oct 12, 2021, at 5:28 AM, Mészáros Mihály <misi@majd.eu> wrote: > > Hi, > > I experienced, that STUN binding requests(udp) came from spoofed/strange > source addresses (from e.g. zoom,valve, etc. address range) to our STUN > servers. > > I don't have better explanation for that, probably someone is using our > STUN server responses to attack the spoofed source IPs. > > If a STUN server is responding to a binding request it may sends many > attributes(RFC5780 attributes and (for classical backward compatibility) > mapped address, software, fingerprint, etc.), > this way the request/response gain factor could be ~3x. > > STUN should not authenticated, so the attack could be distributed to > many STUN servers easily, but even if STUN request is authenticated, > then 401 response also gives 2x times bigger response. > > If STUN not authenticated, then the amount of attack traffic could be > relativity small and distributed in time (if attack is very well > distributed to many STUN servers). > This way the attacker's traffic could be easily under the radar threshold. > > Despite the gain factor 2-3x is not very big, still it seems it has > attracted someones attention. > > I am wondering if it worth to add a warning to STUN Security > Consideration about it? > > Implementations should consider possibility of this type of attack. > As mitigation implementation may consider to limit the STUN response > only to send one attribute "XOR-MAPPED-ADDRESS", to reduce the gain > factor as close as possible to 1x. > > Thanks, > Misi > > > > > _______________________________________________ > tram mailing list > tram@ietf.org > https://www.ietf.org/mailman/listinfo/tram
- [tram] stun amplification vulnerability Mészáros Mihály
- Re: [tram] stun amplification vulnerability Dan Wing