Internet Engineering Task Force | A. Khare, Ed. |
Internet-Draft | J. Scudder |
Intended status: Standards Track | Juniper Networks, Inc. |
Expires: December 23, 2018 | L. Jalil |
Verizon | |
June 21, 2018 |
BGP FlowSpec Payload Matching
draft-khare-idr-bgp-flowspec-payload-match-01
The rise in frequency, volume, and pernicious effects of DDoS attacks has elevated them from fare for the specialist to generalist press. Numerous reports detail the taxonomy of DDoS types, the varying motivations of their attackers, as well as the resulting business and reputation loss of their targets.
BGP FlowSpec (RFC 5575, "Dissemination of Flow Specification Rules") can be used to rapidly disseminate filters that thwart attacks, being particularly effective against the volumetric type. Operators can use existing FlowSpec components to match on pre-defined packet header fields. However recent enhancements to forwarding plane filter implementations allow matches at arbitary locations within the packet header and, to some extent, the payload. This capability can be used to detect highly amplified attacks, whose attack signature remains relatively constant.
We define a new FlowSpec component, "Flexible Match Conditions", with similar matching semantics to those of existing components. This component will allow the operator to define bounded match conditions using offsets and bitmasks.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on December 23, 2018.
Copyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
The rise in frequency, volume, and pernicious effects of distributed denial of service ("DDoS") attacks has elevated them from fare for specialist to generalist press. Numerous reports detail the taxonomy of DDoS types, the varying motivations of their attackers, as well as the resulting business and reputation loss of their targets.
BGP FlowSpec [RFC5575] can be used to rapidly disseminate filters that thwart attacks, being particularly effective against the volumetric type. Operators can use existing FlowSpec components to match on pre-defined packet header fields. However recent enhancements to forwarding plane filter implementations allow matches at arbitary locations within the packet header and, to some extent, the payload. This capability can be used to detect highly amplified attacks, whose attack signature remains relatively constant.
We define a new FlowSpec component, "Flexible Match Conditions", with similar matching semantics to those of existing components. This component will allow the operator to define bounded match conditions using offsets and bitmasks.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 .
We define a new FlowSpec component, Type TBD, named "Flexible Match Conditions".
Encoding: <type (1 octet), op, value>
It contains a single {operator, value} tuple that is used to match packets according to the rules given below.
The operator field is encoded as:
0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |v| a |u |bit o| byte offset | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Value | Symbolic Name | Match start |
---|---|---|
0 | d | Layer 2 (d)ata-link layer Ethernet header |
1 | i | Layer 3 (I)Pv4/IPv6 header |
2 | t | Layer 4 TCP/UDP (t)ransport header |
3 | p | Layer 4-specific (p)rotocol-specific payload |
The operator field indicates where to start matching; by contrast, the value operand indicates what to match and where to stop matching. The value operand MUST be of the type indicated by the 'v' bit, as signaled in the operator. As a result it can take on one of two forms - string vs. numeric range comparison.
The length of the numeric range is constant. It uses two 64-bit fields. A string comparison uses two 128-bit fields. Its length field indicates the extent of how much of the prefix and mask fields to use in the AND operation. This is deemed sufficient for stateless inspection and practical for efficient hardware forwarding plane implementations.
0 1 2 3 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | len | reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + prefix + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + mask + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Implementations MUST only extract the number of bits from the prefix and mask fields as indicated by the preceding length field.
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + low + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + high + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
As an example, consider that the canonical Virtual eXtensible Local Area Network (VXLAN) packet has the following headers:
The following table outlines where the match would start based on the anchor setting:
Anchor value | Match start |
---|---|
d | Outer Ethernet Header |
i | Outer IPv4/IPv6 Header |
t | Outer UDP Header |
p | VXLAN Header |
Malicious, misbehaving, or misunderstanding implementations could advertise semantically incorrect values. Care must be taken to minimize fallout from attempting to parse such data. Any well-behaved implementation SHOULD verify that the minimum packet length undergoing a match equals (match start header length + byte offset + bit offset + value length).
This document introduces no additional security considerations beyond those already covered in [RFC5575] .
IANA is requested to assign a type from the First Come First Served range of the "Flow Spec Component Types" registry:
Type Value | Name | Reference |
---|---|---|
TBD | Flexible Match Conditions | this document |
Thanks to Rafal Jan Szarecki, Sudipto Nandi, and Jeff Haas for their valuable comments and suggestions on this document.
Ron Bonica Juniper Networks, Inc. 2251 Corporate Park Drive Herndon, VA 20171 US Email: rbonica@juniper.net
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
[RFC5575] | Marques, P., Sheth, N., Raszuk, R., Greene, B., Mauch, J. and D. McPherson, "Dissemination of Flow Specification Rules", RFC 5575, DOI 10.17487/RFC5575, August 2009. |
[RFC7348] | Mahalingam, M., Dutt, D., Duda, K., Agarwal, P., Kreeger, L., Sridhar, T., Bursell, M. and C. Wright, "Virtual eXtensible Local Area Network (VXLAN): A Framework for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks", RFC 7348, DOI 10.17487/RFC7348, August 2014. |