Abstract
Introduction
The concept of the Internet of Things (IoT) refers to communication technologies, embedded systems, smart phones, cloud computing, and physical objects (e.g. sensors, wearables, smart cars, and smart appliances) that enable connecting people, places, and things to the Internet, anytime and anywhere. 1 The rapid growth of IoT has forced new, complicated specifications to both networking and inter-networking platforms in current and future networks, particularly the Internet. 2 In the IoT ecosystem, wireless sensor networks (WSNs) are essential elements. A WSN is a network of nodes that collaboratively sense and may control the environment, allowing interaction between persons or devices and the around environment. However, WSNs are faced with many IoT challenging issues such as inflexible control, manual configuration of sensor nodes, difficulty in an orchestration, and virtualizing sensor network resources. 3
Software-defined networking (SDN) is a remarkable technology that can tackle such challenges related to WSN and IoT in the near future. SDN simplifies and improves network control in a highly elastic manner by decoupling the control plane from the data plane. The SDN controller is a centralized software operation that controls the entire network behavior to be agile, programmable, and intelligent.4,5 The major issues related to WSN and IoT can be solved if the advantages of SDN are integrated.
For all these reasons, the software-defined Internet of Things (SDIoT), as an integration of SDN and IoT, is notable.6–10 It will undoubtedly simplify network control using a common protocol in every technological domain, but it also poses some risks. Apart from the reliability and efficiency of its communications, information security is also an essential requirement for SDIoT. In industrial, medical and healthcare, transportation, and smart infrastructure applications, any exposure of sensitive information (e.g. chat logs, patient medical records, financial data) is not acceptable.
In SDIoT, the device’s profile information is regularly updated by the device manager, which is a fundamental and crucial service to ensure the proper operation of the IoT services and applications. However, it is found that the device manager accepts all migrations and changes of device information because it lacks a security mechanism within. Thus, an attacker could easily corrupt the profile information of the target device in the controller, which can lead to various types of serious attacks.
Briefly, the major contributions of this article are as follows. First, a security analysis is thoroughly performed on the device manager in the SDIoT controller. The vulnerabilities in the device manager allow an attacker to carry out device impersonation, eavesdropping, and denial-of-service attacks in the network. Second, comprehensive countermeasures are proposed and discussed. Finally, an experiment is carried out to show that the proposed prevention method is lightweight and effective.
The rest of this article is organized as follows. Related knowledge is described in section “Background and related work.” Section “Vulnerability of the device manager” analyzes the security issues and possible attacks on the device manager in the controller. Section “Countermeasure and evaluation” discusses the proposed defense method and evaluates its performance. Finally, the summary is presented in section “Conclusion.”
Background and related work
In this section, we provide an overview of the SDIoT and the device manager in the SDIoT controller. The related work is also mentioned.
SDIoT
The IoT is a flexible, globally interconnected, intelligent, self-configuring devices. The most important contributor in the IoT is WSN that is defined as intercommunication of distributed sensor nodes mainly related to monitoring and detection. 3 In IoT, a large number of devices generate a huge amount of traffic that requires many processing operations to be converted into useful information. Moreover, any suspension in communication among the devices will negatively impact the performance and accuracy of the system. Thus, these problems require a new paradigm to improve the effectiveness of the IoT architecture.1,2
Recently, SDN, a novel network paradigm, was proposed to decouple the control plane from the data plane, and it can be programmed directly.4,5 As shown in Figure 1, the SDN framework can be divided into three planes, including application, control, and data planes with their corresponding application programming interfaces (APIs), which is explained as follows:
The
The
The

Overview of the SDN architecture.
The benefits of SDN can be derived from four main features, including a network-wide visibility with centralized control, a flexible flow manager, a programmable capacity, and a simplified forwarding mechanism. The SDN can solve a range of IoT challenges and can provide a robust, flexible, scalable scheme for the IoT services.
Several previous studies have presented an integrated SDN with IoT, which is referred to as SDIoT. Qin et al. 6 proposed an SDN controller design for the IoT network, which enables centralized flow scheduling according to the network calculus model. TalebiFard and Leung 7 proposed an SDN-based scheme, which eliminates the rigidity of a conventional IoT network by granting dynamic reply to any shift in the environment. Galluccio et al. 8 introduced SDN-WISE that supports stateful SDN and reduces the amount of information exchanged between the sensor nodes and the controller. SDN-WISE also introduced the WISE-Visor which creates and manages several virtual WSNs based on the same physical sensor nodes. Liu et al. 9 proposed a software-defined IoT paradigm for separating smart urban sensing applications from underlying physical infrastructures. Recently, Jararweh et al. 10 reported efforts in defining a generic high-level architecture to deal with the integration of IoT and SDN. In general, the view of the SDIoT scheme includes the devices/things (e.g. smartphone, wireless sensors, appliances, actuators), network infrastructure (e.g. switches, routers), SDN controller and IoT applications/services, as shown in Figure 2.

SDIoT environment.
Device manager in SDIoT controller
In contrast with traditional networks or IoT schemes, the device manager in SDIoT networks is unique due to its logically centralized controller. The device manager helps the controller identify the location (i.e. the corresponding switch port attached) of the device in the network that is provided to the upper IoT services/applications, as shown in Figure 3. 15

Device manager in SDIoT controller.
The device manager learns the end devices passively or actively. In the case of passive learning, the device manager gets the MAC and IP addresses from the Packet-In message, which encapsulates the ARP reply, DHCP response, or IP packets. Therefore, it can identify where the devices are. In the case of active learning, the device manager will send ARP requests to all the ports and then receive ARP responses from devices attached to these ports. Through ARP responses, the device manager is able to determine where the devices are.
The device profile is built based on the Packet-In message, which contains information such as the IP address, MAC address, switch and port number, and last seen timestamp. A device profile is usually indexed by the MAC address. For instance, OpenDaylight indexes the device profile with MAC and IP addresses. The device manager in Floodlight supports both the VLAN ID and MAC addresses for indexing and querying.
When a device comes in and sends its first packet to the network, the switch forward this packet via a Packet-In message to the controller, and the device manager then creates a new device profile based on the payload information of the Packet-In message. When a device moves from one switch to another, the controller updates the database for the migrated device based on the Packet-In message received from another switch port.
Related work
Few prior studies have investigated security issues for fundamental services in an SDN or SDIoT controller, especially for the network topology service. TopoGuard 15 is a security module in the controller that detects poisoning attacks on network visibility. SPHINX 16 proposes a unified approach based on network flow graphs to detect the attacks that violate the learned flow graphs/modules, but it is ineffective in large-scale networks. Although these models can protect against most network topology attacks, they are powerless against complex attacks constructed by an adversary. NSV-GUARD 17 is a new model that can be used to secure routing path construction in SDN. This method is based on a network security virtualization technique combined with dynamic trust evaluation of the network resources. However, it only deals with malicious routing policies generated by an unregistered routing applications. FADE 18 uses dedicated flow rules to collect flow statistics of a minimal set of flows, and with these flow statistics, it identifies forwarding anomalies. However, the system has a negative impact on the network throughput.
Vulnerability of the device manager
To the best of our knowledge, none of the existing controllers contain a security mechanism to prevent malicious packets that are received by the device manager. Even well-known open-source controllers currently in the market, such as Floodlight, POX, and OpenDaylight, still have this problem. In this section, we first analyze the vulnerability of the device manager service, and three types of network attacks that exploit this security hole are presented. Then, the potential solution to this problem is suggested and discussed.
The security analysis of device manager
The device manager provides information related to the location of the device which is required for monitoring traffic, assisting in traffic routes, and determining the source of the packets. If this service works incorrectly, all dependent services will be affected.
The device manager controls the device entities in a database based on the MAC addresses, network addresses mapped to the devices, and their locations in the networks. We analyze the source code of the device manager in current mainstream controllers, that is, Floodlight, POX, and OpenDaylight, and find some vulnerabilities in their device manager. Specifically, the
Device impersonation
In this attack scenario, the attacker will receive packets intended for the victim and can reply to these packets on behalf of the victim. Figure 4 illustrates the device impersonation attack where device B is the victim.

Device impersonation attack in an SDIoT network.
To perform this attack, the attacker first sends the ARP request to the controller to probe the corresponding MAC address of the IP address for device B. The attacker then injects the spoofed ARP reply, which contains the IP address of device B and the MAC address of the attacker device, to the network. The controller receives the spoofed ARP reply packet from the switch via a Packet-In message and then accepts the change in the profile information of device B, that is, the MAC address for device B changes to the MAC address of the attacker’s device. Since the device profile is indexed by the MAC address, the meta information for device B, that is, the DPID and port number, is also changed into meta information of the attacker device. The controller then sends a Flow-Mod message to modify the Flow Table of the switch based on the forged information of the device profile. As a result, the attacker successfully impersonates device B. Therefore, when another device, for example, device A, attempts to connect to device B, the attacker’s device will communicate with device A.
Eavesdropping
An eavesdropping attack is a well-known attack where an adversary aims to listen to the private communication between two devices without them knowing. We consider the network topology, which consists of an attacker device, device A and device B, as shown in Figure 5. The attacker first sends the fake ARP reply packet, which has the IP addresses of device A and device B but the MAC address of the attacker’s device. The switch will then send this packet to the controller via the Packet-In message. Hence, the controller accepts the modification for the location of device A and device B to the location of the attacker. The controller then sends the Flow-Mod message to change the flow rules in the switch based on the new device profile of device A and device B. Once this has been done, when device A attempts to contact device B, the traffic from device A will go through the attacker device and then to device B. Device A and device B believe that they have a direct connection to each other.

Eavesdropping attack in an SDIoT network.
DoS
Different from traditional denial-of-service (DoS) attack, in this DoS attack scheme, the attacker device runs an attacking script to craft the fake packets and sends them to the controller to make the profile of the target device in the controller contain bogus profile information such as a fake MAC address, a non-existing port. Hence, the victim’s device (e.g. banking servers, DNS servers) cannot communicate with others.
Figure 6 shows the result of the DoS attack where the victim is device B. The attacker periodically sends spurious ARP reply packets to the controller to change the MAC address of device B to an unreal one. Since the device manager accepts all changes in the device profile, the device profile is misconfigured by the spoofed message. The controller then sends a Flow-Mod message to change the Flow Table of the switch according to the misconfigured device information database. Consequently, the flow rules of the Flow Table are erroneous, that is, the MAC address of device B in the flow rules is changed to a non-existing one. Hence, the communication between device B and the other devices is blocked.

Denial-of-service attack in an SDIoT network.
Potential solutions from traditional networking
A cryptographic technique, that is, public key infrastructure (PKI), 19 may be used to solve this problem. The PKI establishes and maintains a trustworthy networking environment by providing key and certificate management services to enable encryption and digital signature capabilities. When a device moves to a new location or newly joins the network, the device will be authenticated by the controller. The device will then encrypt the packet, which contains the location information, using the controller’s public key and will sign it using the device’s digital signature. The digital signature is made of the device’s private key and the message digest. The device then sends the processed message to the controller via the Packet-In message. To prove the identity, the device needs to use a digital certificate provided by a Certification Authority (CA). After receiving the message from the device, the controller decrypts the message with its private key and verifies the message digest using three elements, including the hash algorithm, the authenticity with the device’s public key, and the device’s digital certificate. Then, the controller can identify the location of the device through the received packet information.
Since it is impractical for an attacker to obtain the device’s certificate, this solution seemingly prevents the attacks. Unfortunately, there are several limitations that make it difficult to be deployed in the fields. First, SDIoT is usually a dynamic, large-scale network where the device (e.g. mobile device, wearable device) changes its physical location frequently. When a device migration event occurs, the device will be re-authenticated. If re-authentication happens frequently, the controller’s computing overhead to process each Packet-In message will increase dramatically due to the high computational cost of the asymmetric algorithm such as PKI. 20 In worst case, the controller can even turn off due to the overload. IoT devices (i.e. sensors) are generally limited in power and resources, making it difficult to apply this complex cryptographic algorithm. 21
Due to the limited computing and memory capability of the IoT devices, Ling et al. 22 proposed an efficient and secure one-time password (OTP authentication suitable for devices with limited computing resources and power. In their method, the hash chain is removed to reduce the computational load for the device, but it still retains the one-way hash function to achieve mutual authentication. The device is assumed to contain a pre-shared secret value which is a random number chosen by the controller, and the controller keeps it. The OTP is formed by passing the value of a secret value and a timestamp through a cryptographic hash function of the device. Then, the controller obtains the device’s secret value and timestamp value from a device table and generates the same OTP. The two passwords must be matched to authenticate the device.
Countermeasure and evaluation
In this section, we detail the idea and implementation of the defense method to protect the SDIoT networks against device manager attacks. Also, an experiment is conducted to analyze the performance of the proposed attack prevention method.
Countermeasure
Note that the message authentication scheme is used to confirm that the message comes from the initiating sender and has not been changed in transit. After successful authentication, depending on the system, the contents of the message need to be checked. However, in SDIoT, as we mentioned before, the device manager in the existing controller does not contain the verification mechanism to check the spoofed packet. Hence, the authenticated device can still send the spoofed packet to change the information in the device database. As shown in Figure 7, although the authentication mechanism is activated, the attacker (authenticated as a normal device) can still send a fake message, which is accepted by the controller without considering the contents of the message.

The controller without the spoofed packet-checking mechanism.
To address this issue, we propose a novel model, which is referred to a security patch for the device manager in the controller, as shown in Figure 8. The proposed model consists of a Device Manager Checker, Authenticator, Port Monitoring, and Device Profile Database. The new device must be authenticated by the Authenticator using the lightweight authentication method. When the device moves to another location, a verification of the previous port of the device has to be made via Port Monitoring. If the connection is still active, the migration of the device must be spoofing action and will be blocked by Device Manager Checker. Otherwise, the migration request will be accepted and updated by Device Profile Database. Hence, all the spoofing actions, which lead to three kinds of discussed attacks (i.e. device impersonation, eavesdropping, DoS attack), can be detected and suspended by the proposed model. The details are shown below.

The proposed device manager.
Device profile database
It is structured as a list as shown in Table 1 where each row contains the device profile and its networking status. Each item of device information is stored in its respected column. Each device should have at least the entries on its MAC address, the location of the connected switch, and the last seen timestamp. Furthermore, the authentication status is necessary for the check-up and monitoring measurements.
The suggested structure format of the Device Profile Database.
Authenticator
The newly connected devices must be authenticated by the controller. In this module, we adopt the efficient and secure OTP authentication proposed by Ling et al. 22 The used authentication method establishes a session key to encrypt the transmitted messages. Upon successful authentication, the authentication status of the device will be updated in the Device Profile Database.
Port Monitoring
Without checking the contents of the packet, the authenticated device can still send the spoofed packet to impersonate other devices. With the use of Port Monitoring, a duplicate appearance of the device in the database can occur only if the device has moved and the database has not been updated, or if it is a result of a spoofing attempt. Thus, a check-up of the original device location has to be made via Port Monitoring. An efficient way of check-up is to check the status of the port where the device was previously connected. If the connection is still active, the change must then be a spoofing action, and the Device Manager Checker will block this request. If the connection is inactive, then the change request can be accepted, and the Device Profile Database will be updated. Figure 9 shows the result of using the Port Monitoring when an attacker performs a spoofing attack.

The controller using Port Monitoring in the device manager.
Evaluation
Our experiment is conducted using the Linux-based Mininet 2.2.1, 23 which provides a scalable platform to emulate the SDN network via virtualization. The proposed defense mechanism is implemented using the Floodlight 1.2 controller. 11 We also use Open vSwitch 2.5.1, 24 a software-based virtual SDN switch with the support of the OpenFlow protocol. The attack tools are ARP-spoof 1.5 25 and Wireshark 1.21.1. 26 All experiments are conducted on a PC with an Intel Xeon CPU E3-1230 V2 running at 3.30 GHz with 16 GB of RAM.
In the first experimental scheme, we perform an eavesdropping attack without enabling the security extension of the device manager. The other discussed attack scenarios, i.e., device impersonation and DoS attack can operate in the same manner. We consider a network containing three devices: an attacker device (IP address: 10.0.0.1, MAC address: 00:00:00:00:00:01, switch port: 1), device A (IP address: 10.0.0.2, MAC address: 00:00:00:00:00:02, switch port: 2), and device B (IP address: 10.0.0.3, MAC address: 00:00:00:00:00:03, switch port: 3). The attacker uses ARP-spoof to repeatedly send spoofed ARP reply packets using the MAC address of the attacker’s device and the IP address of two targets, device A and device B. Hence, the profiles for device A and B in Device Profile Database are updated with fake information. The Floodlight controller sends the Flow-Mod message to modify the flow rules of the switch. We can see the flow rules in Figure 10, and the network traffic between device A and device B goes through port number 1, which is the attacker’s location. As shown in Figure 10, the attacker successfully wiretaps the communication between the two victim devices, A and B, as shown in the Wireshark software.

Successful eavesdropping attack on the Floodlight controller.
In the second experimental scheme, the new device manager is activated, and the feedback of the device manager is indicated using the console output of the Floodlight controller. The attack is also performed same as in the previous experiment. However, with our proposed prevention method, the spoofing attacks, which is a major cause of the device impersonation, eavesdropping, and DoS attack, can be prevented. Figure 11 shows the successful detection when a spoofing attempt occurs.

Successful detection of the attacks on the device manager in the Floodlight controller.
We also consider the performance overhead of the controller with and without the proposed model. The network is created by a tree topology with a depth of 2 and fanout of 10 containing 100 devices in Mininet. Table 2 shows the comparison of the controller with and without the proposed countermeasure in terms of the processing time for device discovery of 100 devices and the average processing time per Packet-In message. The authentication mechanism adds an extra 8% processing time of the controller. Port Monitoring also brings a small delay on Packet-In message processing. However, the overhead of average delay for each Packet-In message processing is quite small (below 0.5 ms). The result shows that the impact of the new device manager is acceptable in order to obtain a trustworthy device manager in the controller.
The computational overhead of the controller.
Conclusion
This article considers the security of the device manager, a crucial and fundamental service in an SDIoT controller. The profile database of the device manager can be easily forged due to a lack of security mechanism in this service. Several serious attack scenarios are thus performed according to the discovered vulnerability for the device manager. The potential security solutions are also examined, which cannot be applied directly in SDIoT. Hence, a lightweight, dynamic countermeasure is proposed and then evaluated through experiments. The results show that the proposed defense method can effectively prevent attacks on a device manager in SDIoT networks in real time. Further experiments on a large scale of devices will be conducted in future work.
