End-to-end network attack construction method and device
Analyze attack reports and generate executable script sequence files through large language models, which solves the problems of high professional knowledge requirements and difficulty in automation in traditional penetration testing, enables rapid construction of virtual shooting range environments and automated attacks, and improves the efficiency and quality of penetration testing. .
Patent Information
- Application Number
- CN202410767694.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-10-15
AI Technical Summary
Traditional penetration testing has developed slowly due to the high requirements for professional knowledge and the large number of manual operations of security practitioners. The realization of automated and high-quality penetration testing faces the problem of limited TTP coverage by attack simulation tools, numerous and complex APT attack steps, and the construction of a shooting range. Difficulties and other challenges.
Use a large language model to analyze attack reports, extract information and generate executable script sequence files, conduct automated attacks based on the shooting range environment, and quickly build a virtual shooting range environment through information extraction models, environment file generation models, script generation models and script alignment models. Achieve automatic execution of fine-grained penetration scripts.
It achieves rapid and accurate reconstruction of the virtual shooting range environment, improves the efficiency of semantic mapping and script selection of attack technology sequence files, reduces the need for professional knowledge and manual operations, and improves the automation and diversification capabilities of penetration testing.
Smart Images

Figure CN118784276A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security, and in particular to an end-to-end network attack construction method and device. Background Art
[0002] In recent years, the number and complexity of Advanced Persistent Threats (APT) attacks have continued to increase. At the same time, many intrusion prevention systems have been proposed and developed in academia and industry. As the battle between attackers and defenders continues to escalate, penetration testing has shown its importance in evaluating defense capabilities and training detection models. Penetration testing is a process of evaluating the security of computer systems, networks, or applications by simulating attackers. It is an authorized security assessment that aims to discover security vulnerabilities and weaknesses in the system and provide recommendations and solutions to fix these problems. Therefore, it is crucial in today's network security.
[0003] In penetration testing, attackers use various techniques and means to attack target systems and networks; defenders are committed to discovering, preventing and responding to network attacks; in addition, the shooting range environment, as an experimental platform, also plays an important role in penetration testing. The shooting range is a simulated network environment, a platform for network security training, drills and testing, designed to simulate real-world network environments and attack scenarios, allowing security professionals or other personnel to practice and learn in a safe environment.
[0004] Traditional penetration testing has developed slowly due to its high requirements for professional knowledge and the large amount of manual operations by security practitioners. At the same time, there are many challenges in achieving automated, high-quality penetration testing, such as the limited coverage of TTPs by existing attack simulation tools, the numerous and complex steps of APT attacks, and the difficulty in building a target range. Although some studies have used statistical or mathematical models to analyze the relationship between different technologies in APT attacks, they cannot provide any explanation for the entire analysis process.
[0005] In summary, there is an urgent need for a method that can quickly build a target range to perform automated and diversified attack simulations. Summary of the invention
[0006] The embodiment of the present application provides an end-to-end network attack construction method and device, which uses a large language model to analyze the attack report to extract information, and generates an executable script sequence file combined with a target range environment to perform automated attacks.
[0007] In a first aspect, an embodiment of the present application provides an end-to-end network attack construction method, the method comprising:
[0008] Obtain attack reports, and obtain environmental information and attack information from the attack reports based on the information extraction model;
[0009] Acquire an environment configuration file from the environment information based on the environment file generation model and the environment configuration generation model, and generate a virtual shooting range environment according to the environment configuration file;
[0010] Acquire an attack technology sequence file based on the attack information based on the script generation model, and select scripts in the script database that are closest in semantics to each attack step in the attack technology sequence file, sort and combine them to obtain an executable script sequence file;
[0011] Based on the script alignment model, the scripts in the executable script sequence file are aligned and adjusted to obtain a fine-grained executable script, and the fine-grained executable script and the virtual range environment are integrated to obtain a fine-grained penetration script;
[0012] Automatically execute the fine-grained penetration script to attack the fine-grained executable script.
[0013] In a second aspect, an embodiment of the present application provides an end-to-end network attack construction device, including:
[0014] A tactical technology layer, wherein the tactical technology layer is loaded with an information extraction model, and is used to obtain an attack report and obtain environmental information and attack information from the attack report based on the information extraction model;
[0015] An infrastructure layer, wherein the infrastructure layer is loaded with an environment file generation model, and is used to obtain an environment configuration file from the environment information based on the environment file generation model and the environment configuration generation model, and generate a virtual shooting range environment according to the environment configuration file;
[0016] A program layer, wherein the program layer is loaded with a script generation model and a script alignment model, and is used to obtain an attack technology sequence file based on the script generation model and attack information, and select scripts in a script database that are closest in semantics to each attack step in the attack technology sequence file to sort and combine to obtain an executable script sequence file, and align and adjust the scripts in the executable script sequence file based on the script alignment model to obtain a fine-grained executable script, and integrate the fine-grained executable script and the virtual range environment to obtain a fine-grained penetration script;
[0017] The implementation layer is used to automatically execute the fine-grained penetration script to attack the fine-grained executable script.
[0018] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute an end-to-end network attack construction method.
[0019] In a fourth aspect, an embodiment of the present application provides a readable storage medium, in which a computer program is stored. The computer program includes a program code for controlling a process to execute a process, and the process includes an end-to-end network attack construction method.
[0020] The main contributions and innovations of the present invention are as follows:
[0021] The embodiment of the present application analyzes the attack report through a large language model, so as to quickly and accurately reconstruct the virtual shooting range environment from the attack report; the present solution extracts the attack technology sequence file in the attack report through a large language model, and maps the attack steps in the attack technology sequence file to the MITRE ATT&CK technology matrix, so as to obtain the executable script sequence file by judging and selecting the script based on semantics; the present solution designs the constituent fields of the executable script sequence and the fine-grained penetration script; the present solution reserves a search priority interface for the attacker, and prioritizes network attacks according to the attacker's strategy or knowledge through the search priority interface.
[0022] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0024] Figure 1 is a flow chart of an end-to-end network attack construction method according to an embodiment of the present application;
[0025] Figure 2 is a logical schematic diagram of an end-to-end network attack construction method according to an embodiment of the present application;
[0026] Figure 3 is a structural block diagram of an end-to-end network attack construction device according to an embodiment of the present application;
[0027] Figure 4 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0029] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0030] Embodiment 1
[0031] The embodiment of the present application provides an end-to-end network attack construction method, which uses a large language model to analyze and extract information from attack reports, and generates an executable script sequence file combined with a range environment to perform automated attacks. Specifically, refer to Figure 1 , the method comprising:
[0032] Obtain attack reports, and obtain environmental information and attack information from the attack reports based on the information extraction model;
[0033] Acquire an environment configuration file from the environment information based on the environment file generation model and the environment configuration generation model, and generate a virtual shooting range environment according to the environment configuration file;
[0034] Acquire an attack technology sequence file based on the attack information based on the script generation model, and select scripts in the script database that are closest in semantics to each attack step in the attack technology sequence file, sort and combine them to obtain an executable script sequence file;
[0035] Based on the script alignment model, the scripts in the executable script sequence file are aligned and adjusted to obtain a fine-grained executable script, and the fine-grained executable script and the virtual range environment are integrated to obtain a fine-grained penetration script;
[0036] Automatically execute the fine-grained penetration script to attack the fine-grained executable script.
[0037] In this solution, an attack report is a document that records network attack events in detail, usually including an event overview, attack method, attack source, impact assessment, detection and response, forensic analysis, preventive measures, conclusions and recommendations. The purpose of the attack report is to help understand the details of the attack event and improve future security defense measures. Since this solution is based on attack reports to generate scripts, workers need to make or download attack reports from the Internet in advance. Correspondingly, in the "Get Attack Report" step, obtain manually made attack reports or attack reports downloaded from the Internet.
[0038] In addition, this solution is different from the traditional manual identification method of network engineers. The information extraction model, environment file generation model, script generation model and script alignment model mentioned in this solution are large language models adjusted using corresponding function prompt instructions, so as to use the large language model to complete network tasks such as information extraction, script generation and script alignment.
[0039] This solution designs rich functional prompt instructions to adjust different large language models, which are used to guide the corresponding large language model to generate output content that meets the user's intention according to the content input by the user. Specifically, in the embodiment of this solution, the information extraction prompt instruction adjusts the large language model to obtain the information extraction model, and the information extraction model is adjusted to extract attack information and environmental information from the attack report; the environment file generation prompt instruction is designed to adjust the large language model to obtain the environment file generation model, and the environment file generation model is adjusted to generate an environment configuration file from the environmental information; the script generation prompt instruction is designed to adjust the large language model to obtain the script generation model, and the script generation model is adjusted to generate an attack technology sequence file from the attack information; the script alignment prompt instruction is designed to adjust the large language model to obtain the script alignment model, and the script alignment model is adjusted to align and generate fine-grained executable scripts.
[0040] More specifically, the function prompt instructions including the information extraction prompt instruction, the environment file generation prompt instruction, the script generation prompt instruction and the script alignment prompt instruction are composed of three parts: identity simulation instructions, work task instructions and output content instructions, wherein the identity simulation instructions guide the large language model to simulate the identity of the network engineer to bypass the security policy, the work task instructions design the step splitting, detailed description and operation examples of the work task to guide the large language model to complete the corresponding work task, and the output content instructions design the output format of the output content. In some embodiments, the output content of the information extraction model, the environment file generation model, the script generation model and the script alignment model is output in json format according to different specified formats.
[0041] In the step of "obtaining environment information and attack information from the attack report based on the information extraction model", the information extraction model parses the unstructured attack report to obtain structured environment information and attack information, wherein the environment information is information representing the attack environment of the current attack report, and the attack information is information recording the attack steps in the current attack report. Figure 2 As shown, this scheme converts the input attack report into a tactical technical graph through an information extraction model, wherein the tactical technical graph records the attack information and environmental information.
[0042] In the step of "obtaining an environment configuration file from the environment information based on the environment file generation model and the environment configuration generation model, and generating a virtual range environment according to the environment configuration file", the environment information is input into the environment file generation model for environment analysis to obtain the environment configuration file, and then the environment configuration generation model is used to perform environment configuration according to the environment configuration file to generate a virtual targeting environment. In some embodiments of the present solution, the environment configuration file is in json format.
[0043] Specifically, regarding the output of the environment configuration file of this solution: the environment information is input into the environment file generation model to obtain an environment information description file, and then the environment information description file is input into the environment file generation model to obtain an environment configuration file, and the environment configuration file is combined with the target deployment tool to obtain the environment configuration file.
[0044] Correspondingly, the scheme designs an environment file generation model to extract the field content of the environment information description file from the environment information according to the preset environment file generation prompt instruction, and assembles the environment information description file based on the field and the field content, extracts the fields in the environment configuration file according to the preset environment file generation prompt instruction combined with the environment description file, and assembles the environment configuration file based on the field and the field content. In a specific embodiment, the scheme uses Vagrant as the target deployment tool.
[0045] The environment information description file is used to record and describe in detail various parameters and settings of a specific IT environment or system configuration. In some embodiments, the environment information description file includes at least an operating system field and a dependent text description. In some specific embodiments, an example table of fields of the environment information description file obtained in this solution is shown in Table 1:
[0046] Table 1: Fields of the environment information description file
[0047]
[0048] It is worth mentioning that the fields in the environment information description file can be expanded according to different attack reports and different requirements to meet practical applications. This solution can realize the configuration of different environment information description files by adjusting the prompt instruction of the environment file.
[0049] In some embodiments, the environment configuration file includes at least a server version field, an experimental host quantity field, a network configuration field, a configuration method field, a configuration option field, and a virtual machine instance field.
[0050] The field example table of the environment configuration file obtained in this solution is shown in Table 2:
[0051] Table 2: Example of fields in the environment configuration file
[0052]
[0053] It is worth mentioning that the fields in the environment configuration file can be expanded according to different attack reports and different requirements to meet actual applications.
[0054] In the step of "generating a virtual shooting range environment according to the environment configuration file", a virtual shooting range environment is generated based on the environment configuration file using virtual machine software, and the virtual shooting range environment is a plurality of virtual computers.
[0055] Specifically, each virtual computer in the virtual shooting range environment can install and run a complete system, such as Windows, Linux, Solaris, macOS, DOS and various other operating systems, and these systems are independent of each other and do not affect each other.
[0056] Specifically, the virtual machine software used in this solution is VirtualBox.
[0057] It should be noted that the traditional method of reconstructing the range environment from an attack report often poses significant challenges to the level of professional knowledge and manual time expenditure. The large language model is developing rapidly due to its extensive knowledge reserves and efficient processing speed. Therefore, this solution is designed to use the large language model to obtain the environmental configuration file to automatically complete the configuration of the range environment.
[0058] In the step of "obtaining an attack technology sequence file based on attack information based on a script generation model", the attack information and the network attack knowledge base are input into the script generation model for information analysis. The script generation model splits the attack steps in the attack information according to a preset script generation prompt instruction and maps them to the network attack knowledge base to obtain an attack technology sequence file.
[0059] The cyber attack knowledge base mentioned in this solution contains specific attack techniques and sub-techniques. Specifically, the cyber attack knowledge base used in this solution is the MITRE ATT&CK technology matrix as the cyber attack knowledge base. The MITRE ATT&CK technology matrix is a publicly available knowledge base that systematically outlines known cyber attacker tactics, techniques, and procedures (TTPs). The matrix is designed as a two-dimensional table, one side of which is the tactical category of the attack life cycle, and the other side is the specific technology corresponding to these tactics.
[0060] In some embodiments of the present solution, the attack technique sequence file is in json format, wherein the attack technique sequence file records multiple attack steps.
[0061] In the step of "selecting scripts in the script database that are semantically closest to each attack step in the attack technology sequence file, sorting and combining them to obtain an executable script sequence file", the script generation model generates prompt instructions according to the preset script in the order of execution of the attack steps in the attack technology sequence file, and selects scripts for the attack steps one by one in the script database according to the script mapping search algorithm to form an executable script sequence text.
[0062] Specifically, the rules of the script mapping search algorithm mentioned are as follows:
[0063] Step 1: Determine whether the current attack step is lateral movement. If so, modify the operating system dependency of the current attack step and execute step 2. If not, execute step 2 directly.
[0064] Step 2: Determine whether there is a script with the same technical name as the current attack step in the script database. If so, select the script with the closest semantics to the current attack step from the scripts with the same technical name as the current attack step and execute step 4. Otherwise, execute step 3.
[0065] Step 3: Determine whether there is a script in the script database that has the same technical strategy as the current attack step. If so, select the script that is closest in semantics to the current attack step in the same technical strategy and execute step 4;
[0066] Step 4: Select the next attack step and return to step 1 until there is no next attack step, and integrate the scripts of each attack step to obtain an executable script sequence file.
[0067] In this solution, lateral movement, technology name, and technology strategy are concepts in the network attack knowledge base. Lateral movement means moving from victim host A to victim host B. It is a tactic and means that the attacker may move from one victim computer (windows) to another victim computer (linux). Therefore, the environmental dependency of the attack steps needs to be modified. The technology name is the vertical axis in the MITRE ATT&CK attack matrix, which expresses the specific technology that can achieve the purpose under the corresponding tactic. TID is used to represent the number of the specific technology. The technology strategy is the horizontal axis in the MITRE ATT&CK attack matrix, which represents the technology strategy under the corresponding tactic.
[0068] In summary, this solution uses the script generation model to select scripts for each attack step in the script database by transitioning from a more precise small range to a large range for searching, which can improve the search efficiency. Specifically, this solution uses Atomic Red Team as the script database.
[0069] In some embodiments, the fields in the executable script sequence file include a technology name field, an identifier field, a technology description field, a technology ID field, a tactical field, a technology field, a lateral movement characteristic field, a step ID field, a CTI report description field, a candidate executable script list field, an input parameter field, a dependent executor field, a dependent condition field, an executor field, an execution command field, and a cleanup command field.
[0070] In addition, the end-to-end network attack construction method provided by the present solution can also provide the attacker with a heuristic degree of freedom search priority interface to obtain priority conditions, and the script generation model obtains the priority conditions and provides them to the script mapping search algorithm for script selection and composition of executable script sequence text. Correspondingly, in some embodiments, priority conditions are obtained based on the developed search priority interface, and the priority conditions are incorporated into the script mapping search algorithm for script selection and composition of executable script sequence text.
[0071] That is to say, this scheme provides a search priority interface for the attacker, obtains the attack scheme provided by the attacker according to the search priority interface, and converts the attack scheme into a priority condition and provides it to the script mapping search algorithm.
[0072] For example, during a network attack, if the attacker believes that a certain type of attack technology has a higher success rate or is more likely to evade detection by the defender, then the attacker can provide an attack plan through the search priority interface. For example, if the attacker learns the rules of an intrusion detection system through means (sociological attack), then this rule can be provided to the script mapping search algorithm.
[0073] In the step of "aligning and adjusting the scripts in the executable script sequence file based on the script alignment model to obtain a fine-grained executable script", the executable script sequence file is input into the script alignment model, and the script alignment model performs script alignment adjustment on the executable script sequence file and the network knowledge base according to the preset script alignment prompt instruction. This step can ensure that different scripts work together effectively, and each script can accurately correspond to the corresponding technology in the network knowledge base. In the embodiment of this solution, the network knowledge base is the MITRE ATT&CK framework.
[0074] Specifically, the executable script sequence file generated by this solution and the field representation in the fine-grained executable script are shown in Table 3:
[0075] Table 3: Schematic diagram of executable script sequence file fields
[0076]
[0077]
[0078] That is, the fields in the fine-grained executable script include: technology name, automatically generated globally unique identifier, technology description, technology ID, tactics, technology, step ID, description in CTI report, candidate executable script list, supported platforms, input parameters, dependent executor name, dependency conditions, executor, executor specific execution command, and cleanup command.
[0079] It should be noted that the traditional method requires a lot of professional knowledge and manual operations of security practitioners to complete a complete penetration attack. However, this solution can automatically generate the above-mentioned fine-grained executable scripts based on attack information according to the script generation model and the script alignment model, and then use the automated attack components to achieve one-click execution of the penetration attack.
[0080] In the step of "automatically executing the fine-grained penetration script to attack the fine-grained executable script", the fine-grained penetration script is executed in a virtual targeted environment using a simulated attack deployment platform to realize automatic attack.
[0081] Specifically, this solution designs an end-to-end process based on the large language model so that a complete penetration attack can be completed, avoiding the need for a lot of professional knowledge and manual operations by security practitioners. The overall flow chart of the end-to-end network attack construction method provided by this solution is as follows: Figure 2As shown. For the input coarse-grained penetration script (corresponding to the environment information and attack information of this solution), the environment file generation model and the environment configuration generation model are used to analyze the environment information in the coarse-grained penetration script and generate an environment configuration file. The script generation model is used to analyze the attack information in the coarse-grained penetration script to obtain the attack technology file sequence ( Figure 2 The corresponding penetration attack chain sequence), combined with the script database ( Figure 2 The executable script sequence file is generated by the attack script library, and the executable script sequence file and the environment configuration file are output as a fine-grained penetration script.
[0082] Embodiment 2
[0083] Based on the same idea, refer to Figure 3 , the present application also proposes an end-to-end network attack construction device, including:
[0084] A tactical technology layer, wherein the tactical technology layer is loaded with an information extraction model, and is used to obtain an attack report and obtain environmental information and attack information from the attack report based on the information extraction model;
[0085] An infrastructure layer, wherein the infrastructure layer is loaded with an environment file generation model, and is used to obtain an environment configuration file from the environment information based on the environment file generation model and the environment configuration generation model, and generate a virtual shooting range environment according to the environment configuration file;
[0086] A program layer, wherein the program layer is loaded with a script generation model and a script alignment model, and is used to obtain an attack technology sequence file based on the script generation model and attack information, and select scripts in a script database that are closest in semantics to each attack step in the attack technology sequence file to sort and combine to obtain an executable script sequence file, and align and adjust the scripts in the executable script sequence file based on the script alignment model to obtain a fine-grained executable script, and integrate the fine-grained executable script and the virtual range environment to obtain a fine-grained penetration script;
[0087] The implementation layer is used to automatically execute the fine-grained penetration script to conduct attacks.
[0088] It should be noted that if Figure 3 As shown, the tactical technology layer of this solution also loads an information extraction model adjusted by the prompt template, wherein the parsing model parses the input attack report ( Figure 3 APT report in) and generate corresponding attack information and environment information (corresponding Figure 3The attack information and environment information are then sent to the program layer and the infrastructure layer for processing. After obtaining the environment information, the infrastructure layer of this solution uses the environment file generation model to perform environment analysis and generate an environment configuration file (corresponding to Figure 3 The environment configuration information in the ), and then generate a virtual target environment (corresponding to Figure 3 The program layer of this solution combines the script database ( Figure 3 In the program script warehouse, an executable script sequence file is generated according to the priority conditions and program scripts ( Figure 3 The script alignment model is then used to align the scripts to obtain a fine-grained executable script ( Figure 3 The fine-grained executable script is executed on the simulation attack deployment platform in the implementation layer to realize the automatic attack. The contents of the second embodiment that are the same as those of the first embodiment are not described here.
[0089] Embodiment 3
[0090] This embodiment also provides an electronic device, referring to Figure 4 , including a memory 404 and a processor 402, wherein the memory 404 stores a computer program, and the processor 402 is configured to run the computer program to execute the steps in any of the above-mentioned embodiments of the end-to-end network attack construction method.
[0091] Specifically, the processor 402 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0092] Among them, the memory 404 may include a large capacity memory 404 for data or instructions. By way of example and not limitation, the memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 404 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 404 may be inside or outside the data processing device. In a specific embodiment, the memory 404 is a non-volatile memory. In a specific embodiment, the memory 404 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable Programmable Read-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (Static Random-Access Memory, abbreviated as SRAM) or a dynamic random access memory (Dynamic Random Access Memory, abbreviated as DRAM), wherein the DRAM can be a fast page mode dynamic random access memory 404 (Fast Page Mode Dynamic Random Access Memory, abbreviated as FPMDRAM), an extended data output dynamic random access memory (Extended Date Out Dynamic Random Access Memory, abbreviated as EDODRAM), a synchronous dynamic random access memory (Synchronous Dynamic Random-Access Memory, abbreviated as SDRAM), etc.
[0093] The memory 404 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 402 .
[0094] The processor 402 implements any one of the end-to-end network attack construction methods in the above embodiments by reading and executing computer program instructions stored in the memory 404 .
[0095] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408 , wherein the transmission device 406 is connected to the processor 402 , and the input / output device 408 is connected to the processor 402 .
[0096] The transmission device 406 can be used to receive or send data via a network. The specific examples of the above-mentioned network may include a wired or wireless network provided by a communication provider of the electronic device. In one example, the transmission device includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 406 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0097] The input and output device 408 is used to input or output information. In this embodiment, the input information may be an attack report, etc., and the output information may be a fine-grained executable script.
[0098] Optionally, in this embodiment, the processor 402 may be configured to perform the following steps through a computer program:
[0099] Obtain attack reports, and obtain environmental information and attack information from the attack reports based on the information extraction model;
[0100] Acquire an environment configuration file from the environment information based on the environment configuration file generation model, and generate a virtual shooting range environment according to the environment configuration file;
[0101] Acquire an attack technology sequence file based on the attack information based on the script generation model, and select scripts in the script database that are closest in semantics to each attack step in the attack technology sequence file, sort and combine them to obtain an executable script sequence file;
[0102] Based on the script alignment model, the scripts in the executable script sequence file are aligned and adjusted to obtain a fine-grained executable script, and the fine-grained executable script and the virtual range environment are integrated to obtain a fine-grained penetration script;
[0103] Automatically execute the fine-grained penetration script to conduct the attack.
[0104] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0105] In general, various embodiments may be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flow charts, or using some other graphical representation, it should be understood that, as non-limiting examples, the boxes, devices, systems, techniques, or methods described herein may be implemented in hardware, software, firmware, dedicated circuits or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0106] Embodiments of the present invention may be implemented by computer software that is executable by a data processor of a mobile device, such as in a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets and / or macros may be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. A computer program product may include one or more computer executable components configured to perform an embodiment when the program is run. One or more computer executable components may be at least one software code or a portion thereof. In addition, at this point, it should be noted that, for example, Figure 4 Any block of the logic flow in the program may represent program steps, or interconnected logic circuits, blocks and functions, or a combination of program steps and logic circuits, blocks and functions. The software may be stored on physical media such as memory chips or storage blocks implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs, etc. Physical media are non-transitory media.
[0107] Those skilled in the art should understand that the technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0108] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An end-to-end network attack construction method, It is characterized in that The following steps are involved: Obtain attack reports, and obtain environmental information and attack information from the attack reports based on the information extraction model; Acquire an environment configuration file from the environment information based on the environment file generation model and the environment configuration generation model, and generate a virtual shooting range environment according to the environment configuration file; Acquire an attack technology sequence file based on the attack information based on the script generation model, and select scripts in the script database that are closest in semantics to each attack step in the attack technology sequence file, sort and combine them to obtain an executable script sequence file; Based on the script alignment model, the scripts in the executable script sequence file are aligned and adjusted to obtain a fine-grained executable script, and the fine-grained executable script and the virtual range environment are integrated to obtain a fine-grained penetration script; Automatically execute the fine-grained penetration script to conduct the attack.
2. According to claim 1, an end-to-end network attack construction method, It is characterized in that The information extraction model, the environment file generation model, the script generation model, and the script alignment model are large language models adjusted using corresponding function prompt instructions.
3. According to claim 2, an end-to-end network attack construction method, It is characterized in that The function prompt instructions are composed of three parts: identity simulation instructions, work task instructions and output content instructions. The identity simulation instructions guide the large language model to simulate the identity of a network engineer to bypass security policies. The work task instructions are designed to split the steps, describe the details and provide operation examples to guide the large language model to complete the corresponding work tasks. The output content instructions design the output format of the output content.
4. According to claim 1, a method for constructing an end-to-end network attack, It is characterized in that The environment information is input into an environment file generation model to obtain an environment information description file, and then the environment information description file is input into an environment configuration generation model to obtain an environment configuration file. The environment configuration file is combined with a target deployment tool to obtain a virtual shooting range environment.
5. According to claim 1, a method for constructing an end-to-end network attack, It is characterized in that The script generation model generates prompt instructions according to the preset script to attack the execution order of the attack steps in the technology sequence file, selects the scripts for the attack steps one by one in the script database according to the script mapping search algorithm, and composes an executable script sequence text.
6. According to claim 5, a method for constructing an end-to-end network attack, It is characterized in that The rules for the script map search algorithm are as follows: Step 1: Determine whether the current attack step is lateral movement. If so, modify the operating system dependency of the current attack step and execute step 2. If not, execute step 2 directly. Step 2: Determine whether there is a script with the same technical name as the current attack step in the script database. If so, select the script with the same technical name as the current attack step that is closest in semantics to the current attack step and execute step 4. Otherwise, execute step 3. Step 3: Determine whether there is a script in the script database that has the same technical strategy as the current attack step. If so, select the script that is closest in semantics to the current attack step in the same technical strategy and execute step 4; Step 4: Select the next attack step and return to step 1 until there is no next attack step, and integrate the scripts of each attack step to obtain an executable script sequence file.
7. The end-to-end network attack construction method according to claim 5, It is characterized in that Based on the developed search priority interface, priority conditions are obtained, and the priority conditions are integrated into the script mapping search algorithm to select scripts and form an executable script sequence text.
8. An end-to-end network attack construction device, It is characterized in that include: A tactical technology layer, wherein the tactical technology layer is loaded with an information extraction model, and is used to obtain an attack report and obtain environmental information and attack information from the attack report based on the information extraction model; An infrastructure layer, wherein the infrastructure layer is loaded with an environment file generation model, and is used to obtain an environment configuration file from the environment information based on the environment file generation model and the environment configuration generation model, and generate a virtual shooting range environment according to the environment configuration file; A program layer, wherein the program layer is loaded with a script generation model and a script alignment model, and is used to obtain an attack technology sequence file based on the script generation model and attack information, and select scripts in a script database that are closest in semantics to each attack step in the attack technology sequence file to sort and combine to obtain an executable script sequence file, and align and adjust the scripts in the executable script sequence file based on the script alignment model to obtain a fine-grained executable script, and integrate the fine-grained executable script and the virtual range environment to obtain a fine-grained penetration script; The implementation layer is used to automatically execute the fine-grained penetration script to attack the fine-grained executable script.
9. An electronic device comprising a memory and a processor, It is characterized in that The memory stores a computer program, and the processor is configured to run the computer program to execute an end-to-end network attack construction method as described in any one of claims 1-7.
10. A readable storage medium, It is characterized in that The readable storage medium stores a computer program, wherein the computer program includes a program code for controlling a process to execute a process, wherein the process includes an end-to-end network attack construction method according to any one of claims 1-7.
Citation Information
Cited By
Design method of information security attack and defense range software system
CN119830289A
Network penetration data generation method and device, electronic equipment and program product
CN121037109A
A network penetration data generation method, device, electronic equipment and program product
CN121037109B
Network security actual combat target range generation method based on artificial intelligence
CN121125523A
