User attack behavior identification method, device, electronic device and storage medium

By constructing a three-channel traffic graph and graph core calculation, combined with a historical attack behavior graph model, user attack behavior is identified, solving the problems of low identification rate and high false alarm rate in existing technologies, and achieving efficient user attack behavior identification and real-time protection.

CN118590310BActive Publication Date: 2024-11-19STATE GRID ELECTRONIC COMMERCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411036521.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-19
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

Existing technologies have low user attack behavior identification rates and high false alarm rates, making them unable to effectively identify user attack behavior. Furthermore, they ignore the correlation between user traffic data features and the randomness and volatility of user behavior.

Method used

By acquiring traffic data of current user behavior, fingerprint features are generated and reconstructed into a three-dimensional array. This array is then mapped to three single-channel images for fusion to construct a three-channel traffic graph. Attack behaviors are identified using graph kernel calculation and timestamp sorting. Feature matching is performed by combining historical attack behavior graph models, and multiple thresholds and dynamic matching mechanisms are set.

Benefits of technology

It achieves a high recognition rate and low false alarm rate for user attack behavior, can block attack behavior in real time, improves the network security analysis, tracing and early warning capabilities, and makes up for the shortcomings of traditional firewalls.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590310B_ABST
    Figure CN118590310B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, electronic device and storage medium for identifying user attack behaviors, the method comprising: obtaining flow data of current user behaviors; generating fingerprint features according to the flow data, reconstructing the flow data into a three-dimensional array, mapping the three-dimensional array into three single-channel images respectively, converting the three single-channel images into three-channel flow graphs, fusing the fingerprint features and the three-channel flow graphs to obtain a graph model; based on graph core calculation, the similarity changes between the multiple graph models, identifying whether it is an attack behavior according to the similarity changes, if it is not the attack behavior, then performing feature matching between the graph model and the historical attack behavior graph model, and identifying whether it is the attack behavior again according to the result of the feature matching. The present invention accurately identifies attack behaviors by analyzing the similarity changes between graph models and performing feature matching with the historical attack behavior graph model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security technology, and in particular to a method, device, electronic device and storage medium for identifying user attack behavior. Background Art

[0002] At present, open source software has become the core infrastructure and an important and critical information system. According to statistics, 99% of code bases contain at least one open source component, of which open source code accounts for 70% of all code. When auditing code bases, 75% of the code contains open source components with known security vulnerabilities. As the number of open source software continues to increase, the proportion of products containing vulnerabilities continues to grow, and more than 80% of network attacks occur in open source software. With the continuous improvement of the availability and scope of use of open source software, open source software has become the target of a large number of hacker attacks, using vulnerabilities to attack, causing serious consequences. Therefore, the identification of user attack behavior in open source software is very important. However, the recognition rate in the existing technology is low, there are false positives, and the use of single features cannot effectively identify user attack behavior.

[0003] Traditional user attack behavior recognition is achieved through the learning of a single feature, ignoring the correlation between user traffic data features, and also ignoring the interaction information between the user attack behavior flow, which has limitations. Moreover, since user behavior is random and has certain fluctuations, when there is user attack behavior, it will cause differences in traffic characteristics. Therefore, only setting a static threshold method for similarity calculation cannot fully and effectively identify user attack behavior, resulting in a low recognition rate, a high false alarm rate, and an inability to fully describe user attack behavior. Summary of the invention

[0004] The present invention provides a method, device, electronic device and storage medium for identifying user attack behaviors, which solve the problem of low attack behavior recognition rate.

[0005] According to one aspect of the present invention, the present invention provides a method for identifying user attack behavior, including: obtaining traffic data of current user behavior; generating fingerprint features according to the traffic data, reconstructing the traffic data into a three-dimensional array, mapping the three-dimensional array into three single-channel images respectively, fusing the three single-channel images in the order of R, G, and B channels, converting them into a three-channel traffic graph, fusing the fingerprint features and the three-channel traffic graph to obtain a graph model; based on graph core calculation, sorting the similarity changes between multiple graph models by timestamp, identifying whether the current user behavior is an attack behavior according to the similarity changes, if not the attack behavior, performing feature matching between the graph model and a historical attack behavior graph model, the historical attack behavior graph model is constructed according to historical user attack behaviors, and identifying again whether the current user behavior is the attack behavior according to the result of the feature matching.

[0006] Furthermore, the acquisition of traffic data of the current user behavior is specifically as follows: deploying an interface for monitoring the current user behavior, triggering the interface when there is user access and request behavior, and collecting traffic data packets of the current user behavior; using the standard five-tuple source IP, destination IP, source port, destination port, and protocol type of the traffic data packet as the ID of the traffic data of the user behavior; performing data cleaning on the traffic data, and the data cleaning includes modifying error information, deleting redundant fields, deleting duplicate fields, deleting abnormal items, and filling in missing values, so as to achieve user behavior data cleaning and standardized processing.

[0007] Furthermore, the fingerprint feature is generated according to the flow data, the flow data is reconstructed into a three-dimensional array, the three-dimensional array is mapped into three single-channel images respectively, the three single-channel images are fused in the order of R, G, and B channels, and converted into a three-channel flow map, and the fingerprint feature and the three-channel flow map are fused to obtain a graph model, specifically: the flow data is standardized to generate multiple feature vectors, and multiple feature vectors are spliced ​​into the fingerprint feature; a representation learning method is used to extract features from the flow data, and the flow data is reconstructed into the three-dimensional array; the three-dimensional array is mapped into three single-channel images respectively, and converted into the three-channel flow map by fusing in the order of R, G, and B channels; the fingerprint feature and the three-channel flow map are fused according to the ID of the flow data to obtain the graph model.

[0008] Furthermore, the graph core calculation is based on sorting the similarity changes between the multiple graph models by timestamp, and identifying whether the current user behavior is an attack behavior according to the similarity changes, specifically:

[0009] The plurality of graph models are sorted in ascending order of timestamps, and the similarity values ​​of the graph models are calculated using the Weisfeiler-Lehman graph kernel function. The similarity value calculation formula of the graph models is:

[0010]

[0011] Among them, G n is the graph model with order n, G n+1 is the graph model with the order n+1, is the similarity value of the graph model obtained after h iterations, is the graph model G n The vectorized representation of is the graph model G n+1 The vectorized representation of n is the timestamp order. is the total number of iterations, is the counting function, For the The iteration Seed tree mode; through h iterations, the graph model G n and the graph model G n+1 The similarity value is standardized and calculated to obtain the similarity difference value, and the calculation formula of the similarity difference value is:

[0012]

[0013] in , is the standard deviation of the similarity value of the graph model; by judging whether the similarity difference value is within a preset static threshold range, it is identified whether the current user behavior is the attack behavior.

[0014] Furthermore, the static threshold includes a normal behavior threshold and an attack behavior threshold. If the similarity difference value is within the normal behavior threshold, the current user behavior is identified as normal user behavior; if the similarity difference value is within the attack behavior threshold, the current user behavior is identified as the attack behavior; if the similarity difference value is outside the range of the normal behavior threshold and the attack behavior threshold, the graph model performs feature matching with the historical attack behavior graph model, and based on the result of the feature matching, it is again identified whether the current user behavior is the attack behavior.

[0015] Furthermore, the graph model performs feature matching with a historical attack behavior graph model, and the historical attack behavior graph model is constructed based on historical user attack behaviors, specifically: obtaining traffic data of the historical user attack behaviors; deriving attack behavior fingerprint features and attack behavior three-channel traffic graphs based on the traffic data of the historical user attack behaviors, and fusing the attack behavior fingerprint features and the attack behavior three-channel traffic graphs to obtain the historical attack behavior graph model; extracting the attack behavior graph embedding representation of the historical attack behavior graph model, and establishing an attack behavior feature library based on the attack behavior graph embedding representation; extracting the graph embedding representation of the graph model, and performing feature matching with the attack behavior graph embedding representation of the attack behavior feature library; if the matching value of the feature matching exceeds a preset threshold, the current user behavior is identified as the attack behavior.

[0016] Furthermore, after the current user behavior is identified as the attack behavior, all traffic information of the current user behavior is removed, the traffic of the attack behavior is blocked, and the attack behavior event is recorded.

[0017] According to another aspect of the present invention, a user attack behavior identification device is provided, comprising: a data acquisition module, the data acquisition module is used to obtain traffic data of the current user behavior; a graph model module, the graph model module is used to generate fingerprint features according to the traffic data, the traffic data is reconstructed into a three-dimensional array, the three-dimensional array is respectively mapped into three single-channel images, the three single-channel images are fused in the order of R, G, and B channels, converted into a three-channel traffic graph, the fingerprint features and the three-channel traffic graph are fused to obtain a graph model; a behavior identification module, the behavior identification module is used to calculate based on a graph core, sort the similarity changes between multiple graph models by timestamp, identify whether the current user behavior is an attack behavior according to the similarity change, if not the attack behavior, the graph model is feature matched with a historical attack behavior graph model, the historical attack behavior graph model is constructed according to historical user attack behaviors, and whether the current user behavior is the attack behavior is again identified according to the result of the feature matching.

[0018] According to another aspect of the present invention, there is provided an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor;

[0019] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any user attack behavior identification method in the embodiments of the present invention.

[0020] According to another aspect of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute any user attack behavior identification method in the embodiments of the present invention.

[0021] According to the technology of the present invention, by mapping the three-dimensional array into three single-channel images and converting them into a three-channel flow graph, the three-channel flow graph carries a large number of current user behavior flow features, and can express user behavior from multiple levels. By analyzing the similarity changes between graph models, the interactive change information of the user attack behavior flow can be found, and then the attack behavior can be preliminarily identified. By constructing a historical attack behavior graph model that generates feature fusion, for the current user behavior that cannot be initially identified, feature matching will be performed with a large number of historical attack behavior graph models to further realize the identification of attack behavior, and achieve real-time attack behavior flow blocking and attack event recording, which can be traced and traced, comprehensively cover attack behavior, and improve the user attack behavior analysis, traceability and early warning capabilities, with a high recognition rate and a low false alarm rate.

[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings are used to better understand the present invention and do not constitute a limitation of the present invention.

[0024] Figure 1 is a flow chart of a method for identifying user attack behaviors provided by an embodiment of the present invention;

[0025] Figure 2 It is a framework flow chart of the method for identifying user attack behavior provided by an embodiment of the present invention;

[0026] Figure 3 is a schematic diagram of the structure of a user attack behavior identification device provided by an embodiment of the present invention;

[0027] Figure 4 Schematic diagram of an electronic device and a storage medium according to an embodiment of the present invention.

[0028] In the figure, 100, user attack behavior recognition device; 11, data acquisition module; 12, graph model module; 13, behavior recognition module; 200, electronic device; 201, computing unit; 202, ROM; 203, RAM; 204, bus; 205, I / O interface; 206, input unit; 207, output unit; 208, storage unit; 209, communication unit. DETAILED DESCRIPTION

[0029] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be appreciated by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present invention. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0030] Glossary: ​​Weisfeiler-Lehman, the Weisfeiler-Lehman algorithm was proposed in 1968. It is actually a method to test isomorphic graphs, but its method is similar to the current graph neural network model, so it is now a relatively important algorithm in graph theory.

[0031] like Figure 1 As shown, an embodiment of the present invention discloses a method for identifying user attack behavior, including: S1, obtaining traffic data of the current user behavior; S2, generating fingerprint features according to the traffic data, reconstructing the traffic data into a three-dimensional array, mapping the three-dimensional array into three single-channel images respectively, fusing the three single-channel images in the order of R, G, and B channels, converting them into a three-channel traffic graph, fusing the fingerprint features and the three-channel traffic graph to obtain a graph model; S3, based on graph core calculation, sorting the similarity changes between multiple graph models by timestamp, identifying whether the current user behavior is an attack behavior according to the similarity changes, if not an attack behavior, performing feature matching on the graph model and the historical attack behavior graph model, the historical attack behavior graph model is constructed according to the historical user attack behavior, and identifying whether the current user behavior is an attack behavior again according to the result of feature matching.

[0032] The user attack behavior identification method of the present application maps the three-dimensional array into three single-channel images and converts them into a three-channel flow graph, so that the three-channel flow graph carries a large number of current user behavior flow characteristics, and can express user behavior from multiple levels. By analyzing the similarity changes between graph models, the user attack behavior flow interaction change information is discovered, and the attack behavior is preliminarily identified.

[0033] By constructing a historical attack behavior graph model that generates feature fusion, the historical attack behavior graph model contains both the fingerprint features of user attack behavior traffic data and the graphical features of user attack behavior traffic data. Multiple features enrich the feature representation of user attack behavior traffic data, and mine the correlation and structural information between user attack behavior traffic data, effectively dealing with the randomness and volatility of user behavior. For current user behaviors that cannot be identified initially, feature matching will be performed with a large number of historical attack behavior graph models to further realize the identification of attack behaviors, achieve real-time attack behavior traffic blocking and attack event recording, traceability, comprehensive coverage of attack behaviors, and enhance user attack behavior analysis, traceability and early warning capabilities. It has a high recognition rate and reduces the false alarm rate.

[0034] Through the two-layer user attack behavior recognition model, the user attack behavior encountered by the open source software system can be quickly and comprehensively identified, which can make up for the shortcomings of traditional firewalls in protection and effectively identify attacks. According to the ascending order of the timestamp of the current user behavior, the similarity of the graph model of the current user behavior is calculated based on the graph kernel function to identify whether the current user behavior is a user attack behavior. If the initial recognition model cannot be used for recognition, feature matching will be performed with the user attack behavior feature library to identify whether the current user behavior is an attack behavior.

[0035] In an optional embodiment of the present invention, step S1 specifically includes: deploying an interface for monitoring the current user behavior, triggering the interface when there is user access and request behavior, and collecting traffic data packets of the current user behavior; using the standard five-tuple source IP, destination IP, source port, destination port, and protocol type of the traffic data packet as the ID of the user behavior traffic data; performing data cleaning on the traffic data, and data cleaning includes modification of error information, deletion of redundant fields, deletion of duplicate fields, deletion of abnormal items, and filling of missing values, so as to achieve user behavior data cleaning and standardized processing.

[0036] By deploying monitoring interfaces, users’ access and request behaviors can be captured in real time, and user traffic data can be obtained in a timely manner, which helps to detect attack behaviors in a timely manner and improve the response speed of network security.

[0037] Using the standard five-tuple of the traffic data packet as the traffic data ID of the current user behavior can ensure that each user behavior has a unique identifier, which helps to accurately track and analyze user behavior and further improve the ability to analyze and identify user behavior.

[0038] Data cleaning and standardization of traffic data can effectively remove erroneous information, duplicate fields and abnormal items, fill in missing values, ensure data quality and consistency, and help improve the accuracy and reliability of subsequent data analysis and mining. By deleting redundant and duplicate fields, the structure of traffic data can be optimized, the overhead of data storage and transmission can be reduced, which can help improve the efficiency and performance of data processing and reduce system resource consumption. The data after cleaning and standardization is more standardized and unified, which helps to improve the availability and operability of data and provide a better foundation for subsequent data reconstruction and fusion.

[0039] like Figure 2 As shown, in an optional embodiment of the present invention, step S2 is specifically as follows: after the flow data is standardized, a plurality of feature vectors are generated, and the plurality of feature vectors are spliced ​​into fingerprint features; a representation learning method is used to extract features of the flow data, and the flow data is reconstructed into a three-dimensional array; the three-dimensional array is respectively mapped into three single-channel images, which are fused in the order of R, G, and B channels to be converted into a three-channel flow map; the fingerprint features and the three-channel flow map are fused according to the ID of the flow data to obtain a graph model.

[0040] By reconstructing the traffic data into a three-dimensional array and mapping it into three single-channel images, the characteristics of the traffic data can be better characterized, and the efficiency of further analysis and processing of the traffic data can be improved. By extracting the fingerprint characteristics of the traffic from the traffic data and standardizing the traffic data to generate multiple feature vectors, the characteristics of the traffic data can be expressed more accurately and comprehensively, and the accuracy of analyzing and identifying the traffic data can be improved.

[0041] By using the representation learning method to extract features from traffic data, reconstruct it into a three-dimensional array, and map it into a three-channel traffic graph, the key features of traffic data can be better captured, and the ability to perform deep learning and pattern recognition on traffic data can be improved. By fusing the three-channel traffic graph with the fingerprint feature, the features of different information sources can be comprehensively utilized to improve the ability to comprehensively analyze and judge traffic data, and improve the effectiveness of traffic data analysis, identification, and attack behavior detection. By fusing the fingerprint feature and the three-channel traffic graph to obtain a graph model, the characteristics and structure of traffic data are more intuitively displayed, which helps users to visualize and analyze traffic data and improve network security and traffic management capabilities.

[0042] Specifically, the fingerprint features include user request rate, user access times, source IP, destination IP, source port, destination port, protocol type, timestamp, user behavior flow duration, packet size, bytes transmitted per second, active time of user behavior flow, number of payload packets and interval time between two user behavior flows, a total of 14 features.

[0043] By means of vector concatenation, each feature vector is concatenated to construct the fingerprint feature of the current user behavior traffic data:

[0044]

[0045] in, In order to extract the fingerprint features of the current user behavior traffic data, is the feature vector of each feature extracted, where , Represents a splicing operation.

[0046] The three-channel traffic image feature extraction of the current user behavior traffic data is performed through the representation learning method. First, the current user behavior traffic data is converted into ASCII code, the ASCII code is parsed, and the data after the ASCII code parsing is reconstructed into a three-dimensional array form. Then the three-dimensional array is mapped into three single-channel images respectively, and finally converted into a three-channel traffic map by fusing them in the order of R, G, and B channels. .

[0047] In order to enrich the embedded representation of the current user behavior traffic data, the fingerprint features of the current user behavior and the three-channel traffic graph are integrated to construct a graph model for generating the current user behavior traffic data. , because each traffic data has the same five-tuple, the feature fusion of image features and traffic fingerprints is realized through the traffic data ID, and the generated graph model is The graph model consists of two parts: The node set in is , It is divided into fingerprint features of current user behavior traffic data and three-channel flow graph characteristics , graph model The edge set of , It is the user behavior traffic data ID.

[0048] like Figure 2As shown, in an optional embodiment of the present invention, the traffic data is standardized to generate multiple feature vectors, and the multiple feature vectors are spliced ​​into fingerprint features; the representation learning method is used to extract features from the traffic data, and the traffic data is reconstructed into a three-dimensional array; the three-dimensional array is mapped to three single-channel images, which are fused in the order of the three channels R, G, and B to convert them into a three-channel traffic map; the fingerprint features and the three-channel traffic map are fused according to the ID of the traffic data to obtain a graph model. Based on the graph core, the similarity changes between multiple graph models sorted by timestamps are calculated, and whether the current user behavior is an attack behavior is identified based on the similarity changes, specifically:

[0049] Sort multiple graph models in ascending order of timestamps, and use the Weisfeiler-Lehman graph kernel function to calculate the similarity value of the graph model. The similarity value calculation formula of the graph model is:

[0050]

[0051] Among them, G n is a graph model with order n, G n+1 is a graph model with sorting n+1, is the similarity value of the graph model obtained after h iterations, is the graph model G n The vectorized representation of is the graph model G n+1 The vectorized representation of n is the timestamp order. is the total number of iterations, is the counting function, For the The iteration Seed tree mode;

[0052] After h iterations, the graph model G n and graph model G n+1 The similarity values ​​are standardized and calculated to obtain the similarity difference value. The calculation formula of the similarity difference value is:

[0053]

[0054] in , is the standard deviation of the similarity value of the graph model; by judging whether the similarity difference value is within the preset static threshold range, it is possible to identify whether the current user behavior is an attack behavior.

[0055] By using the Weisfeiler-Lehman algorithm graph kernel function to calculate the similarity of multiple graph models, the similarity between graph models at different timestamps can be measured more accurately, which helps to analyze the evolution of current user behavior, obtain the interaction information of the current user behavior flow, and promptly discover abnormal changes and attack behaviors.

[0056] By measuring the similarity change through the similarity difference value and judging whether the similarity difference value is within the preset static threshold range, it is possible to identify whether the current user behavior is an attack behavior, which helps to timely discover and prevent various network attack behaviors and protect the security of open source software systems and data. The method of calculating similarity using the Weisfeiler-Lehman graph kernel function is efficient and accurate, can cope with complex network environments and large-scale data processing requirements, helps to improve the processing efficiency and performance of the system, and speeds up attack detection and response.

[0057] In an optional embodiment of the present invention, the static threshold includes a normal behavior threshold and an attack behavior threshold. If the similarity difference value is within the normal behavior threshold, the current user behavior is identified as a normal user behavior.

[0058] If the similarity difference value is within the attack behavior threshold, the current user behavior is identified as an attack behavior;

[0059] If the similarity difference value is outside the range of normal behavior threshold and attack behavior threshold, the graph model is feature matched with the historical attack behavior graph model, and whether the current user behavior is an attack behavior is identified again based on the result of feature matching.

[0060] Dividing the static threshold into a normal behavior threshold and an attack behavior threshold helps to more precisely judge the nature of the current user behavior. The current user behavior can be classified according to different threshold ranges, thereby better identifying normal behavior and attack behavior.

[0061] When the similarity difference value is within the normal behavior threshold range, the current user behavior can be accurately identified as normal user behavior, which helps reduce the false alarm rate and ensure a good experience for normal users. When the similarity difference value is within the attack behavior threshold range, the current user behavior can be quickly identified as an attack behavior, so that corresponding security measures can be taken in time to prevent losses caused by network attacks.

[0062] When the similarity difference value is outside the range of normal behavior threshold and attack behavior threshold, the current graph model will be feature matched with the historical attack behavior graph model to identify whether it is an attack behavior for the second time. This second identification mechanism helps to improve the detection rate of attack behavior and can better adapt to the ever-changing attack methods and patterns.

[0063] Through multiple threshold settings and dynamic matching, the ability to identify attack behaviors can be enhanced, overall security can be improved, and it helps protect systems and data from various network threats, maintaining the stable operation of the system and the information security of users.

[0064] Specifically, the normal behavior threshold range of normal user behavior is set to When the similarity difference value of the current user behavior graph model is greater than 0.95, the current user behavior is directly identified as normal user behavior;

[0065] Set the attack behavior threshold range for malicious attack user behavior to When the similarity difference value of the user behavior graph model is less than 0.1, the current user behavior is directly identified as malicious attack user behavior, triggering the warning interface to achieve real-time warning of user attack behavior;

[0066] When the similarity difference value is in the range of The first recognition cannot determine whether there is a user attack behavior, so it is necessary to match the graph model of the current user behavior with the graph model of the historical attack behavior to achieve re-recognition of whether the current user behavior is an attack behavior.

[0067] like Figure 2 As shown, in an optional embodiment of the present invention, the graph model is feature matched with the historical attack behavior graph model, and the historical attack behavior graph model is constructed according to the historical user attack behavior, specifically: the traffic data of the historical user attack behavior is obtained; the attack behavior fingerprint feature and the attack behavior three-channel traffic graph are obtained according to the traffic data of the historical user attack behavior, and the attack behavior fingerprint feature and the attack behavior three-channel traffic graph are merged to obtain the historical attack behavior graph model; the attack behavior graph embedding representation of the historical attack behavior graph model is extracted, and an attack behavior feature library is established according to the attack behavior graph embedding representation; the graph embedding representation of the graph model is extracted, and the graph embedding representation is feature matched with the attack behavior graph embedding representation of the attack behavior feature library; if the matching value of the feature matching exceeds the preset threshold, the current user behavior is identified as an attack behavior.

[0068] By obtaining and analyzing the traffic data of historical user attack behaviors, we can derive attack behavior fingerprint features. This helps to more accurately identify attack behaviors, because malicious attack users usually have some specific behavior patterns and characteristics. Fusion of attack behavior fingerprint features and attack behavior three-channel traffic graphs can provide more comprehensive attack behavior information, which helps to understand the characteristics of attack behaviors more comprehensively and accurately. A historical attack behavior graph model is constructed based on the attack behavior fingerprint features and the attack behavior three-channel traffic graph. The historical attack behavior graph model can be used as a reference benchmark for attack behaviors and is used to match features with the current graph model to identify attack behaviors.

[0069] An attack behavior feature library is established based on the attack behavior graph embedding representation. The historical attack behavior graph model and the attack behavior graph embedding representation are stored in the attack behavior feature library. The feature library stores the feature information of various historical attack behaviors, which helps to perform feature matching when identifying the current user behavior and improve the accuracy of attack behavior identification. By matching the graph embedding representation of the graph model with the attack behavior graph embedding representation of the attack behavior feature library and setting a preset threshold, when the matching value exceeds the preset threshold, the current user behavior can be accurately identified as an attack behavior, so that corresponding security measures can be taken to protect the security of the system and data.

[0070] Specifically, each node in the historical attack behavior graph model is trained through a spatial graph neural network model. The neighbor nodes of are aggregated and calculated as:

[0071]

[0072] in, Is a graph node exist The attack behavior graph of the layer is embedded in the representation. yes Aggregation function of the layer, Representation and Node A set of neighbor nodes;

[0073] The features of the previous layer of the graph node and aggregated neighbor features Splice and get the graph nodes in Embedding representation of the layer;

[0074]

[0075] in, is the activation function, is the weight matrix, For splicing operation.

[0076] Perform nonlinear transformation on each node-level attack behavior graph embedding representation in the historical attack behavior graph model to obtain the global graph context representation , calculated as:

[0077]

[0078] in, is a nonlinear activation function, is the learnable matrix, is the number of nodes, Embedding representation of attack behavior graph for each node .

[0079]

[0080] in, is a nonlinear activation function, It is the set of attack behavior graph embedding representations of the entire graph model node. The attack behavior graph embedding representation of the entire graph model of user attack behavior is obtained by weighted average and calculation of graph node embeddings.

[0081] Similarly, according to the above steps, the graph embedding representation of the current user behavior graph model can be extracted as , feature matching calculation is performed by using the graph embedding representation of the current user behavior graph model and the attack behavior graph embedding representation of the historical attack behavior graph model in the user attack feature library

[0082]

[0083] because The range is , the graph embedding representation of the current user behavior is matched with the attack behavior graph embedding representation of the attack behavior feature library, and the threshold of feature matching is set to 0.85. When the matching value is greater than or equal to the threshold, the current user behavior can be identified as an attack behavior. If it is less than the threshold, it is determined to be a normal user behavior.

[0084] like Figure 2 As shown, in an optional embodiment of the present invention, after the current user behavior is identified as an attack behavior, all traffic information of the current user behavior is removed, the traffic of the attack behavior is blocked, and the attack behavior event is recorded.

[0085] Once the current user behavior is identified as an attack, the attack behavior information is fed back to the open source software warning interface, triggering the warning operation of the current user behavior, automatically removing all traffic information related to the current user behavior, and achieving real-time blocking of the attack behavior traffic corresponding to the open source software system. Start the backup interface and record the warning attack events in the form of logs, etc., to facilitate the provision of data for subsequent tracking and tracing.

[0086] Immediately removing all traffic information of the user will help block malicious attack users from further attacking the open source software system and minimize the potential scope of damage. By promptly removing the traffic information involved in the attack behavior, it is possible to effectively prevent malicious attack users from using traffic information to further penetrate the open source software system or steal data. For the identified attack behavior, measures can be taken immediately to block the relevant traffic, thereby effectively reducing the impact of the attack on the system. By blocking the traffic of the attack behavior, the system can quickly return to normal operation and reduce the loss and impact suffered by the system.

[0087] Recording attack behavior events helps with subsequent analysis and processing. By recording attack behavior events, the system can collect information such as graph models, behavior patterns, and attack methods of malicious attack users, providing a reference for subsequent historical attack behavior graph models and attack event responses. At the same time, recording attack behavior events can also serve as evidence for auditing and supervision, helping to trace the source and responsibility of the attack behavior.

[0088] Figure 3 As shown, the user attack behavior identification device 100 may include:

[0089] Data acquisition module 11, data acquisition module 11 is used to obtain traffic data of current user behavior;

[0090] The graph model module 12 is used to generate fingerprint features according to the flow data, reconstruct the flow data into a three-dimensional array, map the three-dimensional array into three single-channel images respectively, fuse the three single-channel images in the order of R, G, and B channels, and convert them into a three-channel flow map, fuse the fingerprint features and the three-channel flow map to obtain a graph model;

[0091] Behavior identification module 13, behavior identification module 13 is used to calculate the similarity change between multiple graph models sorted by timestamps based on the graph core, and identify whether the current user behavior is an attack behavior based on the similarity change. If it is not an attack behavior, the graph model is feature matched with the historical attack behavior graph model. The historical attack behavior graph model is constructed based on historical user attack behaviors. Based on the result of feature matching, it is again identified whether the current user behavior is an attack behavior.

[0092] For the description of specific functions and examples of each module and submodule of the device in the embodiment of the present invention, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.

[0093] In the technical solution of the present invention, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0094] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.

[0095] Figure 4A schematic block diagram of an example electronic device 200 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0096] like Figure 4 As shown, the device 200 includes a computing unit 201, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 202 or a computer program loaded from a storage unit 208 into a random access memory (RAM) 203. In the RAM 203, various programs and data required for the operation of the device 200 can also be stored. The computing unit 201, the ROM 202, and the RAM 203 are connected to each other via a bus 204. An input / output (I / O) interface 205 is also connected to the bus 204.

[0097] A number of components in the device 200 are connected to the I / O interface 205, including: an input unit 206, such as a keyboard, a mouse, etc.; an output unit 207, such as various types of displays, speakers, etc.; a storage unit 208, such as a disk, an optical disk, etc.; and a communication unit 209, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 209 allows the device 200 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0098] The computing unit 201 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 201 performs the various methods and processes described above, such as a user attack behavior identification method. For example, in some embodiments, a user attack behavior identification method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 208. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 200 via the ROM 202 and / or the communication unit 209. When the computer program is loaded into the RAM 203 and executed by the computing unit 201, one or more steps of a user attack behavior identification method described above may be performed. Alternatively, in other embodiments, the computing unit 201 may be configured to perform a user attack behavior identification method in any other appropriate manner (e.g., by means of firmware).

[0099] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0100] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0101] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0102] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0103] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0104] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0105] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and this document does not limit this.

[0106] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for identifying user attack behavior, characterized in that: include: Get traffic data of current user behavior; The flow data is standardized to generate a plurality of feature vectors, the plurality of feature vectors are spliced ​​into a fingerprint feature, a representation learning method is used to extract features from the flow data, and the flow data is reconstructed into a three-dimensional array, the three-dimensional array is respectively mapped into three single-channel images, the three single-channel images are fused in the order of R, G, and B channels, and converted into a three-channel flow map, and the fingerprint feature and the three-channel flow map are fused to obtain a graph model; Based on graph core calculation, the similarity changes between the multiple graph models are sorted by timestamp, and whether the current user behavior is an attack behavior is identified according to the similarity change. If it is not the attack behavior, a historical attack behavior graph model is constructed according to the traffic data of the historical user attack behavior, and the attack behavior graph embedding representation of the historical attack behavior graph model is extracted. An attack behavior feature library is established according to the attack behavior graph embedding representation, and the graph embedding representation of the graph model is extracted. The graph embedding representation is matched with the attack behavior graph embedding representation of the attack behavior feature library, and whether the current user behavior is the attack behavior is identified again according to the result of the feature matching.

2. The method according to claim 1, characterized in that: The acquisition of the traffic data of the current user behavior is specifically as follows: Deploy an interface for monitoring the current user behavior, trigger the interface when there is user access and request behavior, and collect traffic data packets of the current user behavior; The standard five-tuple source IP, destination IP, source port, destination port, and protocol type of the traffic data packet is used as the ID of the traffic data of the user behavior; The traffic data is cleaned, and the data cleaning includes modifying erroneous information, deleting redundant fields, deleting repeated fields, deleting abnormal items, and filling in missing values, so as to achieve user behavior data cleaning and standardization processing.

3. The method according to claim 2, characterized in that The flow data is standardized to generate multiple feature vectors, and the multiple feature vectors are spliced ​​into the fingerprint feature. The flow data is feature extracted using a representation learning method, and the flow data is reconstructed into a three-dimensional array. The three-dimensional array is mapped into three single-channel images respectively. The three single-channel images are fused in the order of R, G, and B channels to be converted into a three-channel flow map. The fingerprint feature and the three-channel flow map are fused to obtain a graph model, which is specifically: The traffic data is standardized to generate a plurality of feature vectors, and the plurality of feature vectors are concatenated into the fingerprint feature; Using a representation learning method to extract features from the flow data, and reconstructing the flow data into the three-dimensional array; The three-dimensional array is mapped to the three single-channel images respectively, and is converted into the three-channel flow map by fusing them in the order of R, G, and B channels; The fingerprint feature and the three-channel flow graph are fused according to the ID of the flow data to obtain the graph model.

4. The method according to claim 1, characterized in that: The graph core-based calculation, sorting the similarity changes between the multiple graph models by timestamp, and identifying whether the current user behavior is an attack behavior according to the similarity changes, is specifically as follows: The plurality of graph models are sorted in ascending order of timestamps, and the similarity values ​​of the graph models are calculated using the Weisfeiler-Lehman graph kernel function. The similarity value calculation formula of the graph models is: Among them, G n is the graph model with order n, G n+1 is the graph model with the order n+1, is the similarity value of the graph model obtained after h iterations, is the graph model G n The vectorized representation of is the graph model G n+1 The vectorized representation of n is the timestamp order. is the total number of iterations, is the counting function, For the The iteration Seed tree mode; After h iterations, the graph model G n and the graph model G n+1 The similarity value is standardized and calculated to obtain the similarity difference value, and the calculation formula of the similarity difference value is: in , is the standard deviation of the similarity value of the graphical model; By judging whether the similarity difference value is within a preset static threshold range, it is identified whether the current user behavior is the attack behavior.

5. The method according to claim 4, characterized in that The static threshold includes a normal behavior threshold and an attack behavior threshold. If the similarity difference value is within the normal behavior threshold, the current user behavior is identified as a normal user behavior. If the similarity difference value is within the attack behavior threshold, identifying the current user behavior as the attack behavior; If the similarity difference value is outside the range of the normal behavior threshold and the attack behavior threshold, the graph model is feature matched with the historical attack behavior graph model, and whether the current user behavior is the attack behavior is again identified based on the result of the feature matching.

6. The method according to claim 1, characterized in that The graph model is feature matched with the historical attack behavior graph model, which is constructed based on historical user attack behaviors, specifically: Obtaining traffic data of the historical user attack behavior; According to the flow data of the historical user attack behavior, an attack behavior fingerprint feature and an attack behavior three-channel flow graph are obtained, and the attack behavior fingerprint feature and the attack behavior three-channel flow graph are merged to obtain the historical attack behavior graph model; Extracting an attack behavior graph embedding representation of the historical attack behavior graph model, and establishing an attack behavior feature library according to the attack behavior graph embedding representation; Extracting a graph embedding representation of the graph model, and performing feature matching between the graph embedding representation and the attack behavior graph embedding representation of the attack behavior feature library; If the matching value of the feature matching exceeds a preset threshold, the current user behavior is identified as the attack behavior.

7. The method according to claim 1, characterized in that After the current user behavior is identified as the attack behavior, all traffic information of the current user behavior is removed, the traffic of the attack behavior is blocked, and the attack behavior event is recorded.

8. An open source software user attack behavior identification device, characterized in that: include: A data acquisition module, which is used to acquire traffic data of current user behavior; A graph model module, wherein the graph model module is used to generate a plurality of feature vectors after standardization processing of the flow data, the plurality of feature vectors are spliced ​​into a fingerprint feature, a representation learning method is used to extract features of the flow data, and the flow data is reconstructed into a three-dimensional array, the three-dimensional array is respectively mapped into three single-channel images, the three single-channel images are fused in the order of R, G, and B channels, and converted into a three-channel flow map, and the fingerprint feature and the three-channel flow map are fused to obtain a graph model; A behavior identification module is used to calculate the similarity changes between multiple graph models based on the graph core, sort them by timestamp, identify whether the current user behavior is an attack behavior based on the similarity changes, and if it is not an attack behavior, build a historical attack behavior graph model based on the traffic data of historical user attack behaviors, extract the attack behavior graph embedding representation of the historical attack behavior graph model, establish an attack behavior feature library based on the attack behavior graph embedding representation, extract the graph embedding representation of the graph model, perform the feature matching between the graph embedding representation and the attack behavior graph embedding representation of the attack behavior feature library, and identify again whether the current user behavior is an attack behavior based on the result of the feature matching.

9. An electronic device, characterized in that: include: at least one processor, and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.