Internet of Things moving target defense method based on P4

By adopting the programmable data plane language of P4 protocol in the Internet of Things network, dynamic jump and packet processing of device addresses are solved, and the problem of traditional network devices is difficult to support dynamic network changes is improved, and the flexibility of the Internet of Things network is improved. Security meets the needs of efficient defense in resource-constrained environments.

CN119211295APending Publication Date: 2024-12-27TIANJIN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411377835.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Traditional network devices are difficult to support changes in dynamic network attributes of IoT devices, making it difficult to achieve flexible and efficient packet processing in mobile target defense. In addition, the resources of IoT devices are limited, and traditional defense methods are difficult to effectively utilize.

Method used

The programmable data plane language adopts the P4 protocol, and the virtual address selection module, reachable path selection module, address mapping table and flow table is deployed in the SDN controller to realize dynamic jump of device addresses, and use P4 switches for Data packet header parsing and forwarding, dynamically selecting paths and modifying packet headers, supporting complex network operations.

Benefits of technology

It improves the flexibility and programmability of the network, avoids intervention in IoT device resources, realizes flexible defense strategy deployment and data packet control, and enhances the security and protection capabilities of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211295A_ABST
    Figure CN119211295A_ABST
Patent Text Reader

Abstract

The invention discloses an Internet of Things moving target defense method based on P4. The method comprises the following steps: deploying a virtual address selection module, a reachable path selection module and an address mapping table and flow table issuing module in an SDN controller; the source Internet of Things terminal equipment initiates an access request; if the matching rule is not found in the request data packet flow table, packaging the request data packet into a packet-i < n > data message and sending the packet-i < n > data message to the SDN controller; selecting a reachable path; selecting a virtual address; equipment address hopping strategy deployment is completed; if the flow table is received in advance, processing the request data packet according to a matching rule in the flow table; forwarding the request data packet to the target Internet of Things terminal device; and the target Internet of Things terminal device responds to the request and the like. According to the method, the advantage of SD-I oT centralized control is utilized, strategy deployment and data packet forwarding logic modification are carried out on a control plane and a data plane, Internet of Things terminal equipment resources are not utilized, normal use of Internet of Things equipment is not intervened, and the method is realized based on a P4 programmable language, so that the network flexibility and programmability are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of mobile target defense in the Internet of Things, and in particular relates to a mobile target defense method for the Internet of Things based on P4. Background Art

[0002] With the development of software-defined networking (SDN), traditional network devices have achieved flexible network management by separating the control plane from the data plane. Among them, OpenF l ow, as an early representative protocol of SDN, controls the forwarding behavior of switches by sending flow table rules from the controller. However, the data plane behavior of OpenF l ow is fixed and is limited by predefined protocol support, making it difficult to adapt to new network requirements.

[0003] To address this limitation, P4 (a programmable protocol-independent data plane language) was born. Unlike OpenFl ow, P4 allows users to define their own data packet processing logic, supports flexible packet header parsing and custom protocol processing. The protocol independence of P4 enables it to be extended to support various new protocols, so it has stronger programmability and flexibility.

[0004] In recent years, the security of the Internet of Things (IoT) has become one of the core challenges in the network field. Due to the large number and wide distribution of IoT devices, they are easily targeted by network attacks. Therefore, in the face of increasing attacks, it is particularly important to ensure the security of IoT devices. Mobile target defense (MTD) technology has gradually been applied to the field of IoT. By dynamically changing the network properties of devices (such as IP addresses and MAC addresses), it is difficult for attackers to continuously lock on to the target, thereby improving the overall security of the network. However, the implementation of MTD technology requires highly flexible and dynamic packet processing capabilities, which poses a great challenge to traditional fixed protocols.

[0005] Therefore, the language flexibility and programmability of P4 are particularly important. P4 allows users to customize packet processing logic, supports protocol-independent packet header parsing and modification, and can implement fine-grained packet control according to specific needs. P4 is designed to enable it to dynamically select paths, modify packet headers, and perform complex network operations, which is crucial for implementing dynamic address hopping in MTD technology. In contrast, OpenF l ow is limited by hardware implementation and fixed rules, and it is difficult to support such dynamic network behavior.

[0006] P4 not only enables flexible packet control, but also supports a variety of new protocols, especially in emerging fields such as IoT, 5G and edge computing, it can quickly adapt to new network requirements. This makes P4 an important tool for optimizing and customizing network behavior in future network architectures, especially for security policies that need to change dynamically. P4's programmability provides strong support for mobile target defense technology in IoT networks.

[0007] At the same time, the computing resources of IoT devices are limited. Traditional defense methods often rely on high-performance computing power to analyze and detect attacks in real time, making it difficult to effectively utilize device resources, resulting in limited defense effects. In this context, new defense methods are urgently needed to meet the resource-constrained IoT environment while maintaining effective network protection. However, there is currently a lack of corresponding methods. Summary of the invention

[0008] In order to solve the above problems, the purpose of the present invention is to provide an Internet of Things mobile target defense method based on P4.

[0009] In order to achieve the above object, the P4-based IoT mobile target defense method provided by the present invention comprises the following steps performed in sequence:

[0010] 1) Deploy the virtual address selection module, reachable path selection module, address mapping table and flow table delivery module in the SDN controller;

[0011] 2) The source IoT terminal device initiates an access request. At this time, the access request uses a real address. When passing through the directly connected source P4 switch, the real address pair in the request data packet is modified to a virtual address pair. During the transmission process in the network, when passing through different network devices, the virtual address is different; after receiving the request data packet, the connected P4 switch first parses the request data packet into a data packet header and a payload, where the payload does not participate in the subsequent matching operation, and then allows the data packet header to enter the data pipeline;

[0012] 3) After the P4 switch receives the request data packet, if no matching rule is found in the flow table of the request data packet, it needs to encapsulate the request data packet into a packet-i n data message and send it to the SDN controller;

[0013] 4) After receiving the packet-i n data message, the SDN controller selects a reachable path from the reachable path selection module and reserves the number of P4 switches in the reachable path;

[0014] 5) The SDN controller selects a virtual address from the virtual IP and virtual MAC address pools of the virtual address selection module and stores it in the address mapping table;

[0015] 6) The SDN controller calls the virtual address selection module to select the virtual addresses of the corresponding number of P4 switches according to the virtual address selected by the virtual address selection module and the reachable path selected by the reachable path selection module, and the flow table delivery module delivers the flow table to the P4 switch through P4Runt ime, and stores the real address in the address mapping table, thereby completing the deployment of the device address hopping strategy;

[0016] 7) After the P4 switch receives the request packet header, if it has received the flow table from the SDN controller in advance, it processes the request packet according to the matching rules in the flow table, including modifying the source IP address and destination IP address, source MAC address and destination MAC address of the packet, and specifying the output port to forward the packet to the next-hop P4 switch or the destination IoT terminal device;

[0017] 8) When the request data packet arrives at the destination P4 switch, the virtual address pair is modified to a real address pair, and finally, the modified request data packet is forwarded to the destination IoT terminal device;

[0018] 9) After receiving the request data packet sent by the source IoT terminal device, the destination IoT terminal device responds to the request and sends a response message. The response message processing flow is still to modify the real address pair into a virtual address pair.

[0019] In step 4), after the SDN controller receives the packet-i n data message, the specific method of selecting a reachable path from the reachable path selection module and retaining the number of P4 switches in the reachable path is as follows:

[0020] The network topology is represented by a graph structure, in which the P4 switches are used as nodes of the graph and the links between the P4 switches are used as edges of the graph. The path calculation algorithm is used to obtain the reachable path of the P4 switch, and the number of P4 switches contained in the reachable path is recorded to determine the number of calls to the virtual address selection module.

[0021] In step 5), the specific method in which the SDN controller selects a virtual address from the virtual IP and virtual MAC address pools of the virtual address selection module and stores the virtual address in the address mapping table is as follows:

[0022] First, create a virtual IP address pool and a virtual MAC address pool, assign a timestamp to each virtual address to record the usage time of the virtual address, and initially set it to negative infinity. Then, use random constraints to select the first k virtual address pairs that have not been used for the longest time from the virtual address pool. In order to further increase the randomness of the selection of virtual address pairs, use hash constraints to calculate the hash values ​​of the first k virtual address pairs, select the virtual address pair with the smallest hash value, and add this virtual address pair to the address mapping table. Finally, in order to ensure that the size of the virtual address pool remains stable, it is necessary to put the selected virtual address pair back into the virtual address pool and update the timestamp of the virtual address pair for the next virtual address selection.

[0023] The P4-based IoT mobile target defense method provided by the present invention has the following beneficial effects:

[0024] 1) The present invention takes advantage of the centralized control of SD-IoT and performs policy deployment and packet forwarding logic modification on the control plane and data plane. It does not utilize the resources of IoT terminal devices and does not interfere with the normal use of IoT devices, thereby alleviating the problem of not being able to efficiently complete active defense strategies due to limited IoT device resources. In addition, the present invention is implemented based on the P4 programmable language, which greatly improves the flexibility and programmability of the network.

[0025] 2) In order to avoid repeated selection of a certain address, constraints are added to the selected address, and in the reachable path selection module, a reachable path is randomly selected and the flow table is sent to the P4 switch in the reachable path, which increases unpredictability. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a schematic diagram of the overall framework of the P4-based Internet of Things mobile target defense method provided by the present invention.

[0027] Figure 2 It is a schematic diagram of the device address jump strategy in the P4-based Internet of Things mobile target defense method provided by the present invention.

[0028] Figure 3 It is a communication flow chart based on P4 in the P4-based Internet of Things mobile target defense method provided by the present invention.

[0029] Figure 4 It is an Internet of Things simulation topology diagram in the Internet of Things mobile target defense method based on P4 provided by the present invention.

[0030] Figure 5 It is a schematic diagram of the real address and virtual address conversion process in the P4-based Internet of Things mobile target defense method provided by the present invention. DETAILED DESCRIPTION

[0031] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0032] like Figure 1 As shown, the P4-based IoT mobile target defense method provided by the present invention includes the following steps performed in sequence:

[0033] 1) If Figure 2 As shown, a virtual address selection module, a reachable path selection module, an address mapping table, and a flow table delivery module are deployed in the SDN controller;

[0034] The virtual address selection module is used to select a virtual address from a preset virtual IP and virtual MAC address pool, ensuring that the selected virtual address is the one that has not been used for the longest time, so as to increase the randomness and security of the virtual address selection;

[0035] The address mapping table is used to store the mapping relationship between the virtual address and the real address to ensure that the real address of the IoT device can be correctly parsed and restored during the data packet forwarding process;

[0036] The reachable path selection module is used to select a random reachable path by performing path calculation on the network topology map, and record the number of P4 switches in the reachable path as a reference for the selection number of virtual addresses;

[0037] The flow table sending module is used to send the flow table to the relevant P4 switch based on the above virtual address and reachable path using P4Runt ime to ensure the correct forwarding of data packets.

[0038] 2) The source IoT terminal device initiates an access request, such as Figure 5 As shown, the access request uses the real address at this time. When passing through the directly connected source P4 switch, the real address pair in the request data packet is modified to a virtual address pair. During the transmission process in the network, when passing through different network devices, the virtual address is different; Figure 3 As shown, after receiving the request data packet, the P4 switch connected thereto first parses the request data packet into a data packet header and a payload, wherein the payload does not participate in the subsequent matching operation, and then allows the data packet header to enter the data pipeline;

[0039] 3) After the P4 switch receives the request data packet, if no matching rule is found in the flow table of the request data packet, it needs to encapsulate the request data packet into a packet-i n data message and send it to the SDN controller;

[0040] 4) After receiving the packet-i n data message, the SDN controller selects a reachable path from the reachable path selection module and reserves the number of P4 switches in the reachable path;

[0041] The specific method is as follows:

[0042] The network topology is represented by a graph structure, in which the P4 switches are used as nodes of the graph and the links between the P4 switches are used as edges of the graph. The path calculation algorithm is used to obtain the reachable path of the P4 switch, and the number of P4 switches contained in the reachable path is recorded to determine the number of calls to the virtual address selection module.

[0043] 5) The SDN controller selects a virtual address from the virtual IP and virtual MAC address pools of the virtual address selection module and stores it in the address mapping table;

[0044] The specific method is as follows:

[0045] First, a virtual IP address pool and a virtual MAC address pool are created. In order to avoid repeated selection of a certain address during the device address hopping process, a timestamp is assigned to each virtual address to record the usage time of the virtual address, which is initially set to negative infinity. Then, using random constraints, the first k virtual address pairs that have not been used for the longest time are selected from the virtual address pool. In order to further increase the randomness of the selection of virtual address pairs, hash constraints are used to calculate the hash values ​​of the first k virtual address pairs, and the virtual address pair with the smallest hash value is selected and added to the address mapping table. Finally, in order to ensure that the size of the virtual address pool remains stable, the selected virtual address pair needs to be put back into the virtual address pool and the timestamp of the virtual address pair is updated for the next virtual address selection.

[0046] 6) The SDN controller calls the virtual address selection module to select the virtual addresses of the corresponding number of P4 switches according to the virtual address selected by the virtual address selection module and the reachable path selected by the reachable path selection module, and the flow table delivery module delivers the flow table to the P4 switch through P4Runt ime, and stores the real address in the address mapping table, thereby completing the deployment of the device address hopping strategy;

[0047] 7) After the P4 switch receives the request packet header, if it has received the flow table from the SDN controller in advance, it processes the request packet according to the matching rules in the flow table, including modifying the source IP address and destination IP address, source MAC address and destination MAC address of the packet, and specifying the output port to forward the packet to the next-hop P4 switch or the destination IoT terminal device;

[0048] 8) When the request data packet arrives at the destination P4 switch, the virtual address pair is modified to a real address pair, and finally, the modified request data packet is forwarded to the destination IoT terminal device;

[0049] 9) After receiving the request data packet sent by the source IoT terminal device, the destination IoT terminal device responds to the request and sends a response message. The response message processing flow is still to modify the real address pair into a virtual address pair.

[0050] Example

[0051] The Internet of Things mainly includes the gateway layer and the device layer. The gateway layer is mainly the P4 access point, which is used to forward data in the device layer; the device layer is mainly some Internet of Things terminal devices, which are responsible for data collection and sensing.

[0052] Specifically, Figure 4 Take the IoT simulation topology shown as an example, there are 10 P4 switches S1-S10, 2 P4 access points P4AP1-P4AP2, 4 hosts h1-h4 and 4 IoT terminal devices sta1-sta4, which are used to simulate the real IoT communication environment. Take the communication between IoT terminal devices sta1 and sta3 as an example, then the source P4 switch is S1 (S10), and the destination P4 switch is S10 (S1). When the SDN controller is successfully connected to the P4 switch, it immediately creates a periodic task, actively selects a reachable path and sends the flow table to the P4 switch on the reachable path.

[0053] For example, the first reachable path selected is s1→s3→s6→s8→s10. Then, the virtual address selection module needs to be called five times to select five non-repetitive virtual IP addresses and five virtual MAC addresses from the virtual address pool. These addresses are used in different flow tables sent by the SDN controller to the P4 switch on the reachable path to increase unpredictability. The address mapping table obtained is shown in Table 1.

[0054] Table 1. Address mapping table

[0055]

[0056]

[0057] When the time reaches the set period, each module is updated and the reachable path in the network is reselected. The reachable path selected for the second time is s1→s3→s5→s7→s4→s9→s10. Then, the virtual address selection module needs to be called 7 times to select 7 non-repetitive virtual IP addresses and virtual MAC addresses in the virtual address pool. Then, the SDN controller sends the flow table to the corresponding P4 switch. The updated address mapping table is shown in Table 2.

[0058] Table 2. Updated address mapping table

[0059]

[0060] This completes the deployment of the device address jump strategy.

[0061] For different types of request packets, the P4 switch performs different operations. If it is an IPv4 request packet, the source IP address and destination IP address, source MAC address and destination MAC address in the IPv4 request packet header will be modified, and the output port of the request packet will be specified to ensure that the request packet is forwarded to the corresponding port; if it is an ARP packet, the source MAC address and source IP address in the ARP packet header will be modified to update the sender information in the ARP request or reply; the destination MAC address and destination IP address are used to update the target information in the ARP request or reply; finally, the output port of the request packet is specified to specify which port the packet should be forwarded through.

Claims

1. A P4-based mobile target defense method for the Internet of Things, characterized by: The P4-based IoT mobile target defense method includes the following steps performed in sequence: 1) Deploy the virtual address selection module, reachable path selection module, address mapping table and flow table delivery module in the SDN controller; 2) The source IoT terminal device initiates an access request. At this time, the access request uses a real address. When passing through the directly connected source P4 switch, the real address pair in the request data packet is modified to a virtual address pair. During the transmission process in the network, when passing through different network devices, the virtual address is different; after receiving the request data packet, the connected P4 switch first parses the request data packet into a data packet header and a payload, where the payload does not participate in the subsequent matching operation, and then allows the data packet header to enter the data pipeline; 3) After the P4 switch receives the request data packet, if no matching rule is found in the flow table of the request data packet, it needs to encapsulate the request data packet into a packet-in data message and send it to the SDN controller; 4) After receiving the packet-in data message, the SDN controller selects a reachable path from the reachable path selection module and retains the number of P4 switches in the reachable path; 5) The SDN controller selects a virtual address from the virtual IP and virtual MAC address pools of the virtual address selection module and stores it in the address mapping table; 6) The SDN controller calls the virtual address selection module to select the virtual addresses of the corresponding number of P4 switches according to the virtual address selected by the virtual address selection module and the reachable path selected by the reachable path selection module, and the flow table delivery module delivers the flow table to the P4 switch through the P4Runtime, and stores the real address in the address mapping table, thereby completing the deployment of the device address jump strategy; 7) After the P4 switch receives the request packet header, if it has received the flow table from the SDN controller in advance, it processes the request packet according to the matching rules in the flow table, including modifying the source IP address and destination IP address, source MAC address and destination MAC address of the packet, and specifying the output port to forward the packet to the next-hop P4 switch or the destination IoT terminal device; 8) When the request data packet arrives at the destination P4 switch, the virtual address pair is modified to a real address pair, and finally, the modified request data packet is forwarded to the destination IoT terminal device; 9) After receiving the request data packet sent by the source IoT terminal device, the destination IoT terminal device responds to the request and sends a response message. The response message processing flow is still to modify the real address pair into a virtual address pair.

2. The P4-based mobile target defense method for the Internet of Things according to claim 1 is characterized in that: In step 4), after receiving the packet-in data message, the SDN controller selects a reachable path from the reachable path selection module and retains the number of P4 switches in the reachable path. The specific method is as follows: The network topology is represented by a graph structure, in which the P4 switches are used as nodes of the graph and the links between the P4 switches are used as edges of the graph. The path calculation algorithm is used to obtain the reachable path of the P4 switch, and the number of P4 switches contained in the reachable path is recorded to determine the number of calls to the virtual address selection module.

3. The P4-based mobile target defense method for the Internet of Things according to claim 1 is characterized in that: In step 5), the specific method in which the SDN controller selects a virtual address from the virtual IP and virtual MAC address pools of the virtual address selection module and stores the virtual address in the address mapping table is as follows: First, create a virtual IP address pool and a virtual MAC address pool, assign a timestamp to each virtual address to record the usage time of the virtual address, and initially set it to negative infinity. Then, use random constraints to select the first k virtual address pairs that have not been used for the longest time from the virtual address pool. In order to further increase the randomness of the selection of virtual address pairs, use hash constraints to calculate the hash values ​​of the first k virtual address pairs, select the virtual address pair with the smallest hash value, and add this virtual address pair to the address mapping table. Finally, in order to ensure that the size of the virtual address pool remains stable, it is necessary to put the selected virtual address pair back into the virtual address pool and update the timestamp of the virtual address pair for the next virtual address selection.