Control instruction detection code scanning method
By deploying SIP and RTP proxy modules in the video surveillance system, using whitelist and in-depth content analysis to identify and handle malicious instructions, the problem of ineffective blacklist mechanism recognition in the existing technology is solved, and the security coordination of the video surveillance system is achieved Regularity guarantee.
Patent Information
- Application Number
- CN202411293401.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-11-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology relies on the blacklist mechanism to effectively identify and handle dynamic or hidden malicious control instructions, making it difficult to guarantee the security and compliance of the video surveillance system.
Deploy SIP proxy modules and RTP proxy modules between the device and the platform side, identify legal instructions through the whitelist mechanism, conduct in-depth content analysis if it is not legal, trigger alarm mechanisms, and implement one-way media streams to prevent data leakage and unauthorized access.
Through whitelisting and in-depth content analysis mechanisms, ensure that only legal instructions are executed, enhance the system's security response capabilities, prevent data leakage and unauthorized access, and ensure that the security of video surveillance data and control instructions complies with standards and specifications.
Smart Images

Figure CN119011281A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of instruction monitoring, and in particular to a control instruction detection scanning method. Background Art
[0002] GB 28181 is a national standard in China, mainly used for the network transmission protocol of video surveillance systems. GB28181 control instructions refer to various instructions and commands for controlling and managing video surveillance equipment (such as cameras) under this standard. Under the GB 28181 standard, the SIP proxy module can process device control instructions in the video surveillance system, which is used to process the transmission of real-time media streams and ensure the real-time transmission of audio and video data. The RTP proxy module ensures that the real-time video stream in video surveillance can be transmitted smoothly, while in SIP and RTP traffic, ensuring the security and compliance of messages is a key issue, especially when processing control instructions, malicious instructions and potential data entrainment must be prevented to ensure the security of devices and platforms. Many systems now rely on static blacklists or basic filtering rules and cannot effectively identify and process dynamic or hidden malicious instructions. Summary of the invention
[0003] The purpose of the present invention is to provide a control instruction detection scanning method, aiming to solve the problem that the prior art relies on a blacklist mechanism and cannot effectively identify malicious instructions.
[0004] The present invention is implemented in this way. The present invention provides a control instruction detection code scanning method, comprising: Deploy the SIP proxy module and RTP proxy module on the gateway device between the device end and the platform end; The SIP proxy module receives a SIP message from the device end, and parses the instruction type of the SIP message to obtain the instruction type of the SIP message, and identifies the instruction type of the SIP message according to a preset whitelist to determine whether the instruction type of the SIP message exists in the whitelist; If the instruction type of the SIP message exists in the whitelist, the SIP message is allowed to be proxy-transmitted through the SIP proxy module to be delivered to the target device end; wherein the target device end is the device end to which the SIP message is to be delivered; If the instruction type of the SIP message does not exist in the whitelist, the SIP message is subjected to deep content analysis processing, and the result of the deep content analysis processing is used to detect whether there is potential data entrainment in the SIP message. If potential data entrainment is detected, an alarm mechanism is triggered; if no potential data entrainment is detected, the SIP message is allowed to be forwarded by the SIP proxy module so as to be delivered to the target device end; The RTP proxy module is instructed to block the RTP packets originating from the platform end and sent to the device end, so as to realize a one-way media flow from the device end to the platform end.
[0005] The present invention provides a control instruction detection code scanning method, which has the following beneficial effects: The present invention deploys a SIP proxy module and an RTP proxy module. The SIP proxy module identifies the SIP message instruction type according to a preset whitelist and determines whether it is allowed. If it is allowed, it is forwarded to the target device end. If it is not allowed, a deep content analysis is performed. If it is unsafe, an alarm mechanism is triggered. If it is safe, the SIP message is allowed to be forwarded to the target device end. The RTP proxy module is used to realize a one-way media stream. Through the whitelist mechanism and the deep content analysis, it is ensured that only legal instructions are executed. The one-way media stream control can prevent data leakage or unauthorized access. The deep content analysis and the alarm mechanism can timely discover and respond to potential security threats, enhance the response capability of the system, ensure that the system complies with security standards and specifications when processing video surveillance data and control instructions, and solve the problem that malicious instructions cannot be effectively identified by relying on the blacklist mechanism in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0006] Figure 1 It is a schematic diagram of the steps of a control instruction detection code scanning method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0007] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0008] The implementation of the present invention is described in detail below in conjunction with specific embodiments.
[0009] Reference Figure 1 As shown, a preferred embodiment of the present invention is provided.
[0010] The present invention provides a control instruction detection code scanning method, comprising: S1: Deploy the SIP proxy module and RTP proxy module on the gateway device between the device end and the platform end; S2: enabling the SIP proxy module to receive the SIP message from the device end, and parsing the instruction type of the SIP message to obtain the instruction type of the SIP message, and identifying the instruction type of the SIP message according to a preset whitelist to determine whether the instruction type of the SIP message exists in the whitelist; S3: If the instruction type of the SIP message exists in the whitelist, the SIP message is allowed to be proxy-transmitted through the SIP proxy module to be delivered to the target device end; wherein the target device end is the device end to which the SIP message is to be delivered; S4: if the instruction type of the SIP message does not exist in the whitelist, perform deep content analysis on the SIP message, and detect whether there is potential data entrainment in the SIP message through the result of the deep content analysis. If potential data entrainment is detected, trigger an alarm mechanism; if no potential data entrainment is detected, allow the SIP message to be forwarded by the SIP proxy module so as to be delivered to the target device end; S5: Instruct the RTP proxy module to block the RTP packets sent from the platform to the device, so as to realize a one-way media flow from the device to the platform.
[0011] Specifically, GB 28181 is a national standard of China, which is mainly used for the network transmission protocol of video surveillance systems. GB 28181 control instructions refer to various instructions and commands for controlling and managing video surveillance equipment (such as cameras) under this standard. Under the GB 28181 standard, the SIP proxy module can process device control instructions in the video surveillance system, which is used to process the transmission of real-time media streams and ensure the real-time transmission of audio and video data.
[0012] Specifically, in step S1 of the embodiment provided by the present invention, the SIP (Session Initiation Protocol) proxy module is a network device or software for processing SIP protocol messages, which are used to establish, maintain and terminate multimedia sessions (such as voice calls, video conferences, etc.).
[0013] More specifically, the functions that the SIP proxy module can perform include: receiving and forwarding SIP requests and responses to ensure that the communicating parties can establish a session; processing registration requests from user devices and mapping the user location to its current IP address; determining the routing path of the call, including forwarding and redirection in the SIP network; checking and verifying the legitimacy of SIP messages to ensure the security of communications.
[0014] Specifically, the RTP (Real-time Transport Protocol) proxy module is used to process RTP data packets, which carry real-time audio and video data.
[0015] More specifically, the functions that the RTP proxy module can perform include: receiving RTP data packets from the sender and forwarding them to the receiver; managing the transmission of media streams, which may include caching, sorting, and synchronization; ensuring that the bandwidth requirements of the media streams are met and optimizing the traffic to improve transmission efficiency.
[0016] Specifically, a gateway device is a device or system in a network that is responsible for communication and protocol conversion between different networks. It can connect different communication networks or protocols to achieve data exchange.
[0017] More specifically, the functions that a gateway device can perform include: converting one protocol or data format into another protocol or data format; connecting different types of networks (for example, a VoIP network and a traditional telephone network); and processing data traffic in and out of the gateway to ensure the normal operation of the network.
[0018] More specifically, the SIP proxy module and the RTP proxy module are deployed on the gateway device to support the SIP and RTP protocols. The gateway device acts as an intermediary to connect the device side and the platform side to ensure the effective transmission of SIP messages and RTP streams. The SIP proxy module is responsible for processing the control signaling (SIP messages) for establishing and managing sessions, such as call requests, registrations, and session management. The RTP proxy module is responsible for processing the actual media streams (RTP data packets), such as audio and video data, to ensure the transmission of real-time media streams. The gateway device integrates the functions of these two modules to provide a complete solution to handle the entire process of voice and video communication, including the transmission of signaling and media streams. Through this deployment, the gateway device can effectively manage and optimize the communication between the device side and the platform side to ensure the quality and reliability of voice and video sessions.
[0019] Specifically, in steps S2 and S3 of the embodiment provided by the present invention, the SIP proxy module is configured to listen to a specific port and receive SIP messages from the device end, which involves network settings and protocol configurations to ensure that the proxy module can correctly receive and parse SIP traffic, and ensure that the SIP proxy module can capture and process all SIP messages sent from the device end, laying the foundation for subsequent processing.
[0020] More specifically, the received SIP message is parsed to extract the instruction type in the message. The SIP message usually includes the request type (such as INVITE, BYE, REGISTER) and other related information (such as header field, content). The parsing process includes identifying the SIP request line, header field and message body, extracting the key instruction type, identifying and extracting the instruction type in the SIP message, and preparing for the whitelist matching of the instruction type.
[0021] More specifically, a whitelist is configured in the SIP proxy module. The whitelist contains a list of allowed instruction types, such as "INVITE", "BYE", etc. The parsed instruction type is compared with the items in the whitelist to determine whether the instruction type exists in the whitelist, thereby achieving effective management of SIP message instructions and ensuring that only instruction types that meet predefined standards can pass. This improves the security and controllability of the system.
[0022] More specifically, if the instruction type of the SIP message exists in the whitelist, the SIP message is allowed to be forwarded to the target device through the SIP proxy module. If the instruction type is not in the whitelist, further processing (such as deep content analysis) is performed to confirm its security, ensuring that legitimate SIP messages can be forwarded smoothly, improving the processing efficiency of the system, and conducting further security checks on messages that do not meet the standards to enhance network security protection.
[0023] It can be understood that these steps ensure that the SIP proxy module can effectively process and forward SIP messages, while filtering out instruction types that do not meet the requirements through the whitelist mechanism, thereby improving the security and reliability of the system. Through accurate message parsing and whitelist matching, unauthorized instructions can be prevented from affecting the normal operation of the system.
[0024] Specifically, in step S4 of the embodiment provided by the present invention, if the instruction type of the SIP message is not in the whitelist, the SIP proxy module will start deep content analysis processing, which includes an in-depth inspection of the content of the SIP message to identify potential security threats or abnormal data. By comprehensively reviewing the message, the system's ability to detect non-compliant or malicious messages is improved.
[0025] More specifically, deep packet inspection technology (such as feature matching, pattern recognition, content analysis, etc.) is applied to analyze the data part of the SIP message to find potential data entrainment or hidden information. Security policies and rules are used to identify and classify potential data entrainment. This can detect abnormal data or hidden information in the SIP message and enhance the security of the system.
[0026] More specifically, if potential data smuggling is detected, the alarm mechanism is triggered, the administrator is notified or automated response measures are initiated (such as isolating messages, blocking communications, etc.), the alarm information is recorded and logs are generated for subsequent analysis, and potential security threats are responded to quickly to prevent possible attacks or data leaks.
[0027] More specifically, if deep content analysis does not detect potential data smuggling, the SIP message is allowed to continue to be forwarded through the SIP proxy module, and necessary message processing (such as protocol conversion) is performed to ensure that the message can be successfully delivered to the target device end, ensure that legal and secure SIP messages can be successfully delivered, and maintain the normal function of the system and smooth communication.
[0028] Specifically, in step S5 of the embodiment provided by the present invention, a flow direction control strategy is configured in the RTP proxy module, specifying that only RTP packets from the device end to the platform end are allowed to pass, while RTP packets from the platform end to the device end are blocked. The setting includes checking the source address and destination address of the RTP stream, and deciding whether to block it according to the flow direction strategy, ensuring that the system only transmits one-way media streams, from the device end to the platform end, and does not allow media streams in the opposite direction.
[0029] More specifically, the RTP proxy module continuously monitors all passing RTP packets and identifies their source and destination addresses. For RTP packets sent from the platform to the device, the proxy module blocks these packets according to preset strategies to prevent them from reaching the device. It monitors the RTP stream in real time and implements blocking to ensure that only one-way media streams are transmitted, thereby improving the system's flow control capabilities.
[0030] More specifically, when the RTP proxy module blocks the RTP packet from the platform side, the corresponding log information is recorded, including timestamp, source and destination addresses, etc. If necessary, an alarm mechanism can be set to remind the administrator when abnormal traffic or policy violations are detected, and provide detailed operation records to facilitate tracking and analysis of the effectiveness of traffic control and to respond quickly to abnormal situations.
[0031] More specifically, optimize the performance of the RTP proxy module to ensure that it can effectively block unnecessary RTP packets even under high traffic conditions, perform load management, avoid performance degradation of the proxy module due to excessive blocking operations, improve the processing efficiency of the RTP proxy module, and ensure stable performance and reliable traffic control under high load conditions.
[0032] It can be understood that by blocking unnecessary reverse RTP packets, one-way media flow from the device end to the platform end is ensured, thereby meeting specific communication requirements or security policies, preventing unauthorized media flow from returning to the device end, reducing the risk of data leakage or attack, and being able to accurately control the direction of the media flow, improve the management and regulation capabilities of the communication process, reduce unnecessary data transmission, and improve the utilization efficiency of network resources.
[0033] The present invention provides a control instruction detection code scanning method, which has the following beneficial effects: The present invention deploys a SIP proxy module and an RTP proxy module. The SIP proxy module identifies the SIP message instruction type according to a preset whitelist and determines whether it is allowed. If it is allowed, it is forwarded to the target device end. If it is not allowed, a deep content analysis is performed. If it is unsafe, an alarm mechanism is triggered. If it is safe, the SIP message is allowed to be forwarded to the target device end. The RTP proxy module is used to realize a one-way media stream. Through the whitelist mechanism and the deep content analysis, it is ensured that only legal instructions are executed. The one-way media stream control can prevent data leakage or unauthorized access. The deep content analysis and the alarm mechanism can timely discover and respond to potential security threats, enhance the response capability of the system, ensure that the system complies with security standards and specifications when processing video surveillance data and control instructions, and solve the problem that malicious instructions cannot be effectively identified by relying on the blacklist mechanism in the prior art.
[0034] Preferably, the step of performing deep content analysis on the SIP message and detecting whether there is potential data entrainment in the SIP message based on the result of the deep content analysis includes: S41: presetting a data pattern library storing keywords; S42: Based on the preset data pattern library, the SIP message is subjected to content detection processing by using a regular expression and a pattern matching algorithm to detect whether there is content in the SIP message that matches a keyword in the data pattern library; S43: If the detection result is existence, the content in the SIP message that matches the keyword in the data pattern library is used as the potential data entrainment; S44: If the detection result is that the potential data is not present, it is determined that the potential data is not present in the SIP message.
[0035] Specifically, a data pattern library that stores keywords is created and configured. The library includes common malicious data patterns, keywords, and regular expressions. The pattern library should be continuously updated to reflect new threats and data patterns, thereby improving detection accuracy by providing a basic data set for matching and identifying potential data entrainment in SIP messages.
[0036] More specifically, a data pattern library is a database that stores specific patterns, keywords, or features that are used to identify and detect specific data patterns or malicious content. For example, a data pattern library may include specific malicious code snippets, sensitive data identifiers, or formatting rules.
[0037] More specifically, regular expressions and pattern matching algorithms are used to analyze the SIP message content, compare the SIP message content with keywords and patterns in the data pattern library, identify whether there are matches, and efficiently detect whether the SIP message contains suspicious or potentially malicious data, thereby enhancing content analysis capabilities.
[0038] More specifically, if content matching keywords in the data pattern library is detected in the SIP message, it will be marked as potential data inclusion, and the matching content and its location will be recorded for further analysis and processing, so as to identify and classify potential data inclusion and provide a basis for subsequent security response.
[0039] More specifically, if no content matching the keywords in the data pattern library is detected, it is determined that there is no potential data entrainment in the SIP message, and the SIP message is allowed to continue to be delivered, provided that no security issues are found, ensuring that normal message traffic is not disturbed unnecessarily, while avoiding false alarms and maintaining the normal operation and efficiency of the system.
[0040] More specifically, a regular expression (Regular Expression, or Regex for short) is a tool for describing and matching string patterns. It allows users to define complex search patterns to match specific formats or content in text. Regular expressions can be used to find strings that meet specific rules in text, such as email addresses, phone numbers, or malicious code patterns.
[0041] More specifically, a pattern matching algorithm is an algorithm used to find specific patterns in text or data streams. Common pattern matching algorithms include KMP (Knuth-Morris-Pratt), Boyer-Moore, and regular expression matching algorithms, which can effectively detect whether there is content that meets the predetermined pattern in the data and support fast search and matching.
[0042] More specifically, various data patterns and keywords are defined in the data pattern library, such as the format of sensitive information, common attack features, etc., and corresponding regular expressions are created for each pattern. Regular expressions can describe the structure and features of these patterns so that they can be matched in text. These regular expressions are applied to the content of SIP messages using a regular expression engine or pattern matching algorithm. The system scans the message content to find parts that match the regular expression. After detecting a match, these parts are marked as potential data entrainment, and their nature is further analyzed or corresponding security measures are taken.
[0043] Preferably, after the step of triggering an alarm mechanism if potential data entrainment is detected, the method further comprises: S45: Logging the SIP message to obtain a log of the SIP message; wherein the log includes a timestamp, a source IP address, a target IP address, a command type, and potential data entrainment content of the SIP message; S46: Send the potential data entrainment and record log of the SIP message to the security audit system for archiving and subsequent analysis.
[0044] Specifically, it records detailed information of SIP messages, including timestamp, source IP, destination IP, instruction type, and potential data inclusion content detected, and generates log files or record entries containing this information for subsequent processing, providing detailed event records to facilitate tracking and analysis of potential security issues and ensure comprehensive audit and analysis capabilities.
[0045] More specifically, the recorded log information and potential data inclusion content are sent to the security audit system, and the transmission process may include encryption and data integrity checks to ensure that the information is not tampered with or lost during transmission.
[0046] It is understandable that centralizing all relevant information into the security audit system facilitates archiving, analysis and further security response, supports timely detection and handling of security threats, and improves the security and responsiveness of the overall system. In the security audit system, the received log information and potential data entrainment are archived for long-term preservation and management, and the data is deeply analyzed to identify potential attack patterns, abnormal behaviors or system vulnerabilities.
[0047] Preferably, the whitelist and the data pattern library have a periodic updating mechanism, and the periodic updating mechanism is used to periodically update the instruction types of the SIP messages stored in the whitelist and the keywords stored in the data pattern library.
[0048] Specifically, the instruction types in the whitelist are checked and updated regularly, for example, weekly, monthly, or as needed. Updates include adding new legitimate instruction types, deleting obsolete or no longer needed instruction types, and adjusting the rules of existing instruction types. The update process can be completed through automated scripts or manual review to ensure the accuracy and timeliness of the whitelist.
[0049] More specifically, keeping the whitelist up to date ensures that the system can handle newly added legitimate SIP instruction types while avoiding false positives or negatives, improving the flexibility and adaptability of the system so that it can respond to new business needs or protocol changes.
[0050] Specifically, the keywords and patterns in the data pattern library are regularly reviewed and updated. For example, updates are made based on emerging threat intelligence, attack patterns, or security research results. Updates may include adding new malicious data patterns, modifying existing patterns to improve detection accuracy, and deleting outdated or invalid patterns. The update process can be completed by regularly obtaining data from security intelligence sources, using machine learning algorithms for pattern recognition, or manually adding and adjusting rules.
[0051] More specifically, improve the detection capabilities of the data pattern library to ensure that the latest security threats and attack patterns can be identified, enhance the system's detection capabilities for new types of attacks and data entrainment, and reduce false positives and false negatives.
[0052] Preferably, the control instruction detection scanning method further comprises deploying a management interface data-connected to the SIP proxy module and the RTP proxy module, wherein the management interface is used for external module interaction, so as to view the detection results of the SIP proxy module and the RTP proxy module in real time, configure scanning rules, and adjust system parameters through the module interaction.
[0053] Specifically, an interface for data interaction with the SIP proxy module and the RTP proxy module is deployed, allowing an external system or administrator to manage and monitor these modules in real time.
[0054] More specifically, the management interface establishes a data connection with the SIP proxy module and the RTP proxy module, usually through network protocols (such as HTTP, HTTPS, TCP / IP, etc.), to ensure the stability and security of the connection, avoid loss or leakage during data transmission, and realize real-time data access and management of the SIP proxy module and the RTP proxy module, providing a unified management platform to simplify the operating process and improve management efficiency.
[0055] More specifically, the real-time detection results of the SIP proxy module and the RTP proxy module are accessed through the management interface, including the currently processed SIP messages, RTP stream data, detected potential threats, etc., and the module status, statistics and history are displayed for the administrator to analyze, allowing the administrator to monitor the system operation status and detection results in real time, quickly respond to potential security issues, improve the system's visual management capabilities, and enable the administrator to better understand and control the operation of the system.
[0056] More specifically, scanning rules are modified and configured through the management interface, such as setting new whitelist items, updating the data pattern library, adjusting rule priorities, etc. The configuration process can include adding, deleting or modifying rules to adapt to new business needs or security policies, providing flexible rule management functions, enabling the system to adapt to changing environments and requirements, and enhancing the system's adaptability and customization capabilities to meet different security needs.
[0057] More specifically, the system parameters of the SIP proxy module and the RTP proxy module, such as processing capacity, timeout period, log level, etc., are adjusted through the management interface. The parameter adjustment can take effect in real time or at the next system restart, optimizing system performance, ensuring stable operation of the module under different loads, and improving the flexibility and configurability of the system to meet different scenarios and needs.
[0058] It is understandable that the management interface provides a centralized management platform through data connection with the SIP proxy module and the RTP proxy module, making it more efficient and flexible to view detection results in real time, configure scanning rules, and adjust system parameters. This not only improves the controllability of the system, but also enhances the ability to respond to security incidents.
[0059] Preferably, when the number of SIP messages received by the SIP proxy module within a unit time reaches a preset standard, the SIP proxy module is switched to a preset multi-channel parallel node processing mode, and the SIP message is processed in a multi-channel parallel node manner by the SIP proxy module switched to the multi-channel parallel node processing mode; When the SIP proxy module is in the multi-channel parallel node processing mode, the step of performing multi-channel parallel node processing on the SIP message by the SIP proxy module switched to the multi-channel parallel node processing mode includes: S61: constructing a plurality of parallel virtual channels by switching the SIP proxy module to the multi-channel parallel node processing mode, and constructing a plurality of processing levels based on each of the virtual channels, making the processing levels overlap each of the parallel virtual channels, and constructing virtual nodes respectively in the areas where the processing levels overlap each of the parallel virtual channels; S62: According to the setting order of each processing level on each virtual channel, the whitelist is segmented to divide the whitelist into secondary whitelists corresponding to each processing level; wherein each secondary whitelist has a list weight corresponding to the setting order of the virtual channels, and the secondary whitelist assigned to the virtual channel with an earlier setting order has a higher list weight, and the list weight is used to describe the occurrence probability of the instruction type in the secondary whitelist; S63: allocating each of the SIP messages to each of the virtual channels in sequence according to the parallel order of each of the virtual channels, and causing each of the virtual nodes in each of the virtual channels to detect and process the allocated SIP messages in sequence; S64: If the detection result of the virtual node on the SIP message is that the SIP message does not appear in the secondary whitelist, the SIP message is transmitted to the subsequent virtual node in the virtual channel for detection; S65: If the detection result of the virtual node on the SIP message is that it appears in the secondary whitelist, the SIP message is directly detected by the SIP proxy module; S66: If the detection results of all the virtual nodes for the SIP message are that the SIP message does not appear in the secondary whitelist, the SIP message is subjected to deep content analysis processing by multi-channel parallel node processing, and the result of the deep content analysis processing is used to detect whether there is potential data entrainment in the SIP message.
[0060] Specifically, when the number of SIP messages received by the SIP proxy module per unit time reaches a preset standard, the system will switch to multi-channel parallel node processing mode, which aims to improve processing efficiency and responsiveness and enhance system performance through parallel processing.
[0061] More specifically, several parallel virtual channels are created, each of which can process SIP messages independently. Several processing levels are established on each virtual channel, and these levels overlap with the virtual channels. In the overlapping area, a virtual node is built for each processing level to process SIP messages, thereby achieving parallel processing capabilities and improving the system's ability to process a large number of SIP messages. The overlapping design of each virtual channel and processing level allows for more fine-grained detection and analysis.
[0062] More specifically, according to the processing hierarchy order on the virtual channel, the whitelist is segmented and processed to generate multiple secondary whitelists, and a weight is assigned to each secondary whitelist, and the weight value is related to the setting order of the virtual channels. The virtual channels with earlier orders are assigned higher weights of secondary whitelists. The list weight is used to describe the probability of occurrence of instruction types in the secondary whitelist. Secondary whitelists with higher weights are more likely to contain common instruction types, which improves the adaptability and accuracy of the whitelist. By assigning secondary whitelists with different weights in order, the system can more accurately identify legal instructions.
[0063] It can be understood that according to the probability of appearance in the whitelist, the whitelist with a high probability of appearing will be given priority to perform a round of detection on multiple SIP messages. If the SIP message fails, the whitelist with the next level of probability of appearing will be arranged to perform a second round of detection on the SIP message. This design of batch multi-channel detection can improve the detection efficiency, so that the SIP messages that can pass the whitelist can pass the detection as soon as possible, thereby improving the detection efficiency.
[0064] More specifically, according to the parallel order of the virtual channels, the received SIP messages will be distributed to each virtual channel in turn, and the virtual nodes in each virtual channel will detect and process the distributed SIP messages to achieve parallel processing of SIP messages, reduce the load of a single channel, improve the overall processing efficiency, improve the processing capacity of the system, and be able to process more SIP messages at the same time.
[0065] More specifically, the virtual node detects the SIP message and checks whether it appears in the secondary whitelist. If the SIP message does not appear in the secondary whitelist, the message is passed to the subsequent processing steps in the virtual channel (such as further detection or alarm processing), thereby improving the processing capabilities of SIP messages that do not comply with the whitelist, allowing the system to further detect or process potential abnormal messages, ensuring that the system can handle both legitimate and abnormal messages, and improving overall security and reliability.
[0066] It is understandable that the multi-channel parallel node processing mode improves the processing efficiency and system responsiveness of SIP messages through the parallel design of virtual channels and processing levels. By segmenting the whitelist and distributing messages, the system can more effectively identify legitimate instructions and potential threats, thereby improving security protection capabilities.
[0067] More specifically, for the subsequent deep content analysis processing, the above-mentioned multi-channel parallel node processing method is also used to improve the detection efficiency.
[0068] Preferably, it also includes deploying a pre-trained instruction behavior analysis model based on the gateway device, and performing feature analysis processing on the SIP message received by the SIP proxy module through the instruction behavior analysis model to obtain a feature tag for describing the reception status of the SIP proxy module corresponding to the SIP message, and the feature tag is used to perform abnormal monitoring on the SIP message received by the SIP proxy module.
[0069] Specifically, the SIP proxy module needs to conduct in-depth analysis of the received SIP messages to monitor abnormal behavior. To this end, the system deploys a pre-trained instruction behavior analysis model based on the gateway device, performs feature analysis on the received SIP messages, and generates feature tags to describe the receiving status and perform abnormality monitoring.
[0070] More specifically, a pre-trained instruction behavior analysis model is deployed on the gateway device. The model is trained with a large amount of historical data and can identify normal and abnormal SIP message behavior patterns. The trained model is integrated into the system and the interactive interface with the SIP proxy module is configured to receive and analyze SIP messages in real time. The model learns instruction behaviors in historical data and has the ability to identify abnormal behaviors, provide automated analysis capabilities, reduce human intervention, and improve the intelligence level of the system.
[0071] More specifically, the instruction behavior analysis model extracts features from each received SIP message, analyzes key information such as the content, format, and behavior pattern of the message, and generates feature tags that describe the status of SIP message reception based on the extracted features. Feature tags can include multi-dimensional information such as the type, frequency, source, and target of the message. Extracting rich feature information helps to fully understand the behavior pattern of SIP messages. The generation of feature tags enables the system to quickly classify and identify abnormal messages, improving the accuracy and efficiency of monitoring.
[0072] More specifically, the generated feature tags are used to monitor SIP messages in real time to detect whether there are abnormal behaviors, such as abnormal message frequency, instruction types that do not meet expectations, etc. When abnormal feature tags are detected, the corresponding alarm mechanism is triggered to prompt the administrator to conduct further analysis or take action, thereby realizing automated abnormal monitoring of SIP messages, being able to quickly respond to abnormal situations, improve the security and reliability of the system, and reduce the impact of potential attacks on the system.
[0073] It is understandable that by deploying the pre-trained command behavior analysis model, the system can perform feature analysis on SIP messages and generate feature tags for describing the receiving status. These tags can help the system perform real-time anomaly monitoring, effectively identify and process abnormal SIP messages, thereby enhancing the security and intelligent monitoring capabilities of the system.
[0074] Preferably, the pre-training step of the instruction behavior analysis model includes: S71: Preparing a long short-term memory network model in advance; wherein the long short-term memory network model includes an input layer, an LSTM layer, a fully connected layer and an output layer; S72: Collect a training sample set for model training of the long short-term memory network model; wherein the training sample set includes a plurality of training samples, the training samples include a message simulation group and a feature label corresponding to the message simulation group, the message simulation group is used to simulate the SIP message received by the SIP proxy module within a certain period of time, the message simulation group includes a time coordinate axis and a plurality of simulation units, each of the simulation units is respectively arranged on the time coordinate axis, the time coordinate axis is used to describe the relative sending time of the simulation unit within the unit time, and the simulation unit is used to simulate the type of the SIP message; S73: Substitute the training sample set into the input layer, the input layer receives a number of training samples of the training sample set, and transmits each training sample to the LSTM layer, the LSTM layer performs feature acquisition processing of the time dependency relationship between the message simulation group and the feature label on the training samples, thereby obtaining the time dependency relationship between the message simulation group and the feature label; S74: The fully connected layer is used to perform feature integration processing on the time dependency obtained by the LSTM layer to obtain a label generation rule for generating corresponding feature labels according to the SIP messages received by the SIP proxy module per unit time, and the output layer is used to output the label generation rule obtained by the fully connected layer.
[0075] Specifically, the pre-training of the instruction behavior analysis model mainly involves using the Long Short-Term Memory Network (LSTM) model to capture the temporal dependencies of SIP messages, thereby generating feature labels for anomaly monitoring.
[0076] More specifically, the structure of a long short-term memory network (LSTM) model is defined, including an input layer, an LSTM layer, a fully connected layer, and an output layer, wherein the LSTM layer and the fully connected layer can be one layer or more layers.
[0077] More specifically, configure the model parameters, such as the number of LSTM units and the number of nodes in the fully connected layer, to ensure that the model can process time series data. The LSTM model can process time series data and capture long-term dependencies, which is suitable for processing the timing characteristics of SIP messages, laying the foundation for subsequent training and feature extraction, and improving the model's prediction ability and accuracy.
[0078] More specifically, a training sample set including a message simulation group and corresponding feature labels is collected, the message simulation group simulates the time series of SIP messages, the feature labels describe the type and behavior of each message, and several simulation units are set on the time coordinate axis, each unit simulates the sending time and type of SIP messages, providing rich training data and simulating the SIP message flow in the real environment, helping the model to learn different message types and their time dependencies, enhancing the model's adaptability to various time patterns and message behaviors, and improving the training effect.
[0079] More specifically, the training sample set is input into the input layer of the LSTM model. The LSTM layer receives and processes these samples. The LSTM layer analyzes the time dependency between message simulation groups and feature labels, extracts features in the time series, captures the time dependency features of SIP messages, identifies long-term patterns and trends in message streams, generates time dependencies for feature label generation, and provides key data for subsequent model training.
[0080] More specifically, the fully connected layer integrates the time-dependent features extracted by the LSTM layer to form label generation rules. The output layer outputs the processing results of the fully connected layer as label generation rules for generating feature labels for future SIP messages. The fully connected layer can integrate the features extracted by the LSTM layer to form label rules with practical application value. The output layer provides a feature label generation mechanism for anomaly monitoring, so that the model can generate effective labels based on the actual situation of the SIP message.
[0081] It can be understood that through the above steps, the pre-trained command behavior analysis model can capture the time-dependent characteristics of SIP messages and generate feature labels for describing the receiving status. This process includes the construction of the LSTM model, the preparation of training samples, the analysis of time dependencies, and the generation of label rules, thereby improving the system's abnormal monitoring capabilities and intelligence level.
[0082] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A control instruction detection code scanning method, characterized in that: include: Deploy the SIP proxy module and RTP proxy module on the gateway device between the device end and the platform end; The SIP proxy module receives a SIP message from the device end, and parses the instruction type of the SIP message to obtain the instruction type of the SIP message, and identifies the instruction type of the SIP message according to a preset whitelist to determine whether the instruction type of the SIP message exists in the whitelist; If the instruction type of the SIP message exists in the whitelist, the SIP message is allowed to be proxy-transmitted through the SIP proxy module to be delivered to the target device end; wherein the target device end is the device end to which the SIP message is to be delivered; If the instruction type of the SIP message does not exist in the whitelist, the SIP message is subjected to deep content analysis processing, and the result of the deep content analysis processing is used to detect whether there is potential data entrainment in the SIP message. If potential data entrainment is detected, an alarm mechanism is triggered; if no potential data entrainment is detected, the SIP message is allowed to be forwarded by the SIP proxy module so as to be delivered to the target device end; The RTP proxy module is instructed to block the RTP packets sent from the platform end to the device end, so as to realize a one-way media flow from the device end to the platform end.
2. The control instruction detection code scanning method according to claim 1, characterized in that: The step of performing deep content analysis on the SIP message and detecting whether there is potential data entrainment in the SIP message based on the result of the deep content analysis includes: A data pattern library storing keywords is pre-set; Based on the preset data pattern library, the SIP message is subjected to content detection processing by using a regular expression and a pattern matching algorithm to detect whether there is content in the SIP message that matches a keyword in the data pattern library; If the detection result is existence, the content in the SIP message that matches the keyword in the data pattern library is used as the potential data entrainment; If the detection result is no, it is determined that the potential data entrainment does not exist in the SIP message.
3. The control instruction detection code scanning method according to claim 1, characterized in that: After the alarm mechanism is triggered if potential data entrainment is detected, the method further includes: Logging the SIP message to obtain a log of the SIP message; wherein the log includes a timestamp, a source IP address, a target IP address, a command type, and potential data entrainment content of the SIP message; The potential data entrainment and record logs of the SIP message are sent together to a security audit system for archiving and subsequent analysis.
4. The control instruction detection code scanning method according to claim 2, characterized in that: The white list and the data pattern library have a periodic updating mechanism, and the periodic updating mechanism is used to periodically update the instruction type of the SIP message stored in the white list and the keyword stored in the data pattern library.
5. The control instruction detection code scanning method according to claim 1, characterized in that: The control instruction detection scanning method also includes deploying a management interface that is data-connected to the SIP proxy module and the RTP proxy module, wherein the management interface is used for external module interaction, so as to view detection results of the SIP proxy module and the RTP proxy module in real time, configure scanning rules, and adjust system parameters through the module interaction.
6. The control instruction detection code scanning method according to claim 1, characterized in that: When the number of SIP messages received by the SIP proxy module within a unit time reaches a preset standard, the SIP proxy module is switched to a preset multi-channel parallel node processing mode, and the SIP message is processed in a multi-channel parallel node manner by the SIP proxy module switched to the multi-channel parallel node processing mode; When the SIP proxy module is in the multi-channel parallel node processing mode, the step of performing multi-channel parallel node processing on the SIP message by the SIP proxy module switched to the multi-channel parallel node processing mode includes: A plurality of parallel virtual channels are constructed by switching the SIP proxy module to a multi-channel parallel node processing mode, and a plurality of processing levels are constructed based on each of the virtual channels, so that the processing levels are in an overlapping state with each of the parallel virtual channels, and virtual nodes are respectively constructed in the areas where the processing levels and each of the parallel virtual channels are in an overlapping state; According to the setting order of each of the processing levels on each of the virtual channels, the whitelist is segmented to be divided into secondary whitelists corresponding to each of the processing levels; wherein each of the secondary whitelists has a list weight corresponding to the setting order of the virtual channels, and the secondary whitelist assigned to the virtual channel with an earlier setting order has a higher list weight, and the list weight is used to describe the occurrence probability of the instruction type in the secondary whitelist; Allocate each of the SIP messages to each of the virtual channels in sequence according to the parallel order of each of the virtual channels, and enable each of the virtual nodes in each of the virtual channels to detect and process the allocated SIP messages in sequence; If the detection result of the virtual node on the SIP message is that the SIP message does not appear in the secondary whitelist, the SIP message is transmitted to the subsequent virtual node in the virtual channel for detection; If the detection result of the virtual node on the SIP message is that it appears in the secondary whitelist, the SIP message is directly detected by the SIP proxy module; If the detection results of all the virtual nodes for the SIP message are that the SIP message does not appear in the secondary whitelist, the SIP message is subjected to deep content analysis processing through multi-channel parallel node processing, and the result of the deep content analysis processing is used to detect whether there is potential data entrainment in the SIP message.
7. The control instruction detection code scanning method according to claim 1, characterized in that: The method further includes deploying a pre-trained instruction behavior analysis model based on the gateway device, and performing feature analysis processing on the SIP message received by the SIP proxy module through the instruction behavior analysis model to obtain a feature tag for describing the reception status of the SIP proxy module corresponding to the SIP message, wherein the feature tag is used to perform abnormal monitoring on the SIP message received by the SIP proxy module.
8. The control instruction detection code scanning method according to claim 7, characterized in that: The pre-training steps of the instruction behavior analysis model include: Preparing a long short-term memory network model in advance; wherein the long short-term memory network model includes an input layer, an LSTM layer, a fully connected layer and an output layer; Collecting a training sample set for model training of the long short-term memory network model; wherein the training sample set includes a plurality of training samples, the training samples include a message simulation group and a feature label corresponding to the message simulation group, the message simulation group is used to simulate the SIP message received by the SIP proxy module within a certain period of time, the message simulation group includes a time coordinate axis and a plurality of simulation units, each of the simulation units is respectively arranged on the time coordinate axis, the time coordinate axis is used to describe the relative sending time of the simulation unit within the unit time, and the simulation unit is used to simulate the type of the SIP message; Substituting the training sample set into the input layer, the input layer receives a number of training samples of the training sample set, and transmits each training sample to the LSTM layer, and the LSTM layer performs feature acquisition processing of the time dependency relationship between the message simulation group and the feature label on the training samples, thereby obtaining the time dependency relationship between the message simulation group and the feature label; The fully connected layer is used to perform feature integration processing on the time dependency obtained by the LSTM layer to obtain a label generation rule for generating corresponding feature labels according to the SIP message received by the SIP proxy module per unit time, and the output layer is used to output the label generation rule obtained by the fully connected layer.
