1. Introduction
The Internet of Things (IoT) could be defined as a concept that extends the connectivity of standard connected devices (e.g., workstations, laptops, and tablets) to the integration of physical objects into a global network by connecting all of them to the Internet [
1]. In general, the main purpose of an IoT device is to process, collect, and analyse data generated in the real world in order to provide certain specific services to an individual, to a company, or to a field of study. For example, a body sensor could be used to provide live data for a medical study, CCTV cameras to monitor an area for security purposes, or a meteorological station to supply information on the current and expected weather. At the same time, the industrial IoT (IIoT) marries physical production and operations with smart digital technology, machine learning, and big data analytics [
2]. IIoT is currently an active area of research that encompasses industrial applications, including smart manufacturing, robotics, and software-defined production processes [
3].
The IIoT industry is rapidly growing year by year, both economically and in the number of devices used. According to the Statista report, the global market for IIoT was sized at over USD 260 billion in 2021 and is estimated to offer an economic impact of more than USD 1 trillion a year by 2028 [
4]. Thus, it is becoming more important as new services and features appear. The demand for such devices increases every year, which translates to the generation of terabytes of new information every second. The increase in the number of IoT devices can be accompanied by numerous benefits for states, companies, and individuals. Nevertheless, as the demand grows, attackers are also becoming more interested, and as a result, security incidents are on the rise [
5,
6,
7].
In order to ensure the efficient functioning and operation of IoT networks, in 2012, the Internet Engineering Task Force (IETF) proposed a routing protocol standard for IPv6 over Low-power Wireless Personal Area Network (6LoWPAN), which is named IPv6 Routing Protocol for Low-power and Lossy Networks (RPL) [
8]. Moreover, the IETF and academia consider RPL as a potential routing protocol for the industrial low-power and lossy networks of field devices [
9]. RPL is expected to improve the productivity and safety of industrial plants while simultaneously providing more timely information for efficient plant operations [
10]. Since the standardisation of the RPL, there has been an increase in research activity focused on relevant attacks and countermeasures. More specifically, the published attacks on the RPL-based IoT exploit the power limitations, the wireless connectivity, and the lossy network environment in 6LoWPAN in which the devices operate. Traditionally, one of the popular methods of securing Internet-connected systems is to set up appropriate security mechanisms, such as intrusion detection systems (IDS), to be able to detect attacks that target systems and networks [
11,
12]. Some more recent solutions rely on deep learning techniques for IoT data analysis [
13], cloud-based security mechanisms [
14], cross-layer intrusion detection [
15], reinforcement learning (RL) [
16], and machine learning (ML)-based attack detection [
17].
For the purpose of performing real or simulated experiments on RPL-based networks, ContikiOS [
18] is the operating system (OS) used in the majority of the published literature. ContikiOS focuses on resource-constrained and low-power wireless IoT devices, and it provides a built-in network simulator called Cooja [
19]. Recently, as a fork of the original ContikiOS, a new version called Contiki-NG [
20] offers a more efficient routing protocol, RPL-Lite, as well as more continuity on the Contiki project.
The increasing interest in IoT devices has made them more appealing to attackers than before. Hence, new security issues must be countered to ensure the correct functioning of the IoT environment [
21]. In such environments, denial-of-service (DoS) and routing attacks are two of the common security threats to cope with [
22,
23]. DoS attacks take advantage of the resource constraint characteristics of the IoT devices by draining the battery or exhausting the resources of the device. In RPL-based networks, examples of DoS attacks are:
Hello flood attack,
DIS attack, and
DAO insider attack [
24,
25,
26]. On the other hand, routing attacks focus on distorting the routing information in order to cause a negative impact on the network. Examples of these attacks are
version number attack, blackhole attack, greyhole attack, wormhole attack, and
rank decrease attack [
24,
27,
28,
29]. To detect the aforementioned attacks, IDSes are being studied and tested on RPL-based networks. However, as there is a wide variety of attacks, this still remains an open research problem. For these reasons, our work proposes a hybrid intrusion detection approach to detect multiple and diverse attacks on RPL-based IoT. Our hybrid approach refers to the combination of multiple strategies and methodologies to provide a general-purpose solution.
The contributions of this work are as follows. (i) We experimentally evaluate and compare the following RPL attacks: Hello flood attack, DIS attack, DAO insider attack, version number attack, blackhole attack, and greyhole attack. This evaluation consists in the implementation of the aforementioned attacks and the experimentation with their behaviour and operation. To compare and analyse these attacks, the following metrics were used: CPU consumption, transmission rate, and reception rate. (ii) We design a hybrid IDS to detect the previously mentioned attacks by using existing techniques and implementing new ones. Detection methods are based on thresholds, on a matching signature strategy, and on heartbeat messages. Thresholds are used for DIS/DAO/Hello attack detection, a signature matching algorithm is used for version number attacks, whereas the blackhole attack is detected using a lightweight heartbeat protocol. In addition, a UDP-based heartbeat protocol for the detection of greyhole attacks is developed. (iii) We implement the proposed IDS using Contiki-NG and evaluate it with the Cooja tool in terms of its accuracy in attack detection and its performance regarding CPU consumption, transmission and reception rates, and memory consumption.
The rest of the paper is organised as follows.
Section 2 presents the background information on basic RPL concepts.
Section 3 introduces the existing studies on RPL attacks and on IDSes for the IoT. Moreover, specific improvements for IDSes are explained.
Section 4 describes the proposed IDS design by focusing on the following four categories: placement strategy, detection method, security threats, and validation strategy. In addition, we specify the communication protocol for the different components of the hybrid IDS.
Section 5 presents an evaluation of the IDS implementation as well as an analysis of the obtained results, for both the IDS design and each of the implemented RPL attacks. Finally,
Section 6 concludes the paper and describes possible future research directions.
2. Background
This section briefly presents the required background information on the IoT and RPL. First, we present the basic characteristics of IoT devices and networks. Next, we present the basic operation of RPL and its associated security attacks.
2.1. IoT Device Characteristics
It is widely accepted that typical IoT devices have the following characteristics:
Small size: In order to provide connectivity to small objects, these should have a computer inside them to be able handle this feature. Therefore, IoT devices are typically small.
Small battery: For the majority of IoT devices, due to the need to be small and independent, the battery size must fit accordingly. Therefore, batteries for IoT devices are far from big, which limits the power usage of the devices.
Resource constrained: IoT devices cannot avoid an efficient usage of power. As a consequence, and related to their small batteries, the resources used by these devices are limited (e.g., CPU, memory, or disk storage).
2.2. IoT Network Characteristics
Based on the required characteristics of IoT devices, the network management needed to enable appropriate communication among a group of smart devices is not trivial. Indeed, to establish and maintain a network link, the following aspects must be taken into account:
Wireless: In order to provide a good link between devices, wired connections are usually the best option. However, in some scenarios where there are a lot of devices to be connected, the wired option is not the most appropriate. In these cases, wireless connections are the most popular and the ones that are used by the majority of IoT devices. Although a wireless connection has some advantages, it may have problems with interference, distance, and weather conditions [
30].
Limited power: As stated before, IoT devices are resource-constrained machines with small batteries. Because of this, the transmission range is typically not very large, and it becomes even worse when the battery is running low. Hence, the network must be configured correctly in order to reduce to the minimum the possible problems caused by the limited power.
Lossy network: Taking into account the two previous characteristics, it is clear that, depending on the situation, there will be packet loss and the network may become unstable [
31].
As said, IoT networks have relevant characteristics that must be taken into account when designing or using a protocol for a specific purpose. Fortunately, nowadays, there is a protocol standard that can help to cope with the main problems of a 6LoWPAN network: the RPL routing protocol. In addition, since some decades ago, IP global addressing has been a concern because of IPv4 address exhaustion [
32], and with the increasing number of devices connected to the Internet, there is a need for the transition to IPv6 in order to have a sufficient number of addresses that can be used to respond to the growing demand each year. IoT devices are not exempt from this problem. Hence, the standard protocols to be used by IoT devices would typically rely on IPv6.
The 6LoWPAN was developed by IETF in order to fulfil the demand of the network usage by small sensors that need to be interconnected with each other [
33]. 6LoWPAN networks offer encapsulation and header compression mechanisms in order to transmit IPv6 packets over the network standard IEEE 802.15.4, where the channel conditions are far from perfect.
2.3. Basics of RPL
RPL is a routing protocol proposed by IETF for low-power and lossy networks (LLNs). The protocol is based on IPv6, and the network devices are interconnected in a tree topology, which is named destination oriented directed acyclic graph (DODAG) [
8]. An RPL network can be composed of one or more instances, where each instance has a dedicated DODAG. In addition, a DODAG is formed by one root node that operates as the main maintainer of the entire graph, and by the rest of the nodes that adapt their topology according to a set of exchanged messages among all the nodes inside the transmission and reception range. The purpose of the RPL tree topology is to allow the nodes in the network to find the best path based on a
rank metric. The rank is set by each node, depending on the distance to the root node, and by the link cost (i.e., the quality of the link) of the nodes in range. This metric allows nodes to provide information about their own position to the rest of the nodes in the network to enable the others to choose the best parent. As the distance from the root node increases and the link quality becomes poorer, the node rank will continue to increase, and vice versa. Hence, the RPL protocol provides ICMPv6 control messages, which are sent and received by the network nodes. The purpose of these messages is, for example, to receive information about the neighbours of a node (i.e., nodes in range) or to be able to select the parent by providing the best path to the root node. The relevant RPL control messages are the following [
34]:
DIO message: The DODAG information object (DIO) message is broadcasted by the root node at the beginning in order to advertise a DODAG instance. The message contains information that allows the nodes in range to determine, for example, the RPL instance, the instance version, or the rank of the root, so that they can decide whether to join the network or not. Afterwards, DIO messages are sent among nodes to build and maintain the topology.
DIS message: While waiting for a DIO message, which would allow a node to join a network, nodes periodically send DODAG information solicitation (DIS) messages to inform their neighbours of their presence and increase the possibility of joining a DODAG. Upon hearing a DIS message from a neighbour, the node will send a DIO message back to the sender so that it can join the DODAG with knowledge of the required information about the network.
DAO message: If a node decides to join a DODAG, it will select the best parent based on the rank received by hearing DIO messages and the link cost, and it will later send back a destination advertisement object (DAO) message to register itself to the network. DAO messages are always sent to the root node in order to create the downward route from the root to the sender node. However, if the root is not in range, the sender node will send the message to its parent, and the latter will relay the DAO message to the root.
In addition, there are two main mechanisms that allow an RPL instance to heal itself (self-healing mechanisms):
2.4. Attacks in RPL-Based Networks
LLNs have some specific characteristics that must be taken into account by protocol standards defined to work in such environments. In addition to these characteristics, security must play a big role in order to resolve or mitigate some concerns that may arise when using resource-constrained devices. Below, we briefly present the most common attacks in RPL networks.
Hello flood attack: This refers to the launch of a flooding attack on the victim by using Hello messages (i.e., the initial message sent from a node to the neighbours in order to join a network). Two variants of the Hello flood attack can be distinguished. Some authors consider that the initial message in RPL is the DIS control message because it is the first message to be sent from a node that wants to join the network [
36]. On the other hand, there are others that consider the Hello message to be the message that a node sends to another to finally join the network (i.e., a DIO message) [
37]. In this paper, the Hello flood attack is considered as a DIO message flood sent by the attacker to the victim, and the Hello flood attack based on DIS messages is called a DIS attack (see below). By constantly sending DIO messages to the victims, the attacker creates a huge activity in the network and causes the victims to process the DIO message, thus consuming even more CPU time. The network congestion and the increased CPU consumption reduce battery life significantly. This attack can be considered as a DoS attack as the main focus is to drain the battery of the nodes in the network so that they become unavailable.
DIS attack The idea behind the DIS attack is very similar to that of the Hello flood attack in terms of methodology. However, the message to be sent is a DIS control message instead of a DIO message. Depending on the characteristics of the attacker, the DIS attack may be more or less effective than the Hello flood attack. For example, by sending a unicast DIS message to the victim, it is forced to reply with a new DIO message to the attacker, adding more overhead to the communication and causing the attacker node to consume more CPU as it is receiving as many DIO messages as the DIS messages sent [
27]. In this case, if the attacker controls a node that must be online as much time as possible, the DIS attack will not be the best option as the malicious node will need to handle more messages and the battery will not last as expected. On the other hand, if the attacker has compromised a node and the objective is to disturb the network, increase the CPU usage of the neighbours, or drain the battery of the compromised node, the DIS attack is the best option because it also drains the battery of the compromised node.
DAO insider attack: Note that DAO messages are sent by a node that wants to be registered in a network to the root node, when switching parents or when the trickle timer is triggered. If correctly transmitted, this will create a downward and upward route to enable the communication between the root and the DAO sender node. During the DAO insider attack, DAO messages are continuously sent by a child node (i.e., the attacker) to the parent. This forces the parent to handle and retransmit the DAO message to the next parent until it reaches the root node. By handling and retransmitting DAO messages, the intermediate nodes will consume more CPU, and thus the battery will be drained faster [
26]. In addition, in the RPL implementation of ContikiOS, a DAO-ACK message is sent back to the DAO message sender node in order to provide information about the DAO message reception by the root node. This attack is more specific than the Hello flood attack as it can choose the target more specifically (i.e., parents, in this case). Moreover, the DAO insider attack allows the attacker to harm or disturb nodes that are not in the transmission and reception range.
Version number attack: The version number in a DODAG is a variable used to maintain the DODAG version, which acts as a counter and can only be incremented by the root node. This variable keeps an order inside the DODAG so that if a node receives a higher version of it from the root node, it must renew its DODAG information. On the other hand, if the root receives a higher version number than the expected one, this will indicate that something is wrong with the DODAG, which will then prompt it to launch a global repair in order to rebuild the entire topology. The version number attack exploits the global repair mechanism in the RPL to disturb the network operation [
24]. In particular, an attacker may send a higher version number of the DODAG to the neighbours so that a global repair is forced. By doing this, all the nodes in the network will consume more resources in order to handle the DODAG rebuild. In addition, depending on the topology and the distance between the attacker and the root node, loops can be created, thus exhausting the rest of the nodes even more [
24].
Blackhole attack: The main purpose of a blackhole attack is to cause an internal DoS to the child nodes by silently discarding all the messages received from the rest of the nodes [
27]. Furthermore, a node performing a blackhole attack does not send any messages, as it is a hole that absorbs everything. This behaviour, if executed at the right moment and position (i.e., when the attacker node is the parent of many children), may cause nodes in the downward route from the attacker node to be isolated from the network. Despite the fact that this attack may be effective in some scenarios, it has been shown that RPL’s self-healing mechanisms will modify the topology during an attack so that the victims will become unaffected by the attacker, thus reducing the impact of the attack [
38].
Greyhole attack: Greyhole or selective forwarding attack acts similarly to a blackhole attack, but instead of blocking every packet received, a greyhole attack blocks all traffic, except for a selected type of message (e.g., RPL control messages). This attack avoids being detected by simple detection mechanisms and also prevents the self-healing mechanisms from fixing the problem.
4. IDS Design
In this section, we describe the design of our proposed IDS as well as our motivations behind different design choices. There could potentially be multiple IDS configurations that would provide different results, depending on the specific environment in which the IDS is deployed and operates. Depending on the needs of the involved parties and the considered security attacks, one IDS configuration or another could be considered in order to maximise the achieved efficacy based on the current circumstances.
The main aim of this work is to design an IDS capable of detecting multiple and distinguished security attacks in order to demonstrate that a general-purpose IDS for RPL-based IoT is feasible. To accomplish this objective, the design cannot rely on a single detection strategy or be a monolithic entity; it must include multiple cooperative components and employ flexible and adaptive approaches in order to maximise the intrusion detection accuracy. Our IDS design is based on a hybrid configuration of the different attributes, placement strategies, and detection methods. These are detailed in the following subsections.
4.1. Architecture and Components
The high-level architecture of the IDS follows the design proposed in [
49] and is briefly described in this subsection. In addition to the typical sensor nodes, we consider two new types of devices: (i)
Central IDS or
border routers (BR), which are centralised detection modules with routing and firewall capabilities, and (ii)
IDS detectors, which are distributed detection modules that are less powerful, sensor-like devices used to monitor and send suspicious traffic or alerts to the central IDS. In a typical scenario of a small IoT network, there are one BR and several IDS detectors. This means that sensors requiring to communicate with a server will send all the requests through the router. All passing traffic is checked by the BR, which will take the decision as to whether the sending node is malicious or not.
IDS detectors monitor the sensors’ traffic to help in detecting malicious nodes. Compromised devices may attempt to internally disrupt the network without having to communicate with the BR or external networks. For such cases, the detectors log network traffic, and if a node’s activity resembles a known attack behaviour or triggers a known attack signature, an alert along with any related information is forwarded to the BR for decision-making. The traffic exchanged between the sensors is monitored by the nearest detector within range. Afterwards, a lightweight algorithm is executed to decide whether or not traffic should be forwarded to the BR. The collaboration between the BR and the detectors helps in capturing traffic from both internal and external interfaces. For example, some malicious devices may attempt to establish communication with a remote command & control server in order to obtain further malicious instructions or updates. Other malicious devices may exchange traffic locally. In cases where a wireless channel between the BR and the detectors is unavoidable or preferable, an appropriate and secure wireless communication scheme will be put in place (e.g., [
52]).
4.2. Placement Strategies
With respect to the placement strategy of the IDS modules, three options can be distinguished: distributed, centralised, and hybrid placement. A distributed placement strategy consists in installing and configuring an IDS detector in every network node in order to increase the chance of detecting an attack as much as possible. However, this strategy will result in higher power consumption at the nodes. On the other hand, a centralised placement strategy implies using one powerful node as the IDS (e.g., at the BR). This strategy does not involve the rest of the nodes in the network when detecting possible attacks; hence, this consumes less power. Nevertheless, the centralised strategy is only able to detect those attacks that are in range or those that need to send malicious packets to external networks through the BR. Finally, the hybrid placement combines both strategies. For example, it has one node acting as the central IDS, and multiple detectors (in charge of monitoring some areas of the network) gathering information on the network that the central IDS is not capable of obtaining.
In general, a hybrid-based placement approach seems to be the best and the most flexible choice as it allows the IDS to detect more attacks by increasing the number of nodes involved in the monitoring and detection process, but it does not consume as much power as a distributed strategy. Hence, in our design, two types of nodes are used to perform the IDS tasks: a central IDS (which is typically placed in the DODAG root or BR node) and multiple detectors.
Figure 1 represents a possible architecture to exemplify the hybrid design. As can be seen, the root node (aaaa::1), which is the one acting as the central IDS, does not have a large range. In fact, only nodes aaaa::2, aaaa::3, and aaaa::4 are in transmission (TX) and reception (RX) range. Therefore, if node aaaa::11 acts as a malicious node performing a Hello flood attack, it will send a large number of Hello messages to the nodes in range (aaaa::8, aaaa::10, and aaaa::9). Consequently, the central IDS (aaaa::1) will never be able to detect such an attack. On the other hand, by having multiple detectors in the network, the possibilities of detecting an attack increases. In this example, detector node aaaa::8 receives the attack from aaaa::11 and is able to send an alert to the central IDS for further actions.
4.3. Detection Methods
The following types of intrusion detection methods can be distinguished: signature-based, specification-based, anomaly-based, and hybrid. Signature-based detection aims at matching existing signatures with incoming packets to check for intrusions. Some of the limitations of this approach are the large database needed and the impossibility of detecting 0-day attacks. Specification-based and anomaly-based approaches share some similarities. Specification-based detection modules are typically configured manually, whereas anomaly-based are often supported by machine learning algorithms or by algorithms that allow the IDS to adapt to network changes [
53]. Both approaches are based on specific statistics in a network by gathering relevant data from the devices. If the IDS detects an anomalous behaviour (i.e., different from the expected functioning of the network), it will raise an alert. Therefore, for some types of attacks, especially 0-day attacks, the IDS has a higher chance of detection. However, such approaches may produce a high rate of false positives since a small change in the network may be interpreted as an attack. Finally, the hybrid-based detection strategy consists in a combination of the previously mentioned detection methods to maximise the advantages and reduce the encountered issues.
In our design, with the aim of detecting multiple attacks, a hybrid detection strategy is composed of a single module that handles possible attacks by using different types of detection methods. However, due to the placement characteristics of the IDS nodes (see
Figure 1) and the nature of the attacks (some of them cannot be detected if not in range), central IDS and IDS detector nodes use a different hybrid detection method. These are detailed in the following subsections. The meanings of the symbols used in Algorithms 1–5 are given in
Table 1.
4.3.1. Central IDS
Signature-based and specification-based methods are combined into a hybrid approach for the central IDS design in order to detect the following attacks: Hello flood, DIS attack, DAO insider, and version number (Blackhole and greyhole attacks can also be detected from the central IDS; this is explained in
Section 4.4).
Figure 2 illustrates the detection method used by the central IDS.
Specification-based detection: Hello flood attack, DIS attack, and DAO insider attack have similar behaviour. All of them continuously send specific packets to a target in order to cause an unexpected reception of packets and drain the battery of the victim. As a result of this similar characteristic, the central IDS can use the same strategy to detect them. In this case, specification-based detection is used. According to the normal behaviour of the network, the root node, which also acts as the central IDS, does not receive a large number of DIS, DIO, and DAO packets per minute. Hence, by analysing the network, appropriate thresholds , , and can be specified to detect a high rate of DIS, DIO, or DAO messages if the threshold is exceeded. Algorithm 1 represents the pseudocode for Hello flood attack, DIS attack, and DAO insider attack detection. As shown, upon receiving a packet, the central IDS stores a counter, depending on the type of packet. If the threshold is exceeded, an alert is raised.
Signature-based detection: Version number attack is a substantially different attack than those described above. Therefore, it requires a different strategy in order to be detected. Briefly explained, an attacker launching the version number attack issues a higher DODAG version number to the rest of the nodes in order to cause disruption in the network. If the IDS is capable of identifying this malformed packet, the attack will be detected as soon as the packet is inspected. In this scenario, a signature-based detection method is required in order to detect the attack. Thus, by taking into account that only the root node issues a higher version of the DODAG version number, if the central IDS (which acts as the root node) receives a DIO message (control message containing the DODAG information) with a version number that is higher than the current one, the IDS will know that an attack is taking place and will raise the corresponding alert. Algorithm 2 represents the detection algorithm for the version number attack.
Algorithm 1: Detection of Hello flood attack, DIS attack, and DAO insider attack. |
|
Algorithm 2: Detection of version number attack from central IDS. |
|
4.3.2. IDS Detector
IDS detectors are in charge of the detection of possible intrusions in a specific region of the network, after which they alert the central IDS. This type of node combines the concepts of signature-based, specification-based, and anomaly-based detection methods, as explained below.
Figure 3 illustrates the detection method used by the IDS detector.
Specification-based detection: Regarding the Hello flood attack, DIS attack, and DAO insider attack, the detection method required to recognise those is the same as that for the central IDS (Algorithm 1 represents the detection pseudocode). Hence, specification-based detection is used by specifying the required thresholds for this purpose:
,
, and
. However, the case of the DAO Insider attack is slightly different. Recall that the objective of the DAO insider attack is to make the victims (i.e., parent nodes on the path to the root) consume more power. To do so, the attacker sends a DAO message to perform the attack, with the root node as the destination. As a result of this, intermediate IDS detector nodes will simply forward the packet since they are not the packet destinations (In a 6LoWPAN network, an additional header is included in the packet when this needs to be forwarded [
54]). Therefore, with the intention of detecting the DAO insider attack, every time an IDS detector forwards a packet, this will need to be deeply inspected for the IDS detector to realise that the packet is a DAO message. Central IDS does not need to deeply inspect the packet as it already knows that the packet is a DAO message because the central IDS is the destination. That being said, as the central IDS is always the destination of a DAO message, one may think that IDS detector nodes are not required to detect this attack, because even if the central IDS is not in the range of the attacker, the packet will always reach the IDS. However, in a scenario where the IDS is capable of removing malicious nodes from the network, such a restriction will be better applied by an IDS detector node close to the network region where the attacker is located as the blocking rule will be applied faster.
Signature-based detection: With respect to the version number attack, the detection algorithm used by the central IDS can also be applied here. Upon receiving a DIO message from a source node other than the root, and with a higher version number than the current one, the IDS detector will issue an alert as this is the typical behaviour of an attacker performing a version number attack. Algorithm 3 represents the pseudocode of the version number attack detection performed by the IDS detector.
Anomaly-based detection: The IDS detector also incorporates the anomaly-based detection method to detect a rank decrease attack, which consists of issuing a message with a rank lower than the real one in order to advertise a “fake” better route. If it succeeds, neighbours receiving a lower rank than the one used in their best path will change the preferred parent, which is the attacker node. In order to detect such attacks, a technique based on a scheme proposed by Iuchi et al. [
55] to secure the parent node selection process in RPL is used. The main idea behind this scheme is based on the possibility for an attacker to falsely claim a malformed rank in order to legitimate the nodes and thus become the parent of the victim nodes. With this in mind, an algorithm is executed in every node of the network to avoid malicious nodes and to choose the best parent. The algorithm consists of calculating a threshold
, which is the result of the following equation calculated from a node
i by taking into account the rank values of the neighbours:
where
is the average rank value among the neighbours in range of a node
i,
is the maximum rank of the set of neighbour nodes in range of a node
i, and
is a constant defined before the execution of the algorithm. The value of this constant is used to balance the value of the threshold. Low threshold values may result in a higher number of false positives, whereas high threshold values may miss some attacks. Once
is calculated, if the node
i receives a rank value lower than the calculated threshold
from a node
j,
i will consider
j as an attacker, and
j will not be included during the best parent selection process of
i. Therefore, by using the algorithm, an IDS detector will analyse the current behaviour of a network region in order to establish a threshold
for the detection of a malicious node performing a rank decrease attack, and to be able to issue the corresponding alert to the central IDS. Algorithm 4 represents the pseudocode executed by the IDS detector in order to measure the value of
. Once this value is determined (i.e., every time the rank of the neighbours is updated upon receiving a DIO message), the IDS detector will verify if this newly received rank exceeds the threshold. If it does, an alert specifying the IP address of the attacker and the type of attack will be sent to the central IDS.
Algorithm 3: Detection of version number attack by IDS detector. |
|
Algorithm 4: Threshold
calculation by node i (i.e., IDS detector) to detect the
rank decrease attack. |
|
4.4. Blackhole and Grayhole Detection
Recall that the proposed IDS uses a hybrid method to detect some of the attacks mentioned earlier (i.e., Hello flood attack, DIS attack, DAO insider attack, version number attack, and rank decrease attack). However, in order to detect the blackhole or greyhole attacks, the use of traditional detection methods (i.e., signature-based, specification-based, and anomaly-based) may not be sufficient. In the case of a signature-based detection strategy, there are difficulties in detecting the blackhole and greyhole attacks as such attacks do not send packets to the victims. Therefore, an IDS using a signature-based method will not be able to match a malicious signature with a depicted malicious packet because no such packets will be received. On the other hand, specification-based and anomaly-based detection methods, if properly configured, may be able to detect both the blackhole and greyhole attacks [
56,
57]. Nevertheless, in the case of specification-based detection methods, the previous analysis of the network to specify the correct set of rules for the detection of such attacks will be difficult. In addition, any modification in the network topology or configuration will require a new analysis and new specifications, which will consume time and effort. The use of anomaly-based detection to detect blackhole and greyhole attacks has similar problems. In a network without too many changes in topology and data transmission patterns, an anomaly-based IDS is able to detect malicious behaviours as the network will suffer significant changes caused by the attack. In such circumstances, the anomaly-based detection method may work. However, in dynamic network scenarios and with frequent variations (e.g., in packet transmission rate, packet size, peak hours, etc.), the anomaly-based IDS is unable to establish a normal behaviour for the network. In fact, the normal behaviour is for a network to have too many changes. Hence, a blackhole or greyhole attack might not be efficiently detectable.
Due to the aforementioned problems regarding the use of specification-based and anomaly-based detection methods for blackhole and greyhole attacks, our IDS design also includes a
heartbeat technique whose objective is to detect such attacks. Note that a blackhole attack does not forward or send any packet. Thus, the lightweight heartbeat protocol (LHP) of [
37] will notice this behaviour, and the attack can be detected. On the other hand, with respect to the greyhole attack, the LHP may not work. Depending on the implementation of the attack, the node in charge of performing the malicious action may decide to forward only control messages. In such a case, RPL control messages and ICMPv6 packets will be forwarded, and the IDS will not notice anything suspicious as the LHP will receive the corresponding replies from other nodes in the network. For this reason, in addition to the LHP, the IDS design includes an enhanced heartbeat protocol that is based on UDP messages [
58]. The main idea is that instead of using ICMPv6 messages, the IDS and other nodes will exchange UDP messages. The main benefit of this option is that it can detect both blackhole and greyhole attacks by utilising a single protocol. However, there is a major drawback when using a UDP-based heartbeat: other nodes are required to handle these UDP packets and send the corresponding responses to the IDS. Therefore, every network node will require a modification in its code to be able to communicate using the UDP-based heartbeat protocol.
All in all, in order to detect possible intrusions, the IDS has been based on a hybrid placement strategy that combines signature-based, specification-based, and anomaly-based detection methods to detect a large variety of attacks. Central IDS and IDS detectors use a different combination of detection methods due to their different characteristics. In addition, the IDS design includes the heartbeat protocol as a detection method to detect both blackhole and greyhole attacks. As the IDS performing this detection needs full communication with all the nodes, the heartbeat protocol is executed from the central IDS. If the requirements of the network are focused on detecting only blackhole attacks, the LHP is the option used in this design. On the other hand, if greyhole attacks also need to be detected, the UDP-based heartbeat protocol will be used.
Algorithm 5: Proposed method: Detection phase |
while
and
do
end while |
4.5. Central IDS and IDS Detector Communication
In order to detect the attacks described above, it is necessary to provide a hybrid placement IDS module throughout the entire network. As explained before, the IDS design is composed of a central IDS and multiple IDS detectors. The central IDS is focused on detecting specific attacks, but one of its core functions is to handle the alerts received by the IDS detectors. If the central IDS is not capable of “hearing” those alerts, some attacks will go unnoticed. For this reason, ensuring appropriate communication between the central IDS and IDS detectors is crucial.
Every
(where
represents an interval of time in seconds), the central IDS sends a message to all IDS detectors in the network. These messages are sent to ensure that the communication between the two parties is working correctly. Hence, if the central IDS does not receive a reply, the link between this specific IDS detector and the central IDS will be marked as down, and further actions from the network administrators will be required. At this point, the design will have two variants, which were evaluated in
Section 5. One of the variants is that, in addition to the security message, the IDS detector will make use of the packet sent to raise an alert, if required, so that the central IDS can be made aware of possible attacks outside its range. The other variant consists of sending an alert as soon as the IDS detector is aware of it. The first variant reduces the messages exchanged inside the network, but the IDS will detect attacks every
seconds (e.g., 30 or 60 s). On the other hand, if the IDS detector needs to send the alert as soon as the attack is detected, resource usage is increased as well as the number of exchanged messages when an attack takes place.
Figure 4 illustrates the communication protocol for the aforementioned variants. IDS Detector 1 uses the variant of sending only relevant information every time the central IDS asks for this information. On the contrary, IDS Detector 2 sends the attack information as soon as it detects the suspicious behaviour.
6. Conclusions
In this work, we experimentally evaluated and compared the following RPL attacks: Hello flood attack, DIS attack, DAO insider attack, blackhole attack, and greyhole attack. Firstly, we implemented these attacks and then analysed the behaviour and results obtained from the simulated experiments. The performance metrics used were the CPU usage and the TX/RX rates. In addition to the evaluation of the attacks, a hybrid IDS was designed and implemented using Contiki-NG. After the implementation, the IDS was evaluated in terms of the accuracy of the attack detection and its performance regarding CPU usage, TX/RX rate, and memory usage. To detect the aforementioned attacks, existing techniques from the available literature were used (i.e., threshold usage to detect flooding attacks, and signature matching to detect the version number attack). Moreover, new methods for detection were developed, such as the UDP-based heartbeat protocol for blackhole and greyhole attacks detection.
A study on specific RPL attacks was provided during the experimental evaluation. The main conclusion to be taken from this evaluation is that the studied RPL attacks can have a big impact inside an RPL network by exhausting the nodes or by isolating them from the network. Therefore, it is mandatory to include security measures in order to mitigate potential attacks and reduce the damage caused by the attackers. In order to mitigate those RPL attacks, a new IDS design and implementation was proposed, and according to the obtained results, the proposed IDS was able to detect flooding attacks, blackhole attacks, greyhole attacks, and version number attacks with high accuracy and very quickly.
Regarding performance, the developed solution was shown to be appropriate as the overhead caused by the IDS implementation was negligible in terms of CPU usage and TX/ RX rates. On the other hand, as the devices under consideration had very limited RAM and ROM, the memory overhead caused by the IDS implementation was close to the maximum limit. Therefore, the IDS design is suitable for execution on resource-constrained devices, but the memory of these devices must be taken into account. Regarding the version number attack, the evaluation showed that the problem occurred after the attack was propagated through the network. At that moment, the network became unstable and loops were created. To mitigate this, a new blocking mechanism can be included in the IDS design to remove the attacker node from the network before it is too late. The IDS will provide information on the alert and the target, and the blocking system must block the attacker as soon as possible in order to reduce the impact of the version number attack. To summarise, the CPU usage overhead is less than 2% in all cases, whereas the average power consumption increase is no more than 0.5%, which can be considered an insignificant impact on the overall resource utilisation.
Possible future research directions could include the detection of other attacks, such as a rank decrease attack. For example, an improved parent node selection strategy could be used for rank decrease attack detection. A deeper study is needed in order to develop the appropriate detection mechanism and algorithm. Possible future improvements could also rely on deep and heterogeneous group convolutional neural networks (CNN) [
59,
60], which can be used to automatically mine accurate information about the intrusions based on their observed properties.