Automatic vulnerability mining method and system based on adversarial double model cooperation
By employing an automated vulnerability discovery method that utilizes an adversarial dual-model approach, attack vectors are generated and evaluated. Combined with threat assessment and protocol compliance modules, this approach enables efficient and automated vulnerability discovery and verification, addressing the inefficiencies and manual reliance issues inherent in existing technologies and improving the efficiency and accuracy of vulnerability discovery.
Patent Information
- Application Number
- CN202511855994.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-12-10
AI Technical Summary
Existing automated vulnerability discovery technologies are inefficient, blind, and costly. They cannot effectively generate attack vectors that conform to protocol specifications, and the verification process relies on manual intervention, making it impossible to form an efficient iterative optimization loop.
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 feedback signals to achieve full-process automation and adaptive evolution.
It 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 target system version iterations and feature changes.
Smart Images

Figure CN121283784B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of network security and automated testing technology, and in particular to an automated vulnerability mining method and system based on adversarial double model cooperation. BACKGROUND
[0002] The discovery of unknown vulnerabilities (zero-day vulnerabilities) is the front line of network security attack and defense confrontation. Current mainstream automated vulnerability mining technologies, such as fuzzing, inject a large number of variant inputs into target programs in order to trigger abnormal behavior. However, traditional fuzzing technologies represented by AFL (American Fuzzy Lop) have significant bottlenecks:
[0003] Inefficiency and blindness: Most traditional fuzzing technologies use random or simple rule-based byte-level variation. The vast majority of inputs generated by them are rejected in the early validation stage because they do not meet the protocol specifications of target applications (such as HTTP services), which results in a very low generation rate of effective test cases.
[0004] Lack of semantic understanding: Fuzzers have no knowledge of the business logic meaning of inputs. Although it can generate syntactically correct JSON (JavaScript Object Notation) data, it cannot understand the logical relationships between fields, so it is difficult to construct attacks that exploit authentication defects or business process vulnerabilities.
[0005] High verification cost: Program crashes generated by fuzzing require security experts to invest a lot of time in manual identification, reproduction, and root cause analysis, which has become an efficiency bottleneck in modern software development processes (such as DevSecOps) that require rapid iteration.
[0006] To solve the above problems, the industry has begun to explore the application of machine learning models in this field. However, when directly applying GAN to generate structured attack text, it often encounters problems of mode collapse and unstable training, i.e. the model can only generate a few monotonous attack variants, so it is necessary to propose a new automated vulnerability mining technology based on GAN. SUMMARY
[0007] The present application provides an automated vulnerability mining method and system based on adversarial double model cooperation, aiming to solve the technical problems of blind attack vector generation, low quality, poor protocol compliance, and dependence on manual verification process in existing automated vulnerability mining technologies due to the lack of deep understanding of protocol semantics and effective feedback mechanisms.
[0008] The first aspect of the present application provides an automatic vulnerability mining method based on adversarial double model cooperation, which comprises the following steps:
[0009] 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 context prompt, including protocol metadata and target environment information;
[0010] Step 2: performing a logical mutation operation on the generated basic data packet based on its parameter type to obtain a candidate attack vector;
[0011] Step 3: using an evaluation model with a double-flow neural network architecture to evaluate the candidate attack vector, including:
[0012] calculating a first score based on a threat evaluation module, the first score representing the potential attack of the candidate attack vector;
[0013] 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;
[0014] performing weighted fusion on the first score and the second score to obtain a comprehensive score of each candidate attack vector;
[0015] Step 4: performing an adoption decision on 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 to be effective (i.e. a high-score candidate attack vector), and step 5 is performed based on the high-score candidate attack vector; otherwise, return to step 1;
[0016] Step 5: performing vulnerability verification on 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;
[0017] Step 6: generating a feedback signal based on the verification result, and performing incremental training on 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.
[0018] Further, in step 1, the protocol metadata of the prompt includes: protocol version, request method, application program interface API path, parameter structure and target field.
[0019] Further, the attack vector generation model is an autoregressive sequence generation model using a Transformer decoder architecture, which is used to automatically complete the header field, content type (Content-Type) and basic payload structure of the set protocol specification based on the input prompt.
[0020] Further, the attack vector generation model adopts a dynamic temperature adjustment sampling strategy based on the information entropy of the generated sequence information when generating the basic data packet , calculates the information entropy of the current prediction probability distribution , and calculates the current dynamic temperature based on the information entropy and a preset entropy threshold
[0021]
[0022] wherein, is the current dynamic temperature, represents a preset basic temperature, is an adjustment coefficient, is a hyperbolic tangent function.
[0023] The application realizes the following through the above dynamic temperature adjustment sampling measurement: when the information entropy is too low (indicating that the model tends to generate monotonous common values), the temperature parameter is increased to expand the exploration of the model to the low probability distribution; if the information entropy is too high (indicating that the model distribution is discrete), the temperature is reduced to converge the syntax structure.
[0024] Further, step 2 specifically comprises:
[0025] 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; performing logical mutation based on the data type of each leaf node, and then obtaining the candidate attack vector based on the data packet corresponding to the tree structure after logical mutation;
[0026] wherein, the logical mutation operation based on the data type of each leaf node comprises:
[0027] the logical mutation operation of the numerical type includes boundary value test and format confusion;
[0028] the logical mutation operation of the 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;
[0029] the logical mutation operation of the logical type includes conditional inversion.
[0030] Further, step 2 further comprises, after each logical mutation operation, performing real-time compliance checking on the generated intermediate result through a protocol compliance module to obtain the compliance degree of the intermediate result, and if the compliance degree is less than a compliance threshold, rolling back the logical mutation operation 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] Further, in step 3, the threat assessment module and the protocol compliance module are specifically:
[0032] 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 , that is, the first score; wherein, represents the candidate attack vector; , and are the weights and biases of the threat assessment module, that is, trainable module parameters; The closer the value of to 1, the more significant the attack feature is;
[0033] The protocol compliance module adopts a natural language model, combines the perplexity (PPL) reciprocal of the generated sequence and the type constraint verification result, and outputs a compliance score , that is, the second score; wherein, is a perplexity (fluency) function, is a type constraint verification result, based on different types of verification results, different weights are configured for each verification result, and the more serious the error is, the greater the weight is. In the present application, The higher the value of, the more the data packet conforms to the normal protocol flow characteristics, and the higher the concealment is.
[0034] Further, in step 5, the multi-modal probe includes: a kernel layer probe, a memory layer probe and an application layer probe.
[0035] Further, in step 6, the feedback signal is a structured reward signal, if the attack is successful and the protocol is compliant, it is a positive feedback, and the reward value is increased by 1; if the attack fails, it is a negative feedback, and the reward value is decreased by 1.
[0036] The second aspect of the present application provides an automatic vulnerability mining system based on cooperative adversarial double models, comprising: an attack vector generation model, an evaluation model, a semantic perturbation engine, a decision module, an automatic verification target range and a feedback module;
[0037] Wherein,
[0038] 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;
[0039] The semantic perturbation engine is used to perform a logical variation operation on the generated basic data packet based on its parameter type, to obtain a candidate attack vector and send it to the evaluation model;
[0040] 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 a comprehensive score of each candidate attack vector, and sends the candidate attack vector, the comprehensive score and the second score to the decision module;
[0041] The decision module is used for adoption determination of 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 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 processing, or the user is notified to re-input the prompt to start a new round of vulnerability mining processing;
[0042] The automated verification range is used for vulnerability verification of the high-score candidate attack vector, and automatically determines whether the attack is successful through a multi-modal probe, and outputs a verification result; meanwhile, the verification result is sent to the feedback module;
[0043] The feedback module is used for generating a feedback signal based on the verification result, and performing incremental training on the attack vector generation model and the evaluation model to optimize the model parameters; when the model parameters are updated, a new round of vulnerability mining processing is started based on the current input prompt.
[0044] Further, the semantic perturbation engine further comprises: after each logical mutation operation, the generated intermediate result (i.e. the current generated candidate attack vector) is sent to the protocol compliance module for real-time compliance checking, 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 scheme provided by the application at least brings the following beneficial effects:
[0046] (1) The effective hit rate of the attack vector is improved: through the double standard (attack and protocol compliance) evaluation of the evaluation model, the system can screen out high-value attack vectors with "legal syntax but abnormal logic", effectively bypassing the primary detection of the protocol stack and reaching the deep logic of the application. Compared with traditional fuzzy testing, the hit rate of effective attacks is significantly improved.
[0047] (2) Realize full-process automation and shorten the vulnerability discovery period: By integrating the generation module, the evaluation module, the automated verification target range and the feedback loop, the application eliminates the need for human intervention in the "generation-verification-retraining" cycle. Thus, the vulnerability discovery period is significantly shortened, for example, from several days to several hours.
[0048] (3) Ensure protocol compliance of test cases: The protocol compliance determination function of the evaluation model and the real-time checking mechanism of the semantic disturbance engine ensure that most of the test cases generated by the system comply with the protocol specification. Thus, the problem of waste of computing resources caused by traditional fuzzy testing due to generation of a large number of invalid inputs is solved.
[0049] (4) Have adaptive evolution ability: Through the closed-loop feedback mechanism, the attack vector generation model and the evaluation model can continuously learn new attack patterns from the verified successful attack cases. Thus, the application has the ability to adaptively discover new and unknown vulnerabilities, and can flexibly cope with version iteration and feature changes of the target system. BRIEF DESCRIPTION OF DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0051] Figure 1 The flow chart of the automatic vulnerability mining method based on the cooperative of the antagonistic double models provided by the embodiments of the present application;
[0052] Figure 2 The architecture diagram of the automatic vulnerability mining system based on the cooperative of the antagonistic double models provided by the embodiments of the present application;
[0053] Figure 3 The structural schematic diagram of the evaluation model used by the embodiments of the present application. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the following will combine the drawings in the embodiments of the present application to describe the technical solutions in the embodiments of the present application in detail and completely. Obviously, the described embodiments are only some embodiments of the present application, not all the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings can be arranged and designed using different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not to limit the scope of the claimed application, but only represents selected embodiments of the present application.
[0055] In one embodiment, as shown in Figure 1 The specific implementation steps of the automatic vulnerability mining method based on the collaborative of the adversarial double model provided by the embodiment of the present application include:
[0056] Step S1, generating a basic data packet: generating a basic data packet based on the attack vector generation model according to the input prompt and the preset protocol specification; wherein the prompt is a structured context prompt, including protocol metadata and target environment information;
[0057] Step S2, perturbation and enhancement: performing a logical mutation operation on the generated basic data packet based on its parameter type to obtain a candidate attack vector;
[0058] Step S3, comprehensive scoring of the candidate attack vector: using an evaluation model with a double-flow neural network architecture to evaluate the candidate attack vector, including: calculating a first score, i.e., an attack score, based on a threat evaluation module, which represents the potential attack of the candidate attack vector; calculating a second score, i.e., a protocol compliance score, based on a protocol compliance module, which represents the compliance degree of the candidate attack vector to the protocol specification; and performing weighted fusion on the attack score and the protocol compliance score to obtain the comprehensive score of each candidate attack vector;
[0059] Step S4, decision-making-whether to adopt, i.e., high-score candidate attack vector adoption decision: 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 step S5 is performed based on the current candidate attack vector; otherwise, the current candidate attack vector is discarded, and step S1 is returned to generate a new basic data packet; that is, in this step, the comprehensive score and the protocol compliance score are used to determine whether to adopt;
[0060] Step S5, execution and verification, automatic verification based on multi-modal probes: performing vulnerability verification on the high-score candidate attack vector in the automatic verification range, and automatically determining whether the attack is successful through multi-modal probes to output the verification result;
[0061] Step S6, feedback and evolution: generating a feedback signal based on the verification result, and performing incremental training on the attack vector generation model and the evaluation model to optimize the model parameters; after completion, returning to step S1 to start a new round of vulnerability mining processing.
[0062] In one embodiment, as shown in Figure 2As shown, the automatic vulnerability mining system based on the collaborative attack of the double model provided by the embodiment of the application includes: an attack vector generation model, an evaluation model, a semantic disturbance engine, a decision module, an automatic verification target and a feedback module; wherein the attack vector generation model is used to generate a basic data packet according to an input prompt and a preset protocol specification and send it to the semantic disturbance engine; wherein the prompt is a structured context prompt, including protocol metadata and target environment information; the semantic disturbance engine is used to perform a logical variation operation on the generated basic data packet based on its parameter type, obtain a candidate attack vector and send it to the evaluation model; the evaluation model uses a double-flow neural network architecture to evaluate the candidate attack vector, including a threat evaluation module, a protocol compliance module and an evaluation output module, such as Figure 3 As shown, wherein the threat evaluation module is used to calculate a first score, that is, an attack score used to represent the potential attack of the candidate attack vector, and send the attack score to the evaluation output module; the protocol compliance module calculates a second score, that is, a protocol compliance score used to represent the compliance degree of the candidate attack vector to the protocol specification, and sends the protocol compliance score to the evaluation output module; the evaluation output module performs weighted fusion on the attack score and the protocol compliance score to obtain a 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 make a decision on 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 (referred to as a high-score vector) and sent to the automatic verification target; otherwise, inform the attack vector generation model to generate a new basic data packet to start a new round of vulnerability mining processing, or inform the user to input a new prompt to start a new round of vulnerability mining processing; the automatic 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, and 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; when the model parameters are updated, a new round of vulnerability mining processing is started based on the current input prompt.
[0063] In one embodiment, the semantic disturbance engine further includes: after each logical variation operation, the generated intermediate result (i.e. the current generated candidate attack vector) is sent to the protocol compliance module for real-time compliance checking to obtain the second score of the intermediate result; if the second score is less than the compliance threshold, the logical variation operation is rolled back 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 adopts an autoregressive sequence generation model based on a Transformer decoder (Decoder-only) architecture as the basic data generation engine of the system. Its core task is to automatically build a packet framework that conforms to the basic protocol specification. Unlike traditional rule-based template filling, this model is pre-trained on a large amount of data, and the present embodiment is pre-trained on more than 1 billion normal HTTP / RPC interaction logs to learn the deep syntax structure and context dependency of network protocols. It can automatically complete the header fields, content type Content-Type, and basic payload structure according to the given context prompt, providing high-quality basic data that conforms to the syntax specification for subsequent logic mutation.
[0065] Among them, the protocol metadata of the prompt can include: protocol version, request method, application program interface API path, parameter structure, and target field, etc.; for example, the protocol metadata is 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 pre-release / test environment, development environment, local environment, etc.
[0066] The output of the attack vector generation model is a complete and syntactically correct raw packet text sequence, for example:
[0067]
[0068] This example represents a POST request under the HTTP / 1.1 protocol, with the target path being / order / submit. Among them, POST represents the interface information, Host represents the host information, Content-Type represents the content type, Content-Length represents the content length, item_id represents the item identifier, and quantity represents the data quantity.
[0069] To solve the contradiction between "pattern collapse" (generating repeated samples) and "completely random" (generating invalid random codes) often encountered by the generation model, in the attack vector generation model, a dynamic temperature adjustment mechanism based on the entropy of the generated sequence information is introduced. When generating each Token (token) of the basic data packet, the information entropy of the current prediction probability distribution is calculated in real time: if the entropy value is too low (indicating that the model tends to generate monotonous common values), the algorithm adjusts the temperature parameter to expand the exploration of the model to the low probability distribution; if the entropy value is too high (indicating that the model distribution is discrete), the temperature is reduced to converge the syntax structure. That is, the attack vector generation model uses a dynamic temperature adjustment sampling strategy to generate the basic data packet. The specific calculation formula of the current dynamic temperature (i.e., the dynamic temperature of the t-th step) is as follows:
[0070]
[0071] wherein, represents a preset basic temperature, for example, set to 1.0, is an adjustment coefficient, for example, set to 0.5, is a hyperbolic tangent function, is a set entropy threshold, is the information entropy of the previous prediction probability distribution. This strategy ensures that the basic data generated by the attack vector generation model is both protocol compliant and retains sufficient variation potential.
[0072] In one embodiment, the evaluation model serves as the core evaluation and filtering component of the system, which adopts a Two-Stream neural network architecture and is responsible for multi-dimensional quality screening of candidate attack vectors before verification. The evaluation model receives a candidate attack vector as input and sends it to two independent tasks working in parallel, respectively quantitatively evaluating from the "attackability" and "compliance" dimensions. This mechanism ensures that the samples screened by the system have both potential attackability and protocol specification, so that they can pass through the regular security protection devices and application parsing layer.
[0073] The threat evaluation module based on the evaluation model realizes the calculation of the attackability score The purpose of this logic branch is to identify whether the input contains known attack feature patterns (such as SQL injection features, buffer overflow features). In this embodiment, the threat evaluation module uses a multi-layer perceptron to map the input candidate attack vector to the attack space, outputting a scalar representing the attack probability, i.e., the first score; wherein, represents the candidate attack vector; , are the weights and biases of the threat evaluation module, i.e., 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 realizes accurate logical mutation based on abstract syntax tree (AST) parsing and data type awareness technology. Its core workflow first uses a protocol parser (such as HTTP Parser, JSON Parser, etc.) to parse the basic data packet generated by the attack vector generation model into a tree structure, locates the data type (integer, floating point, string, Boolean, etc.) of each leaf node, and then calls the corresponding mutation operator for testing under the premise of maintaining the integrity of the top-level protocol structure.
[0080] Among them, the logical mutation operation of the basic data packet based on the parameter type is realized by the perturbation operator configured for different data types, and the specific perturbation operator is:
[0081] (1) Numeric:
[0082] Boundary value test: replace with integer limit values such as 2147483647, -2147483648, 0, NaN, Infinity, etc. Boundary values;
[0083] Format confusion: change the representation of the value without changing the value itself, for example, replace 100 with 1e2 or hexadecimal 0x64, to test the robustness of the parser;
[0084] (2) String:
[0085] Payload injection: concatenate common attack payload fragments in the string;
[0086] Path traversal: inject system path characteristics such as.. / .. / .. / .. / etc / passwd;
[0087] Long string: generate a repeating character sequence that exceeds the buffer length limit to attempt to trigger an overflow.
[0088] (3) Boolean / Enum:
[0089] Condition inversion: change true to false, or replace the enumeration value with an illegal value outside the defined range.
[0090] In the embodiment of the application, 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 quick verification. If the mutation causes the protocol structure to be damaged (for example, JSON format error), the mutation operation will be rolled back to ensure that the output test case is always valid at the syntax level.
[0091] In one embodiment, the automated verification target field constructs a high-fidelity virtualized execution environment, and captures “silent attacks” that fail to cause program crashes but have triggered vulnerabilities through multi-dimensional monitoring probes. The target field dynamically arranges independent micro-service instance groups for each test task based on container arrangement tools (Docker Compose) dynamic arrangement technology, and the environment includes target applications, databases, middleware, and accompanying monitoring Sidecar containers, forming an isolated and reproducible verification closed loop. Among them, the multi-modal probes used by the automated verification target field include kernel layer probes, memory layer probes, and application layer probes to determine whether the attack is successful.
[0092] Kernel Level-eBPF: Use eBPF (Extended Berkeley Packet Filter) technology to mount to critical system calls, intercept and analyze execve (execute command), open / write (file read / write), connect (network external connection) and other high-risk calls in real time. If the web process abnormally calls / bin / sh when processing requests, it is directly determined as a remote code execution (RCE) attack success.
[0093] Memory Level-CRIU: Use CRIU (Checkpoint / Restore In Userspace) tool for memory integrity detection. Take snapshots of process memory before and after processing requests, and compare the changes of memory pages through the difference algorithm (Diff). If the read-only memory area (ReadOnly Data Segment) is found to be modified, it is determined as a memory corruption vulnerability.
[0094] Application Level Probe (Application Level): Analyze application logs, HTTP status codes, and database query logs (Query Log). If a large number of HTTP 500 errors are detected, or unexpected full table scan statements appear in the database log, it is determined as a logic error or injection success.
[0095] In one embodiment, the feedback module adopts a feedback closed loop mechanism, that is, after verification, the target field outputs a structured reward signal: 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 (intercepted or not triggered), it is negative feedback, and the reward value is decreased by 1. The reward signal can be returned to the attack vector generation model and the evaluation model through the reinforcement learning interface, guiding the gradient update of the model parameters, and realizing the automatic iterative evolution of the system. Specifically, a fixed number (e.g. 10000) of samples can be generated each time, and the two models will update the parameters once. The update interval and frequency can be adjusted based on the business scenario.
[0096] Finally, it should be noted that the above examples are only used to illustrate the technical solutions of the present application, and are not intended to limit the same. Although the present application has been described in detail with reference to the foregoing examples, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacements for some of the technical features. Such modifications or replacements 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 application.
[0097] The above only describes some embodiments of the present application. For those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can be made, which are all within the protection scope of the present application.
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 context 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, which represents the potential attack of the candidate attack vector; calculating a second score based on a protocol compliance module, which represents 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: making an adoption decision on 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, and automatically determining whether the attack is successful through a multi-modal probe, and outputting the verification result; wherein the multi-modal probe includes: a kernel layer probe, a memory layer probe and an application layer probe; 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; 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 an attack probability , 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, different weights are configured for each type of checking result based on different checking results.
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, performing logical mutation, and then based on the data packet corresponding to the logically mutated tree structure to obtain a candidate attack vector; wherein the logical mutation operation based on the data type of each leaf node includes: the logical mutation operation of the numerical type includes boundary value test and format confusion; the logical mutation operation of the 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 the logical type includes conditional inversion.
6. The automated vulnerability mining method based on adversarial dual model collaboration of claim 1, wherein, The step 2 further includes, after each logical mutation operation, performing real-time compliance checking on the generated intermediate result by the protocol compliance module to obtain a compliance degree of the intermediate result, and if the compliance degree is less than a compliance threshold, rolling back the logical mutation operation 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 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.
8. An automated vulnerability mining system based on adversarial dual model collaboration, characterized in that, Comprise: An attack vector generation model, an evaluation model, a semantic perturbation engine, a decision module, an automated verification target, and a 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 mutation operations 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 make a decision on 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 sent to the automated verification target; otherwise, the attack vector generation model is notified to generate a new basic data packet to start a new round of vulnerability mining process, or the user is notified to input a new prompt 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 determines whether the attack is successful through a multi-modal probe to output a verification result; at the same time, the verification result is sent to the feedback module; wherein the multi-modal probe comprises: a kernel layer probe, a memory layer probe, and an application layer probe; The feedback module is used to generate a feedback signal based on the verification result, and incrementally trains the attack vector generation model and the evaluation model to optimize the model parameters; when the model parameters are updated, a new round of vulnerability mining process is started based on the current input prompt; 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.
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