IoT edge gateway security defense system and IoT edge gateway

By combining a three-layer defense module and a trusted platform, the IoT edge gateway achieves efficient identification and interception of complex attacks, solves the security protection problem under limited resources, and improves the security and stability of the IoT edge gateway.

CN123123038APending Publication Date: 2026-11-17GUANGDONG COLLEGE OF BUSINESS & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611625894.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-20
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

When faced with complex and ever-changing attacks, existing security protection mechanisms are ineffective in dealing with IoT edge gateways, especially unknown or variant attacks. Furthermore, limited computing and storage resources result in low identification and interception efficiency.

Method used

It adopts a three-layer defense module structure. The first defense module quickly matches preset threat features through a knowledge base, the second defense module performs content-level and behavior-level detection, and the third defense module performs multi-dimensional feature probabilistic detection. Combined with the trusted platform module, it performs hardware trust root verification to achieve hierarchical filtering and accurate identification of business traffic.

Benefits of technology

It enables rapid identification and filtering of known threats, improves the detection capability of unknown and variant attacks, reduces resource consumption, and ensures the security and stability of IoT edge gateways.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123038A_ABST
    Figure CN123123038A_ABST
Patent Text Reader

Abstract

This application provides an IoT edge gateway security defense system and an IoT edge gateway, belonging to the field of IoT edge gateway technology. The system includes: a first defense module, which extracts traffic characteristics of service traffic and matches them with preset threat characteristics. If the match is successful, the detection is terminated; otherwise, it is sent to a second defense module. The second defense module performs content-state detection and behavior-state detection on the service traffic, outputs the behavior-state risk level, adjusts the initial content-state detection parameters according to the behavior-state risk level, and feeds back the content-state hit result to the behavior-state detection cumulative count. If a preset high-risk condition is hit or the source device is in an isolated or blocked state, the system blocks and issues an alarm; otherwise, it is sent to a third defense module. The third defense module extracts multi-dimensional features of the service traffic, determines the malicious probability based on preset weights, preset biases, and multi-dimensional features, and rejects the traffic if the malicious probability is greater than or equal to a preset threshold; otherwise, it allows the traffic to pass.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of IoT edge gateway technology, and specifically relates to an IoT edge gateway security defense system and an IoT edge gateway. Background Technology

[0002] IoT edge gateways serve as the hub connecting the sensing layer and the cloud, and their security impacts the stable operation of the entire IoT system. Among related technologies, the application of IoT edge gateway security mainly focuses on encryption technology, authentication mechanisms, artificial intelligence, machine learning, cloud-based defense, and access control. These technologies can ensure the legitimacy of device access, but often rely on complex key management systems, making them relatively vulnerable to business-layer attacks and unknown or variant attacks.

[0003] Furthermore, IoT edge gateway devices typically use relatively simple CPU architectures, have a maximum of 2GB of memory, and primarily use flash memory for storage, limiting the number of write cycles. Their computing, storage, and communication resources are relatively limited. Directly deploying large models, machine learning models, and other AI products can lead to insufficient computing power, high memory consumption, and significant response latency.

[0004] Traditional single-mode security protection mechanisms, such as encryption, authentication, artificial intelligence, and machine learning, can mitigate security threats to some extent, but they often fall short in effectively against complex and ever-changing attack methods. For example, known attacks have clear characteristics, such as SQL injection exploiting known vulnerabilities, cross-site scripting (XSS), and brute-force attacks using default passwords. These can be identified through static rules, but rule bases cannot cover all attack characteristics. Anomalous behavior attacks do not change the content of individual data packets but launch attacks by altering behavioral patterns, such as frequently sending abnormal commands after a device is compromised or transmitting large amounts of data during inactive periods. Traditional single-packet detection methods are difficult to detect these attacks. Unknown / variant attacks utilize zero-day vulnerabilities or variants of known attacks. Their characteristics are not included in existing rule bases and are difficult to identify through static rules.

[0005] The content of the background section is merely the technology known to the inventor and does not necessarily represent the prior art in this field. Summary of the Invention

[0006] This application aims to provide an IoT edge gateway security defense system and an IoT edge gateway to solve at least one of the above-mentioned technical problems.

[0007] According to one aspect of this application, an IoT edge gateway security defense system is provided, comprising: a first defense module configured to receive service traffic, extract traffic features from the service traffic, and match the traffic features with preset threat features; if the match is successful, the traffic is determined to be malicious and a preset action is executed, and the detection is terminated; if the match fails, the service traffic is sent to a second defense module; the second defense module is configured to receive service traffic, perform content-state detection and behavior-state detection on the service traffic, wherein the content-state detection is performed based on initial content-state detection parameters, and the behavior-state detection outputs a behavior-state risk level; the second defense module... During the detection process, the initial content detection parameters are adjusted according to the behavioral risk level, and the content detection hit results are fed back to the behavioral detection cumulative count. If the content detection hits the preset high-risk condition, or the behavioral detection indicates that the source device corresponding to the service traffic is in an isolated or blocked state, the traffic is blocked and an alarm is triggered. Otherwise, the service traffic is sent to the third line of defense module. The third line of defense module is configured to receive the service traffic, extract the multi-dimensional features of the service traffic, and determine the malicious probability of the service traffic based on preset weights, preset biases, and multi-dimensional features. If the malicious probability is greater than or equal to a preset threshold, the service traffic is rejected; otherwise, it is allowed.

[0008] According to some embodiments of this application, the second defense module includes: a feedback adjustment unit, which is configured to determine an adjustment coefficient based on the behavioral risk level and adjust the initial content detection parameters based on the adjustment coefficient; wherein the initial content detection parameters include at least one of multiple detection rules, priority scores, rule weights, and rule judgment thresholds.

[0009] According to some embodiments of this application, content-state detection includes: traversing multiple detection rules in descending order of priority score, determining the hit detection rules, and taking the detection rule with the highest priority score among the hit detection rules as the detection result of content-state detection.

[0010] According to some embodiments of this application, behavioral detection includes: accumulating the number of topic hops, IP hops, and alarms of a preset level for the source device corresponding to the service traffic within a preset time window, and maintaining the transition of the source device's state between new device state, normal state, suspicious state, isolated state, and blocked state; wherein, the new device state is the initial state that allows service traffic to pass, the normal state is the pass state, and in the suspicious state, the second defense module sends the service traffic to the third defense module.

[0011] According to some embodiments of this application, the second defense module also performs anomaly determination based on the device profile baseline of the source device and group collaborative perception; the device profile baseline is the behavior statistical baseline of the source device within a historical time window; group collaborative perception refers to the determination of network segment hijacking when multiple source devices in the same network segment simultaneously experience source IP address jumps within a preset time window and the number of jumps of a single source device is less than a preset jump threshold.

[0012] According to some embodiments of this application, determining the malicious probability of business traffic includes: obtaining a weighted value through weighted calculation, and transforming the weighted value using a sigmoid function to obtain the malicious probability; the weighted calculation uses a formula... Where z is the weighting value; x is the multidimensional feature; w is the preset weight corresponding to the multidimensional feature; bias is the preset bias; and the sigmoid function is... Where sigmoid(z) is the probability of malice and e is the natural constant.

[0013] According to some embodiments of this application, the IoT edge gateway security defense system further includes: a trusted platform module, configured as a hardware root of trust for the IoT edge gateway, which performs integrity verification on the firmware, bootloader, and kernel of the IoT edge gateway during startup, and performs integrity verification on the configuration data of the security defense system during its operation. The configuration data includes at least one of security key, certificate, initial content state detection parameters, preset weight, and preset bias.

[0014] According to some embodiments of this application, the trusted platform module performs cryptographic operations when a preset security event is triggered; the preset security event includes at least one of the following: model parameters need to be verified for integrity, configuration data is changed, and the IoT edge gateway needs to perform identity authentication; wherein, the model parameters include preset weights and preset biases; the cryptographic operations include at least one of the following: verifying the integrity of the model parameters, calculating a digest of the changed configuration data and comparing it with a benchmark digest, and performing signature verification on the identity authentication information of the IoT edge gateway.

[0015] According to some embodiments of this application, the preset threat characteristics include at least one of the following: malicious IP address range, MAC address of the hijacked device, fingerprint of the compromised device, protocol whitelist, preset MQTT topic, injection attack characteristics and path traversal attack characteristics; traffic characteristics include at least one of the following: source IP address, destination port, MAC address, protocol field, MQTT topic and message data.

[0016] According to another aspect of this application, an Internet of Things (IoT) edge gateway is also provided, including the IoT edge gateway security defense system described above.

[0017] The beneficial effects of the technical solutions provided in this application are: This application establishes a first, second, and third line of defense modules, with business traffic flowing through these three layers sequentially. This achieves hierarchical filtering and precise identification. The first line of defense module matches traffic characteristics with preset threat characteristics. Upon successful matching, it identifies the traffic as malicious and executes preset actions, terminating the detection process. This enables rapid identification and filtering of known threats. The second line of defense module performs content-level and behavior-level detection on the business traffic. Content-level detection is performed based on initial content-level detection parameters, while behavior-level detection outputs a behavior-level risk level. The initial content-level detection parameters are adjusted based on the behavior-level risk level, and the content-level hit results are fed back to the behavior-level detection cumulative count. This achieves bidirectional feedback and weighting between content-level and behavior-level detection, enabling the second line of defense module to... It can adaptively adjust detection sensitivity according to changes in the behavior and state of the source device; it blocks and alarms when the content-state detection hits the preset high-risk condition or the behavior-state detection indicates that the source device is in an isolated or blocked state, thus achieving timely interception of service traffic that meets the blocking conditions; otherwise, it sends the service traffic to the third defense module, thus achieving further detection of service traffic that does not hit the preset high-risk condition and whose source device is not in an isolated or blocked state; the third defense module extracts the multi-dimensional feature vector of the service traffic, and determines the malicious probability based on preset weights, preset biases, and multi-dimensional feature vectors. When the malicious probability is greater than or equal to a preset threshold, the service traffic is rejected; otherwise, it is allowed, thus achieving probabilistic fallback detection of service traffic that the first and second defense modules fail to clearly determine. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A schematic diagram of the structure of an IoT edge gateway security defense system according to an embodiment of this application is shown; Figure 2 A schematic diagram of the defense process of the IoT edge gateway security defense system according to an embodiment of this application is shown.

[0020] Explanation of reference numerals in the attached figures: IoT edge gateway security defense system 1; first line of defense module 11; second line of defense module 12; third line of defense module 13; trusted platform module 14; feedback and weight adjustment unit 121. Detailed Implementation

[0021] The present application will now be described in detail with reference to the accompanying drawings and embodiments. Various examples are provided by way of interpretation and not by way of limitation. In fact, those skilled in the art will recognize that modifications and variations can be made to the present application without departing from the scope or spirit thereof. For example, a feature represented or described as part of one embodiment may be used in another embodiment to produce yet another embodiment. Therefore, it is desirable that the present application encompass such modifications and variations that fall within the scope of the appended claims and their equivalents.

[0022] The accompanying drawings illustrate one or more examples of this application. The detailed description uses numerical and alphabetic designations to refer to features in the drawings. Similar or analogous designations in the drawings and description have been used to refer to similar or analogous parts of this application. As used herein, the terms “first,” “second,” “third,” and “fourth,” etc., are used interchangeably to distinguish one component from another and are not intended to indicate the location or importance of a single component.

[0023] The accompanying drawings in the following embodiments clearly and completely describe the technical solutions of this application. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] Figure 1 A schematic diagram of the structure of an IoT edge gateway security defense system according to an embodiment of this application is shown. According to an example embodiment, such as… Figure 1 As shown, the IoT edge gateway security defense system includes a first defense module, a second defense module, and a third defense module.

[0025] The first defense module 11 is configured to receive service traffic, extract traffic features from the service traffic, and match the traffic features with preset threat features. If the match is successful, the traffic is determined to be malicious and a preset action is executed, and the detection is terminated. If the match fails, the service traffic is sent to the second defense module 12.

[0026] According to the example implementation, business traffic refers to the communication data generated between devices and application servers in an IoT environment to complete preset functions. Examples include electricity consumption reported by smart meters, video streams transmitted by cameras, and temperature readings sent by industrial sensors. Attackers may disguise or hijack this business traffic to launch attacks. Attacks mainly fall into three categories: known attacks, which are attacks with clear characteristics, such as Structured Query Language (SQL) injection exploiting known vulnerabilities, cross-site scripting (XSS) attacks, and brute-force attacks using default passwords; abnormal behavior attacks, which are attacks that do not change the content of a single data packet but launch by changing the behavior pattern, such as frequently sending abnormal commands after the device is compromised, or transmitting large amounts of data during inactive periods; and unknown or variant attacks, which are attacks launched using zero-day vulnerabilities or variants of known attacks, whose characteristics are not included in existing rule bases and are difficult to identify through static rules.

[0027] For example, the first defense module 11 is a knowledge base. The knowledge base stores preset threat features in memory and supports runtime hot updates. Specifically, the underlying technology of the knowledge base works through hash comparison, memory loading, and runtime hot updates. Specifically, the knowledge base stores preset threat features in a hash table. After extracting traffic features from business traffic, a hash function maps the traffic features to positions in the hash table, directly comparing them with the preset threat features stored at the corresponding positions. Since the lookup time of the hash table is independent of the data size, the matching time remains essentially unchanged regardless of how many preset threat features are stored in the knowledge base, thereby achieving rapid identification and filtering of known threats.

[0028] For example, the preset threat characteristics include at least one of the following: malicious IP address range, MAC address of the hijacked device, fingerprint of the compromised device, protocol whitelist, preset MQTT (Message Queuing Telemetry Transport) topic, injection attack characteristics and path traversal attack characteristics; traffic characteristics include at least one of the following: source IP address, destination port, MAC address, protocol field, MQTT topic and message data.

[0029] According to the example embodiment, the processing measures of the first defense module 11 for service traffic include: if a match is successful, it is determined to be known malicious traffic, and the first defense module 11 immediately executes a preset action, terminating the detection process. The preset action includes at least one of blocking, alarming, or rate limiting. This matching process is typically completed within 1 millisecond and can block approximately 90% of known threats from the first defense module 11 (i.e., the first line of defense). If the match fails, it indicates that the service traffic does not contain preset threat characteristics, and the first defense module 11 sends the service traffic to the second defense module 12.

[0030] According to the example embodiment, the first defense module 11 is designed to address the problem of rapid identification and filtering of known attacks. The first defense module 11 does not perform reasoning, scoring, or learning; it relies solely on the detection of preset threat features to make a decision, thereby blocking known malicious traffic (i.e., malicious traffic identified by the first defense module 11) before subsequent detection processes, reducing the pressure on the second and third defense modules 12 and 13. The knowledge base continuously expands its coverage of preset threat features, continuously improving the hit rate against known attacks, leaving less suspicious traffic for subsequent defenses (i.e., the second and third defense modules 12 and 13). Through the above embodiment, this application achieves the identification and filtering of known threats through the knowledge base rapid matching mechanism of the first defense module 11, completing matching within 1 millisecond and intercepting approximately 90% of known threats at the first line of defense, significantly reducing the detection pressure on subsequent defenses.

[0031] The second line of defense module 12 is configured to receive service traffic and perform content-level and behavior-level detection on the service traffic. The content-level detection is performed based on the initial content-level detection parameters, and the behavior-level detection outputs the behavior-level risk level. During the detection process, the second line of defense module 12 adjusts the initial content-level detection parameters according to the behavior-level risk level, and at the same time feeds back the content-level hit result to the behavior-level detection cumulative count. If the content-level detection hits the preset high-risk condition, or the behavior-level detection indicates that the source device corresponding to the service traffic is in an isolated or blocked state, the traffic is blocked and an alarm is triggered. Otherwise, the service traffic is sent to the third line of defense module 13.

[0032] According to the example embodiment, after the service traffic passes through the first defense module 11, it reaches the second defense module 12. Specifically, the second defense module 12 is a rule state feedback closed-loop engine. Specifically, the rule state feedback closed-loop engine includes a rule engine and a state machine. The rule engine is used to perform content state detection on the service traffic, and the state machine is used to perform behavior state detection on the service traffic.

[0033] For example, content-state detection is performed based on initial content-state detection parameters. Initial content-state detection parameters refer to detection parameters pre-set before the start of content-state detection, including at least one of multiple detection rules, priority scores, rule weights, and rule judgment thresholds. Multiple detection rules refer to rules registered in the rule engine used to detect logical violations in a single request (a single request message in the business traffic); priority scores refer to the scores corresponding to each detection rule used to determine the traversal order, with higher priority scores indicating more severe detection rules; rule weights refer to the weight of each detection rule in the content-state detection result; and rule judgment thresholds refer to the threshold used to determine whether a single detection rule is hit. During the content-state detection process, the second defense module 12 extracts content-state features from the business traffic. These features include topic, payload, port, protocol fields, etc. Multiple detection rules are traversed in descending order of priority scores to determine the hit detection rules, and the detection rule with the highest priority score among the hit detection rules is taken as the content-state detection result.

[0034] For example, behavioral detection outputs a behavioral risk level. The behavioral risk level refers to the risk level output by behavioral detection based on the behavioral state of the source device, reflecting the current security status of the source device. During behavioral detection, the second defense module 12 extracts behavioral features from the service traffic. These features include device_id (device identifier), source IP address, preceding alarms, timestamps, etc. Within a preset time window, the second defense module 12 accumulates the source device's topic hop count, IP hop count, and preset alarm count, and maintains the transition of the source device's state between new device state, normal state, suspicious state, isolated state, and blocked state. Based on the source device's position during this transition, the behavioral risk level is output. The new device state is the initial state allowing service traffic to pass; the normal state is the passable state; and in the suspicious state, the second defense module 12 sends the service traffic to the third defense module 13.

[0035] For example, content-level detection and behavior-level detection are executed in parallel, forming a feedback loop through mutual cooperation. Specifically, the second defense module 12 adjusts the initial content-level detection parameters according to the behavior-level risk level during the detection process, and simultaneously feeds back the content-level hit result to the behavior-level detection cumulative count. For example, the second defense module 12 includes a feedback weighting unit 121, which is configured to determine a weighting coefficient according to the behavior-level risk level and adjust the initial content-level detection parameters based on the weighting coefficient. The weighting coefficient refers to a coefficient determined according to the behavior-level risk level and used to adjust the initial content-level detection parameters. Those skilled in the art will understand that the feedback weighting unit 121 can be implemented as a computer program or a logic circuit.

[0036] Adjusting the initial content detection parameters based on the behavioral risk level means: the higher the behavioral risk level, the larger the adjustment coefficient, the lower the rule judgment threshold and the higher the rule weight in the initial content detection parameters, thus increasing the sensitivity of content detection to suspicious traffic; the lower the behavioral risk level, the smaller the adjustment coefficient, the higher the rule judgment threshold and the lower the rule weight, thus increasing the allowance rate of normal traffic. The second line of defense module 12 feeding back the content hit results to the behavioral detection cumulative count means: for each detection rule hit by content detection, the hit result is positively fed back to behavioral detection for cumulative counting, assisting in the state transition of behavioral detection.

[0037] For example, the handling measures of the second defense module 12 include the following two scenarios: The first scenario is that content-state detection hits a preset high-risk condition. A preset high-risk condition refers to a detection rule with the highest priority score among the detection rules hit by content-state detection, which is a preset high-risk rule. There are nine preset high-risk rules, specifically: Shell (command interpreter) injection detection rule, used to detect whether the payload of business traffic contains Shell command injection characteristics; SQL injection detection rule, used to detect whether the payload of business traffic contains Structured Query Language (SQL) injection characteristics; Path traversal detection rule, used to detect whether the payload of business traffic contains path traversal attack characteristics; Payload greater than 8KB detection rule, used to detect whether the payload of business traffic is greater than 8KB; MQTT command-type topic detection rule, used to detect whether the MQTT topic of business traffic belongs to the command-type topic; Writing to sensitive topics detection rule, used to detect whether business traffic writes data to preset sensitive topics; High-risk port detection rule, used to detect whether business traffic uses high-risk ports such as Telnet (Teletype Network, remote terminal protocol) and RDP (Remote Desktop Protocol); Unregistered protocol detection rule, used to detect whether business traffic uses unregistered protocols; and Temperature sensor normal reporting detection rule, used to detect whether business traffic is normal reporting data from temperature sensors. When the content-based detection hits a preset high-risk condition, it indicates that the business traffic has an attack that bypasses the first defense module 11 (i.e., the knowledge base) but still violates the detection rules. The second defense module 12 immediately blocks and issues an alarm, outputs a detection result containing a reason, and terminates the transmission to the third defense module 13.

[0038] The second scenario is that the source device corresponding to the behavioral detection indicates that the service traffic is in an isolated or blocked state. When the behavioral detection indicates that the source device is in an isolated or blocked state, it means that the source device has been determined to be an untrusted device. The second defense module 12 immediately blocks and alarms, terminating the transmission to the third defense module 13.

[0039] Through the above embodiments, this application achieves a two-way feedback weighting closed loop between content-state detection and behavior-state detection by parallel execution of content-state detection and behavior-state detection in the second defense module 12, adjusting the initial content-state detection parameters according to the behavior-state risk level, and feeding back the content-state hit result to the behavior-state detection cumulative count. By blocking and alarming when content-state detection hits a preset high-risk condition or when behavior-state detection indicates that the source device is in an isolated or blocked state, timely interception of service traffic that hits the preset high-risk condition is achieved. Otherwise, the service traffic is sent to the third defense module 13, which enables further detection of service traffic that does not hit the preset high-risk condition and whose source device is not in an isolated or blocked state.

[0040] According to the example embodiment, the second defense module 12 also makes anomaly determination based on the device profile baseline of the source device and the group collaborative perception; the device profile baseline is the behavior statistics baseline of the source device within a historical time window; the group collaborative perception refers to the determination of network segment hijacking when multiple source devices in the same network segment simultaneously change their source IP address within a preset time window and the number of changes of a single source device is less than a preset change threshold.

[0041] For example, the profile baseline refers to looking at the individual; different source devices have different behavioral baselines, and it's impossible to define all source devices under a uniform standard. Group collaborative perception refers to looking at the group as a whole. For example, in a network segment hijacking scenario, if the source IP addresses of 18 source devices in a network segment collectively change within 40 seconds, and each source device only changes 3 times (less than the preset hopping threshold of 5), the individual state machines allow it to proceed. While one source device's IP address changing 3 times is normal, if all 18 source devices change 3 times simultaneously, it's judged as a network segment hijacking. For example, each time the state machine updates the behavioral risk level, it feeds back the current behavioral state to the rule engine for weight adjustment; each time the rule engine hits a detection rule, it feeds back the accumulated count to the state machine.

[0042] Through the above embodiments, this application uses the second defense module 12 to combine the device profile baseline of the source device with group collaborative perception to perform anomaly judgment, thereby realizing the anomaly detection of source device behavior from both individual and group dimensions. By rolling the calibration of the device profile baseline over time, different source devices have behavioral baselines adapted to their own behaviors, avoiding misjudgments caused by uniform standards. By judging the situation where multiple source devices in the same network segment simultaneously exhibit source IP address jumps through group collaborative perception, it is possible to detect situations where the behavior of a single source device is normal but the collaboration of multiple source devices is abnormal, effectively identifying network segment hijacking. Through bidirectional feedback weight adjustment between the state machine and the rule engine, content-state detection and behavior-state detection are mutually coordinated and adaptively adjusted, improving the detection capability of the second defense module 12 against behavioral attacks.

[0043] The third line of defense module 13 is configured to receive service traffic, extract multi-dimensional features of the service traffic, and determine the malicious probability of the service traffic based on preset weights, preset biases, and multi-dimensional features. If the malicious probability is greater than or equal to a preset threshold, the service traffic is rejected; otherwise, it is allowed. Those skilled in the art will understand that the third line of defense module 13 can be implemented by a computer program or by hardware such as an integrated circuit, field-programmable gate array, digital signal processor, or neural network processing unit; no limitation is made herein.

[0044] According to the example embodiment, once the service traffic passes through the first defense module 11 and the second defense module 12, it will reach the third defense module 13. The third defense module 13 performs probabilistic detection on unknown traffic or suspicious behavior that the first defense module 11 and the second defense module 12 could not clearly determine. The third defense module 13 uses a logistic regression model, which does not rely on completely known fixed rules, but instead calculates the probability of malice through feature weighting, thereby providing a fallback for identifying abnormal behaviors that are disguised or variable but not yet covered by explicit rules.

[0045] According to the example embodiment, determining the malicious probability of business traffic includes: the second defense module 12 obtains a weighted value through weighted calculation based on logistic regression, and transforms the weighted value through the sigmoid function to obtain the malicious probability; the weighted calculation uses the formula... Where z is the weighting value; x is the multidimensional feature; w is the preset weight corresponding to the multidimensional feature; bias is the preset bias; and the sigmoid function is... Where sigmoid(z) is the probability of malice and e is the natural constant.

[0046] Specifically, x includes: the proportion of special characters (i.e., the percentage of special characters in the payload), including semicolons, vertical bars, AND signs, dollar signs, greater than signs, etc.; whether it is a high-risk port, i.e., whether the business traffic uses high-risk ports such as Telnet or Remote Desktop Protocol (RDP), with a value of 0 or 1; whether it is an MQTT protocol, i.e., whether the business traffic uses Message Queuing Telemetry Transport Protocol (MQTT), with a value of 0 or 1; whether it is an HTTP protocol, i.e., whether the business traffic uses Hypertext Transfer Protocol (HTTP), with a value of 0 or 1; payload_len_norm (payload length normalization value), i.e., normalizing the payload length to between 0 and 1; payload_digit_ratio (payload numeric character proportion), i.e., the percentage of numeric characters in the payload; payload_alpha_ratio (payload alpha character proportion), i.e., the percentage of alpha characters in the payload; and has_shell_meta (whether it contains Shell metacharacters). The payload contains metacharacters of the operating system's command interpreter (Shell), with a value of 0 or 1; has_sql_meta (whether it contains SQL metacharacters), i.e., whether the payload contains metacharacters of Structured Query Language (SQL), with a value of 0 or 1; has_path_traversal (whether it contains path traversal features), i.e. whether the payload contains features of accessing unauthorized directories by using path jumps, with a value of 0 or 1; hour_sin (sine of the timestamp hour), i.e., converting the hours of the timestamp to a sine value; hour_cos (cosine of the timestamp hour), i.e., converting the hours of the timestamp to a cosine value; is_night (whether it is nighttime), with a value of 0 or 1; is_modbus (whether it uses the Modbus protocol), i.e. whether the business traffic uses the Modbus industrial control protocol, with a value of 0 or 1; topic_sensitive (whether the topic is a preset topic), i.e. whether the MQTT topic of the business traffic belongs to a preset topic, with a value of 0 or 1. For example, the sigmoid function flattens any weighted value z to between 0 and 1, and then assigns the value obtained by the sigmoid mathematical function to prob, where prob represents the probability that the request is malicious, that is, the probability of malicious business traffic.

[0047] For example, if the probability of malicious activity is greater than or equal to a preset threshold, the traffic is determined to be malicious and rejected; if the probability of malicious activity is less than the preset threshold, the traffic is determined to be non-malicious and allowed. For example, the preset threshold is 0.50, and when the probability of malicious activity is greater than or equal to 0.80, it is determined to be a serious threat.

[0048] Through the above embodiments, this application uses weighted calculation and the sigmoid function to perform probabilistic detection of multidimensional features, thereby achieving fallback identification of unknown traffic or suspicious behavior that the first defense module 11 and the second defense module 12 could not clearly determine.

[0049] According to some embodiments of this application, the IoT edge gateway security defense system 1 further includes: a trusted platform module 14, configured as a hardware root of trust for the IoT edge gateway, which performs integrity verification on the firmware, bootloader, and kernel of the IoT edge gateway during startup, and performs integrity verification on the configuration data of the security defense system during its operation. The configuration data includes at least one of security key, certificate, initial content state detection parameters, preset weight, and preset bias.

[0050] According to some embodiments of this application, the trusted platform module 14 performs cryptographic operations when a preset security event is triggered; the preset security event includes at least one of the following: model parameters need to be verified for integrity, configuration data is changed, and the IoT edge gateway needs to perform identity authentication; wherein, the model parameters include preset weights and preset biases; the cryptographic operations include at least one of the following: verifying the integrity of the model parameters, calculating a digest of the changed configuration data and comparing it with a benchmark digest, and performing signature verification on the identity authentication information of the IoT edge gateway.

[0051] According to the example embodiment, the Trusted Platform Module 14 refers to a Trusted Platform Module (TPM), a secure hardware chip used to securely store sensitive information such as keys, certificates, and passwords, and to perform integrity measurements and cryptographic operations on the firmware, bootloader, and kernel of the IoT edge gateway. The hardware root of trust refers to the lowest-level, most trusted security starting point implemented in hardware. In this application, the Trusted Platform Module 14 serves as the hardware root of trust for the IoT edge gateway.

[0052] For example, during the startup process of the IoT edge gateway, the trusted platform module 14 performs integrity verification on the firmware, bootloader, and kernel of the IoT edge gateway. Specifically, the trusted platform module 14 calculates digest values ​​for the firmware, bootloader, and kernel respectively, and compares the calculated digest values ​​with the baseline digest values ​​stored in the trusted platform module 14. If the comparison matches, it indicates that the firmware, bootloader, and kernel have not been tampered with, and the IoT edge gateway is allowed to continue starting; if the comparison does not match, it indicates that the firmware, bootloader, and kernel have been tampered with, and startup is refused or an alarm is triggered.

[0053] For example, during the operation of the IoT edge gateway, the trusted platform module 14 performs integrity verification on the configuration data of the IoT edge gateway security defense system 1. The configuration data includes at least one of a security key, certificate, initial content state detection parameters, preset weights, and preset biases. Specifically, the trusted platform module 14 calculates a digest of the configuration data and compares the calculated digest with a baseline digest stored in the trusted platform module 14 to confirm whether the configuration data has been tampered with.

[0054] According to the example embodiment, in order to avoid affecting throughput performance by performing cryptographic operations on all business traffic, the trusted platform module 14 is limited to performing cryptographic operations only when a preset security event is triggered, rather than performing cryptographic operations on every piece of business traffic.

[0055] For example, the preset security event includes at least one of the following two scenarios.

[0056] The first scenario requires integrity verification. Before the third-line defense module 13 loads the model parameters of the logistic regression model, the trusted platform module 14 calculates the SM3 digest of the model parameters and compares it with the baseline digest of the model parameters stored in its protected storage area during deployment: if they match, loading is allowed; if they do not match, the integrity of the model parameters is determined to be compromised, loading is rejected, and an alarm is reported. When the model parameters need to be legally updated, the digital signature of the update package is first verified. If the signature is valid, writing and loading are allowed, and then the trusted platform module 14 re-seals the baseline digest.

[0057] The second scenario involves changes to the configuration data. When the configuration data of the security defense system changes, the trusted platform module 14 calculates a digest of the changed configuration data and compares the calculated digest with the baseline digest of the configuration data stored in the trusted platform module 14 to confirm whether the change in configuration data is legitimate. The configuration data includes at least one of the following: security key, certificate, initial content state detection parameters, preset weight, and preset bias. If the comparison matches, the change in configuration data is legitimate; if the comparison does not match, the configuration data has been tampered with, triggering an alarm.

[0058] Through the above embodiments, this application uses the trusted platform module 14 as the hardware root of trust for the IoT edge gateway. During the startup process, it performs integrity verification on the firmware, bootloader, and kernel, and during the operation process, it performs integrity verification on the configuration data, thereby protecting the IoT edge gateway. By having the trusted platform module 14 perform cryptographic operations when a preset security event is triggered, it avoids all business traffic from undergoing cryptographic operations, thus balancing security and throughput performance.

[0059] Figure 2This illustration shows a schematic diagram of the defense process of an IoT edge gateway security defense system according to an embodiment of this application. Based on an example embodiment, such as… Figure 2 As shown, the defense process of the IoT edge gateway security defense system includes: When the IoT edge gateway security defense system is powered on, the trusted platform module 14 first performs trusted startup, verifying the integrity of the configuration files of the first defense module 11, the second defense module 12, and the third defense module 13; the trusted platform module 14 performs identity authentication on the IoT edge gateway (such as verifying the device certificate and hardware fingerprint of the IoT edge gateway). After successful identity authentication, the IoT edge gateway starts trustedly; after the service traffic is input, it first enters the first defense module 11 for knowledge base matching. If the matching is successful, it is determined to be malicious traffic and a preset action is executed, and the detection is terminated; if the matching fails, the service traffic is sent to the second defense module 12. The second defense module 12 performs content-level detection and behavior-level detection on the service traffic and makes conditional judgments: if a preset high-risk condition is hit, or the source device is in an isolated or blocked state, it blocks and alarms, and the detection is terminated; if no match is found, the service traffic is sent to the third defense module 13. The third defense module 13 performs logistic regression probabilistic detection to determine whether the probability of malice is greater than or equal to a preset threshold. If so, the business traffic is rejected; otherwise, the business traffic is allowed. Figure 2 The specific execution details of each step have been described in detail above and will not be repeated here.

[0060] According to another aspect of this application, an Internet of Things (IoT) edge gateway is also provided, including the IoT edge gateway security defense system 1 described above.

[0061] To verify the technical effectiveness of the IoT edge gateway security defense system 1 provided in this application embodiment, a LINUX operating system was installed on a test computer using a virtual machine, and the IoT edge gateway security defense system 1 was deployed for the following tests. The test devices were configured with either a 4-core processor and 4GB of memory, or a 1-core processor and 1GB of memory, to verify the operational effectiveness of this application on resource-constrained devices.

[0062] According to the example embodiment, the first defense module 11 is a knowledge base that stores preset threat features, including malicious IP address ranges. This test case is used to verify the first defense module 11's ability to detect malicious IP addresses.

[0063] For example, the testing process is as follows: A network request to submit data is initiated to the detection interface of the IoT edge gateway security defense system 1 via a command-line tool. The data sent in the request is in JSON format. The request includes the device identifier (device_id), source IP address (source_ip), protocol (protocol), topic (topic), operation (operation), and payload (payload). Specifically, the device identifier is bad-ip-test, the source IP address is 203.0.113.66, the protocol is MQTT, the topic is sensor / data (sensor data), the operation is publish, and the payload is 23.5. The specific request is as follows: `curl -s -X POST $BASE / inspect \` initiates a network request to submit data. -H "Content-Type: application / json" \ means that the data sent in the request is in JSON format; -d '{ "device_id":"bad-ip-test", where the JSON data is the device ID "bad-ip-test"; "source_ip":"203.0.113.66", the IP address is 203.0.113.66; "protocol":"mqtt", indicating that the communication protocol used is MQTT; "topic":"sensor / data", the topic being transmitted is sensor data; "operation":"publish", indicating that the operation writes data; "payload":"23.5", effective payload 23.5; }' | jq '{decision,reason,final_score,line_results}' The above request is used to initiate a network request to submit data. The data sent in the request is in JSON format. The JSON data has a device ID of bad-ip-test, an IP address of 203.0.113.66, uses the MQTT communication protocol, transmits sensor data as the subject, performs data writing operations, and has a payload of 23.5.

[0064] After receiving the reported data, the IoT edge gateway security defense system 1 returned the following results: text { "request_id": "7785918a129f", the request ID is 7785918a129f; "decision": "deny", the server's final decision is "deny"; "severity": "high", indicating that the risk level of this request is "high"; "reason": "IP 203.0.113.66 \u547d\u4e2d\u9ed1\u540d\u5355", the reason is that the IP address IP 203.0.113.66 is on the blacklist; "total_latency_ms": 0.23, total latency 0.23; "final_score": 1.0, indicating that the final risk score requested is 1.0; "line_results": [The detection results are as follows;] { "line": "first_line", the first rule; "decision": "deny", the decision is "to refuse". "severity": "high", indicating a high risk level; "reason": "IP 203.0.113.66 \u547d\u4e2d\u9ed1\u540d\u5355", the IP is on the blacklist; "score": 1.0, indicating a risk score of 1.0; "matched_rules": [], indicates that the matched rules are empty; "latency_ms": 0.198, latency 0.198 milliseconds } ] } The request ID is 7785918a129f. The server's final decision was to reject the request. The risk level of this request is high because the IP address 203.0.113.66 is on the blacklist. The total time was 0.23 milliseconds, and the final risk score of the request was 1.0. The detection results are as follows: The first rule decision was to reject the request, the risk level was high, the reason was that the IP was on the blacklist, the risk score was 1.0, the matched rule was empty, and the delay was 0.198 milliseconds.

[0065] For example, as can be seen from the above test case, the first defense module 11 can complete the detection of malicious IP addresses and make a rejection decision within 0.23 milliseconds, which verifies the efficiency of the first defense module 11.

[0066] As is known from common technical knowledge, this application can be implemented through other embodiments that do not depart from its spirit or essential characteristics. Therefore, the disclosed embodiments described above are merely illustrative in all respects and are not the only ones. All modifications within the scope of this application or equivalent to this application are included in this application.

Claims

1. A security defense system for an Internet of Things (IoT) edge gateway, characterized in that, include: The first line of defense module is configured to receive service traffic, extract traffic features from the service traffic, and match the traffic features with preset threat features; If a match is found, the traffic is identified as malicious and a pre-defined action is executed, at which point the detection is terminated. If a match fails, the service traffic is sent to the second line of defense module; The second defense module is configured to receive the service traffic, perform content-state detection and behavior-state detection on the service traffic, wherein the content-state detection is performed based on initial content-state detection parameters, and the behavior-state detection outputs a behavior-state risk level. During the detection process, the second defense module adjusts the initial content detection parameters according to the behavioral risk level, and feeds back the content hit result to the behavioral detection cumulative count. If the content detection hits the preset high-risk condition, or the behavioral detection indicates that the source device corresponding to the service traffic is in an isolated or blocked state, the traffic is blocked and an alarm is triggered. Otherwise, the service traffic is sent to the third defense module. The third defense module is configured to receive the service traffic, extract multi-dimensional features of the service traffic, determine the malicious probability of the service traffic based on preset weights, preset biases and the multi-dimensional features, and if the malicious probability is greater than or equal to a preset threshold, then reject the service traffic; otherwise, allow it to pass.

2. The IoT edge gateway security defense system according to claim 1, characterized in that, The second defense module includes: The feedback adjustment unit is configured to determine an adjustment coefficient based on the behavioral risk level and adjust the initial content detection parameters based on the adjustment coefficient; wherein the initial content detection parameters include at least one of multiple detection rules, priority scores, rule weights, and rule judgment thresholds.

3. The IoT edge gateway security defense system according to claim 2, characterized in that, The content-state detection includes: traversing the multiple detection rules in descending order of priority score, determining the hit detection rules, and taking the detection rule with the highest priority score among the hit detection rules as the detection result of the content-state detection.

4. The IoT edge gateway security defense system according to claim 1, characterized in that, The behavioral detection includes: Within a preset time window, accumulate the number of topic jumps, IP jumps, and alarms of a preset level for the source device corresponding to the service traffic, and maintain the migration of the source device's state between new device state, normal state, suspicious state, the isolated state, and the blocked state; The new device status is the initial state that allows the service traffic to pass through, the normal state is the pass state, and in the suspicious state, the second defense module sends the service traffic to the third defense module.

5. The IoT edge gateway security defense system according to claim 1, characterized in that, The second defense module also performs anomaly detection based on the device profile baseline of the source device and group collaborative perception; The device profile baseline is the statistical baseline of the source device's behavior within a historical time window; the group collaborative perception refers to the determination of network segment hijacking when multiple source devices in the same network segment simultaneously experience source IP address jumps within a preset time window and the number of jumps for a single source device is less than a preset jump threshold.

6. The IoT edge gateway security defense system according to claim 1, characterized in that, Determining the malicious probability of the service traffic includes: obtaining a weighted value through weighted calculation, and transforming the weighted value through the sigmoid function to obtain the malicious probability; The weighted calculation uses the formula Where z is the weighting value; x is the multidimensional feature; w is the preset weight corresponding to the multidimensional feature; and bias is the preset bias. The sigmoid function is Wherein, sigmoid(z) is the probability of malice; e is the natural constant.

7. The IoT edge gateway security defense system according to claim 1, characterized in that, Also includes: The trusted platform module is configured as the hardware root of trust for the IoT edge gateway. During the startup process of the IoT edge gateway, it performs integrity verification on the firmware, bootloader, and kernel. During its operation, it performs integrity verification on the configuration data of the security defense system. The configuration data includes at least one of the following: security key, certificate, initial content state detection parameters, preset weight, and preset bias.

8. The IoT edge gateway security defense system according to claim 7, characterized in that, The trusted platform module performs cryptographic operations when a preset security event is triggered. The preset security events include at least one of the following: model parameters needing integrity verification, configuration data changing, and the IoT edge gateway needing identity authentication; wherein, the model parameters include the preset weights and the preset biases; The cryptographic operations include at least one of the following: performing integrity verification on the model parameters, calculating a digest of the changed configuration data and comparing it with a benchmark digest, and performing signature verification on the identity authentication information of the IoT edge gateway.

9. The IoT edge gateway security defense system according to claim 1, characterized in that, The preset threat characteristics include at least one of the following: malicious IP address range, MAC address of hijacked device, fingerprint of compromised device, protocol whitelist, preset MQTT topic, injection attack characteristics and path traversal attack characteristics; The traffic characteristics include at least one of the following: source IP address, destination port, MAC address, protocol field, MQTT topic, and message data.

10. An Internet of Things (IoT) edge gateway, characterized in that, The IoT edge gateway security defense system includes any one of claims 1-9.