A method and system for predicting network attacks
By combining dynamic temporal graphs and attention-based dynamic graph neural networks, the problem of static graph modeling being unable to synchronize network topology changes is solved, enabling real-time prediction and tracing of network attack paths, thus improving the accuracy of attack identification and the timeliness of defense.
Patent Information
- Application Number
- CN202611282163.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-11-17
AI Technical Summary
Existing technologies using static graph modeling cannot promptly perceive dynamic changes in network topology and intrusion traces left by attackers. This leads to the failure of multi-layer jumper node identification, deviation in the location of the real attack source, and breakage of the tracing link during the attack attribution process, making it impossible to accurately predict the attack propagation link.
By updating the dynamic time sequence graph based on detected device change events, the characteristics of nodes and edges are determined. An attention-based dynamic graph neural network is used to perform feature weighting enhancement and time sequence decay correction. A comprehensive risk score is calculated and reverse path traversal is performed to predict network attack paths.
It achieves real-time synchronization of network attack prediction system and accurate characterization of topology changes, accurately reconstructs attack propagation chain, and improves the accuracy of source tracing and identification and the timeliness of defense response.
Smart Images

Figure CN123122905A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network security technology, and in particular to a method and system for predicting network attacks. Background Technology
[0002] As enterprise IT infrastructure development deepens, the number of terminals, servers, and IoT devices on enterprise intranets continues to grow. Operations such as employee terminal plugging and unplugging, temporary start-up and shutdown of business servers, and VPN remote terminal access and exit cause the network topology to be constantly changing dynamically. At the same time, network attacks such as Advanced Persistent Threats (APTs) are becoming increasingly covert. Attackers typically do not directly expose the source of the attack, but first use external network jumpers to penetrate border devices, and then gradually move laterally into the intranet, using multiple intermediate devices to reach critical assets such as core databases and business systems. System logs and firewall alerts from a single device can only record single points of anomaly, making it difficult to reconstruct the complete attack chain.
[0003] Currently, mainstream network attack tracing solutions in the industry all use static graph neural networks to model network assets and their communication relationships: internal network hosts, servers, gateway devices, etc. are uniformly abstracted as nodes in the graph, traffic sessions generated between devices are abstracted as static edges connecting nodes, and surface features such as IP address, port, and traffic size are extracted to mark abnormal devices, thereby reconstructing the attack path.
[0004] However, the aforementioned static graph neural network tracing scheme has a core technical problem: it uses a fixed static topology throughout the process and only utilizes surface network features, which makes it impossible to perceive dynamic changes in the network topology and intrusion traces left by attackers in a timely manner. This leads to the failure of multi-layer jump node identification, deviation in the location of the real attack source, and breakage of the tracing link during the attack tracing process, making it difficult to accurately predict the attack propagation link. Summary of the Invention
[0005] This application provides a network attack prediction method and system to solve the problems of existing technologies using static graph modeling, such as lagging topology updates, insufficient feature information, low accuracy in source tracing and identification, and inability to predict attack paths in advance.
[0006] Firstly, this application provides a method for predicting network attacks, the method comprising:
[0007] Based on the detected device change events occurring within the target network, the dynamic timing graph of the target network is updated; wherein, the dynamic timing graph includes a set of nodes consisting of each device in the target network as nodes, and a set of directed edges consisting of directed edges consisting of the interaction behaviors between devices; device change events include device access events and device offline events;
[0008] Determine the initial node features of each node, as well as the edge features of each directed edge; among which, the initial node features include attack trace features, which are trace features that characterize the device being compromised.
[0009] The attack trace features of each node are weighted and enhanced to obtain the enhanced feature vector of each node;
[0010] Calculate the time difference between the occurrence time of the interaction behavior corresponding to the directed edge and the current time, and determine the temporal decay weight of the directed edge based on the time difference; modify the edge features of each directed edge based on the temporal decay weight to obtain the modified edge features.
[0011] The enhanced feature vectors of each node and the corrected edge features of each directed edge are input into the attention dynamic graph neural network, and the representation vectors of each node are obtained through the attention dynamic graph neural network.
[0012] Based on the representation vector of each node, calculate the comprehensive risk score of each node, and determine the victim target node from the node set based on the comprehensive risk score.
[0013] Starting from the victim node, a reverse path traversal is performed along the directed edges to predict the network attack path corresponding to the victim node; the network attack path includes the attack propagation link from the attack source node through at least one jump node to the victim node.
[0014] In some feasible embodiments, attack trace characteristics include at least one of the following: malicious process resident markers, backdoor file markers, system privilege escalation records, bulk data outflow behavior, and persistent registry tampering records;
[0015] The attack traces of each node are weighted and enhanced, including:
[0016] Based on the initial node characteristics of each node, ordinary characteristics and attack trace characteristics are distinguished; ordinary characteristics include basic static characteristics, dynamic characteristics, interactive behavior characteristics, and log alarm characteristics.
[0017] The attack trace feature values are multiplied by a preset amplification weight coefficient, while keeping the values of ordinary features unchanged, to obtain the enhanced feature vectors of each node.
[0018] In some feasible embodiments, the edge features of a directed edge include the interaction type encoding corresponding to the interaction behavior, the interaction behavior strength, and the initial anomaly risk score.
[0019] The temporal decay weights of directed edges are determined based on time differences, including:
[0020] Based on a preset attenuation coefficient and time difference, the temporal attenuation weight of the directed edge is calculated using a preset exponential function, which is: ;in,
[0021] Δt is the time difference; λ is the preset attenuation coefficient;
[0022] The edge features of each directed edge are corrected based on temporal decay weights, including:
[0023] The corrected edge features are obtained by multiplying all feature values in the edge features of the directed edge by the temporal decay weight.
[0024] In some feasible embodiments, the representation vector of each node is obtained through an attention-based dynamic graph neural network, including:
[0025] The enhanced feature vectors of each node are linearly transformed and encoded to generate the hidden representation vectors of the first hidden layer of the attention dynamic graph neural network.
[0026] Based on the target network, obtain the neighboring nodes of each node and determine the modified edge features between each node and each neighboring node;
[0027] For each layer of the attention dynamic graph neural network, the attention weights of each neighbor node are determined based on the hidden representation vector of the first hidden layer and the modified edge features between each node and each neighbor node.
[0028] Based on the attention weights of each neighbor node, the hidden representation vectors of each neighbor node at the first layer of the network are weighted and aggregated to obtain the hidden representation vectors of each node at the current layer of the network.
[0029] The hidden representation vector of the last layer of the network is determined as the representation vector of each node.
[0030] In some feasible embodiments, the attention weights of each neighboring node are determined, including:
[0031] Obtain the hidden representation vector of each node at the first layer of the network, and the hidden representation vector of each neighbor node at the first layer of the network.
[0032] The hidden representation vectors of each node at layer 1 of the network, the hidden representation vectors of neighboring nodes at layer 1 of the network, and the modified edge features between each node and its neighbors are concatenated to obtain a concatenated vector. The attention weights of neighboring nodes are then determined based on this concatenated vector, as follows: ;in,
[0033] Representative node neighboring nodes The attention weight values in the l-th layer of the network; It is the attention parameter vector of the attention dynamic graph neural network; This represents vector concatenation operations; It is a non-linear activation function; This indicates weight normalization, where the sum of the attention weights of all neighboring nodes of the same node is 1.
[0034] In some feasible embodiments, based on the attention weights of each neighboring node, the hidden representation vectors of each neighboring node at the current layer of the network are weighted and aggregated to obtain the hidden representation vectors of each node at the current layer of the network, including:
[0035] Based on attention weights, the hidden representation vectors of each neighbor node at the first layer of the network are weighted and aggregated to obtain an aggregated intermediate vector.
[0036] The hidden representation vector of each node in the network layer is residually concatenated with the aggregated intermediate vector, and layer normalization is performed to obtain the hidden representation vector of each node in the current layer of the network.
[0037] In some feasible embodiments, a comprehensive risk score for each node is calculated based on its representation vector, and the victim target node is determined from the node set based on the comprehensive risk score, including:
[0038] Based on the representation vector of each node, calculate the node's own feature anomaly score, neighbor association anomaly score, and interaction edge anomaly score respectively.
[0039] The node's overall risk score is obtained by weighting and summing its own feature anomaly score, neighbor association anomaly score, and interaction edge anomaly score using preset weighting coefficients.
[0040] Nodes with a comprehensive risk score greater than a preset threshold are identified as candidate abnormal nodes;
[0041] Based on the behavioral characteristics of candidate abnormal nodes, they are classified into attack source nodes, jump site nodes, or victim target nodes.
[0042] In some feasible embodiments, based on the representation vector of each node, the node's own feature anomaly score, neighbor association anomaly score, and interaction edge anomaly score are calculated, including:
[0043] Obtain local attack trace indicators for each node at the current moment; local attack trace indicators include malicious process resident markers, backdoor suspicious file markers, privilege escalation records, batch outbound behavior, system alarm level, and abnormal login records;
[0044] The local attack trace indicators and representation vectors are input into a pre-trained anomaly scoring network to output the node's own feature anomaly score.
[0045] Determine the representation vectors of all neighboring nodes of a node, and perform mean aggregation on the representation vectors of all neighboring nodes to obtain the average neighbor representation; calculate the vector distance between the average neighbor representation and the preset malicious node baseline representation vector; normalize the vector distance mapping to obtain the neighbor association anomaly score.
[0046] Determine the interaction behavior types of all interaction edges corresponding to a node; based on a preset interaction risk mapping table, determine the risk weight value corresponding to each interaction edge; the interaction risk mapping table records the correspondence between each interaction behavior type and the risk weight value; sum the risk weight values of all interaction edges of a node and perform normalization processing to obtain the abnormal score of the interaction edge corresponding to the node.
[0047] In some feasible embodiments, after predicting the network attack path corresponding to the victim node by performing a reverse path traversal along the directed edges, starting from the victim node, the method further includes:
[0048] When multiple network attack paths are obtained, the path nodes of each network attack path are determined, and the path edges formed by adjacent path nodes are determined.
[0049] The node risk score of the network attack path is calculated based on the anomaly score of each path node's own characteristics; the path edge risk score of the network attack path is calculated based on the risk weight value of each path edge.
[0050] Based on node risk scores and path edge risk scores, a comprehensive anomaly score for network attack paths is calculated.
[0051] Network attack paths with a comprehensive anomaly score higher than a preset score threshold are identified as risky paths.
[0052] Secondly, this application also provides a network attack prediction system, comprising:
[0053] The timing graph update module is configured to update the dynamic timing graph of the target network based on the detected device change events occurring within the target network. The dynamic timing graph includes a set of nodes consisting of each device in the target network and a set of directed edges consisting of directed edges consisting of the interaction behaviors between devices. Device change events include device access events and device offline events.
[0054] The feature determination module is configured to determine the initial node features of each node and the edge features of each directed edge; wherein, the initial node features include attack trace features, which are trace features that characterize the device being intruded upon.
[0055] The node feature enhancement module is configured to perform weighted enhancement processing on the attack trace features of each node to obtain the enhanced feature vector of each node.
[0056] The edge feature correction module is configured to calculate the time difference between the occurrence time of the interaction behavior corresponding to the directed edge and the current time, and determine the temporal decay weight of the directed edge based on the time difference; and correct the edge features of each directed edge based on the temporal decay weight to obtain the corrected edge features.
[0057] The representation vector determination module is configured to input the enhanced feature vectors of each node and the modified edge features of each directed edge into the attention dynamic graph neural network, and obtain the representation vectors of each node through the attention dynamic graph neural network.
[0058] The node determination module is configured to calculate the comprehensive risk score of each node based on the representation vector of each node, and determine the victim target node from the node set based on the comprehensive risk score.
[0059] The prediction module is configured to traverse the reverse path along the directed edges, starting from the victim target node, in order to predict the network attack path corresponding to the victim target node; the network attack path includes the attack propagation link from the attack source node through at least one jump node to the victim target node.
[0060] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method provided in the first aspect of this application.
[0061] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method provided in the first aspect of this application.
[0062] As described above, this application provides a network attack prediction method and system. First, it updates the dynamic time-series graph of the target network based on detected device change events occurring within the target network. Then, it determines the initial node features of each node and the edge features of each directed edge. The attack trace features of each node are weighted and enhanced to obtain enhanced feature vectors. Simultaneously, the edge features are temporally decayed to obtain corrected edge features. The enhanced feature vectors and corrected edge features are then input into an attention-based dynamic graph neural network to obtain the representation vectors of each node. Based on the representation vectors, the comprehensive risk score of each node is calculated, and the victim target node is determined. Finally, starting from the victim target node, a reverse path traversal is performed along the directed edges to predict the network attack path. This enables the network attack prediction system to synchronize network topology changes in real time, accurately characterize device intrusion risks, and reconstruct the complete attack propagation link from the attack source node through the jumper node to the victim target node. This solves the problems of lagging topology updates, insufficient feature information, low accuracy in source tracing and identification, and inability to predict attack paths in advance in static graph modeling, thus improving the accuracy of network attack source tracing and the timeliness of defense response. Attached Figure Description
[0063] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 An overall flowchart of the network attack prediction method in some embodiments is shown;
[0065] Figure 2 The overall structure diagram of the network attack prediction system in some embodiments is shown. Detailed Implementation
[0066] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0067] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0068] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0069] The following explanations of the technical terms mentioned in the embodiments of this application are provided to facilitate understanding by those skilled in the art.
[0070] A dynamic sequence graph is a graph model that uses devices within a target network as nodes, directed edges formed by interactions between devices, and whose graph structure can be updated in real time as device events change.
[0071] Attack trace characteristics refer to trace characteristics that directly indicate that a device has been compromised, such as malicious process resident markers, backdoor file markers, system privilege escalation records, bulk data outbound behavior, and persistent registry tampering records.
[0072] Temporal decay weight refers to a weighting coefficient calculated based on the time difference between the occurrence time of the interaction and the current time, used to weaken the impact of outdated interaction behaviors.
[0073] Attention-based dynamic graph neural networks (GNNs) are graph neural networks that aggregate information about neighboring nodes on a dynamic graph through an attention mechanism.
[0074] The representation vector refers to the high-dimensional feature vector output by a node after learning through an attention-based dynamic graph neural network.
[0075] The comprehensive risk score is a numerical value used to quantify the risk of device intrusion, obtained by integrating the abnormal characteristics of the node itself, the abnormal association of neighbors, and the abnormal interaction edges.
[0076] The attack source node refers to the device node that initiates the attack, the jump node refers to the device node that is used as a relay during the attack, and the victim node refers to the device node that is ultimately compromised.
[0077] The application scenarios of this application will be explained below.
[0078] With the increasing number of terminals, servers, and IoT devices in enterprise networks, daily operations routinely involve employees plugging and unplugging computers, temporarily starting and stopping business servers, VPN remote terminal access and exit, and adjusting switch links. Network topology is not static in the long term. In recent years, most network attacks do not directly expose the source of the attack. Attackers typically use external network jumpers to penetrate border devices, then move laterally into the internal network step by step, using multiple intermediate devices to reach core databases and business systems. System logs and firewall alerts from a single device can only record single points of failure, making it difficult for operations and maintenance personnel to piece together the complete attack chain from scattered alerts.
[0079] Currently, graph models are widely used in the industry to describe the communication relationships between network assets. Graph neural networks are used to uncover hidden anomalies in device associations for threat hunting and post-attack attribution. However, most practical tools and existing research solutions on the market adopt static graph modeling, updating the entire network topology only every few hours. This fails to keep up with real-time changes in devices and links, resulting in outdated and distorted network connection information used by the model. Furthermore, traditional analysis methods can only trace clues after an attack has fully occurred and caused damage, making it impossible to predict which devices attackers will compromise next. Security defenses can only react passively, leaving very little buffer time for operations and maintenance. This makes the protection weaknesses particularly apparent when facing advanced threats with continuous penetration.
[0080] Currently, most mature attack tracing tools in the industry rely on static graph neural networks to build their overall framework. They uniformly treat internal network hosts, servers, and gateway devices as nodes in a graph, and the traffic sessions generated between devices as static edges connecting the nodes. They use ordinary graph neural networks to extract surface features such as IP, port, and traffic volume, mark devices with abnormal traffic, and simply reconstruct an attack path.
[0081] Current technologies use a fixed, static topology for calculations, resulting in long topology refresh intervals. Temporarily connected external terminals, temporarily established remote access links, and short-lived malicious communication sessions cannot be promptly entered into the model. Short-term attack correlations between many jump node nodes are directly lost, often leading to link interruptions, misalignment of the actual attack source, and complete unidentification of intermediate jump devices during source tracing. Existing solutions only use basic network parameters such as network segments, open ports, and bandwidth usage when constructing device feature vectors, neglecting traces of intrusion behavior such as malicious process residency, system file tampering, privilege escalation backdoors, and bulk data outflow. The features contain too little risk information, making it difficult to distinguish between normal cross-device access and lateral movement by attackers, resulting in consistently low overall accuracy in source tracing. The entire tool only has the core function of retrospectively tracing the attack chain; it lacks reasoning logic for the timing of attack behavior, making it impossible to extract the attacker's complete action target from a pile of scattered alarms or predict subsequent possible intrusion paths. Operations personnel can only investigate and handle issues after alarms appear, resulting in a significant lag in defense response. In addition, existing tools only export a list of plain text alerts after outputting the attack path, and do not automatically provide corresponding handling actions based on the importance of assets or the severity of the attack. Operations and maintenance personnel need to combine their years of work experience to sort out clues one by one and formulate protection strategies, which prolongs the entire security incident handling cycle.
[0082] To address the aforementioned issues, this application proposes a network attack prediction method. This method maintains a dynamic temporal graph of the target network in real time using an event-triggered approach. It weights and enhances the attack trace features of nodes, corrects the temporal decay of edge features, learns node representations using an attention-based dynamic graph neural network, calculates a comprehensive risk score to locate the victimized target node, and reverses the attack propagation chain. This allows for accurate reconstruction of the attack chain based on real-time topology synchronization, and further infers attack intent and predicts subsequent attack paths, thus upgrading from post-event handling to pre-event warning.
[0083] The network attack prediction method provided in this disclosure can be applied to a network attack prediction system, which is used to monitor and predict attacks on devices in a target network. The target network includes multiple devices, such as intranet hosts, business servers, routers, border firewalls, IoT terminals, cloud virtual hosts, etc., which are interconnected and interact with each other via wired or wireless means.
[0084] In some embodiments, the network attack prediction system can be deployed on computing devices in the target network, on servers in the cloud, or in a combination of cloud and local deployment.
[0085] Figure 1 A flowchart illustrating the overall process of network attack prediction methods in some embodiments is shown. For example... Figure 1 As shown, the method includes the following steps:
[0086] S110, based on the detected device change event occurring within the target network, update the dynamic timing diagram of the target network.
[0087] The target network refers to the network environment in which network attack prediction and attribution analysis need to be conducted. The dynamic time sequence graph includes a set of nodes, with each device within the target network as a node, and a set of directed edges, with the interactions between devices as directed edges. Device change events include device access events and device offline events.
[0088] In one implementation, the target network can be an enterprise intranet, a campus network, a hybrid cloud network, etc. The devices corresponding to the nodes can include at least one of the following: intranet hosts, business servers, routers, border firewalls, IoT terminals, and cloud virtual hosts. The interactive behaviors corresponding to the directed edges can include at least one of the following: normal device access, remote maintenance login, batch file transfer, malicious lateral movement, malicious external network connection, and system privilege invocation.
[0089] For example, nodes can be maintained in the node set based on the device's unique identifier. The unique identifier can be generated by combining the device's media access control (MAC) address, fixed internet protocol (IP) address, and asset number, thereby avoiding confusion caused by duplicate device identifiers. When a device access event is detected, a node corresponding to that device is added to the node set; when a device offline event is detected, a node corresponding to that device is removed from the node set; and when device interaction behavior is detected, the corresponding directed edge is added or updated in the directed edge set.
[0090] Among them, the event-triggered method is used to maintain the dynamic time sequence graph, which can update the graph structure at the moment of device access, offline or interaction, so that the graph structure keeps the graph structure synchronized with the real network state and provides a lag-free topological foundation for subsequent representation learning.
[0091] S120, determine the initial node characteristics of each node, and the edge characteristics of each directed edge.
[0092] Among them, the initial node features include attack trace features, which are trace features that characterize the device as having been intruded upon.
[0093] In one implementation, the initial node characteristics may further include at least one of the following: basic static characteristics, dynamic operational characteristics, interactive behavior characteristics, and log alarm characteristics. For example, basic static characteristics may include device type, asset importance level, IP network segment, operating system version, and total number of open ports. Dynamic operational characteristics may include central processing unit (CPU) utilization, memory usage, number of concurrent network sessions, and number of currently online users. Interactive behavior characteristics may include frequency of connecting to unfamiliar IPs, number of accesses to uncommon ports, and frequency of remote login operations. Log alarm characteristics may include total number of intrusion alarms, alarm risk level distribution, and number of log anomaly field markers.
[0094] In one implementation, edge features may include the interaction type encoding corresponding to the interaction behavior, the interaction behavior strength, and the initial anomaly risk score.
[0095] S130: The attack trace features of each node are weighted and enhanced to obtain the enhanced feature vector of each node.
[0096] Among these features, attack traces directly reflect whether a device has been compromised, making them of greater importance for attack identification. By weighting and enhancing attack trace features, the proportion of attack traces in node features can be amplified, enabling subsequent models to prioritize capturing intrusion clues left on the device. This addresses the problems of average feature weights and low malicious behavior identification in traditional solutions.
[0097] S140: Calculate the time difference between the occurrence time of the interaction behavior corresponding to the directed edge and the current time, and determine the temporal decay weight of the directed edge based on the time difference. Correct the edge features of each directed edge based on the temporal decay weight to obtain the corrected edge features.
[0098] Among these factors, the temporal validity of interactive behaviors has a significant impact on risk assessment; the more recent the interactive behavior, the greater its influence on the current risk status. By using time-decay weights to reduce the interference of outdated interactive behaviors on model calculations, the risk weights of recent malicious interactions are highlighted, making the model calculation results more consistent with the temporal propagation characteristics of network attacks.
[0099] S150: The enhanced feature vectors of each node and the modified edge features of each directed edge are input into the attention dynamic graph neural network, and the representation vectors of each node are obtained through the attention dynamic graph neural network.
[0100] Among them, the attention dynamic graph neural network can aggregate neighbor node information through multi-layer message passing, and dynamically allocate the attention weight of neighbor nodes according to node features and edge features during the aggregation process, thereby automatically distinguishing the risk impact of different neighbor nodes and mining the hidden malicious propagation associations between nodes.
[0101] S160: Calculate the comprehensive risk score of each node based on its representation vector, and determine the victim target node from the node set based on the comprehensive risk score.
[0102] The comprehensive risk score is a quantification of the risk of node intrusion. In one implementation, the comprehensive risk score can be calculated by integrating three types of information: abnormal node characteristics, abnormal neighbor associations, and abnormal interaction edges, thereby providing a more comprehensive characterization of the node's risk status.
[0103] S170 starts from the victim node and performs a reverse path traversal along the directed edges to predict the network attack path corresponding to the victim node.
[0104] The network attack path includes the attack propagation link from the attack source node through at least one jump node to the victim target node. By traversing backwards along the directed edges starting from the victim target node, the complete propagation link from the attack source through multiple jump nodes to the victim target can be traced back, solving the problems of broken tracing links and source location offset in traditional solutions.
[0105] In the technical solution provided by this disclosure, the dynamic temporal graph of the target network is updated in real time through event triggering, the initial node features of the nodes and the edge features of the edges are determined, and the attack trace features are weighted and enhanced, and the temporal decay of the edge features is corrected. Then, the enhanced feature vector and the corrected edge features are input into the attention dynamic graph neural network to learn the node representation, and then the comprehensive risk score is calculated to locate the victim target node and reverse the attack propagation link. This enables the network attack prediction system to synchronize the network topology in real time, accurately characterize the device risk, and restore the complete attack link from the attack source node through the jump node to the victim target node. This solves the problems of lagging topology updates, insufficient feature information, and low accuracy of source identification in static graph modeling.
[0106] The implementation of steps S110-S170 is illustrated below.
[0107] In step S110, the dynamic timing diagram of the target network is updated based on the detected device change events occurring within the target network. Specifically, this includes the following:
[0108] When a device access event is detected, a new node corresponding to the device is added to the node set based on the device's unique identifier. The unique identifier of the device can be generated by combining the device's Media Access Control address, fixed Internet Protocol address, and asset number to avoid confusion caused by duplicate device identifiers.
[0109] When a device interaction event is detected, add or update the directed edge corresponding to the interaction behavior in the directed edge set, and mark the behavior type of the directed edge.
[0110] In one implementation, the behavior type of a directed edge can include normal business access, remote login, malicious lateral movement, malicious external network connection, etc. For example, when an interaction between devices is detected, if the directed edge corresponding to the interaction already exists, the characteristics of that directed edge are updated; if it does not exist, the directed edge is added, and the corresponding behavior type is marked.
[0111] If no event is detected within the preset refresh cycle, the dynamic timing graph is fully refreshed.
[0112] In one implementation, the preset refresh period can be a set time interval, such as 30 seconds. When no device access, offline, or interaction events are detected within the preset refresh period, the dynamic timing diagram is fully refreshed to prevent a small number of hidden topology changes from being missed for a long time.
[0113] In the technical solution provided by the embodiments of this disclosure, new nodes and directed edges are added by triggering events, and a full refresh is performed with a preset refresh cycle. This realizes the real-time update and fallback refresh of the dynamic time sequence graph, ensuring that there is basically no time difference between the graph structure and the real network state, and solving the problems of delayed static graph topology updates and loss of associations due to short-term attacks.
[0114] In step S120, the initial node characteristics of each node and the edge characteristics of each directed edge are determined.
[0115] The initial node features include attack trace features, which are trace-type features that characterize the device being intruded upon. For example, enhanced attack trace features include malicious process resident markers, suspicious backdoor files, system privilege escalation records, batch data outbound behavior, and persistent registry tampering records.
[0116] Side features can include the interaction type encoding corresponding to the interaction behavior, the interaction behavior strength, and the initial anomaly risk score. Side features can be represented as: ;in, represent Time is determined by nodes Pointing to node The complete eigenvectors of directed edges; The interaction type is coded as follows: 0 represents normal business access, 1 represents remote login, 2 represents lateral movement by attackers, and 3 represents malicious external network connections. The intensity of the interactive behavior is determined by a weighted sum of the number of accesses and the amount of data transmitted. Features derived from interaction time periods can include interaction time period coding, interaction frequency statistics, etc. The initial abnormal risk score for the interactive behavior has a fixed numerical range. .
[0117] In step S130, the attack trace features of each node are weighted and enhanced to obtain the enhanced feature vector of each node, which may include the following steps:
[0118] S131, based on the initial node characteristics of each node, distinguishes between ordinary features and attack trace features.
[0119] Common features include basic static features, dynamic runtime features, interactive behavior features, and log / alarm features. Attack trace features include at least one of the following: malicious process resident markers, backdoor file markers, system privilege escalation records, bulk data outbound behavior, and persistent registry tampering records.
[0120] In one implementation, the initial node features can be divided according to feature dimensions. Features representing intrusion traces are categorized as attack trace features, while the remaining feature dimensions are categorized as ordinary features. For example, the initial node feature vector can be divided into ordinary feature segments and attack trace feature segments, where the first part of the dimensions represents ordinary features, and the latter part represents attack trace features. For instance, the initial node features have 48 dimensions: the first 36 dimensions are ordinary network and log features, and the last 12 dimensions are attack trace-specific features.
[0121] S132, multiply the value of the attack trace feature by a preset amplification weight coefficient, and keep the value of the ordinary feature unchanged to obtain the enhanced feature vector of each node.
[0122] The amplification weight coefficient is a preset coefficient greater than 1, used to amplify the numerical proportion of attack trace features in the feature vector. Ordinary features remain unchanged, while attack trace features are uniformly multiplied by the amplification weight coefficient, thereby enhancing the model's ability to perceive malicious behavior while maintaining the overall feature structure.
[0123] In one implementation, the amplification weight coefficient can be determined by training and tuning using historical attack samples. For example, the amplification weight coefficient can be 2.8. For instance, if a victim node has an original value of 0.4 in the backdoor file tag dimension and an original value of 0.3 in the privilege escalation record dimension, the weighted amplification results in corresponding values of 1.12 and 0.84, respectively, while the values of ordinary features, such as the number of open ports, remain unchanged.
[0124] In the technical solution provided by this disclosure, by distinguishing between ordinary features and attack trace features, and multiplying the attack trace features by an amplification weight coefficient while keeping the ordinary features unchanged, the proportion of intrusion traces in node features is amplified, enabling the model to prioritize capturing intrusion clues left on the device. This solves the problems of average feature weights, low identification of malicious behavior, and low accuracy of source tracing in traditional solutions.
[0125] Step S140 may include the following steps S141-S142:
[0126] Among them, the edge features of directed edges include the interaction type encoding corresponding to the interaction behavior, the interaction behavior strength, and the initial anomaly risk score.
[0127] In one implementation, interaction type encoding is used to distinguish different interaction behavior types. For example, an interaction type encoding of 0 can represent normal business access, 1 can represent remote login, 2 can represent lateral movement by an attacker, and 3 can represent malicious external network connections. The intensity of the interaction behavior can be obtained by weighted summation of the number of accesses and the amount of data transmitted. The initial anomaly risk score is the initial anomaly risk value for this interaction behavior, with a fixed range.
[0128] S141, based on the preset attenuation coefficient and time difference, calculates the temporal attenuation weight of the directed edge through a preset exponential function.
[0129] The time difference is the difference between the current calculation time and the time when the interaction occurred, and the unit can be minutes. The preset attenuation coefficient can be set in conjunction with the enterprise's internal network attack and penetration rhythm. The preset exponential function can be a time-series attenuation weight equal to a negative attenuation coefficient of the natural constant e multiplied by the time difference raised to the power of its value.
[0130] For example, a predefined exponential function can be expressed as: Where Δt is the time difference and λ is the preset attenuation coefficient. For example, if a malicious lateral movement occurs 1 minute ago, its corresponding time-series attenuation weight is high, and this behavior has a significant impact on the model's judgment. If a normal business access behavior occurs 10 minutes ago, its corresponding time-series attenuation weight decreases significantly and has virtually no impact on risk assessment.
[0131] S142, multiply all feature values in the edge features of the directed edge by the temporal decay weight to obtain the corrected edge features.
[0132] Before participating in subsequent message passing calculations, all feature values of each directed edge are uniformly multiplied by the corresponding time-decay weight, thereby ensuring that the edge features used in the model calculations are consistent with the recent real network interaction state and avoiding interference from historical invalid data.
[0133] In the technical solution provided by this disclosure, the time difference between the time when the interaction occurs and the current time is calculated, and the time decay weight is determined according to the exponential function. Then, the edge features are corrected with the time decay weight. This reduces the interference of old interaction behaviors on model calculation, highlights the risk weight of recent malicious interactions, and makes the model calculation conform to the time propagation characteristics of network attacks. This solves the problem that static edges cannot reflect the time validity of interaction behaviors in traditional solutions and improves the accuracy of attack link identification.
[0134] Step S150 may include the following steps S151-S155:
[0135] S151, perform linear transformation encoding on the enhanced feature vectors of each node to generate the hidden representation vector of the first hidden layer of the attention dynamic graph neural network.
[0136] In this approach, linear transformation coding is used to unify the dimension of the augmented feature vectors at each node, ensuring that the feature vectors match the specifications of subsequent network inputs. In one implementation, a trainable linear mapping layer can be used to linearly transform the augmented feature vectors of each node to obtain the hidden representation vector corresponding to the first hidden layer.
[0137] ;in, represent Time Node The hidden representation of layer 0 after the initial linear transformation; This is a trainable linear mapping layer used to unify the dimension of feature vectors across all nodes, matching the input specifications of subsequent networks.
[0138] S152, obtain the neighboring nodes of each node based on the target network, and determine the modified edge features between each node and each neighboring node.
[0139] In this context, a node's neighboring nodes refer to nodes that are directly connected to the node by directed edges in the dynamic time sequence graph. In one implementation, all neighboring nodes corresponding to each node, as well as the modified edge characteristics between the node and each neighboring node, can be determined based on the set of directed edges in the dynamic time sequence graph.
[0140] S153. For each layer of the attention dynamic graph neural network, the attention weights of each neighbor node are determined based on the hidden representation vector of the first hidden layer and the modified edge features between each node and each neighbor node.
[0141] The attention weight is used to characterize the contribution of each neighboring node to the node's representation update. Neighboring nodes associated with malicious behavior can be assigned higher attention weights, thereby highlighting the proportion of features associated with malicious interactions during aggregation.
[0142] S154. Based on the attention weights of each neighbor node, the hidden representation vectors of each neighbor node in the network layer are weighted and aggregated to obtain the hidden representation vectors of each node in the current layer of the network.
[0143] In this approach, the hidden representation vector of a node in the current layer is generated by aggregating the representations of its previous layer, the representations of its directly connected neighbors in the previous layer, and the dynamic edge risk features. In one implementation, after each layer of aggregation is completed, it can be further multiplied by a temporal decay weight to reduce the interference of features from old interaction associations.
[0144] S155 determines the hidden representation vector of the last layer of the network as the representation vector of each node.
[0145] After multiple iterations and aggregations, the node outputs a final stable high-dimensional representation vector, which is used for subsequent node risk scoring and attack tracing calculations.
[0146] In the technical solution provided by this disclosure, the enhanced feature vector is linearly transformed and encoded, and the attention weights of neighboring nodes are determined layer by layer based on the modified edge features and weighted aggregation is performed. Finally, the node representation vector is output, which enables the network to automatically distinguish the degree of risk impact of different neighboring nodes and to discover the hidden malicious propagation associations between nodes. This solves the problem that traditional solutions use mean or summation aggregation and are difficult to identify hidden attack links, and improves the ability of node representation to distinguish attack behaviors.
[0147] In some embodiments, step S153 above may include the following steps S1531-S1532:
[0148] S1531, obtain the hidden representation vector of each node at the first layer of the network, and the hidden representation vector of each neighbor node at the first layer of the network.
[0149] Here, "one layer on the network" refers to the layer preceding the current layer. For the first layer, the hidden representation vector of a node in the previous layer of the network is the hidden representation vector obtained in step S151.
[0150] S1532: The hidden representation vectors of each node at the first layer of the network, the hidden representation vectors of neighboring nodes at the first layer of the network, and the modified edge features between each node and its neighbors are concatenated to obtain a concatenated vector. The attention weights of neighboring nodes are then determined based on the concatenated vector.
[0151] In one implementation, the concatenated vector can be mapped using a non-linear activation function, and then the attention weights can be calculated by combining them with the trainable attention parameter vector. The attention weights of all neighboring nodes of the same node are then normalized so that the sum of the attention weights of all neighboring nodes of the same node is 1. For example, the attention weights of neighboring nodes can be expressed as: ;in, Representative node neighboring nodes The attention weight values in the l-th layer of the network; It is the attention parameter vector of the attention dynamic graph neural network; This represents vector concatenation operations; It is a non-linear activation function; This indicates weight normalization, where the sum of the attention weights of all neighboring nodes of the same node is 1.
[0152] By concatenating node representations, neighbor representations, and edge features to calculate attention weights, the attention weights can comprehensively reflect the risk characteristics of the node's own state, neighbor states, and interaction edges.
[0153] In the technical solution provided by the embodiments of this disclosure, attention weight is calculated by concatenating node representation, neighbor representation and modified edge features. The calculation of attention weight takes into account the information of the node itself, neighbors and interaction edges, so as to more accurately characterize the risk impact of different neighbor nodes, provide a basis for subsequent weighted aggregation, and improve the accuracy of attack association identification.
[0154] In some embodiments, step S154 above may include the following steps S1541-S1542:
[0155] S1541, based on attention weights, performs weighted aggregation of the hidden representation vectors of each neighbor node at the first layer of the network to obtain the aggregated intermediate vector.
[0156] The aggregated intermediate vector is a vector obtained by weighting and summing the hidden representation vectors of the neighboring nodes at the previous layer according to the attention weights.
[0157] S1542, perform residual connection between the hidden representation vector of each node in the network layer and the aggregated intermediate vector, and perform layer normalization to obtain the hidden representation vector of each node in the current layer of the network.
[0158] The residual connection is used to add the hidden representation vector of the previous layer of a node to the aggregated intermediate vector, thereby alleviating the gradient vanishing problem during the training of multi-layer networks and preserving the node's own information. The layer normalization process is used to normalize the vector after the residual connection, stabilizing network training.
[0159] In this embodiment, the hidden vector of a single-layer node is generated by aggregating its own upper-layer representation, the representation of its directly connected neighbors, and the dynamic edge risk features. The general aggregation formula is expressed as follows: In the formula, represent Time Node No. Hidden representations after layer aggregation; represent Time Node The set of all directly connected neighbor nodes; Neighboring nodes The hidden representation output from the previous layer; It is an attention-weighted aggregation function that replaces the traditional mean and summation aggregation methods. It can automatically distinguish the risk impact weight of different neighbor nodes, and neighbor nodes associated with malicious behavior will be assigned higher weights.
[0160] In some embodiments, after each layer of message aggregation is completed, all hidden vectors are uniformly multiplied by a temporal decay weight to further reduce feature interference from old interaction associations. After multiple layers of iterative aggregation, the output node finally stabilizes its representation vector.
[0161] In the technical solution provided in this application embodiment, residual connections and layer normalization are introduced on the basis of neighbor feature weighted aggregation. This not only aggregates the risk information of neighbor nodes, but also retains the feature information of the nodes themselves, which alleviates the gradient vanishing problem in deep network training, makes node representation learning more stable and accurate, and thus improves the accuracy of attack link identification.
[0162] Step S160 may include the following steps S161-S164:
[0163] S161, based on the representation vector of each node, calculate the node's own feature anomaly score, neighbor association anomaly score, and interaction edge anomaly score respectively.
[0164] Among them, the self-characteristic anomaly score is calculated based on the device's local attack traces and operational anomaly indicators, the neighbor association anomaly score is derived from the average risk characterization of all directly connected neighbors of the node, and the interaction edge anomaly score is obtained by summing the risk weights of all inbound and outbound links of the node.
[0165] S162, using preset weighting coefficients, sums the abnormal scores of its own features, neighbor associations, and interaction edges to obtain the node's comprehensive risk score.
[0166] The preset weighting coefficients are determined by training and optimization with massive attack samples to ensure that the scoring results closely match real attack scenarios. The higher the overall risk score, the greater the probability that the device has engaged in malicious attacks.
[0167] S163, nodes with a comprehensive risk score greater than a preset threshold are identified as candidate abnormal nodes.
[0168] Among them, a global risk assessment threshold can be preset, and a node whose comprehensive risk score exceeds the preset threshold is marked as a candidate abnormal node.
[0169] S164. Based on the behavioral characteristics of candidate abnormal nodes, candidate abnormal nodes are classified into attack source nodes, jump node nodes, or victim target nodes.
[0170] In one implementation, high-risk nodes with external network access who actively initiate malicious outbound connections can be identified as attack source nodes. Intermediate devices connecting suspicious external network nodes to core internal network assets and exhibiting high risk values can be identified as jump server nodes. Devices that only receive malicious access, leave numerous intrusion traces, and exhibit no proactive outbound connection behavior can be identified as victim target nodes. Devices with acceptable risk scores and whose interactive behaviors conform to business logic can be identified as normal, secure nodes.
[0171] The technical solution provided in this disclosure calculates a comprehensive risk score by integrating three types of scores: self-feature anomaly, neighbor association anomaly, and interaction edge anomaly. Based on the comprehensive risk score, candidate abnormal nodes are screened and node types are classified, thereby achieving a comprehensive quantification of device intrusion risk and accurate differentiation of node roles. This solves the problems of single risk characterization and missed detection of malicious nodes in traditional solutions.
[0172] In one embodiment, step S161 above may include the following steps S1611-S1614:
[0173] S1611, obtain the local attack trace indicators of each node at the current moment.
[0174] Among them, local attack trace indicators include malicious process resident markers, backdoor suspicious file markers, privilege escalation records, bulk outbound behavior, system alarm levels, and abnormal login records.
[0175] S1612 inputs the local attack trace index and representation vector into a pre-trained anomaly scoring network to output the node's own feature anomaly score through the anomaly scoring network.
[0176] In one implementation, the anomaly scoring network can be a pre-trained neural network model that outputs an anomaly score for a node's own characteristics based on the node's local attack trace indicators and representation vectors.
[0177] S1613: Determine the representation vectors of all neighboring nodes of the node, and perform mean aggregation on the representation vectors of all neighboring nodes to obtain the average neighbor representation. Calculate the vector distance between the average neighbor representation and the preset malicious node baseline representation vector. Normalize the vector distance mapping to obtain the neighbor association anomaly score.
[0178] The malicious node baseline representation vector can be a pre-defined baseline vector used to represent malicious nodes. The vector distance reflects the similarity between a node's neighbors and the malicious node baseline; the smaller the vector distance, the closer the node is to the malicious environment, and the higher the neighbor association anomaly score.
[0179] S1614: Determine the interaction behavior type of all interaction edges corresponding to the node. Based on the preset interaction risk mapping table, determine the risk weight value corresponding to each interaction edge.
[0180] The interaction risk mapping table records the correspondence between each interaction behavior type and its risk weight value. The risk weight values of all interaction edges of a node are summed and normalized to obtain the anomaly score for the corresponding interaction edge of the node.
[0181] Based on the high-dimensional node representation output by the neural network, a three-layer weighted risk scoring model is constructed by integrating three dimensions of data: device anomaly characteristics, neighbor association risk, and link interaction risk. This model accurately quantifies the intrusion risk level of each network device and distinguishes four types of network node states.
[0182] The formula for calculating the comprehensive risk score is as follows: In the formula, represent Time Node The higher the overall security risk score, the greater the probability that the device is subject to malicious attacks. The node's own characteristic anomaly score is calculated based on local attack traces and abnormal operation indicators of the device. The neighbor association anomaly score is derived from the average risk representation of all directly connected neighbors of the node. The abnormal score for the interactive edge is obtained by summing the risk weights of all inbound and outbound links of the node. The weighting coefficients are determined by training and optimization with a large number of attack samples to ensure that the scoring results closely match real attack scenarios.
[0183] Based on the behavioral characteristics of the candidate abnormal nodes, the candidate abnormal nodes are classified into attack source nodes, jump server nodes, or victim target nodes, thus achieving accurate classification:
[0184] Specifically, high-risk nodes with external network access who actively initiate malicious external connections are identified as attack source nodes; intermediate devices that connect suspicious external network nodes with core internal network assets and have high risk values are identified as jump server nodes; devices that only receive malicious access, leave a large number of intrusion traces, and do not actively engage in external connections are identified as victim target nodes; and devices that meet the risk score and whose interaction behavior conforms to business logic are identified as normal and secure nodes.
[0185] In the technical solution provided by the embodiments of this disclosure, the abnormal score of the node is calculated by the abnormal scoring network, the abnormal score of the neighbor association is calculated by the vector distance between the average representation of the neighbor and the malicious benchmark, and the abnormal score of the interaction edge is calculated by accumulating the interaction risk mapping table. The abnormality of the node is comprehensively quantified from three dimensions: itself, neighbors, and interaction edges, which provides an accurate basis for the calculation of the comprehensive risk score and improves the accuracy of attack node identification.
[0186] In one embodiment, step S170 may include the following steps S171-S173:
[0187] S171, perform reverse traversal along directed edges whose risk scores are greater than a preset threshold to obtain at least one candidate attack propagation link.
[0188] In this process, one or more candidate attack propagation links can be obtained by traversing backward from the victim target node to the attack source along the directed edges in the dynamic time sequence graph where the risk score is greater than a preset threshold.
[0189] S172 performs time consistency verification, behavior consistency verification, evidence consistency verification, and topology consistency verification on the candidate attack propagation link.
[0190] In one implementation, time consistency checks ensure that upstream anomalous behavior occurs before downstream intrusion. Behavioral consistency checks ensure that link behavior conforms to the timing logic of a standard attack chain. Evidence consistency checks require log, traffic, or endpoint traces to corroborate each link segment. Topology consistency checks ensure that the link structure matches the real-time dynamic network topology.
[0191] S173 identifies all verified candidate attack propagation links as network attack paths.
[0192] In the technical solution provided by this disclosure, candidate attack propagation links are obtained by traversing in reverse along high-risk directed edges, and four-fold consistency verification of time, behavior, evidence, and topology is performed to eliminate false links, ensuring that the attack propagation links obtained by tracing the source are real and reliable, and solving the problems of broken tracing links and source location offset in traditional solutions.
[0193] In one embodiment, after predicting the network attack path corresponding to the victim node, the method may further include the following steps S181-S184:
[0194] S181, when multiple network attack paths are obtained, determine the path nodes of each network attack path and determine the path edges formed by adjacent path nodes.
[0195] Here, a path node refers to a node contained in a network attack path, and a path edge refers to an edge formed between adjacent path nodes.
[0196] S182, calculate the node risk score of the network attack path based on the anomaly score of each path node's own characteristics. Calculate the path edge risk score of the network attack path based on the risk weight value of each path edge.
[0197] S183 calculates the comprehensive anomaly score of the network attack path based on the node risk score and the path edge risk score.
[0198] The comprehensive anomaly score is used to quantify the attack credibility of each candidate attack path; a higher score indicates a higher degree of authenticity and credibility for the path. In one implementation, the independent risk scores of each node within the path are summed with the anomaly risk scores of the links between adjacent nodes within the path to obtain the comprehensive path anomaly score.
[0199] S184 identifies network attack paths with a comprehensive anomaly score higher than a preset score threshold as risky paths.
[0200] Among these methods, paths with higher overall anomaly scores are selected as risky paths by using a preset score threshold, and high-confidence attack links are prioritized for retention among multiple candidate paths.
[0201] A single complete attack propagation path is represented by an ordered sequence of nodes: In the formula, This is the original source node of the attack in the entire chain; to This serves as an intermediate stepping stone node for multi-level jumps; The final victim node that was compromised.
[0202] To screen for real attack paths, a comprehensive path anomaly score formula is constructed to quantify the attack credibility of each candidate path: In the formula, The path is scored as an anomaly; the higher the score, the higher the authenticity and credibility of the link. Calculate the node risk score for each node within the path; The path edge risk score is given for links between adjacent nodes within the path.
[0203] In the technical solution provided by this disclosure, the node risk score and path edge risk score of each network attack path are calculated, and then the comprehensive path anomaly score is obtained and risk paths are screened. This realizes the credible quantification and ranking of multiple candidate attack links, eliminates false links, and ensures the authenticity and credibility of the tracing results.
[0204] In one embodiment, after determining the attack propagation chain, the method may further include the following steps S191-S193:
[0205] S191, extract the attack behaviors of each node in the attack propagation chain, and construct the attack behavior sequence according to the order of their occurrence.
[0206] The attack sequence is a set of attack behaviors arranged in chronological order of their occurrence. Each attack behavior can include information such as behavior type, occurrence time, source and destination nodes, risk level, and supporting evidence.
[0207] Ordered attack behavior sequence expression: In the formula, For a single malicious act, it includes core information such as the type of act, the time of occurrence, the source and destination nodes, the risk level, and supporting evidence. This represents the total number of attack behaviors that have been captured.
[0208] S192, match and score the attack behavior sequence with multiple preset attack intent labels, and determine the attack intent label with the highest matching score as the attacker's attack intent.
[0209] In one implementation, the preset attack intent tags can include ransomware attacks, data theft, lateral movement within the intranet, business disruption, and persistent privileges. A matching score can be calculated between the attack behavior sequence and each attack intent tag, with the tag having the highest matching score representing the attacker's attack intent. For example, higher weights can be assigned to key attack behaviors such as privilege escalation and data theft to improve the accuracy of intent determination.
[0210] The system incorporates tags for various attack intents, including ransomware attacks, data theft, lateral movement within the intranet, business disruption, and persistent privileges. It uses a proprietary matching and scoring formula to calculate the degree to which behavioral sequences match these intents. In the formula, For the current behavior sequence and intent label The matching score is used, and the tag corresponding to the highest score is the attacker's true intent. This represents the similarity score between a single action and its corresponding attack intent. The behavior weighting coefficient assigns higher weight to key attack behaviors such as privilege escalation and data theft, thereby improving the accuracy of intent determination.
[0211] S193, determine the current attack stage of the attacker based on the type of each attack behavior in the attack behavior sequence.
[0212] In one implementation, the attack phase may include external reconnaissance, initial intrusion, privilege escalation, persistent persistence, lateral movement within the internal network, core data collection, data leakage, and system damage. By linking the attack phase with the attack intent, the attacker's likely subsequent attack operations can be predicted.
[0213] In the technical solution provided by the embodiments of this disclosure, the attack intent is determined by constructing an attack behavior sequence and matching and scoring it with an attack intent label. Then, the attack stage is determined based on the attack behavior type. This enables reasoning and judgment of the attacker's true target and the current stage, providing a core basis for subsequent attack path prediction. It solves the problem that traditional solutions can only retrospectively trace back and cannot sort out the attacker's action target.
[0214] In one embodiment, after determining the attack propagation chain, the method may further include the following steps S201-S203:
[0215] S201, based on the representation vectors of the controlled nodes, the representation vectors of the candidate target nodes, and the link risk characteristics between the controlled nodes and the candidate target nodes, calculate the transfer probability of the attacker intruding into the candidate target nodes from the controlled nodes.
[0216] In one implementation, the representation vectors of the controlled node, the candidate target node, and the risk features of the directed edge between them can be input into a trained probability mapping function, which outputs the transition probability of an attacker invading the candidate target node from the controlled node. The probability mapping function can be constructed from a large amount of sample data; for example, a Softmax function can be used.
[0217] S202, multiply the transition probabilities between adjacent nodes in multiple candidate attack paths to obtain the comprehensive occurrence probability of each candidate attack path.
[0218] In the case of multi-step lateral penetration by attackers, the single-step transition probabilities between each adjacent node can be multiplied along the candidate attack path to obtain the overall probability of occurrence of the entire candidate attack path.
[0219] S203 outputs a preset number of potential attack paths in descending order of overall probability of occurrence.
[0220] In one implementation, a preset number of potential attack paths can be output in descending order of overall probability of occurrence, and the asset level and estimated intrusion method of the target device can be marked simultaneously. High-probability paths corresponding to core business assets are marked with a first-level warning to achieve pre-attack prediction.
[0221] In some embodiments, a visual topology of the attack chain can be generated and a tiered emergency response plan can be automatically output.
[0222] The visualized topology is built on a real-time dynamic graph. It uses differentiated colors to distinguish attack sources, jump node, victim device, and high-risk predicted node. The thickness of the lines indicates the level of risk of the link, and the predicted potential attack path is marked with a dotted line. It also displays auxiliary information such as attack timeline, node risk score, attack intent description, and path prediction probability, intuitively restoring the full picture of the attack and potential risks.
[0223] The emergency response plan employs a tiered and categorized generation logic, automatically matching corresponding strategies based on attack risk level, equipment asset importance, and predicted attack paths. It covers actionable commands such as victim device isolation, malicious file and process cleanup, attack source IP blocking, port access tightening, core asset traffic auditing, and account permission reset. For high-risk core devices that have not been compromised, preventative measures such as temporary blocking and vulnerability scanning are proactively pushed out. All plans are prioritized according to urgency, facilitating rapid, tiered emergency response by operations and maintenance personnel.
[0224] In the technical solution provided in this application embodiment, the transition probability from the controlled node to the candidate target node is calculated, and the transition probabilities of multiple candidate paths are multiplied together to obtain the comprehensive occurrence probability. Then, the potential attack paths are output according to the probability. This realizes the quantitative prediction of the attacker's subsequent lateral diffusion path and high-risk victim assets, solves the problem that the traditional solution can only backtrack after the fact and cannot provide early warning, and extends the emergency response window for security operation and maintenance.
[0225] The embodiments of this application have the following technical effects: They deeply integrate dynamic graph neural networks with temporal attack intent reasoning technology, completely solving the industry pain points of traditional static graph tracing models, such as topology lag, single features, and low recognition accuracy. Through an event-triggered dynamic topology update mechanism, real-time synchronization between network topology and actual operating status is achieved. Relying on attack trace weighting enhancement algorithms and temporal decay attention aggregation algorithms, the identification capabilities of malicious jumper nodes and covert attack links are significantly improved, accurately locating the real external network attack source and multi-layer internal network jumpers, effectively solving the problems of broken tracing links, source location offset, and missed malicious node detection in traditional solutions.
[0226] Meanwhile, this application breaks through the limitations of traditional attribution tracing, which can only retrospectively analyze attacks. By reasoning about the attack behavior sequence, it clarifies the attacker's core intent, quantitatively predicts subsequent lateral spread paths and high-risk victim assets, and achieves a defense upgrade from "post-event handling" to "pre-event warning," significantly extending the emergency response window for security operations. The entire system automates the entire process of data collection, modeling and analysis, attribution assessment, risk prediction, and solution output. Coupled with a visual topology display interface, it significantly reduces the operational threshold and workload of operations personnel, effectively shortening the network security incident handling cycle. This solution is suitable for dynamic and complex enterprise intranet and hybrid cloud network scenarios. Its ability to identify and defend against advanced persistent penetration and multi-layered lateral attack is significantly superior to traditional technologies, comprehensively improving the proactive defense and emergency response capabilities of enterprise network security.
[0227] Based on the same inventive concept, this application also provides a network attack prediction system. The solution provided by this system is similar to the solution described in the above method. Therefore, the specific limitations in the network attack prediction system embodiments provided below can be found in the limitations of the network attack prediction method above, and will not be repeated here.
[0228] In one exemplary embodiment, such as Figure 2 As shown, a network attack prediction system 200 is provided, comprising:
[0229] The timing graph update module 201 is configured to update the dynamic timing graph of the target network based on the detected device change events occurring within the target network. The dynamic timing graph includes a set of nodes consisting of each device in the target network and a set of directed edges consisting of directed edges consisting of the interaction behaviors between devices. Device change events include device access events and device offline events.
[0230] The feature determination module 202 is configured to determine the initial node features of each node and the edge features of each directed edge; wherein, the initial node features include attack trace features, which are trace features that characterize the device being intruded upon.
[0231] The node feature enhancement module 203 is configured to perform weighted enhancement processing on the attack trace features of each node to obtain the enhanced feature vector of each node.
[0232] The edge feature correction module 204 is configured to calculate the time difference between the occurrence time of the interaction behavior corresponding to the directed edge and the current time, and determine the temporal decay weight of the directed edge based on the time difference; and correct the edge features of each directed edge based on the temporal decay weight to obtain the corrected edge features.
[0233] The representation vector determination module 205 is configured to input the enhanced feature vector of each node and the modified edge feature of each directed edge into the attention dynamic graph neural network, and obtain the representation vector of each node through the attention dynamic graph neural network.
[0234] The node determination module 206 is configured to calculate the comprehensive risk score of each node based on the representation vector of each node, and determine the victim target node from the node set based on the comprehensive risk score.
[0235] The prediction module 207 is configured to traverse the reverse path along the directed edges, starting from the victim target node, in order to predict the network attack path corresponding to the victim target node; the network attack path includes the attack propagation link from the attack source node through at least one jump node to the victim target node.
[0236] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of a large model adaptive inference method for heterogeneous computing power collaboration as described above.
[0237] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0238] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0239] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.
Claims
1. A network attack prediction method, characterized by, The method includes: Based on the detected device change events occurring within the target network, the dynamic timing graph of the target network is updated; wherein, the dynamic timing graph includes a set of nodes composed of each device in the target network as nodes, and a set of directed edges composed of the interaction behaviors between the devices as directed edges; the device change events include device access events and device offline events; Determine the initial node features of each node and the edge features of each directed edge; wherein, the initial node features include attack trace features, which are trace features characterizing the device being intruded upon. The attack trace features of each node are weighted and enhanced to obtain the enhanced feature vector of each node; Calculate the time difference between the occurrence time of the interaction behavior corresponding to the directed edge and the current time, and determine the temporal decay weight of the directed edge based on the time difference; perform edge feature correction processing on each directed edge based on the temporal decay weight to obtain the corrected edge features. The enhanced feature vectors of each node and the corrected edge features of each directed edge are input into the attention dynamic graph neural network, and the representation vectors of each node are obtained through the attention dynamic graph neural network. Based on the representation vector of each node, calculate the comprehensive risk score of each node, and determine the victim target node from the node set based on the comprehensive risk score; Starting from the victim target node, a reverse path traversal is performed along the directed edge to predict the network attack path corresponding to the victim target node; the network attack path includes an attack propagation link from the attack source node through at least one jump node to the victim target node.
2. The network attack prediction method of claim 1, wherein, The attack traces include at least one of the following: malicious process resident markers, backdoor file markers, system privilege escalation records, bulk data outflow behavior, and persistent registry tampering records. The weighted enhancement processing of the attack trace features of each node includes: Based on the initial node characteristics of each node, ordinary features are distinguished from the attack trace features; The common features include basic static features, dynamic runtime features, interactive behavior features, and log and alarm features; The value of the attack trace feature is multiplied by a preset amplification weight coefficient, while keeping the value of the ordinary feature unchanged, to obtain the enhanced feature vector of each node.
3. The network attack prediction method of claim 1, wherein, The edge features of the directed edge include the interaction type encoding, interaction intensity, and initial anomaly risk score corresponding to the interaction behavior. The step of determining the temporal decay weight of the directed edge based on the time difference includes: Based on a preset attenuation coefficient and the time difference, the temporal attenuation weight of the directed edge is calculated using a preset exponential function, which is: ; in, Δt is the time difference; λ is the preset attenuation coefficient; The step of correcting the edge features of each directed edge based on the temporal decay weight includes: The corrected edge features are obtained by multiplying all feature values in the edge features of the directed edge by the temporal decay weight.
4. The network attack prediction method according to claim 1, characterized in that, The step of obtaining the representation vector of each node through the attention dynamic graph neural network includes: The enhanced feature vectors of each node are linearly transformed and encoded to generate the hidden representation vectors of the first hidden layer of the attention dynamic graph neural network; Based on the target network, obtain the neighboring nodes of each node, and determine the modified edge features between each node and each neighboring node; For each layer of the attention dynamic graph neural network, the attention weight of each neighbor node is determined based on the hidden representation vector of the first hidden layer and the modified edge features of each node and each neighbor node. Based on the attention weights of each neighbor node, the hidden representation vectors of each neighbor node at the current layer of the network are weighted and aggregated to obtain the hidden representation vectors of each node at the current layer of the network. The hidden representation vector of the last layer of the network is determined as the representation vector of each node.
5. The network attack prediction method according to claim 4, characterized in that, Determining the attention weights of each of the neighboring nodes includes: Obtain the hidden representation vector of each node at one layer of the network, and the hidden representation vector of each neighbor node at one layer of the network. The hidden representation vectors of each node at layer 1 of the network, the hidden representation vectors of neighboring nodes at layer 1 of the network, and the modified edge features between each node and its neighbors are concatenated to obtain a concatenated vector. The attention weights of the neighboring nodes are then determined based on this concatenated vector, expressed as follows: ; in, Representative node neighboring nodes The attention weight values in the l-th layer of the network; It is the attention parameter vector of the attention dynamic graph neural network; This represents vector concatenation operations; It is a non-linear activation function; This indicates weight normalization, where the sum of the attention weights of all neighboring nodes of the same node is 1.
6. The network attack prediction method according to claim 4, characterized in that, The process of weighting and aggregating the hidden representation vectors of each neighbor node at a single layer of the network based on the attention weights of each neighbor node to obtain the hidden representation vector of each node at the current layer of the network includes: Based on the attention weights, the hidden representation vectors of each neighbor node at the first layer of the network are weighted and aggregated to obtain an aggregated intermediate vector. The hidden representation vector of each node at the current layer of the network is residually concatenated with the aggregated intermediate vector, and layer normalization is performed to obtain the hidden representation vector of each node at the current layer of the network.
7. The network attack prediction method according to claim 4, characterized in that, The step of calculating a comprehensive risk score for each node based on its representation vector, and determining the victim target node from the node set based on the comprehensive risk score, includes: Based on the representation vector of each node, calculate the node's own feature anomaly score, neighbor association anomaly score, and interaction edge anomaly score respectively. The node's overall risk score is obtained by weighting and summing the self-feature anomaly score, the neighbor association anomaly score, and the interaction edge anomaly score using preset weighting coefficients. Nodes with a comprehensive risk score greater than the preset threshold are identified as candidate abnormal nodes; Based on the behavioral characteristics of the candidate abnormal nodes, the candidate abnormal nodes are classified into attack source nodes, jump site nodes, or victim target nodes.
8. The network attack prediction method according to claim 7, characterized in that, The step of calculating the node's own feature anomaly score, neighbor association anomaly score, and interaction edge anomaly score based on the representation vector of each node includes: Obtain local attack trace indicators for each node at the current moment; the local attack trace indicators include malicious process resident markers, backdoor suspicious file markers, privilege escalation records, batch outbound behavior, system alarm level, and abnormal login records; The local attack trace index and the representation vector are input into a pre-trained anomaly scoring network to output the node's own feature anomaly score through the anomaly scoring network. Determine the representation vectors of all the neighboring nodes of the node, and perform mean aggregation on the representation vectors of all the neighboring nodes to obtain the average neighbor representation; calculate the vector distance between the average neighbor representation and the preset malicious node baseline representation vector; normalize the vector distance mapping to obtain the neighbor association anomaly score; The interaction behavior types of all interaction edges corresponding to a node are determined; based on a preset interaction risk mapping table, the risk weight value corresponding to each interaction edge is determined; wherein, the interaction risk mapping table records the correspondence between each interaction behavior type and the risk weight value; the risk weight values of all interaction edges of a node are summed and normalized to obtain the abnormal score of the interaction edge corresponding to the node.
9. A network attack prediction method according to claim 8, characterized in that, After predicting the network attack path corresponding to the victim node by performing a reverse path traversal along the directed edges, starting from the victim node, the method further includes: When multiple network attack paths are obtained, the path nodes of each network attack path are determined, and the path edges formed by adjacent path nodes are determined. The node risk score of the network attack path is calculated based on the anomaly score of each path node's own characteristics; the path edge risk score of the network attack path is calculated based on the risk weight value of each path edge. Based on the node risk score and the path edge risk score, calculate the comprehensive anomaly score of the network attack path; Network attack paths whose overall anomaly score exceeds a preset score threshold are identified as risky paths.
10. A network attack prediction system, characterized in that, include: The timing graph update module is configured to update the dynamic timing graph of the target network based on the detected device change events occurring within the target network; wherein, the dynamic timing graph includes a set of nodes composed of each device in the target network as nodes, and a set of directed edges composed of directed edges composed of the interaction behaviors between the devices; the device change events include device access events and device offline events; The feature determination module is configured to determine the initial node features of each of the nodes and the edge features of each of the directed edges; wherein the initial node features include attack trace features, which are trace features characterizing the device being intruded upon. The node feature enhancement module is configured to perform weighted enhancement processing on the attack trace features of each node to obtain the enhanced feature vector of each node; The edge feature correction module is configured to calculate the time difference between the occurrence time of the interaction behavior corresponding to the directed edge and the current time, and determine the temporal decay weight of the directed edge based on the time difference; and perform edge feature correction processing on each of the directed edges based on the temporal decay weight to obtain the corrected edge features. The representation vector determination module is configured to input the enhanced feature vectors of each node and the modified edge features of each directed edge into the attention dynamic graph neural network, and obtain the representation vectors of each node through the attention dynamic graph neural network. The node determination module is configured to calculate a comprehensive risk score for each node based on the representation vector of each node, and determine the victim target node from the node set based on the comprehensive risk score. The prediction module is configured to traverse the directed edge in reverse order, starting from the victim target node, to predict the network attack path corresponding to the victim target node; the network attack path includes an attack propagation link from the attack source node through at least one jump node to the victim target node.
