A method, apparatus, and storage medium for generating attack path graphs based on Proof-of-Concept (PoC).

By constructing a PoC-based attack path dependency graph, obtaining grantable parameters and determining their activatability, and generating an empirical attack path graph, the problem of traditional paths being unable to be executed in real-world environments is solved, achieving low-cost maintenance and verifiable path generation.

CN123074846APending Publication Date: 2026-11-10BEIHANG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611577819.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-13
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

In existing technologies, traditional attack path graphs are generated based on asset topology or external knowledge base reasoning, which makes the paths unexecutable in real-world environments, lack verifiable empirical support, and make it difficult for multi-agent systems to identify parameter passing relationships and environmental capability requirements between PoC scripts.

Method used

By constructing a dependency graph in the proof-of-concept script library, obtaining grantable parameters, identifying nodes and establishing directed edges, determining activatability based on the current set of available parameters, generating an empirical attack path graph, and ensuring that the path is executable in a real environment.

Benefits of technology

Empirical verification of the attack path graph was achieved, ensuring that the path is executable in a real environment, reducing maintenance costs. Furthermore, the output path is supported by actual verification results, solving the problem that traditional paths cannot be verified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123074846A_ABST
    Figure CN123074846A_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, and storage medium for generating attack path graphs based on Proof-of-Concept (PoC), relating to the field of network security technology. The method includes: obtaining first grantable parameters from the structured metadata of each first proof-of-concept script; identifying each first proof-of-concept script as a first node and determining directed edges between each first node to construct a proof-of-concept dependency graph; determining the activatability of each first node based on the currently available parameter set to identify an activated execution pool; executing second proof-of-concept scripts in the activated execution pool that meet the execution conditions, and marking the second node corresponding to the successfully executed second proof-of-concept script as a success state based on the execution result; and generating an empirical attack path graph based on all successful second nodes and the directed edges between them. Therefore, the empirical attack path graph ultimately output by this application represents actually verified paths, not theoretically reachable paths.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cybersecurity technology, and in particular to a method, apparatus, and storage medium for generating attack path graphs based on Proof-of-Concept (PoC). Background Technology

[0002] Vulnerability verification platforms typically maintain a library of Proof of Concept (PoC) scripts, where each PoC script is used to verify a specific type of vulnerability. Implicit dependencies exist between PoC scripts: the execution of some PoCs requires parameters, authentication status, interface capabilities, or environmental capabilities from preceding PoCs. For example, a service verification script needs ports or protocol parameters discovered by a reconnaissance script, while an interface verification script requires local communication capabilities to be available.

[0003] For example, publication number CN110348218A, invention titled "A Vulnerability Testing Method and Apparatus Based on an In-Vehicle Terminal System," describes a method comprising: A) obtaining the system architecture of the in-vehicle terminal system under test; B) obtaining the vulnerability verification script number and corresponding vulnerability verification script execution environment information of a vulnerability verification script library; and also obtaining vulnerability verification script execution result information containing various vulnerability verification script execution results; C) preparing the test environment based on the vulnerability verification script execution environment information, including whether root privileges are required, the script execution terminal directory, and whether execution permissions are required; D) loading the vulnerability verification script file under the corresponding system architecture according to the vulnerability verification script number; and E) executing the vulnerability verification script file to obtain the corresponding vulnerability verification script execution result, comparing it with the vulnerability verification script execution result information to obtain the vulnerability detection result, and saving the vulnerability detection result to a vulnerability detection result information library.

[0004] For example, the invention disclosed in CN107480531A, entitled "Automatic Software Vulnerability Verification System and Method Based on Vulnerability Database," involves obtaining vulnerability information from the internet, collecting vulnerability attack scripts, building a local vulnerability database using existing frameworks, selecting suitable attack scripts from the database, remotely executing the attack scripts, or placing the attack scripts on the target for execution, and identifying the target's response during attack execution. This method is similar in concept to fuzz testing; however, due to the accurate correspondence between test cases and software versions in the vulnerability database verification, this method can quickly trigger vulnerabilities, significantly improving testing efficiency.

[0005] While existing multi-agent vulnerability verification systems can automatically decompose reconnaissance, planning, and execution tasks, the lack of a unified constraint mechanism on PoC parameter dependencies, environmental capabilities, and execution evidence makes it difficult for multi-agent systems to accurately identify parameter passing relationships, authentication state inheritance relationships, and environmental capability requirements when planning attack paths. As a result, the generated attack paths often remain only at the theoretical planning level and cannot guarantee their executability in actual network environments.

[0006] Furthermore, traditional attack path graphs are mostly generated from asset topology, vulnerability databases, or expert rule reasoning. The attack paths they construct only reflect the theoretical possibility of vulnerability exploitation. They cannot prove that the nodes in the attack graph have been actually verified, nor can they associate parameter grant records and evidence indexes, making the verification results lack verifiable empirical support.

[0007] To address the technical problem in the existing technologies mentioned above, where traditional attack path graphs generate attack paths based solely on asset topology or external knowledge bases, thus detaching from the executable conditions of the actual environment and making the attack paths unverifiable, no effective solution has yet been proposed. Summary of the Invention

[0008] The embodiments of this disclosure provide a method, apparatus, and storage medium for generating attack path graphs based on Proof-of-Concept (PoC), which at least solves the technical problem in the prior art where traditional attack path graphs generate attack paths solely based on asset topology or external knowledge base reasoning, thus deviating from the executable conditions of the actual environment and making the attack paths unverifiable.

[0009] According to one aspect of the present disclosure, a method for generating an attack path graph based on Proof-of-Concept (PoC) is provided, comprising: determining a plurality of first proof-of-concept scripts in a proof-of-concept script library, and obtaining a first grantable parameter in the structured metadata of each first proof-of-concept script; determining each first proof-of-concept script as a first node, and determining directed edges between each first node to construct a proof-of-concept dependency graph, wherein the directed edges represent conditions that, after the first proof-of-concept script corresponding to the current first node is successfully executed, can provide conditions for executing the first proof-of-concept script corresponding to the next first node; determining the activatability of each first node according to the currently available parameter set, and determining an activated execution pool, wherein the currently available parameter set is the set of parameters that have been actually obtained at the current time and can provide the first proof-of-concept script call; executing a second proof-of-concept script in the activated execution pool that meets the execution conditions, and marking the second node corresponding to the successfully executed second proof-of-concept script as a success state according to the execution result; and when there is no second proof-of-concept script in the activated execution pool that meets the execution conditions, generating an empirical attack path graph based on all successful second nodes and the directed edges between successful second nodes.

[0010] According to another aspect of the present disclosure, a storage medium is also provided, the storage medium including a stored program, wherein, when the program is executed, a processor performs any of the methods described above.

[0011] According to another aspect of the embodiments of this disclosure, a PoC-based attack path graph generation apparatus is also provided, comprising: a script determination and parameter acquisition module, configured to determine multiple first proof-of-concept scripts in a proof-of-concept script library and acquire a first grantable parameter from the structured metadata of each first proof-of-concept script; a proof-of-concept dependency graph construction module, configured to determine each first proof-of-concept script as a first node and determine directed edges between each first node to construct a proof-of-concept dependency graph, wherein the directed edges represent conditions that, after the first proof-of-concept script corresponding to the current first node is successfully executed, can provide conditions for executing the first proof-of-concept script corresponding to the next first node; and an activated execution pool determination module, used for... Based on the currently available parameter set, the activationability of each first node is determined to identify the activated execution pool. The currently available parameter set refers to the set of parameters that have been actually obtained at the current moment and can provide the first proof-of-concept script for invocation. The success status marking module is used to execute the second proof-of-concept script in the activated execution pool that meets the execution conditions, and marks the second node corresponding to the successfully executed second proof-of-concept script as a success status based on the execution result. The empirical attack path graph generation module is used to generate an empirical attack path graph based on all the second nodes in the success status and the directed edges between the second nodes in the success status when there are no second proof-of-concept scripts in the activated execution pool that meet the execution conditions.

[0012] According to another aspect of the present disclosure, a PoC-based attack path graph generation apparatus is also provided, comprising: a processor; and a memory connected to the processor, configured to provide the processor with instructions for processing the following steps: determining a plurality of first proof-of-concept scripts in a proof-of-concept script library, and obtaining a first grantable parameter from the structured metadata of each first proof-of-concept script; determining each first proof-of-concept script as a first node, and determining directed edges between each first node, constructing a proof-of-concept dependency graph, wherein a directed edge indicates that after the first proof-of-concept script corresponding to the current first node is successfully executed, it can provide the path to execute the next first node. The conditions for a proof-of-concept script are as follows: Based on the currently available parameter set, the activatability of each first node is determined to identify the activated execution pool, where the currently available parameter set is the set of parameters that have been actually obtained at the current moment and can provide the first proof-of-concept script for invocation; the second proof-of-concept script in the activated execution pool that meets the execution conditions is executed, and the second node corresponding to the successfully executed second proof-of-concept script is marked as successful based on the execution result; and when there is no second proof-of-concept script in the activated execution pool that meets the execution conditions, an empirical attack path graph is generated based on all successful second nodes and the directed edges between successful second nodes.

[0013] This application first identifies multiple first proof-of-concept scripts in a proof-of-concept script library, and then further obtains the first grantable parameter from the structured metadata of each first proof-of-concept script. Next, each first proof-of-concept script is identified as a first node in the proof-of-concept dependency graph, and the directed edges between these first nodes are further determined. After constructing the proof-of-concept dependency graph, based on the current set of available parameters, the activation of each first node in the graph is assessed to determine the first proof-of-concept scripts that are currently ready to be executed. The first nodes that pass the activation assessment are then marked as activated, thus identifying the activated execution pool. Further, second proof-of-concept scripts that meet the execution conditions are selected from the activated execution pool for execution, and their execution results are obtained. The second node corresponding to the successfully executed second proof-of-concept script is then marked as successful based on the execution result. When no second proof-of-concept scripts that meet the execution conditions exist in the activated execution pool, an empirical attack path graph is generated based on all successful second nodes and the directed edges between them.

[0014] Therefore, this application can automatically deduce dependencies from the structured metadata of the first proof-of-concept script itself, thereby automatically reconstructing the proof-of-concept dependency graph when the proof-of-concept script library is updated. Thus, this application achieves low-cost maintenance of the proof-of-concept script library and always aligns with actual proof-of-concept capabilities. Furthermore, the empirical attack path graph output by this application is supported by the execution results of the second proof-of-concept script, representing the actual verified path, not the theoretically achievable path. This solves the technical problem in existing technologies where traditional attack path graphs generate attack paths solely based on asset topology or external knowledge base reasoning, thus detaching from the executable conditions of the actual environment and making the attack paths unverifiable. Attached Figure Description

[0015] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this application, illustrate exemplary embodiments of this disclosure and are used to explain this disclosure, but do not constitute an undue limitation of this disclosure. In the drawings: Figure 1 This is a hardware structure block diagram of a computing device for implementing the method according to Embodiment 1 of this disclosure; Figure 2 This is a flowchart illustrating the attack path graph generation method based on PoC according to Embodiment 1 of this disclosure; Figure 3 This is a schematic diagram of the directed edge construction of the verification-of-concept dependency graph according to the method described in Embodiment 1 of this disclosure; Figure 4 This is a flowchart illustrating the generation of an empirical attack path graph according to the method described in Embodiment 1 of this disclosure; Figure 5 This is a schematic diagram showing the result of the activation determination according to the method described in Embodiment 1 of this disclosure; Figure 6 This is a schematic diagram illustrating the results of a comprehensive value assessment based on the method described in Embodiment 1 of this disclosure; Figure 7 This is a schematic diagram of the structure of an empirical attack path graph according to Embodiment 1 of this disclosure; Figure 8 This is a flowchart illustrating the node states according to Embodiment 1 of this disclosure; Figure 9 This is a schematic diagram of the PoC-based attack path graph generation device according to Embodiment 2 of this disclosure; Figure 10 This is a schematic diagram of the PoC-based attack path graph generation device according to Embodiment 3 of this disclosure. Detailed Implementation

[0016] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this disclosure.

[0017] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0018] Example 1

[0019] According to this embodiment, a method embodiment for generating attack path graphs based on Proof of Concept (PoC) is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0020] The method embodiments provided in this example can be executed on mobile terminals, computer terminals, servers, or similar computing devices. Figure 1 A hardware block diagram of a computing device for implementing a Proof-of-Concept (PoC)-based attack path graph generation method is shown. Figure 1 As shown, a computing device may include one or more processors (processors may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory for storing data, a transmission device for communication functions, and an input / output interface. The memory, transmission device, and input / output interface are connected to the processor via a bus. In addition, it may also include a display, keyboard, and cursor control device connected to the input / output interface. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, a computing device may also include... Figure 1The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0021] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element in a computing device. As involved in the embodiments of this disclosure, the data processing circuits serve as processor control (e.g., selection of a variable resistor termination path connected to an interface).

[0022] The memory can be used to store software programs and modules of application software, such as the program instruction / data storage device corresponding to the PoC-based attack path graph generation method in this embodiment of the present disclosure. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the PoC-based attack path graph generation method of the aforementioned application. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the computing device via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0023] The transmission device is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the computing device's communication provider. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0024] The display can be, for example, a touchscreen liquid crystal display (LCD), which allows users to interact with the user interface of the computing device.

[0025] It should be noted here that, in some optional embodiments, the above... Figure 1 The computing device shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computing devices.

[0026] Under the aforementioned operating environment, according to the first aspect of this embodiment, a method for generating attack path graphs based on Proof-of-Concept (PoC) is provided. This method consists of... Figure 1 The computing device shown is implemented. Figure 2 A flowchart illustrating the method is shown below. (Refer to...) Figure 2 As shown, the method includes: S202: Identify multiple first proof-of-concept scripts in the proof-of-concept script library and obtain the first grantable parameter from the structured metadata of each first proof-of-concept script; S204: Determine each first concept proof script as the first node, and determine the directed edges between each first node to construct a concept proof dependency graph, where the directed edges represent the conditions that can be provided to execute the first concept proof script corresponding to the next first node after the first concept proof script corresponding to the current first node is executed successfully. S206: Based on the current set of available parameters, determine the activatability of each first node and identify the activated execution pool. The current set of available parameters is the set of parameters that have been actually obtained at the current moment and can provide the first proof-of-concept script for invocation. S208: Execute the second proof-of-concept script that meets the execution conditions in the activated execution pool, and mark the second node corresponding to the successfully executed second proof-of-concept script as a success state based on the execution result; S210: When there is no second proof-of-concept script that meets the execution conditions in the activated execution pool, generate an empirical attack path graph based on all successful second nodes and the directed edges between successful second nodes.

[0027] Specifically, the computing device first identifies multiple first proof-of-concept scripts in a proof-of-concept script library. This proof-of-concept script library is a collection of scripts pre-built and stored in a computing device-readable storage medium, where each proof-of-concept script is used to verify a specific type of vulnerability.

[0028] The computing device then further acquires the structured metadata of each first proof-of-concept script. This structured metadata refers to the attribute information recorded in a standardized format in each first proof-of-concept script, including required parameters, capability configuration tags, first grantable parameters, attack surface category, vulnerability type category, and severity level (corresponding to step S202). The first grantable parameters are used to indicate the first grantable parameter type or parameter value that can be added to the currently available parameter set.

[0029] Next, the computing device identifies each first proof-of-concept script as a first node in the proof-of-concept dependency graph, and further determines the directed edges between each first node in the graph. This proof-of-concept dependency graph expresses the dependencies between the first proof-of-concept scripts, where each script corresponds to only one node. Furthermore, the directed edges between first nodes in the graph indicate that successful execution of the first script corresponding to the current first node provides the preconditions for the execution of the next first script (corresponding to step S204).

[0030] After constructing the proof-of-concept dependency graph, the computing device, based on the currently available set of parameters, begins to determine the activatability of each first node in the graph to identify the first proof-of-concept script that is ready to be executed at the current moment. This currently available set of parameters refers to all parameters accumulated by the computing device up to the current moment that can provide the necessary calls to the first proof-of-concept script. The specific method for determining activatability will be explained later.

[0031] It should be noted that during the complete activation determination process, the computing device also needs to simultaneously check whether the execution capability status of the target environment meets the hardware or communication capability requirements indicated by the capability configuration tag of the first node (i.e., capability gating check). The execution capability status of the target environment includes network interface, authentication status, local debugging channel, local communication interface, or physical communication interface.

[0032] In other words, when the capability configuration label of the first node includes network interface, local communication, wireless communication, diagnostic channel, debug channel, physical communication interface, or authentication status, the computing device checks the actual availability of the corresponding interface parameters, device identifier, channel parameters, connection status, or authentication status. Furthermore, the first node can only pass the capability gating check if the execution capability status of the corresponding target environment is actually available. CAN bus, Bluetooth, radio frequency, DoIP, and ADB can be specific embodiments of the capability gating in the vehicle electronic system.

[0033] Then, the computing device marks the first node determined by the activatability determination as activated, thereby determining the activated execution pool (corresponding to step S206).

[0034] Furthermore, the computing device needs to select a second proof-of-concept script that meets the execution conditions from the activated pool of pending executions as the object of execution in each round. The specific execution conditions will be explained later.

[0035] Next, after the computing device selects the second proof-of-concept script, it calls the executable code corresponding to the second proof-of-concept script, runs the second proof-of-concept script in the target environment, and obtains its execution result. Then, based on the execution result, the computing device marks the second node corresponding to the successfully executed second proof-of-concept script as a success (corresponding to step S208).

[0036] During execution, the computing device continuously monitors the status of the activated execution pool. When the computing device detects that there are no longer any second proof-of-concept scripts in the activated execution pool that meet the execution conditions, the computing device enters the empirical attack path graph generation phase.

[0037] Specifically, the computing device traverses the entire proof-of-concept dependency graph, filters out all second nodes in successful states, and further extracts the directed edges between these second nodes marked as successful states from the proof-of-concept dependency to generate an empirical attack path graph (corresponding to step S210). At the same time, the computing device labels each path represented by a directed edge with the verification state, path depth, attack surface category, evidence index, and granted parameter record.

[0038] It should be noted that this empirical attack path graph differs from traditional attack graphs. Traditional attack path graphs derive their paths solely from asset topology, vulnerability databases, or expert rules, reflecting only the theoretical possibility of vulnerability exploitation and failing to prove whether nodes on the path have been actually verified in a real environment. In contrast, the empirical attack path graph generated in this application corresponds to a real and successfully executed second proof-of-concept script for each second node, and each directed edge corresponds to a real parameter pass. In other words, the final empirical attack path graph output by this application represents actually verified paths, not theoretically reachable paths.

[0039] As described in the background section above, existing multi-agent vulnerability verification systems can automatically decompose reconnaissance, planning, and execution tasks. However, due to the lack of a unified constraint mechanism for PoC parameter dependencies, environmental capabilities, and execution evidence, multi-agent systems struggle to accurately identify parameter passing relationships, authentication state inheritance relationships, and environmental capability requirements when planning attack paths. Consequently, the generated attack paths often remain only at the theoretical planning level and cannot guarantee their executability in actual network environments.

[0040] Furthermore, traditional attack path graphs are mostly generated from asset topology, vulnerability databases, or expert rule reasoning. The attack paths they construct only reflect the theoretical possibility of vulnerability exploitation. They cannot prove that the nodes in the attack graph have been actually verified, nor can they be associated with parameter grant records and evidence indexes, making the verification results lack verifiable empirical support. At the same time, in heterogeneous network environments, differences in interface openness, authentication mechanisms, local debugging channels, and physical communication capabilities directly affect the executability of PoC scripts. This can lead to existing technologies scheduling scripts in the absence of necessary environmental capabilities, resulting in execution failures or unreliable results.

[0041] In view of this, this application first identifies multiple first proof-of-concept scripts in the proof-of-concept script library, and then further obtains the first grantable parameter from the structured metadata of each first proof-of-concept script. Next, each first proof-of-concept script is identified as a first node in the proof-of-concept dependency graph, and the directed edges between each first node in the graph are further determined. After constructing the proof-of-concept dependency graph, based on the current set of available parameters, the activation of each first node in the graph is assessed to determine the first proof-of-concept scripts that are currently ready to be executed. The first nodes that pass the activation assessment are then marked as activated, thus identifying the activated execution pool. Further, second proof-of-concept scripts that meet the execution conditions are selected from the activated execution pool for execution, and their execution results are obtained. The second node corresponding to the successfully executed second proof-of-concept script is then marked as successful based on the execution result. When no second proof-of-concept scripts that meet the execution conditions exist in the activated execution pool, an empirical attack path graph is generated based on all successful second nodes and the directed edges between them.

[0042] Therefore, this application can automatically deduce dependencies from the structured metadata of the first proof-of-concept script itself, thereby automatically reconstructing the proof-of-concept dependency graph when the proof-of-concept script library is updated. Thus, this application achieves low-cost maintenance of the proof-of-concept script library and always aligns with actual proof-of-concept capabilities. Furthermore, the empirical attack path graph output by this application is supported by the execution results of the second proof-of-concept script, representing the actual verified path, not the theoretically achievable path. This solves the technical problem in existing technologies where traditional attack path graphs generate attack paths solely based on asset topology or external knowledge base reasoning, thus detaching from the executable conditions of the actual environment and making the attack paths unverifiable.

[0043] Optionally, the operation of determining each first proof-of-concept script as a first node and determining the directed edges between each first node includes: obtaining the capability configuration tag and required parameters from the structured metadata corresponding to each first proof-of-concept script, and determining each first proof-of-concept script as a first node; determining the current first node with the first grantable parameter and the next first node with the required parameter based on the capability configuration tag, the first grantable parameter, the required parameter, and the mapping relationship between the capability configuration tag and the first grantable parameter in the preset parameter-capability mapping table; and establishing a directed edge from the current first node to the next first node when the first grantable parameter of the current first node contains the required parameter of the next first node.

[0044] Specifically, the computing device first acquires the structured metadata of each first proof-of-concept script, and extracts from the structured metadata a capability configuration tag, a first grantable parameter, and required parameters for each first proof-of-concept script. The capability configuration tag indicates the type of hardware or communication capability required for the execution of the first proof-of-concept script, and the required parameters indicate the parameters that must be acquired before the first proof-of-concept script can be executed. The computing device then identifies each first proof-of-concept script as a first node in the proof-of-concept dependency graph.

[0045] Next, the computing device begins to determine the directed edges between the various first nodes. Specifically, the computing device first reads a pre-defined parameter-capability mapping table, which predefines the correspondence between capability configuration tags and the set of first grantable parameters. Then, based on this parameter-capability mapping table, and in conjunction with the actual capability configuration tags and first grantable parameters of each first proof-of-concept script, the computing device determines which first nodes possess the first grantable parameters (i.e., the current first node) and which first nodes' required parameters have not yet been satisfied (i.e., the next first node, hereinafter referred to as the target node).

[0046] Subsequently, the computing device compares the first grantable parameter of each current first node with the required parameters of all target nodes one by one. When the computing device finds that the grantable parameters of a current first node contain the required parameters of a target node, it determines that the current first node provides the necessary parameter dependency for the execution of the first proof-of-concept script corresponding to that target node. Therefore, the computing device establishes a directed edge between the two first nodes, with the direction of the directed edge pointing from the current first node to the target node.

[0047] It should be noted that the current first node and the target node mentioned above are relative concepts. That is, in the proof-of-concept dependency graph constructed by the computing device, a first node may act as a source node on a directed edge, providing parameters to other first nodes, and at the same time, it may also act as a target node on another edge, receiving parameters provided by other first nodes.

[0048] For example, refer to Figure 3 As shown, when the first node The first grantable parameter includes the first node When the required parameters are obtained, the computing device is at the first node. and the first node Establish a directed edge between them Conversely, the first node The first grantable parameter does not include the first node. , and The required parameters are not available, therefore the computing device is not in the first node. and the first node , as well as Establish directed edges between them.

[0049] Similarly, when the first node The first grantable parameter includes the first node When the required parameters are obtained, the computing device is at the first node. and the first node Establish a directed edge between them When the first node The first grantable parameter includes the first node When the required parameters are obtained, the computing device is at the first node. and the first node Establish a directed edge between them When the first node The first grantable parameter includes the first node When the required parameters are obtained, the computing device is at the first node. and the first node Establish a directed edge between them .

[0050] Furthermore, the directed edges in the proof-of-concept dependency graph constructed by the computing device include three types: parametric dependency edges, category progression edges, and attack surface link edges. The specific construction methods for these three types of directed edges are as follows: The computing device iterates through the required parameters of each non-reconnaissance class first node B and queries the parameter-capability mapping table for capability configuration tags that provide the required parameters. Then, the computing device establishes parameter dependency edges from A to B for all first nodes A with that capability configuration tag. For example, if the required parameter of a non-reconnaissance class first node B includes `can_interface`, and the CAN extended configuration in the capability configuration tag can be granted to `can_interface`, then all first nodes A corresponding to capability configuration tags with CAN extended configuration will establish parameter dependency edges with the non-reconnaissance class first nodes B.

[0051] For each reconnaissance node C, the computing device is a non-reconnaissance node D with the required parameters and not configured with the same capabilities as the reconnaissance node C. A category progression edge is established from C to D.

[0052] When the category number of the first node E belonging to the vulnerability type is The category number of the first node F is 2. When the first node E and the first node F belong to the same attack surface or the same protocol, the computing device establishes attack surface links from E to F for the first nodes E and F. This reflects the progressive depth within the same attack surface. Subsequently, when constructing the proof-of-concept dependency graph, the computing device removes duplicate directed edges and maintains two query indexes: a forward adjacency list and a reverse adjacency list.

[0053] Thus, computing devices can automatically deduce directed edges through the structured metadata of the first proof-of-concept script itself, without relying on external knowledge graphs or human expert rules. When the proof-of-concept script library is updated, the proof-of-concept dependency graph can be automatically reconstructed, resulting in low maintenance costs and always keeping it aligned with the actual script capabilities.

[0054] Optionally, based on the current set of available parameters, the activation of each first node is determined to identify the operations that have been activated and are waiting to be executed. This includes: traversing each first node to obtain the required parameters corresponding to each first node; comparing the required parameters of each first node with the first grantable parameters in the current set of available parameters; and marking the first node whose required parameters are all present in the current set of available parameters as activated and adding it to the activated waiting pool.

[0055] Specifically, in combination Figure 4 As shown, after constructing the proof-of-concept dependency graph, the computing device begins to determine the activatability of each first node in the proof-of-concept dependency graph to identify which first proof-of-concept scripts are ready to be executed at the current moment.

[0056] Specifically, the computing device traverses each first node in the proof-of-concept dependency graph and, for the currently traversed first node, retrieves the required parameters from its corresponding structured metadata. In other words, the computing device must first obtain all the parameters that each first node must have before its corresponding first proof-of-concept script can be executed.

[0057] Subsequently, the computing device compares the required parameters of the first node with the parameters in the currently available parameter set one by one to check whether the currently available parameter set contains every parameter required by the first node.

[0058] refer to Figure 5 As shown, when all the required parameters of the first node are present in the currently available parameter set, the computing device marks it as activated and adds the first node to the activated execution pool to wait for it to be selected for execution later.

[0059] When the required parameters for the first node are not fully present in the currently available parameter set, the computing device keeps it in a pending state and does not add it to the activated execution pool, waiting for new parameters to be granted later to perform an activation determination again.

[0060] By using the above methods, we can avoid blindly executing the first proof-of-concept script without meeting the data requirements, thus effectively saving detection time and system resources.

[0061] Optionally, the operation of executing a second proof-of-concept script that meets the execution conditions in the activated execution pool includes: comparing the current probe budget value with a budget threshold, wherein the probe budget value is used to indicate the total amount of resources that can be consumed; when the probe budget value is greater than the budget threshold, determining the comprehensive value of each first node in the activated execution pool based on the hazard level, dependency depth, attack surface coverage, execution cost, and execution risk of each first node; selecting the first node with the highest comprehensive value as the second node to be executed; and executing the second proof-of-concept script corresponding to the second node and obtaining the execution result of the second proof-of-concept script.

[0062] Specifically, please refer to Figure 4 As shown, before executing a second proof-of-concept script that meets the execution conditions, the computing device first performs a probe budget check based on a budget threshold. The probe budget is the upper limit of resource consumption during system operation, used to prevent the verification process from looping indefinitely or exceeding preset resource limits. The budget threshold is the minimum remaining budget limit that allows continued execution of the second proof-of-concept script; this budget threshold can be defined by those skilled in the art based on the number of scripts executed, runtime, or number of network requests.

[0063] The computing device then compares the current probe budget value with the budget threshold. When the probe budget value is greater than the budget threshold, it indicates that there are sufficient available resources to execute the second proof-of-concept script that meets the execution conditions.

[0064] Therefore, refer to Figure 6 As shown, the computing device further performs a comprehensive value analysis on each first node in the activated execution pool according to the following formula. Assessment: (1) Among them, comprehensive value It is a score calculated based on five dimensions, used to measure the execution priority of each first proof-of-concept script in the active execution pool at the current moment. The scores are normalized based on the hazard level, with the most severe level receiving the highest score and the least severe level receiving the lowest score; the scores depend on the depth of the hazard level. The depth at which the first node is activated is taken and normalized. The depth of the root node is 0. The depth of the next first node activated by the root node with depth 0 is 1, and so on. Attack surface coverage score. This is used to determine whether the vulnerability type and attack surface category of the first node have been covered by the executed second proof-of-concept script. If a dimension is not covered, the computing device determines that executing the second proof-of-concept script can expand the scope of verification and assigns a higher first score to that dimension. If a dimension has already been covered, it means that executing the second proof-of-concept script cannot bring novelty to that dimension, and assigns a lower second score to that dimension. The computing device then takes the average of the first and second scores as the attack surface coverage score. Execution cost score. A higher value is chosen when node capability configuration involves hardware interfaces or requires many parameters. (Execution risk score) It is obtained by normalizing the damage level and superimposed with risk increment when the first node is marked as having interference. , , , , These are configurable non-negative weight coefficients. It should be noted that the normalized correspondences and weight values ​​mentioned above are configurable examples and do not constitute a limitation on the values.

[0065] Furthermore, the selection of computing devices should consider comprehensive value. The largest first node is designated as the second node to be executed. When batch execution of second proof-of-concept scripts that meet the execution conditions is required, the computing device is considered to have a comprehensive value. The largest front This comprehensive value assessment assigns higher value to high-hazard, deep-hitting, uncovered attack surface second-proof-of-concept scripts, while penalizing high-cost and high-risk first-proof-of-concept scripts.

[0066] Next, the computing device executes the second proof-of-concept script corresponding to the second node. Specifically, the computing device calls the executable code of the second proof-of-concept script, runs it in the target environment, and obtains its execution results.

[0067] This allows the computing device to ensure the verification process operates within a controllable resource consumption range through probing budget checks, preventing system crashes or test tasks from failing to complete on time due to infinite loops or excessive execution. Furthermore, this application can consider the severity level, dependency depth, attack surface coverage, execution cost, and execution risk of each first node while evaluating its overall value, balancing vulnerability severity with detection efficiency, and avoiding the problem of unmet preconditions caused by ranking solely by severity.

[0068] Optionally, the operation of marking the second node corresponding to the successfully executed second proof-of-concept script as a success state based on the execution result includes: determining whether the second proof-of-concept script meets preset postconditions based on the execution result, wherein the postconditions include successful acquisition of reconnaissance information, successful parameter discovery, successful confirmation of service or protocol response, positive vulnerability verification, or successful generation of evidence index; if the second proof-of-concept script meets the postconditions, then marking the second node corresponding to the second proof-of-concept script as a success state, and updating the current available parameter set according to the current second grantable parameter of the second node; and according to the updated current available parameter set, re-determining the activatability of the first node that has not yet been executed, adding the newly qualified first node to the activated pending execution pool, and executing the second proof-of-concept scripts in the activated pending execution pool that meet the execution conditions.

[0069] Specifically, after the computing device obtains the execution result of the second proof-of-concept script, it compares the execution result with the preset postconditions of the second proof-of-concept script. These postconditions are predefined criteria for determining success states in the structured metadata or script logic of the second proof-of-concept script. These postconditions include successful acquisition of reconnaissance information, successful parameter discovery, successful confirmation of service or protocol response, positive vulnerability verification, or successful generation of evidence index.

[0070] When the computing device determines that the second proof-of-concept script meets the postconditions, it marks the second node corresponding to the second proof-of-concept script as successful. Then, the computing device directly adds the second grantable parameter from the structured metadata of the second node to the currently available parameter set to complete the update of the currently available parameter set.

[0071] It should be noted that the first set of grantable parameters indicates which parameters can be granted after the first proof-of-concept script executes successfully. In other words, before the first proof-of-concept script executes, the first set of grantable parameters has not yet been actually acquired from the current set of available parameters. Only after the second proof-of-concept script executes successfully and meets the post-conditions will the grantable parameters corresponding to the second proof-of-concept script be added to the current set of available parameters. The second proof-of-concept script is the first proof-of-concept script that meets the execution conditions.

[0072] Furthermore, when a second node is marked as successful, the computing device can trace back along its activation source node (the previous second node along the directed edge pointing to this second node) to the root node (the first second node to execute the second proof-of-concept script), obtaining the complete attack path. Moreover, when the execution result of the second proof-of-concept script corresponding to the second node contains new parameters in addition to structured metadata, the computing device adds the discovered new parameters to the currently available parameter set, enabling subsequent activation determination to utilize parameters dynamically discovered during execution.

[0073] After the current set of available parameters is updated, the computing device begins a new round of activation determination. Specifically, the computing device traverses all unexecuted first nodes in the proof-of-concept dependency graph, compares the required parameters of each first node with the updated set of currently available parameters, and checks whether the execution capability status of the target environment meets the capability configuration tag requirements of the first node.

[0074] For a first node that is in a pending state due to the lack of a certain parameter, if that parameter is granted by the second proof-of-concept script that has just been successfully executed, the first node will pass the activation determination in this round of determination, be marked as activated and added to the activated execution pool, waiting to be selected for execution later.

[0075] This dynamic activation mechanism, driven by execution result feedback, allows the verification process to operate independently of a pre-arranged fixed execution order, dynamically adjusting subsequent verification directions based on actual execution results. In other words, the successful execution of any script can unlock new attack paths without requiring manual prediction of script dependencies, thus achieving online adaptive adjustment of attack paths.

[0076] Those skilled in the art should note that the above is merely an example of one of multiple first nodes (e.g., the first node with the highest overall value). In practice, when multiple first nodes are involved, the above process needs to be iterated repeatedly to determine multiple second nodes that can be marked as successful.

[0077] Optionally, the operation of determining whether the second proof-of-concept script meets the preset postconditions based on the execution result includes: if the second proof-of-concept script does not meet the postconditions, then marking the second node corresponding to the second proof-of-concept script as a failure.

[0078] Specifically, after obtaining the execution result of the second proof-of-concept script, the computing device compares the execution result with preset postconditions. If the second proof-of-concept script fails to meet the postconditions in the execution result, the computing device marks the second node corresponding to the second proof-of-concept script as a failure. At the same time, the computing device records the reason for the failure of the second proof-of-concept script.

[0079] By employing the above methods, invalid repeated execution of the same script can be avoided. Furthermore, distinguishing between the success and failure states of the second node ensures that the execution results of each second-concept verification script during the verification process are traceable and auditable.

[0080] Optionally, when the activated execution pool does not contain a first proof-of-concept script or when the probe budget value is less than the budget threshold, the second node of all successful states is used as the path node, and the directed edge between the second nodes of successful states is used as the path edge to generate an empirical attack path graph.

[0081] Specifically, the computing device continuously monitors the status of the active execution pool and the consumption of the remaining probe budget during the execution loop. Since the number of first nodes in the active execution pool gradually decreases with each execution round—that is, the computing device removes second nodes that have executed corresponding second proof-of-concept scripts from the active execution pool—the number of nodes in the active execution pool can be dynamically reduced. Furthermore, since executing each second proof-of-concept script consumes a corresponding amount of probe budget, the probe budget also decreases as the second proof-of-concept scripts are executed.

[0082] Therefore, when the computing device detects that there are no first-concept proof-of-concept scripts in the active execution pool, it determines that all currently active second nodes have been executed. Alternatively, when the computing device detects that the current probe budget is less than the budget threshold, it determines that system resources are insufficient to support the execution of second-concept proof-of-concept scripts. Even if there are still second nodes to be executed in the active execution pool, the computing device will not continue execution to prevent resource overrun.

[0083] Therefore, if any of the above situations occur, the computing device will not continue with the above iterative steps. The computing device then begins generating the empirical attack path graph. Specifically, the computing device traverses the entire proof-of-concept dependency graph, filters out the second nodes of all successful states, and extracts the directed edges between these second nodes of successful states.

[0084] Further, refer to Figure 7 As shown, the computing device uses the second nodes of these successful states as path nodes and the directed edges between these second nodes of successful states as path edges, thereby generating an empirical attack path graph.

[0085] In summary, during the activation determination of each first node by the computing device, the computing device can directly mark reconnaissance-type first nodes as activated. Non-reconnaissance-type first nodes require a two-step check: the first step is a parameter availability check, determining whether all required parameters exist in the currently available parameter set. The second step is a capability gating check; when the capability configuration label of the first node involves local communication, wireless communication, diagnostic channels, debugging channels, or authentication status, the corresponding capabilities are checked for actual availability. Only when a non-reconnaissance-type first node passes both of these checks will the computing device mark it as activated. CAN adapters, Bluetooth adapters, RF devices, DoIP channels, and ADB connections can be used as specific capability examples in the vehicle electronic system.

[0086] In addition, refer to Figure 8 As shown, the computing device is configured with six states for marking the first node, including pending, activated, skipped, executing, successful, and failed.

[0087] Specifically, the initial state of the first node is to be determined by the computing device.

[0088] When all the required parameters for the first node are present in the currently available set and the capability configuration tag of the first node passes the capability gating check, the computing device will convert the first node from a pending state to an activated state.

[0089] If not all required parameters for the first node are present in the current available set, or if the capability configuration label of the first node fails the capability gating check, the computing device will switch the first node from a pending state to a skipped state.

[0090] When the first node, which is marked as active, is determined to meet the execution conditions, the computing device will change the first node from the active state to the execution state.

[0091] When the first node, which is marked as being in the execution state, is determined to meet the execution conditions, the computing device will treat the first node as the second node and convert the second node, which is in the execution state, to the successful state.

[0092] When the first node marked as being in execution is determined to not meet the execution conditions, the computing device will convert the first node in execution to a failed state.

[0093] Success, failure, and skipping are all final states of the first node. Furthermore, when the computing device transitions a second node from the executing state to the successful state, it updates the current set of available parameters based on the second grantable parameters generated after the successful execution of the second proof-of-concept script corresponding to that second node. Simultaneously, the computing device re-determines the activatability of the first node. This ensures that the lifecycle of each first node is traceable and auditable, with state transitions triggered by explicit conditions.

[0094] In an exemplary execution process, the computing device first reads the structured metadata of the proof-of-concept script library and uses the target address, interface identifier, or other basic parameters provided at test initiation as the initial set of currently available parameters. During the initial activation phase, the first proof-of-concept script corresponding to the first node of the reconnaissance class, as well as the first node of the network, application, or configuration check class that only depends on basic parameters, are determined by the computing device to be activatable nodes. Meanwhile, for first nodes involving local communication, wireless communication, diagnostic channels, debug channels, or authentication status, if the corresponding capabilities are not yet available, the computing device will maintain the pending state of that first node.

[0095] Furthermore, the computing device selects the second node with the highest overall value from the activated pool of pending executions for execution. When the second node executes successfully and generates new parameters such as target port, service type, interface name, protocol session, device identifier, or authentication information, the computing device adds these new parameters to the currently available parameter set and re-determines the activatability of the first node in the pending state, thereby activating the next first node that meets the prerequisites.

[0096] Subsequently, the computing device continues to execute the above process, recording the activation source, granting parameters, and evidence index for each successful second node. Simultaneously, the computing device records the reason for inactivation, execution failure, or capability gating for each first node in a failed or skipped state. When the activated execution pool is empty, the probe budget is exhausted, or a preset stopping condition is met, the computing device uses successful second nodes as path nodes and directed edges between all successful second nodes as path edges, thereby generating an empirical attack path graph.

[0097] In addition, refer to Figure 1 As shown, according to a second aspect of this embodiment, a storage medium is provided. The storage medium includes a stored program, wherein, when the program is executed, a processor performs any of the methods described above.

[0098] Therefore, according to this embodiment, this application can automatically deduce dependencies from the structured metadata of the first proof-of-concept script itself, thereby automatically reconstructing the proof-of-concept dependency graph when the proof-of-concept script library is updated. Thus, this application achieves low-cost maintenance of the proof-of-concept script library and always aligns with actual proof-of-concept capabilities. Furthermore, the empirical attack path graph finally output by this application is supported by the execution results of the second proof-of-concept script, representing the actual verified path, not the theoretically achievable path. This solves the technical problem in the prior art where traditional attack path graphs generate attack paths solely based on asset topology or external knowledge base reasoning, thus detaching from the executable conditions of the actual environment and making the attack paths unverifiable.

[0099] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0100] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0101] Example 2

[0102] Figure 9 An attack path graph generation apparatus based on Proof-of-Concept (PoC) according to this embodiment is shown, which corresponds to the method described in Embodiment 1. (Reference) Figure 9As shown, the device includes: a script determination and parameter acquisition module 910, used to determine multiple first proof-of-concept scripts in a proof-of-concept script library and acquire the first grantable parameter from the structured metadata of each first proof-of-concept script; a proof-of-concept dependency graph construction module 920, used to determine each first proof-of-concept script as a first node and determine the directed edges between each first node to construct a proof-of-concept dependency graph, wherein the directed edges represent the conditions that can be provided to execute the first proof-of-concept script corresponding to the next first node after the first proof-of-concept script corresponding to the current first node is successfully executed; and an activated pending execution pool determination module 930, used to determine the first proof-of-concept scripts to be executed based on the currently available parameter set. The first node is activated to determine the activated execution pool, where the currently available parameter set is the set of parameters that have been actually obtained at the current time and can provide the first proof-of-concept script call; the success status marking module 940 is used to execute the second proof-of-concept script in the activated execution pool that meets the execution conditions, and mark the second node corresponding to the successfully executed second proof-of-concept script as a success state according to the execution result; and the empirical attack path graph generation module 950 is used to generate an empirical attack path graph based on all the second nodes in the success state and the directed edges between the second nodes in the success state when there are no second proof-of-concept scripts in the activated execution pool that meet the execution conditions.

[0103] Optionally, the operation of determining each first proof-of-concept script as a first node and determining the directed edges between each first node includes: obtaining the capability configuration tag and required parameters from the structured metadata corresponding to each first proof-of-concept script, and determining each first proof-of-concept script as a first node; determining the current first node with the first grantable parameter and the next first node with the required parameter based on the capability configuration tag, the first grantable parameter, the required parameter, and the mapping relationship between the capability configuration tag and the first grantable parameter in the preset parameter-capability mapping table; and establishing a directed edge from the current first node to the next first node when the first grantable parameter of the current first node contains the required parameter of the next first node.

[0104] Optionally, based on the current set of available parameters, the activation of each first node is determined to identify the operations that have been activated and are waiting to be executed. This includes: traversing each first node to obtain the required parameters corresponding to each first node; comparing the required parameters of each first node with the first grantable parameters in the current set of available parameters; and marking the first node whose required parameters are all present in the current set of available parameters as activated and adding it to the activated waiting pool.

[0105] Optionally, the operation of executing a second proof-of-concept script that meets the execution conditions in the activated execution pool includes: comparing the current probe budget value with a budget threshold, wherein the probe budget value is used to indicate the total amount of resources that can be consumed; when the probe budget value is greater than the budget threshold, determining the comprehensive value of each first node in the activated execution pool based on the hazard level, dependency depth, attack surface coverage, execution cost, and execution risk of each first node; selecting the first node with the highest comprehensive value as the second node to be executed; and executing the second proof-of-concept script corresponding to the second node and obtaining the execution result of the second proof-of-concept script.

[0106] Optionally, the operation of marking the second node corresponding to the successfully executed second proof-of-concept script as a success state based on the execution result includes: determining whether the second proof-of-concept script meets preset postconditions based on the execution result, wherein the postconditions include successful acquisition of reconnaissance information, successful parameter discovery, successful confirmation of service or protocol response, positive vulnerability verification, or successful generation of evidence index; if the second proof-of-concept script meets the postconditions, then marking the second node corresponding to the second proof-of-concept script as a success state, and updating the current available parameter set according to the current second grantable parameter of the second node; and repeating the following steps iteratively based on the updated current available parameter set: re-determining the activatability of the first node that has not yet been executed; adding the newly qualified first node to the activated pending execution pool; and executing the second proof-of-concept scripts in the activated pending execution pool that meet the execution conditions.

[0107] Optionally, the operation of determining whether the second proof-of-concept script meets the preset postconditions based on the execution result includes: if the second proof-of-concept script does not meet the postconditions, then marking the second node corresponding to the second proof-of-concept script as a failure.

[0108] Optionally, when the activated execution pool does not contain a first proof-of-concept script or when the probe budget value is less than the budget threshold, the second node of all successful states is used as the path node, and the directed edge between the second nodes of successful states is used as the path edge to generate an empirical attack path graph.

[0109] Therefore, according to this embodiment, this application can automatically deduce dependencies from the structured metadata of the first proof-of-concept script itself, thereby automatically reconstructing the proof-of-concept dependency graph when the proof-of-concept script library is updated. Thus, this application achieves low-cost maintenance of the proof-of-concept script library and always aligns with actual proof-of-concept capabilities. Furthermore, the empirical attack path graph finally output by this application is supported by the execution results of the second proof-of-concept script, representing the actual verified path, not the theoretically achievable path. This solves the technical problem in the prior art where traditional attack path graphs generate attack paths solely based on asset topology or external knowledge base reasoning, thus detaching from the executable conditions of the actual environment and making the attack paths unverifiable.

[0110] Example 3

[0111] Figure 10 An attack path graph generation apparatus based on Proof-of-Concept (PoC) according to this embodiment is shown, which corresponds to the method described in Embodiment 1. (Reference) Figure 10 As shown, the device includes: a processor 1010; and a memory 1020 connected to the processor 1010, used to provide the processor 1010 with instructions to process the following steps: determining a plurality of first proof-of-concept scripts in a proof-of-concept script library, and obtaining a first grantable parameter from the structured metadata of each first proof-of-concept script; determining each first proof-of-concept script as a first node, and determining directed edges between each first node, constructing a proof-of-concept dependency graph, wherein the directed edges indicate that after the first proof-of-concept script corresponding to the current first node is successfully executed, it can provide the execution of the first proof-of-concept script corresponding to the next first node. The conditions are as follows: Based on the currently available parameter set, the activatability of each first node is determined, and the activated execution pool is identified. The currently available parameter set is the set of parameters that have been actually obtained at the current moment and can provide the first proof-of-concept script for invocation. The second proof-of-concept script in the activated execution pool that meets the execution conditions is executed. Based on the execution result, the second node corresponding to the successfully executed second proof-of-concept script is marked as a success state. When there is no second proof-of-concept script in the activated execution pool that meets the execution conditions, an empirical attack path graph is generated based on the directed edges between all successful second nodes and successful second nodes.

[0112] Optionally, the operation of determining each first proof-of-concept script as a first node and determining the directed edges between each first node includes: obtaining the capability configuration tag and required parameters from the structured metadata corresponding to each first proof-of-concept script, and determining each first proof-of-concept script as a first node; determining the current first node with the first grantable parameter and the next first node with the required parameter based on the capability configuration tag, the first grantable parameter, the required parameter, and the mapping relationship between the capability configuration tag and the first grantable parameter in the preset parameter-capability mapping table; and establishing a directed edge from the current first node to the next first node when the first grantable parameter of the current first node contains the required parameter of the next first node.

[0113] Optionally, based on the current set of available parameters, the activation of each first node is determined to identify the operations that have been activated and are waiting to be executed. This includes: traversing each first node to obtain the required parameters corresponding to each first node; comparing the required parameters of each first node with the first grantable parameters in the current set of available parameters; and marking the first node whose required parameters are all present in the current set of available parameters as activated and adding it to the activated waiting pool.

[0114] Optionally, the operation of executing a second proof-of-concept script that meets the execution conditions in the activated execution pool includes: comparing the current probe budget value with a budget threshold, wherein the probe budget value is used to indicate the total amount of resources that can be consumed; when the probe budget value is greater than the budget threshold, determining the comprehensive value of each first node in the activated execution pool based on the hazard level, dependency depth, attack surface coverage, execution cost, and execution risk of each first node; selecting the first node with the highest comprehensive value as the second node to be executed; and executing the second proof-of-concept script corresponding to the second node and obtaining the execution result of the second proof-of-concept script.

[0115] Optionally, the operation of marking the second node corresponding to the successfully executed second proof-of-concept script as a success state based on the execution result includes: determining whether the second proof-of-concept script meets preset postconditions based on the execution result, wherein the postconditions include successful acquisition of reconnaissance information, successful parameter discovery, successful confirmation of service or protocol response, positive vulnerability verification, or successful generation of evidence index; if the second proof-of-concept script meets the postconditions, then marking the second node corresponding to the second proof-of-concept script as a success state, and updating the current available parameter set according to the current second grantable parameter of the second node; and repeating the following steps iteratively based on the updated current available parameter set: re-determining the activatability of the first node that has not yet been executed; adding the newly qualified first node to the activated pending execution pool; and executing the second proof-of-concept scripts in the activated pending execution pool that meet the execution conditions.

[0116] Optionally, the operation of determining whether the second proof-of-concept script meets the preset postconditions based on the execution result includes: if the second proof-of-concept script does not meet the postconditions, then marking the second node corresponding to the second proof-of-concept script as a failure.

[0117] Optionally, when the activated execution pool does not contain a first proof-of-concept script or when the probe budget value is less than the budget threshold, the second node of all successful states is used as the path node, and the directed edge between the second nodes of successful states is used as the path edge to generate an empirical attack path graph.

[0118] Therefore, according to this embodiment, this application can automatically deduce dependencies from the structured metadata of the first proof-of-concept script itself, thereby automatically reconstructing the proof-of-concept dependency graph when the proof-of-concept script library is updated. Thus, this application achieves low-cost maintenance of the proof-of-concept script library and always aligns with actual proof-of-concept capabilities. Furthermore, the empirical attack path graph finally output by this application is supported by the execution results of the second proof-of-concept script, representing the actual verified path, not the theoretically achievable path. This solves the technical problem in the prior art where traditional attack path graphs generate attack paths solely based on asset topology or external knowledge base reasoning, thus detaching from the executable conditions of the actual environment and making the attack paths unverifiable.

[0119] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0120] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0121] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0122] The units described as separate components may or may not be physically separate. 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 units can be selected to achieve the purpose of this embodiment according to actual needs.

[0123] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0124] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0125] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for generating attack path graphs based on Proof-of-Concept (PoC), characterized in that, include: Identify multiple first proof-of-concept scripts in the proof-of-concept script library and obtain the first grantable parameter from the structured metadata of each first proof-of-concept script; Each of the first concept proof scripts is determined as a first node, and the directed edges between each first node are determined to construct a concept proof dependency graph, wherein the directed edges represent the conditions that can be provided to execute the first concept proof script corresponding to the next first node after the first concept proof script corresponding to the current first node is successfully executed. Based on the currently available parameter set, the activation of each first node is determined to identify the activated execution pool, wherein the currently available parameter set is the set of parameters that have been actually obtained at the current moment and can provide the first proof-of-concept script call; Execute the second proof-of-concept script that meets the execution conditions in the activated execution pool, and mark the second node corresponding to the successfully executed second proof-of-concept script as a success state based on the execution result; as well as When the activated execution pool does not contain a second proof-of-concept script that meets the execution conditions, an empirical attack path graph is generated based on all successful second nodes and the directed edges between the successful second nodes.

2. The method according to claim 1, characterized in that, The operation of determining each of the first concept verification scripts as first nodes and determining the directed edges between each first node includes: Obtain the capability configuration tags and required parameters from the structured metadata corresponding to each first proof-of-concept script, and determine each first proof-of-concept script as the first node; Based on the capability configuration tag, the first grantable parameter, and the required parameter, and the mapping relationship between the capability configuration tag and the first grantable parameter in a preset parameter-capability mapping table, determine the current first node with the first grantable parameter and the next first node with the required parameter; and When the first grantable parameter of the current first node contains the required parameter of the next first node, a directed edge is established from the current first node to the next first node.

3. The method according to claim 1, characterized in that, Based on the currently available parameter set, the activationability of each first node is determined to identify the operations that have been activated and are awaiting execution in the pool, including: Traverse each of the first nodes and obtain the required parameters corresponding to each of the first nodes; The required parameters of each first node are compared with the first grantable parameters of the currently available parameter set; and The first node, in which all the required parameters are present in the currently available parameter set, is marked as activated and added to the activated pending execution pool.

4. The method according to claim 3, characterized in that, The operation of executing the second proof-of-concept script that meets the execution conditions in the activated execution pool includes: The current detection budget value is compared with the budget threshold, where the detection budget value is used to indicate the total amount of resources that can be consumed; When the detection budget value is greater than the budget threshold, the comprehensive value of each first node in the activated execution pool is determined based on the hazard level, dependency depth, attack surface coverage, execution cost, and execution risk of each first node. The first node with the highest overall value is selected as the second node to be executed; and Execute the second proof-of-concept script corresponding to the second node, and obtain the execution result of the second proof-of-concept script.

5. The method according to claim 4, characterized in that, The operations that mark the second node corresponding to the successfully executed second proof-of-concept script as successful based on the execution result include: Based on the execution result, determine whether the second proof-of-concept script meets the preset postconditions, wherein the postconditions include successful acquisition of reconnaissance information, successful discovery of parameters, successful confirmation of service or protocol response, positive vulnerability verification, or successful generation of evidence index. If the second proof-of-concept script satisfies the postcondition, then the second node corresponding to the second proof-of-concept script is marked as successful, and the currently available parameter set is updated according to the current second grantable parameter of the second node; and Based on the updated set of currently available parameters, the first node that has not yet been executed is re-determined for its activatability. The newly qualified first node is added to the activated execution pool, and the second proof-of-concept script that meets the execution conditions in the activated execution pool is executed.

6. The method according to claim 4, characterized in that, The operation of determining whether the second proof-of-concept script meets the preset postconditions based on the execution result includes: if the second proof-of-concept script does not meet the postconditions, then marking the second node corresponding to the second proof-of-concept script as a failure.

7. The method according to claim 5, characterized in that, When the first proof-of-concept script does not exist in the activated execution pool or when the probe budget value is less than the budget threshold, an empirical attack path graph is generated using all successful second nodes as path nodes and the directed edges between the successful second nodes as path edges.

8. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, the method described in any one of claims 1 to 7 is performed by a processor.

9. An attack path graph generation device based on Proof-of-Concept (PoC), characterized in that, include: The script identification and parameter acquisition module is used to identify multiple first proof-of-concept scripts in the proof-of-concept script library and acquire the first grantable parameter from the structured metadata of each first proof-of-concept script. The concept proof dependency graph construction module is used to determine each of the first concept proof scripts as first nodes and determine the directed edges between each first node to construct a concept proof dependency graph, wherein the directed edges represent the conditions that can be provided to execute the first concept proof script corresponding to the next first node after the first concept proof script corresponding to the current first node is successfully executed. The activated execution pool determination module is used to determine the activatability of each first node based on the current available parameter set and to determine the activated execution pool, wherein the current available parameter set is the set of parameters that have been actually obtained at the current time and can provide the first proof-of-concept script call; The success status marking module is used to execute the second proof-of-concept script that meets the execution conditions in the activated execution pool, and mark the second node corresponding to the successfully executed second proof-of-concept script as a success status according to the execution result; as well as The empirical attack path graph generation module is used to generate an empirical attack path graph based on all successful second nodes and the directed edges between the successful second nodes when the activated execution pool does not have a second proof-of-concept script that meets the execution conditions.

10. An attack path graph generation device based on Proof-of-Concept (PoC), characterized in that, include: processor; as well as A memory, connected to the processor, for providing the processor with instructions to perform the following processing steps: Identify multiple first proof-of-concept scripts in the proof-of-concept script library and obtain the first grantable parameter from the structured metadata of each first proof-of-concept script; Each of the first concept proof scripts is determined as a first node, and the directed edges between each first node are determined to construct a concept proof dependency graph, wherein the directed edges represent the conditions that can be provided to execute the first concept proof script corresponding to the next first node after the first concept proof script corresponding to the current first node is successfully executed. Based on the currently available parameter set, the activation of each first node is determined to identify the activated execution pool, wherein the currently available parameter set is the set of parameters that have been actually obtained at the current moment and can provide the first proof-of-concept script call; Execute the second proof-of-concept script that meets the execution conditions in the activated execution pool, and mark the second node corresponding to the successfully executed second proof-of-concept script as a success state based on the execution result; as well as When the activated execution pool does not contain a second proof-of-concept script that meets the execution conditions, an empirical attack path graph is generated based on all successful second nodes and the directed edges between the successful second nodes.

Citation Information

Patent Citations

  • Automation software loophole verification system and method based on loophole library

    CN107480531A

  • Vulnerability testing method and device based on vehicle-mounted terminal system

    CN110348218A