Automatic vulnerability mining method and system based on antagonism double-model collaboration
By employing an automated vulnerability discovery method that utilizes an adversarial dual-model approach, attack vectors conforming to protocol specifications are generated and evaluated. This addresses the issues of inefficiency and high cost in existing technologies, enabling efficient and automated vulnerability discovery and verification.
Patent Information
- Application Number
- CN202511855994.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-12-10
AI Technical Summary
Existing automated vulnerability discovery technologies are inefficient, blind, and costly to verify. They cannot effectively generate attack vectors that conform to protocol specifications and lack semantic understanding, resulting in low vulnerability discovery efficiency.
An adversarial dual-model collaborative approach is adopted, which generates basic data packets through an attack vector generation model, performs comprehensive evaluation by combining a threat assessment module and a protocol compliance module, uses multimodal probes for automated verification, and optimizes model parameters through a feedback mechanism to achieve efficient generation and verification of attack vectors.
It significantly improves the effective hit rate of attack vectors, shortens the vulnerability discovery cycle, ensures the protocol compliance of test cases, and has adaptive evolution capabilities, enabling it to flexibly respond to version iterations and feature changes of the target system.
Smart Images

Figure CN121283784A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of network security and automated testing technology, and in particular to an automated vulnerability discovery method and system based on adversarial dual-model collaboration. Background Technology
[0002] The discovery of unknown vulnerabilities (zero-day vulnerabilities) is at the forefront of cybersecurity attack and defense. Current mainstream automated vulnerability discovery techniques, such as fuzzing, inject a large number of mutated inputs into the target program in order to trigger anomalous behavior. However, traditional fuzzing techniques, represented by AFL (American Fuzzy Lop), have significant bottlenecks:
[0003] Inefficiency and blindness: Traditional fuzz testing mostly uses random or simple rule-based byte-level mutations. The vast majority of the inputs generated are rejected in the early verification stage because they do not conform to the protocol specifications of the target application (such as HTTP service), which results in an extremely low generation rate of effective test cases.
[0004] Lack of semantic understanding: The fuzz tester has no idea of the business logic meaning of the input. Although it can generate syntactically correct JSON (JavaScript Object Notation) data, it cannot understand the logical relationships between the fields, making it difficult to construct attacks that exploit authentication flaws or business process vulnerabilities.
[0005] Verification costs are high: Program crashes caused by fuzzing require security experts to spend a lot of time manually identifying, reproducing, and analyzing the root causes, which has become an efficiency bottleneck in modern software development processes that require rapid iteration (such as DevSecOps).
[0006] To address these issues, the industry has begun exploring the application of machine learning models in this field. However, directly applying Generative Adversarial Networks (GANs) to generate structured attack text often encounters problems such as mode collapse and training instability, meaning the model can only generate a few monotonous attack variants. Therefore, it is necessary to propose a new automated vulnerability discovery technique based on Generative Adversarial Networks. Summary of the Invention
[0007] This invention provides an automated vulnerability discovery method and system based on adversarial dual-model collaboration, aiming to solve the technical problems in existing automated vulnerability discovery technologies, such as blind and low-quality attack vector generation, poor protocol compliance, reliance on manual verification processes, and inability to form an efficient iterative optimization closed loop, due to the lack of deep understanding of protocol semantics and effective feedback mechanisms.
[0008] The first aspect of this invention provides an automated vulnerability discovery method based on adversarial dual-model collaboration, the method comprising the following steps:
[0009] Step 1: Generate basic data packets based on the input prompt and preset protocol specifications, using the attack vector generation model; where the prompt is a structured context prompt, including protocol metadata and target environment information;
[0010] Step 2: Perform a logical mutation operation on the generated basic data packet based on its parameter type to obtain candidate attack vectors;
[0011] Step 3: Evaluate the candidate attack vectors using an evaluation model with a two-stream neural network architecture, including:
[0012] A first score is calculated based on the threat assessment module, and the first score characterizes the potential attack power of the candidate attack vector;
[0013] A second score is calculated based on the protocol compliance module, and the second score represents the degree of compliance of the candidate attack vector with the protocol specification;
[0014] The first and second scores are weighted and fused to obtain a comprehensive score for each candidate attack vector;
[0015] Step 4: Determine whether to accept the candidate attack vector. When the overall score of the candidate attack vector is greater than or equal to the preset acceptance threshold and the second score is greater than or equal to the preset compliance threshold, the current candidate attack vector is determined to be valid (i.e., a high-scoring candidate attack vector), and Step 5 is executed based on the high-scoring candidate attack vector; otherwise, return to Step 1.
[0016] Step 5: Perform vulnerability verification on high-scoring candidate attack vectors in the automated verification range, and automatically determine whether the attack is successful through multimodal probes, and output the verification results.
[0017] Step 6: Generate feedback signals based on the verification results, and incrementally train the attack vector generation model and evaluation model to optimize the model parameters; after completion, return to step 1 to start a new round of vulnerability discovery processing.
[0018] Furthermore, in step 1, the protocol metadata of the prompt includes: protocol version, request method, application programming interface (API) path, parameter structure, and target field.
[0019] Furthermore, the attack vector generation model is an autoregressive sequence generation model based on the Transformer decoder architecture, used to automatically complete the header fields, content type, and basic payload structure of the set protocol specification based on the input prompt.
[0020] Furthermore, the attack vector generation model employs a dynamic temperature-adjusted sampling strategy based on the information entropy of the generation sequence when generating the basic data packet. For each token in the basic data packet, the information entropy of the current predicted probability distribution is calculated. And based on information entropy and preset entropy threshold Calculate the current dynamic temperature:
[0021]
[0022] in, For the current dynamic temperature, This indicates the preset base temperature. For adjustment coefficients, It is the hyperbolic tangent function.
[0023] This invention achieves its purpose through the aforementioned dynamic temperature regulation sampling measurement: when information entropy If the temperature parameter is too low (representing the model's tendency to generate monotonous, common values), increase it to expand the model's exploration of low-probability distributions; if the information entropy... If the temperature is too high (representing a discrete distribution of the model), the temperature should be lowered to converge the grammatical structure.
[0024] Furthermore, step 2 specifically includes:
[0025] The basic data packet is parsed into a tree structure, with each leaf node representing a protocol field and the data type of each leaf node is located. Logical mutation is performed based on the data type of each leaf node, and candidate attack vectors are obtained based on the data packets corresponding to the logically mutated tree structure.
[0026] The logical mutation operation based on the data type of each leaf node includes:
[0027] Numerical logical mutation operations include boundary value testing and format obfuscation;
[0028] String-based logical mutation operations include payload injection, path traversal, and excessively long strings. Excessively long strings refer to generating a sequence of repeating characters that exceeds the buffer length limit.
[0029] Logical mutation operations include condition inversion.
[0030] Furthermore, step 2 also includes performing real-time compliance verification on the generated intermediate result through the protocol compliance module after each logical mutation operation to obtain the compliance degree of the intermediate result. If the compliance degree is less than the compliance threshold, the logical mutation operation is rolled back until the compliance degree of the generated intermediate result is greater than or equal to the compliance threshold, so as to ensure that the output candidate attack vector (i.e. test case) is always valid at the syntax level.
[0031] Furthermore, in step 3, the threat assessment module and the protocol compliance module are specifically as follows:
[0032] The threat assessment module uses a multilayer perceptron to map the input candidate attack vectors to the attack space, and outputs a scalar representing the probability of attack. , that is, the first fraction; where, Indicates the candidate attack vector; , These are the weights and biases of the threat assessment module, which are the trainable module parameters; The closer the value is to 1, the more significant the attack characteristics.
[0033] The protocol compliance module uses a natural language model to combine the inverse of the perplexity (PPL) of the generated sequence with the type constraint verification results to output a compliance score. That is, the second fraction; where, For perplexity (fluency) function, For type constraint validation results, different weights are assigned to each validation result based on the type; the more severe the error, the greater its weight. In this invention, A higher value indicates that the data packet conforms more to the characteristics of normal protocol traffic, and the higher its concealment.
[0034] Furthermore, in step 5, the multimodal probes include: kernel layer probes, memory layer probes, and application layer probes.
[0035] Furthermore, in step 6, the feedback signal is a structured reward signal. If the attack is successful and the protocol is compliant, it is positive feedback, and the reward value is incremented by 1; if the attack fails, it is negative feedback, and the reward value is decremented by 1.
[0036] The second aspect of the present invention provides an automated vulnerability discovery system based on adversarial dual-model collaboration, comprising: an attack vector generation model, an evaluation model, a semantic perturbation engine, a decision module, an automated verification range, and a feedback module;
[0037] in,
[0038] The attack vector generation model is used to generate basic data packets based on the input prompt and preset protocol specifications and send them to the semantic perturbation engine; the prompt is a structured context prompt, including protocol metadata and target environment information;
[0039] The semantic perturbation engine is used to perform logical mutation operations on the generated base packets based on their parameter types, obtain candidate attack vectors, and send them to the evaluation model;
[0040] The evaluation model employs a two-stream neural network architecture to evaluate candidate attack vectors, including a threat assessment module, a protocol compliance module, and an evaluation output module. The threat assessment module calculates a first score and sends it to the evaluation output module; this first score represents the potential offensiveness of the candidate attack vector. The protocol compliance module calculates a second score and sends it to the evaluation output module; this second score represents the degree of compliance of the candidate attack vector with the protocol specifications. The evaluation output module weights and fuses the first and second scores to obtain a comprehensive score for each candidate attack vector, and then sends the candidate attack vector, the comprehensive score, and the second score to the decision module.
[0041] The decision module is used to determine the adoption of candidate attack vectors. When the comprehensive score of a candidate attack vector is greater than or equal to the preset adoption threshold, and the second score is greater than or equal to the preset compliance threshold, the current candidate attack vector is determined to be a high-scoring candidate attack vector and sent to the automated verification range; otherwise, the attack vector generation model is notified to regenerate the basic data packet to start a new round of vulnerability mining, or the user is notified to re-enter the prompt to start a new round of vulnerability mining.
[0042] The automated verification range is used to verify vulnerabilities in high-scoring candidate attack vectors and automatically determine whether the attack is successful through multimodal probes, outputting the verification results; at the same time, the verification results are sent to the feedback module.
[0043] The feedback module is used to generate feedback signals based on the verification results, and to incrementally train the attack vector generation model and the evaluation model to optimize the model parameters. After the model parameters are updated, a new round of vulnerability discovery processing is started based on the current input prompt.
[0044] Furthermore, the semantic perturbation engine also includes: after each logical mutation operation, sending the generated intermediate result (i.e., the currently generated candidate attack vector) to the protocol compliance module for real-time compliance verification to obtain the compliance degree of the intermediate result, i.e., the second score; if the second score is less than the compliance threshold, the logical mutation operation is rolled back until the second score of the generated intermediate result is greater than or equal to the compliance threshold.
[0045] The technical solution provided by this invention brings at least the following beneficial effects:
[0046] (1) Improve the effective hit rate of attack vectors: By evaluating the dual criteria (aggressiveness and protocol compliance) of the evaluation model, the system can filter out high-value attack vectors that are "syntactically valid but logically abnormal", effectively bypassing the initial detection of the protocol stack and directly reaching the deep logic of the application. Compared with traditional fuzz testing, the hit rate of effective attacks is significantly improved.
[0047] (2) Achieving full-process automation and shortening the vulnerability discovery cycle: By integrating the generation module, evaluation module, automated verification range, and feedback loop, this invention eliminates the need for manual intervention in the "generation-verification-retraining" cycle. This significantly shortens the vulnerability discovery cycle, for example, from several days to several hours.
[0048] (3) Ensuring the protocol compliance of test cases: The protocol compliance judgment function of the evaluation model and the real-time verification mechanism of the semantic perturbation engine ensure that the vast majority of test cases generated by the system comply with the protocol specifications. This solves the problem of wasted computing resources caused by the generation of a large number of invalid inputs in traditional fuzz testing.
[0049] (4) Possesses adaptive evolution capability: Through a closed-loop feedback mechanism, the attack vector generation model and the evaluation model can continuously learn new attack patterns from verified successful attack cases. This endows the present invention with the ability to adaptively discover new and unknown vulnerabilities, enabling it to flexibly respond to version iterations and feature changes of the target system. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 A flowchart illustrating an automated vulnerability discovery method based on adversarial dual-model collaboration provided in an embodiment of the present invention;
[0052] Figure 2 An architecture diagram of an automated vulnerability discovery system based on adversarial dual-model collaboration provided in an embodiment of the present invention;
[0053] Figure 3 This is a schematic diagram of the evaluation model used in an embodiment of the present invention. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be described in detail and completely below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Generally, the components of the embodiments of the present invention described and shown in the accompanying drawings can be arranged and designed using different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present invention.
[0055] In one embodiment, such as Figure 1 As shown, the specific implementation steps of an automated vulnerability discovery method based on adversarial dual-model collaboration provided in this embodiment of the invention include:
[0056] Step S1, Generate basic data packet: Generate basic data packet based on attack vector generation model according to the input prompt and preset protocol specifications; wherein, the prompt is a structured context prompt, including protocol metadata and target environment information;
[0057] Step S2, Perturbation and Enhancement: Perform a logical mutation operation on the generated base data packet based on its parameter type to obtain candidate attack vectors;
[0058] Step S3, Comprehensive scoring of candidate attack vectors: The evaluation model using a two-stream neural network architecture is used to evaluate the candidate attack vectors, including: calculating a first score, i.e., an attack power score, based on the threat assessment module, to characterize the potential attack power of the candidate attack vector; calculating a second score, i.e., a protocol compliance score, based on the protocol compliance module, to characterize the degree of compliance of the candidate attack vector with the protocol specifications; and weighting and fusing the attack power score and the protocol compliance score to obtain a comprehensive score for each candidate attack vector.
[0059] Step S4, Decision - Adoption: This involves determining whether to adopt a high-scoring candidate attack vector. If the overall score of the candidate attack vector is greater than or equal to a preset adoption threshold, and the second score is greater than or equal to a preset compliance threshold, the current candidate attack vector is determined to be a high-scoring candidate attack vector, and step S5 is executed based on this vector. Otherwise, the current candidate attack vector is discarded, and the process returns to step S1 to regenerate a new basic data packet. In other words, this step involves a decision based on the overall score and the protocol compliance score to determine whether to adopt the vector.
[0060] Step S5, Execution and Verification, Automated Verification Based on Multimodal Probes: Vulnerability verification is performed on high-scoring candidate attack vectors in the automated verification range, and the success of the attack is automatically determined by multimodal probes, and the verification results are output.
[0061] Step S6, Feedback and Evolution: Generate feedback signals based on the verification results, and incrementally train the attack vector generation model and evaluation model to optimize the model parameters; after completion, return to step S1 to start a new round of vulnerability discovery processing.
[0062] In one embodiment, such as Figure 2As shown in the figure, the automated vulnerability mining system based on adversarial dual-model collaboration provided in this embodiment of the invention includes: an attack vector generation model, an evaluation model, a semantic perturbation engine, a decision module, an automated verification range, and a feedback module; wherein, the attack vector generation model is used to generate basic data packets based on input prompts and preset protocol specifications and send them to the semantic perturbation engine; wherein, the prompts are structured context prompts, including protocol metadata and target environment information; the semantic perturbation engine is used to perform logical mutation operations on the generated basic data packets based on their parameter types to obtain candidate attack vectors and send them to the evaluation model; the evaluation model uses a dual-stream neural network architecture to evaluate the candidate attack vectors, including a threat evaluation module, a protocol compliance module, and an evaluation output module, such as Figure 3 As shown, the threat assessment module calculates a first score, which is an attack score characterizing the potential attack power of candidate attack vectors, and sends the attack score to the assessment output module. The protocol compliance module calculates a second score, which is a protocol compliance score characterizing the degree of compliance of candidate attack vectors with protocol specifications, and sends the protocol compliance score to the assessment output module. The assessment output module performs a weighted fusion of the attack score and the protocol compliance score to obtain a comprehensive score for each candidate attack vector, and sends the candidate attack vector, the comprehensive score, and the second score to the decision module. The decision module is used to determine the adoption of candidate attack vectors. When the comprehensive score of a candidate attack vector is greater than or equal to a preset adoption threshold, and the second score is greater than or equal to a preset compliance threshold, the decision module adopts the candidate attack vector. When the value is positive, the current candidate attack vector is determined to be a high-scoring candidate attack vector (referred to as a high-scoring vector) and sent to the automated verification range; otherwise, the attack vector generation model is notified to regenerate the basic data packet to start a new round of vulnerability mining, or the user is notified to re-enter the prompt to start a new round of vulnerability mining. The automated verification range is used to verify the vulnerabilities of the high-scoring candidate attack vectors and automatically determine whether the attack is successful through multimodal probes, and output the verification results; at the same time, the verification results are sent to the feedback module; the feedback module is used to generate feedback signals based on the verification results, and to incrementally train the attack vector generation model and the evaluation model to optimize the model parameters; after the model parameters are updated, a new round of vulnerability mining is started based on the currently input prompt.
[0063] In one embodiment, the semantic perturbation engine further includes: after each logical mutation operation, sending the generated intermediate result (i.e., the currently generated candidate attack vector) to the protocol compliance module for real-time compliance verification to obtain a second score of the intermediate result; if the second score is less than the compliance threshold, rolling back the logical mutation operation until the second score of the generated intermediate result is greater than or equal to the compliance threshold.
[0064] In one embodiment, the attack vector generation model employs an autoregressive sequence generation model based on a Transformer decoder-only architecture as the system's foundational data generation engine. Its core task is to automatically construct packet frames that conform to the underlying protocol specifications. Unlike traditional rule-based template filling, this model is pre-trained on a large amount of data—in this embodiment, it is pre-trained on over 1 billion normal HTTP / RPC interaction logs—to learn the deep syntactic structure and contextual dependencies of network protocols. Based on given context prompts, it can automatically complete header fields, Content-Type, and basic payload structure, providing high-quality, syntactically compliant foundational data for subsequent logical mutations.
[0065] The protocol metadata in the prompt can include: protocol version, request method, API path, parameter structure, and target fields; for example, the protocol metadata can be set as: [Protocol version: HTTP / 1.1] [Request method: POST] [API path: / order / submit] [Parameter structure: JSON] [Target field: quantity]. The target environment in the prompt usually refers to a specific deployment instance or server address, such as a pre-release / test environment, development environment, or local environment.
[0066] The output of the attack vector generation model is a complete, syntactically correct sequence of raw data packet text, for example:
[0067]
[0068] This example represents a POST request under the HTTP / 1.1 protocol, with the target path being / order / submit. Here, POST indicates the interface information, Host indicates the host information, Content-Type indicates the content type, Content-Length indicates the content length, item_id indicates the item identifier, and quantity indicates the data volume.
[0069] To address the contradiction between "pattern collapse" (generating duplicate samples) and "complete randomness" (generating invalid garbled text) often encountered in generative models, this invention introduces a dynamic temperature adjustment mechanism based on the information entropy of the generated sequence in the attack vector generation model. When generating each token in the basic data packet, the information entropy of the current predicted probability distribution is calculated in real time: if the entropy value is too low (indicating that the model tends to generate monotonic common values), the algorithm increases the temperature parameter to expand the model's exploration of low-probability distributions; if the entropy value is too high (indicating that the model's distribution is discrete), the temperature is decreased to converge the grammatical structure. In other words, the attack vector generation model uses a dynamic temperature adjustment sampling strategy to generate the basic data packet. The current dynamic temperature (i.e., the dynamic temperature at step t) is... The specific calculation formula is as follows:
[0070]
[0071] in, This indicates the preset base temperature, for example, set to 1.0. This is an adjustment factor, for example, set to 0.5. It is the hyperbolic tangent function. Let the entropy threshold be set. The information entropy of the pre-predicted probability distribution is used. This strategy ensures that the base data generated by the attack vector generation model is both protocol compliant and retains sufficient mutation potential.
[0072] In one embodiment, the evaluation model, serving as the core evaluation and filtering component of the system, employs a two-stream neural network architecture and is responsible for multi-dimensional quality screening of candidate attack vectors before verification. The evaluation model receives candidate attack vectors as input and feeds them into two parallel, independent tasks that perform quantitative evaluations from the dimensions of "aggressivity" and "compliance." This mechanism ensures that the samples selected by the system possess both potential for attack and protocol compliance, thereby enabling them to pass through conventional security protection devices and application parsing layers.
[0073] The threat assessment module based on the assessment model implements an aggression score. The purpose of this logical branch is to identify whether the input contains known attack signature patterns (such as SQL injection signatures or buffer overflow signatures). In this embodiment, the threat assessment module uses a multilayer perceptron to map the input candidate attack vectors to the attack space, outputting a scalar representing the probability of attack. , that is, the first fraction; where, Indicates the candidate attack vector; , These are the weights and biases of the threat assessment module, which are the trainable module parameters; The closer the value is to 1, the more significant the attack characteristics.
[0074] The protocol compliance module based on the evaluation model implements a protocol compliance score. The purpose of this logical branch is to determine whether the input conforms to the RFC (Request For Comments) standard and API data specifications, and whether it can pass various protocol checks or application parsers to reach the application execution logic normally. In this embodiment, the protocol compliance module uses a natural language model, combining the inverse of the perplexity (PPL) of the generated sequence with the type constraint verification result, to output a compliance score. Its expression is:
[0075]
[0076] in, For perplexity (fluency) function, For type constraint validation results, different weights are configured for each validation result based on the type. The more serious the error, the greater its weight. For example, the validation results are divided into four types: critical error (complete type match), major error (partial type mismatch), minor error (format problem), and warning level. The weights of the four types are set to 1, 0.7, 0.3, and 0.1 respectively.
[0077] In this invention, A higher value indicates that the data packet conforms more to the characteristics of normal protocol traffic, and the higher its concealment.
[0078] In obtaining an aggression score and compliance score Then, it can be based on the formula The final score of the candidate attack vectors is obtained. That is, the overall score. These are preset weighting coefficients. If and only if... Exceeding the preset adoption threshold, and If the minimum compliance requirements are met, the candidate attack vector is determined to be valid, i.e., a high-scoring candidate attack vector, and is sent to the next stage.
[0079] In one embodiment, the semantic perturbation engine achieves precise logical mutations based on Abstract Syntax Tree (AST) parsing and data type awareness technology. Its core workflow first uses a protocol parser (such as an HTTP parser, JSON parser, etc.) to parse the basic data packets generated by the attack vector generation model into a tree structure, locates the data type (integer, floating point, string, boolean value, etc.) of each leaf node, and then, while maintaining the integrity of the top-level protocol structure, calls the corresponding mutation operator for testing on specific types.
[0080] The logical mutation operation on the basic data packet based on its parameter type is implemented through perturbation operators configured for different data types. The specific perturbation operators are as follows:
[0081] (1) Numeric type:
[0082] Boundary value testing: Replace with limit values of integer type, such as 2147483647, -2147483648, 0, NaN, Infinity, etc.
[0083] Format obfuscation: Changing the representation of a number without changing the number itself, for example, replacing 100 with 1e2 or hexadecimal 0x64, to test the robustness of the parser;
[0084] (2) String type:
[0085] Payload injection: Concatenating common attack payload fragments into a string;
[0086] Path traversal: Inject system path identifiers, such as .. / .. / .. / .. / etc / passwd;
[0087] Excessively long string: Generates a sequence of repeating characters that exceeds the buffer length limit, attempting to trigger an overflow.
[0088] (3) Logical type (Boolean / Enum):
[0089] Conditional reversal: Changes true to false, or replaces an enumeration value with an illegal value outside the defined range.
[0090] In this embodiment of the invention, the semantic perturbation engine also includes real-time compliance verification. That is, after each perturbation operation (logical mutation operation), the generated intermediate result is called back to the protocol compliance module for rapid verification. If the mutation causes damage to the protocol structure (e.g., JSON format error), the mutation operation will be rolled back to ensure that the output test cases are always valid at the syntax level.
[0091] In one embodiment, the automated verification range constructs a high-fidelity virtualized execution environment. Through multi-dimensional monitoring probes, it captures "silent attacks" that, while failing to cause program crashes, have triggered vulnerabilities. The range utilizes dynamic orchestration technology based on Docker Compose, launching an independent cluster of microservice instances for each test task. This environment includes the target application, database, middleware, and a companion monitoring sidecar container, forming an isolated and reproducible verification loop. The automated verification range employs multimodal probes, including kernel-level probes, memory-level probes, and application-level probes, to determine the success of the attack.
[0092] Kernel Level-eBPF: This probe uses eBPF (Extended Berkeley PacketFilter) technology to attach to critical system calls, intercepting and analyzing high-risk calls such as execve (command execution), open / write (file read / write), and connect (network connection) in real time. If the web process abnormally calls / bin / sh while processing a request, it is directly determined that a remote code execution (RCE) attack has succeeded.
[0093] Memory Level Probe (CRIU): This tool uses CRIU (Checkpoint / Restore In Userspace) to perform memory integrity checks. It takes snapshots of the process memory before and after processing a request and compares the changes in memory pages using a differential algorithm (Diff). If modifications to a read-only memory segment are found, it is identified as a memory corruption vulnerability.
[0094] Application Level Probe: Analyzes application logs, HTTP status codes, and database query logs. A surge in HTTP 500 errors or unexpected full table scan statements in the database logs indicates a logical error or successful injection.
[0095] In one embodiment, the feedback module employs a closed-loop feedback mechanism. After verification, the target range outputs a structured reward signal: if the attack is successful and the protocol is compliant, it's positive feedback, incrementing the reward value by 1; if the attack fails (intercepted or not triggered), it's negative feedback, decrementing the reward value by 1. This reward signal can be fed back to the attack vector generation model and evaluation model via a reinforcement learning interface, guiding the gradient updates of model parameters and enabling automated iterative evolution of the system. Specifically, after generating a fixed number of samples (e.g., 10,000), both models will perform a parameter update. The update interval and frequency can be adjusted based on the business scenario.
[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0097] The above descriptions are merely some embodiments of the present invention. Those skilled in the art can make various modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the scope of protection of the present invention.
Claims
1. An automated vulnerability mining method based on adversarial double model cooperation, characterized in that, The method comprises the following steps: Step 1: generating a basic data packet based on an attack vector generation model according to an input prompt and a preset protocol specification; wherein the prompt is a structured contextual prompt, including protocol metadata and target environment information; Step 2: performing a logical mutation operation on the generated basic data packet based on its parameter type to obtain a candidate attack vector; Step 3: evaluating the candidate attack vector using an evaluation model with a dual-flow neural network architecture, including: calculating a first score based on a threat evaluation module, the first score representing the potential attack of the candidate attack vector; calculating a second score based on a protocol compliance module, the second score representing the compliance degree of the candidate attack vector to the protocol specification; weighting and fusing the first score and the second score to obtain a comprehensive score of each candidate attack vector; Step 4: determining whether to adopt the candidate attack vector, when the comprehensive score of the candidate attack vector is greater than or equal to a preset adoption threshold, and the second score is greater than or equal to a preset compliance threshold, the current candidate attack vector is determined as a high-score candidate attack vector, and step 5 is performed based on the high-score candidate attack vector; otherwise, return to step 1; Step 5: verifying the vulnerability of the high-score candidate attack vector in an automated verification target range, and automatically determining whether the attack is successful through a multi-modal probe to output a verification result; Step 6: generating a feedback signal based on the verification result, and incrementally training the attack vector generation model and the evaluation model to optimize the model parameters; after completion, return to step 1 to start a new round of vulnerability mining process.
2. The automated vulnerability mining method based on adversarial dual model collaboration of claim 1, wherein, In step 1, the protocol metadata of the prompt includes: protocol version, request method, application program interface API path, parameter structure and target field. 3.The automated vulnerability mining method based on the adversarial dual model collaboration of claim 1, wherein, The attack vector generation model is an autoregressive sequence generation model based on a Transformer decoder architecture, which is used to automatically complete the header field, content type and basic payload structure of the set protocol specification based on the input prompt.
4. The automated vulnerability mining method based on adversarial dual model collaboration of claim 1, wherein, The attack vector generation model adopts a dynamic temperature adjustment sampling strategy based on generation sequence information entropy when generating a basic data packet, and calculates the information entropy of the current prediction probability distribution at each token of the basic data packet , and calculates the current dynamic temperature based on the information entropy and a preset entropy threshold : ; wherein is the current dynamic temperature, denotes a preset base temperature, is an adjustment factor, is a hyperbolic tangent function.
5. The automated vulnerability mining method based on adversarial dual model collaboration of claim 1, wherein, Step 2 specifically includes: parsing the basic data packet into a tree structure, each leaf node representing a protocol field, and locating the data type of each leaf node; based on the data type of each leaf node, logical mutation is performed, and based on the data packet corresponding to the logically mutated tree structure, a candidate attack vector is obtained; wherein the logical mutation operation based on the data type of each leaf node includes: the logical mutation operation of numerical type includes boundary value test and format confusion; the logical mutation operation of string type includes payload injection, path traversal and super-long string, wherein the super-long string refers to a repeated character sequence generated beyond the buffer length limit; the logical mutation operation of logical type includes conditional inversion.
6. The automated vulnerability mining method based on adversarial dual model collaboration of claim 1, wherein, Step 2 further includes, after each logical mutation operation, performing real-time compliance checking on the generated intermediate result through the protocol compliance module to obtain the compliance degree of the intermediate result, if the compliance degree is less than the compliance threshold, the logical mutation operation is rolled back until the compliance degree of the generated intermediate result is greater than or equal to the compliance threshold.
7. The automated vulnerability mining method based on adversarial dual model collaboration of claim 1, wherein, In step 3, the threat evaluation module and the protocol compliance module are specifically: The threat assessment module adopts a multi-layer perception to map the input candidate attack vector to an attack space, and outputs a scalar representing the probability of attack , i.e. the first score; wherein, represents the candidate attack vector; , are the weight and bias of the threat assessment module, respectively. The protocol compliance module adopts a natural language model, combines the perplexity reciprocal of the generated sequence and the type constraint checking result, and outputs a compliance score , i.e., a second score; wherein, is a perplexity function, is a type constraint checking result, and different weights are configured for each type of checking result based on different checking results.
8. The automated vulnerability mining method based on adversarial dual model collaboration of claim 1, wherein, In step 5, the multi-modal probe includes: a kernel layer probe, a memory layer probe and an application layer probe.
9. The automated vulnerability mining method based on adversarial dual model collaboration of claim 1, wherein, In step 6, the feedback signal is a structured reward signal, and if the attack is successful and the protocol is compliant, it is positive feedback, and the reward value is increased by 1; if the attack fails, it is negative feedback, and the reward value is decreased by 1.
10. An automated vulnerability mining system based on adversarial dual model collaboration, characterized in that, Comprise: Attack vector generation model, evaluation model, semantic perturbation engine, decision module, automated verification target and feedback module; Wherein, The attack vector generation model is used to generate a basic data packet according to the input prompt and the preset protocol specification and send it to the semantic perturbation engine; wherein the prompt is a structured context prompt, including protocol metadata and target environment information; The semantic perturbation engine is used to perform logical variation operation on the generated basic data packet based on its parameter type to obtain candidate attack vectors and send them to the evaluation model; The evaluation model adopts a double-flow neural network architecture to evaluate the candidate attack vectors, including a threat evaluation module, a protocol compliance module, and an evaluation output module; wherein the threat evaluation module is used to calculate a first score and send it to the evaluation output module, the first score representing the potential attack of the candidate attack vector; the protocol compliance module calculates a second score and sends it to the evaluation output module, the second score representing the compliance degree of the candidate attack vector to the protocol specification; the evaluation output module performs weighted fusion on the first score and the second score to obtain the comprehensive score of each candidate attack vector, and sends the candidate attack vector, the comprehensive score and the second score to the decision module; The decision module is used to determine the adoption of the candidate attack vector, when the comprehensive score of the candidate attack vector is greater than or equal to the preset adoption threshold, and the second score is greater than or equal to the preset compliance threshold, the current candidate attack vector is determined as a high-score candidate attack vector and sent to the automated verification target; otherwise, inform the attack vector generation model to generate a new basic data packet to start a new round of vulnerability mining process, or inform the user to input the prompt again to start a new round of vulnerability mining process; The automated verification target is used to verify the vulnerability of the high-score candidate attack vector, and automatically determine whether the attack is successful through a multi-modal probe to output the verification result; at the same time, the verification result is sent to the feedback module; The feedback module is used to generate a feedback signal based on the verification result, and incrementally train the attack vector generation model and the evaluation model to optimize the model parameters; after the model parameters are updated, a new round of vulnerability mining process is started based on the current input prompt.
Citation Information
Patent Citations
Multi-edge collaborative anomaly detection system and method based on double-flow parallel neural network
CN119402273A
Artificial intelligence security vulnerability detection platform based on deep learning
CN120763933A
Predicting code vulnerabilities using machine learning classifier models trained on internal analysis states
US20210357207A1
IoT vulnerability detection
WO2024092323A1