<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd"[
<!ENTITY RFC2119 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC6130 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6130.xml">
<!ENTITY RFC5444 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5444.xml">
<!ENTITY RFC6621 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6621.xml">
<!ENTITY RFC7182 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7182.xml">
<!ENTITY RFC4949 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4949.xml">
<!ENTITY RFC7186 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7186.xml">
<!ENTITY RFC5614 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5614.xml">
<!ENTITY RFC5148 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5148.xml">
]>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<rfc ipr="trust200902"
category="info"
docName="draft-ietf-manet-smf-sec-threats-00">

<front>
<title abbrev="Security Threats for SMF">Security Threats for Simplified Multicast Forwarding (SMF) </title>

<author fullname="Jiazi Yi" initials="J" surname="Yi">
<organization>LIX, Ecole Polytechnique</organization>
<address>
<postal>
<street/>
<city>91128 Palaiseau Cedex</city>
<region/>
<country>France</country>
</postal>
<phone>+33 1 77 57 80 85</phone>
<email>jiazi@jiaziyi.com</email>
<uri>http://www.jiaziyi.com/</uri>
</address>
</author>


<author fullname="Thomas Heide Clausen" initials="T" surname="Clausen">
<organization>LIX, Ecole Polytechnique</organization>
<address>
<postal>
<street/>
<city>91128 Palaiseau Cedex</city>
<region/>
<country>France</country>
</postal>
<phone>+33 6 6058 9349</phone>
<email>T.Clausen@computer.org</email>
<uri>http://www.thomasclausen.org/</uri>
</address>
</author>

<author fullname="Ulrich Herberg" initials="U" surname="Herberg">
<organization>Fujitsu Laboratories of America</organization>
<address>
<postal>
<street>1240 E Arques Ave</street>
<city>Sunnyvale</city>
<region>CA 94085</region>
<country>USA</country>
</postal>
<email>ulrich@herberg.name</email>
<uri>http://www.herberg.name/</uri>
</address>
</author>
<date/>

<workgroup>Mobile Ad hoc Networking (MANET)</workgroup>
<keyword>MANET</keyword>

<abstract>
<t>
This document analyzes security threats of the Simplified Multicast Forwarding (SMF), including the vulnerabilities of duplicate packet detection and relay set selection mechanisms. This document is not intended to propose solutions to the threats described.
</t>
</abstract>

</front>

<middle>

    <section title="Introduction" anchor="introduction">
      <t>
    	    This document analyzes security threats of the Simplified Multicast Forwarding (SMF) mechanism <xref target="RFC6621"/>. SMF aims at providing basic Internet Protocol (IP) multicast forwarding, in a way which is suitable for limited wireless mesh and Mobile Ad hoc NETworks (MANET). SMF is constituted of two major functional components: Duplicate Packet Detection and Relay Set Selection. 
      </t>
      
      <t>
 	     	SMF is typically used in decentralized wireless environments, and is potentially exposed to different kinds of attacks and misconfigurations. Some of the threats are of particular significance as compared to wired networks. In <xref target="RFC6621"/>, SMF does not define any explicit security measures for protecting the integrity of the protocol. 
      </t>
      
		<t>
			This document is based on the assumption that no additional security mechanism such as IPsec is used in the IP layer, as not all MANET deployments may be suitable to deploy common IP protection mechanisms (e.g., because of limited resources of MANET routers to support the IPsec stack). The document analyzes possible attacks on and mis-configurations of SMF and outlines the consequences of such attacks/mis-configurations to the state maintained by SMF in each router (and, thus, made available to protocols using this state). 
		</t>
		
		<t>
			This document aims at analyzing and describing the potential vulnerabilities of and attack vecors for SMF. While completeness in such an analysis always is a goal, no claims of being complete are made. The goal of this document is to be helpful for  when deploying SMF in a network and needing to understand the risks thereby incurred - as wll as for providing a reference and documented experience with SMF as input for possibly future developments of SMF.
		</t>

		<t>
			This document is not intended to propose solutions to the threats described. <xref target="RFC7182"/> provides a framework, which can be used with SMF, and which - depending on how it is used - may offer some degree of protection against the threats described in this document related to identity spoofing. 
		</t>
		
    </section>
    <section title="Terminology" anchor="terminology">
      <t>This document uses the terminology and notation defined in <xref target="RFC2119"/>, <xref target="RFC5444"/>,  <xref target="RFC6621"/> and <xref target="RFC4949"/>.
      </t>
      
      <t>
      	Additionally, this document introduces the following terminology:
      	<list style="hanging">
      		<t hangText="SMF router:">
      			A MANET router, running SMF as specified in <xref target="RFC6621"/>.
      		</t>
      		<t hangText="Attacker:">
      			A device that is present in the network and intentionally seeks to compromise the information bases in SMF routers.
      		</t>
      		
      		<t hangText="Compromised SMF router:">
      			An attacker, present in the network and which generates syntactically correct SMF control messages. Control messages emitted by a compromised SMF router may contain additional information, or omit information, as compared to a control message generated by a non-compromized SMF router located in the same topological position in the network.
      		</t>

      		<t hangText="Legitimate SMF router:">
      			An SMF router, which is not a compromised SMF Router.
      		</t>
      		

      	</list>
      </t>
    </section><section title="SMF Threats Overview">
	<t>
		SMF requires an external dynamic neighborhood discovery mechanism in orde to maintain suitable topological information describing its immediate neighborhood, and thereby allowing it to select reduced relay sets for forwarding multicast data traffic. Such an external dynamic neighborhood discovery mechanism MAY be provided by lower-layer interface information, by a concurrently operating MANET routing protocol which already maintains such information such as <xref target="RFC7181"/>, or by explicitly using MANET Neighborhood Discovery Protocol (NHDP) <xref target="RFC6130"/>. If NHDP is used for neighborhood discovery by SMF, SMF implicitly inherits the vulnerabilities of NHDP, as discussed in <xref target="RFC7186"/>.  This document assumes that NHDP is used.
	</t>

	<t>
		Based on neighborhood discovery mechanisms, SMF specified two major functional components: Duplicate Packet Detection (DPD) and Relay Set Selection (RSS). 
	</t>
	
	<t>
		DPD is required by SMF in order to be able to detect duplicate packets and eliminate their redundant forwarding. An Attacker has several ways in which to harm the DPD mechanisms: 
		
		<list style="symbols">
			<t>
				It can "deactivate" DPD, so as to make it such that duplicate packets are not correctly detected, and that as a consequence they are (redundantly) transmitted, increasing the load on the network, draing the batteries of the routers involved, etc.
			</t>
			<t>
				It can "pre-activate" DPD, so as to make DPD detect a later
				arriving (valid) packet as being a duplicate, which therefore won't be forwarded"
			</t>
		</list>
		The attacks on DPD are detailed in <xref target="dpd"/>. 
	</t>
	
	<t>
		RSS produces a reduced relay set forforwarding multicast data packets across the MANET.  SMF supports the use of several relay set algorithms, including E-CDS (Essential Connected Dominating Set), S-MPR (Source-based Multi-point Relay, as known from <xref target="RFC3626"/> and <xref target="RFC7181"/>), or MPR-CDS. An Attacker can disrupt the RSS algorithm, by degrading it to classical flooding, or by "masking" certain part of the routers from the multicasting domain. The attacks to RSS algorithms are illustrated in <xref target="rss"/>. 
	</t>
	
</section>
<section anchor="dpd" title="Threats to Duplicate Packet Detection">
	<t>
		Duplicate Packet Detection (DPD) is required for packet dissemination in MANET because the packets may be transmitted via the same physical interface as the one over which they were received. A router may also receive multiple copies of the same packets from different neighbors. DPD is thus used to check if an incoming packet has been received or not. 
	</t>
	
	<t>
		DPD is achieved by a router maintaining a record of recently processed multicast packets, and comparing later received multicast herewith. A duplicate packet detected is silently dropped, and is not inserted into the forwarding path of that router, nor is it delivered to an application. DPD, as proposed by SMF, supports both IPv4 and IPv6 and for each suggests two duplicate packet detection mechanisms: 1) header content identification-based DPD (I-DPD), using packet headers, in combination with flow state, to estimate temporal uniqueness of a packet, and 2) hash-based DPD (H-DPD), employing hashing of selected header fields and payload for the same effect.
	</t>
	
	<t>
		As they are distinct mechanisms, the threats to I-DPD and H-DPD are discussed separately.
	</t>
	
	<section title="Threats to Identification-based Duplicate Packet Detection">
	
	
	<t>
		I-DPD uses a specific DPD identifier in the packet header to identify a packet. By default, such packet identification is not provided by the IP packet header (for both IPv4 and IPv6). Therefore, additional identification header, such as the fragment header, a hop-by-hop header option, or IPSec sequencing, must be employed in order to support I-DPD. The uniqueness of a packet can then be identified by the [source IP address] of the packet originator, and the [sequence number] (from the fragment header, hop-by-hop header option, or IPsec). By doing so, each intermediate router can keep a record of recently received packet, and determine the coming packet has been received or not.  
	</t>
	
		<section title="Pre-activation Attacks (Pre-Play)">
		
		<t>
			In a wireless environment, or across any other shared channel, a compromised SMF router can perceive the identification tuple [source IP, sequence number] of a packet.  If sequence number progression is predictable, then it is trivial to generate aand inject invalid packets with "future" identification information into the network. If these invalid packets  arrive before the legitimate packets that they're spoofing, the latter will be treated as a duplicates and discarded.  This can prevent multicast packets from reaching parts of the network. 
		</t>
		
		<t>
			<xref target="pre_play"/> gives an example of pre-activation attack. A, B, and C are legitimate SMF routers, and X is the compromised SMF router. The line between the routers presents the packet forwarding. Router A is the source and originates a multicast packet with sequence number n. When router X receives the packet, it generates an invalid packet with the the source address of A, and sequence number n. If the invalid packet arrives at router C before the forwarding of router B, the valid packet will be dropped by C as duplicate packet. In a wireless environment, jitter is commonly used to avoid systematic collisions at MAC layer <xref target="RFC5148"/>, thus an  attacker can increase the probability that its invalid packets arrive first by retransmitting them without jittering. 
			
			<figure anchor="pre_play" align='center'><artwork>
                         .---.  
                         | X |
                       --'---' __
packet with seq=n     /          \  invalid packet with seq=n
                     /            \		
                 .---.              .---.
                 | A |              | C |
                 '---'              '---'
packet with seq=n    \    .---.   /
                      \-- | B |__/  valid packet with seq=n
                          '---'
         
					</artwork><postamble/>
				</figure>
		</t>
		
		
		
		</section>
		
		<section title="De-activation Attacks (Sequence Number wrangling)">
		<t>
			A compromised SMF router can also seek to de-activate DPD, by modifying the sequence number in packets that it forwards. Thus, routers will not be able to detect an actual duplicate packet as a duplicate – rather, they will treat them as new packets, i.e., process and forward them. This is similar to DoS attack. The consequence of this attack is an increased channel load, the origin of which appears to be a router other than the compromised SMF router. 
		</t>
		
		<t>
			Given the topology shown in <xref target="pre_play"/>, on receiving packet with seq=n, the attacker X can forward the packet with modified sequence number n+i. This has two consequences: firstly, router C will not be able to detect the packet forwarded by X is a duplicate packet; secondly, the consequent packet with seq=n+i generated by router A probably will be treated as duplicate packet, and dropped by router C. 
		</t>

		</section>
	</section>
	
	<section title="Threats to Hash-based Duplicate Packet Detection">
		
		<t>
			When it is not feasible to have explicit sequence numbers in packet headers, hash-based DPD can be used. A hash of the non-mutable fields in the header of and the data payload can be generated, and recorded at the intermediate routers. A packet can thus be uniquely identified by the source IP address of the packet, and its hash-value. 
		</t>
		
		<t>
			The hash algorithm used by SMF is being applied only to provide a reduced probability of collision and is not being used for cryptographic or authentication purposes. Consequently, a digest collision is still possible. In case the source router or gateway identifies that it recently has generated or injected a packet with the same hash-value, it inserts a "Hash-Assist Value (HAV)" IPv6 header option into the packet, such that calculating the hash also over this HAV will render the resulting value unique.
		</t>

		<!--
			THC:
			We probably may want to spin an end here on something like the ability to actually calculate IPSec stuff and 5444-sec stuff signatures over that, etc.? For -01
		-->

		<section title="Replay Attack">
		<t>
			A replay attack implies that control traffic from one region of the network is recorded and replayed in a different region at (almost) the same time, or in the same region at a different time.
		</t>
		
		<t>
			One possible replay attack is based on the Time-to-Live (TTL, for IPv4) or hop limit (for IPv6) field. As routers only forward packets with TTL > 1, a compromised SMF router can forward an otherwise valid packet, while drastically reducing the TTL hereof. This will inhibit recipient routers from later forwarding the same multicast packet, even if received with a different TTL – essentially a compromised SMF router thus can instruct its neighbors to block forwarding of valid multicast packets. As the TTL of a packet is intended to be manipulated by intermediaries forwarding it, classic methods such as integrity check values (e.g., digital signatures) are typically calculated with setting TTL fields to some pre-determined value (e.g., 0) – such is for example the case for IPsec Authentication Headers – rendering such an attack more difficult to both detect and counter. If the compromised SMF router has access to a "wormhole" through the network (a directional antenna, a tunnel to a collaborator or a wired connection, allowing it to bridge parts of a network otherwise distant) it can make sure that the packets with such an artificially reduced TTL arrive before their unmodified counterparts.
		</t>
		
		</section>
		
		<section title="Attack on Hash-Assistant Value">
		<t>
			The HAV header is helpful when a digest collision happens. However, it also introduces a potential vulnerability. As the HAV option is only added when the source or the ingressing SMF router detects that the coming packet has digest collision with previously generated packets, it actually can be regarded as a "flag" of potential digest collision. A compromised SMF router can discover the HAV header, and be able to conclude a hash collision is possible if the HAV header is removed. By doing so, other SMF routers receiving the modified packet will be treated as duplicate packet, and be dropped because it has the same hash value with precedent packet. 
		</t>
			
		<t>
			In the example of Figure <xref target="HAV"/>, Router A and B are legitimate SMF routers, X is a compromised SMF router. A generate two packets P1 and P2, with the same hash value h(P1)=h(P2)=x. Based on SMF specification, a hash-assistant value (HAV) is added to the latter packet P2, so that h(P2+HAV)=x', to avoid digest collision. When the attacker X detects the HAV of P2, it is able to conclude that a collision is possible by removing the HAV header. By doing so, packet P2 will be treated as duplicate packet by router B, and be dropped. 
			
			<figure anchor="HAV" align='center'><artwork>


           P2            P1                P2         P1           
.---.  h(P2+HAV)=x'    h(P1)=x    .---.  h(P2)=x     h(P1)=x    .---.
| A |---------------------------> | X | ----------------------> | B |
`---'                             `---'                         `---'

			</artwork><postamble/>
			</figure>
		</t>
		
		</section>
		
		
	</section>
	

	
</section>
<section anchor="rss" title="Threats to Relay Set Selection">

	<t>
		A framework for RSS mechanism, rather than a specific RSS algorithm is provided by SMF. It is normally achieved by distributed algorithms that can dynamically generate a topological Connected Dominating Set based on 1-hop and 2-hop neighborhood information. In this section, the common threats to the RSS framework are first discussed. Then the three commonly used algorithms: Essential Connection Dominating Set (E-CDS) algorithm, Source-based Multipoint Relay (S-MPR) and Multipoint Relay Connected Dominating Set (MPR-CDS) are analyzed. 
	</t>
	
	<section title="Relay Set Selection Common Threats">
		<t>
			The common threats to RSS algorithms, including Denial of Service attack, eavesdropping, message timing attack and broadcast storm have been discussed in <xref target="RFC7186"/>. 
		</t>
	</section>
	
	<section anchor="ecds-threats" title="Threats to E-CDS Algorithm">
		<t>
			The "Essential Connected Dominating Set" (E-CDS) algorithm <xref target="RFC5614"/> forms a single CDS mesh for the SMF operating region.  It requires 2-hop neighborhood information (the identify of the neighbors, the link to the neighbors and neighbors' priority information) collected through NHDP or another process. 
		</t>
		
		<t>
			An SMF Router select itself as a relay, if:

		

		<list style="symbols">
		<t>
			The SMF Router has a higher priority than all of its symmetric neighbors, or
		</t>
		<t>
			There does not exist a path from the neighbor with largest priority to any other neighbor, via neighbors with greater priority. 
		</t>
		
		</list>
		</t>
		
		<t>
		A Compromised SMF Router can disrupt the E-CDS algorithm by link spoofing or identity spoofing. 
		</t>
		
		<section title="Link Spoofing">
		<t>
			Link spoofing implies that a Compromised SMF Router advertises non-existing links to another router (present in the network or not).
		</t>
		
		<t>
			A Compromised SMF Router can declare itself with high route priority, and spoofs the links to as many Legitimate SMF Routers as possible to declare high connectivity. By doing so, it can prevent Legitimate SMF Routers from self-selecting as relays. As the "super" relay in the network, the Compromised SMF Router can manipulate the traffic relayed by it. 
		</t>
		
		</section>
		
		<section title="Identity Spoofing">
		
		<t>
			Identity spoofing implies that a compromised SMF router determines and makes use of the identity of other legitimate routers, without being authorised to do so. The identity of other routers can be obtained by overhearing the control messages or source/destination address from datagram. The compromised SMF router can then generate control or datagram traffic, pretending to be a legitimate router. 
		</t>
		
		<t>
			Because E-CDS self-selection is based on the router priority value, a compromised SMF router can spoof the identity of other legitimate routers, and declares a different router priority value. If it declares a higher priority of a spoofed router, it can prevent other routers from selecting themselves as relays. On the other hand, if the compromised router declares lower priority of a spoofed router, it can enforces other routers to selecting themselves as relays, to degrade the multicast forwarding to classical flooding. 
		</t>
		
		</section>
	</section>
	
	<section anchor="smpr-threats" title="Threats to S-MPR Algorithm">
		<t>
			The source-based multipoint relay (S-MPR) set selection algorithm enables individual routers, using 2-hop topology information, to select relays from their set of neighboring routers.  MPRs are selected so that forwarding to the router's complete 2-hop neighbor set is covered.
		</t>
		
		<t>
			An SMF router forwards a multicast packet if and only if:

		

		
		<list style="symbols">
			<t>
				the packet is not received before, and
			</t>
			<t>
				the neighbor from which the packet was received has selected the router as MPR. 
			</t>
		</list>
		</t>
		<t>
			Because MPR calculation is based on the willingness declared by the SMF routers, and the connectivity of the routers, it can be disrupted by both link spoofing and identity spoofing. The threats and its impacts have been illustrated in section 5.1 of <xref target="RFC7186"/>.  
		</t>
		
	</section>
	
	<section title="Threats to MPR-CDS Algorithm">
		<t>
			MPR-CDS is a derivative from S-MPR. The main difference between S-MPR and MPR-CDS is that while S-MPR forms a different broadcast tree for each source in the network, MPR-CDS forms a unique broadcast tree for all sources in the network. 
		</t>
		
		<t>
			As MPR-CDS combines E-CDS and S-MPR, the vulnerabilities of E-CDS and S-MPR that discussed in <xref target="ecds-threats"/> and <xref target="smpr-threats"/> apply to MPR-CDS also. 
		</t>
	</section>
</section>
<section title="Future Work">

</section>
<section anchor="Security" title="Security Considerations">
		<t>This document does not specify a protocol or a procedure. The document, however, reflects on security considerations for SMF for packet dissemination in MANETs.</t>
</section>
    <section anchor="IANA" title="IANA Considerations">
		<t>
			This document contains no actions for IANA.
		</t>
	</section>

</middle>

<back>
<references title="Normative References">
  <reference anchor="RFC2119">
	<front>
	  <title abbrev="RFC Key Words">Key words for use in RFCs to Indicate Requirement Levels</title>
	  <author initials="S." surname="Bradner" fullname="Scott Bradner">
	    <organization>Harvard University</organization>
	  </author>
	  <date year="1997" month="March"/>
	</front>
	<seriesInfo name="BCP" value="14"/>
	<seriesInfo name="RFC" value="2119"/>
  </reference>
    &RFC6621;
	&RFC7186;
	&RFC5614;

    
</references>

    <references title="Informative References">

  <reference anchor="RFC3626">
    <front>
      <title>The Optimized Link State Routing Protocol</title>
      <author initials="T.H." surname="Clausen" fullname="Thomas Heide Clausen (ed.)">
        <organization abbrev="PCRI">Ecole Polytechnique, France</organization>
      </author>
      <author initials="P." surname="Jacquet" fullname="Philippe Jacquet (ed.)">
        <organization abbrev="INRIA">Project Hipercom, INRIA Rocquencourt, France</organization>
      </author>
      <date month="October" year="2003"/>
    </front>
    <seriesInfo name="RFC" value="3626"/>
  </reference>
  
  <reference anchor="RFC5444">
	<front>
	  <title abbrev="RFC5444">Generalized MANET Packet/Message Format</title>
	  <author initials="T.H." surname="Clausen" fullname="Thomas Heide Clausen">
	    <organization abbrev="X">Ecole Polytechnique, France</organization>
	  </author>
	  <author initials="C.M." surname="Dearlove" fullname="Christopher Dearlove">
	    <organization abbrev="BAE">BAE Systems Advanced Technology Centre, UK</organization>
	  </author>
	  <author initials="J.W." surname="Dean" fullname="Justin W. Dean">
		<organization abbrev="NRL">Naval Research Laboratory, USA</organization>
	  </author>
	  <author initials="C." surname="Adjih" fullname="Cedric Adjih">
		<organization>INRIA Rocquencourt</organization>
	  </author>
	  <date month="February" year="2009"/>
	</front>
	<seriesInfo name="RFC" value="5444"/>
  </reference>

  <reference anchor="RFC6130">
	<front>
	  <title>Mobile Ad Hoc Network (MANET) Neighborhood Discovery Protocol (NHDP)</title>
	  <author initials="T.H." surname="Clausen" fullname="Thomas Heide Clausen">
		<organization abbrev="X">Ecole Polytechnique, France</organization>
	  </author>
	  <author initials="J.W." surname="Dean" fullname="Justin W. Dean">
	    <organization abbrev="NRL">Naval Research Laboratory, USA</organization>
	  </author>
	  <author initials="C.M." surname="Dearlove" fullname="Christopher Dearlove">
		<organization>BAE Systems Advanced Technology Centre, UK</organization>
	  </author>
	  <date month="April" year="2011"/>
	</front>
	<seriesInfo name="RFC" value="6130" />
  </reference>

  <reference anchor="RFC7181">
	<front>
	  <title>The Optimized Link State Routing Protocol version 2</title>
	  <author initials="T." surname="Clausen"/>
	  <author initials="C." surname="Dearlove"/>
	  <author initials="P." surname="Jacquet"/>
	  <author initials="U." surname="Herberg"/>
	  <date month="April" year="2014" />
	</front>
	<seriesInfo name="RFC" value="7181"/>
  </reference>
	&RFC7182;
    &RFC4949;
    &RFC5148;
  </references>
</back>
</rfc>
