A Method and Device for Unknown Threat Detection Based on Large Language Models
By injecting a verified fact list into a large language model and implementing a reverse graph mapping filtering algorithm, combined with multi-dimensional feature indicators and five-stage adversarial state machine deduction, the problem of AI illusion generated by the large language model in the detection of unknown threats is solved, achieving high-confidence detection of unknown threats and reducing false alarms.
Patent Information
- Application Number
- CN202611382826.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-07
- Publication Date
- 2026-11-17
AI Technical Summary
Existing threat detection solutions, when faced with advanced unknown threats, are prone to AI illusions due to detection based on large language models, leading to false alarms and false alerts, and are unable to effectively identify covert APT attacks and supply chain fileless attacks.
By injecting a verified list of facts into the model constraint layer of the large language model and implementing a reverse graph mapping filtering algorithm, combined with multi-dimensional feature indicators and asynchronous callback mechanisms, unknown threat detection is performed, including a five-stage adversarial state machine deduction and an illusion circuit breaker mechanism, to ensure the objectivity and accuracy of the evidence chain.
It effectively eliminates the AI illusion of large language models, achieves high-confidence detection of unknown threats, reduces false alarm rate, improves the recognition rate of advanced covert attacks, and ensures the auditability and interpretability of the judgment results.
Smart Images

Figure CN123122949A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network security technology, and in particular to a method and apparatus for detecting unknown threats based on a large language model. Background Technology
[0002] As the intensity of cyberspace confrontation continues to escalate, advanced persistent threats (APTs), white-on-black attacks, living off the land, and covert, fileless attacks targeting the supply chain have become core cybersecurity threats.
[0003] To address these advanced, unknown threats, current threat detection and assessment primarily rely on the following two types of solutions: 1. Feature rule engine and multidimensional statistical popularity architecture.
[0004] This solution is the most basic and widely used in current cybersecurity defenses. Its standard implementation steps are as follows: Feature matching: Real-time collection of raw logs from the host or network layer using security devices to extract explicit fields (such as file MD5 / SHA256 hashes, specific process paths, specific static command line strings, source / destination IP addresses, etc.).
[0005] Blacklist / whitelist and popularity calculation: The extracted features are hard-coded and compared with a known malicious intelligence database (blacklist), or statistically calculated with the commonality (popularity) of assets across the entire network / enterprise intranet. If the popularity of a file or behavior is extremely low and triggers the associated feature rules, the system calculates a risk value using a preset weighted algorithm. If the risk value exceeds the threshold, the system will directly block or issue an alert.
[0006] 2. A shallow joint inference architecture of feature rule engine and single AI model.
[0007] Pre-processing rule filtering and assembly: The rule engine first performs an initial screening of massive logs, filtering out a large number of normal whitelist logs. For logs that cannot be accurately determined or contain ambiguous context (such as complex PowerShell obfuscated commands, abnormal parent-child process chains, unowned memory stacks, etc.), the system directly assembles their original text fragments.
[0008] Single AI black-box analysis: The concatenated original log text is submitted directly as a prompt to a general large language model (LLM) or a traditional machine learning classification model. The model then uses its pre-trained semantic capabilities to perform a single inference, directly outputting an analysis report of the free text, or directly providing a binary classification label conclusion of malicious or benign.
[0009] The aforementioned technical solutions, when facing hunting scenarios involving advanced unknown threats (such as stealthy APT attacks and fileless injection in the supply chain), suffer from at least one of the following technical problems due to inherent mechanism defects: Lack of factual constraints leads to AI illusions, resulting in fabricated evidence and false alarms. In existing solutions, raw logs are directly input into the large language model as free context. Large language models inherently possess uncontrollable generation characteristics and lack "rigid factual constraints" on underlying security data. When faced with highly obfuscated, unknown APT attack streams they haven't learned from, the model is highly prone to probabilistic generalization, generating severe "AI illusions." The model may fabricate non-existent malicious behavior fields, incorrect call stack modules, or fake IP connection relationships, and output these as "evidence for judgment." This false evidence leads to frequent false alarms and false alerts in security systems, severely consuming security operation costs and resulting in low efficiency and confidence in judging highly obfuscated APT attacks.
[0010] Therefore, there is an urgent need to provide an unknown threat detection solution that can solve at least one of the above technical problems. Summary of the Invention
[0011] This invention provides a method, apparatus, electronic device, and storage medium for detecting unknown threats based on a large language model, which can effectively eliminate the AI illusion of the large language model and achieve a high-confidence evidence chain at the production security level.
[0012] On one hand, embodiments of the present invention provide a method for detecting unknown threats based on a large language model, including: Receive raw logs to be detected, including: host behavior logs and network communication behavior logs; The original logs are then split based on multi-dimensional feature indicators; The original logs diverted to the AI slow track are used for unknown threat detection based on a large language model. The model constraint layer of the large language model is injected with a list of verified facts forcibly extracted from the underlying data source, and an illusion circuit breaker mechanism is executed in the post-processing layer through a reverse graph mapping filtering algorithm.
[0013] Optionally, the large language model includes: a pre-built offline large language model serving as the first inference model, wherein the pre-built offline large language model possesses streaming concurrency and dynamic batch processing scheduling capabilities; the method further includes: The pre-built offline large language model is used to mine deep hidden malicious semantics at the code level and output a middleware JSON object with structured features. The middleware JSON object includes: specific abnormal instruction judgment and call addressing method. By using an asynchronous callback mechanism in the main control flow, the key metadata in the middleware JSON object is backfilled and integrated into the original security event master log data packet, thereby completing heterogeneous semantic enhancement and obtaining a complete security event data packet.
[0014] Optionally, the large language model further includes: a tactical-level deductive large language model serving as a second inference engine and a distillation inference model; the method further includes: Under the highest priority constraints of the physical prefix hard lock technology and the verified fact list, the second inference engine drives the localized large language model into a five-stage adversarial state machine deduction based on asymmetric opposition hypothesis verification, so as to perform reverse falsification deduction on all currently captured abnormal technical evidence. The five-stage adversarial state machine derivation includes: Technical verification phase: Based on the large language model, the underlying code and call stack facts in the verified fact list are fully verified to generate a basic technical score; Tactical context assessment phase: Perform multi-dimensional semantic assessment of process command line intent, rationality of process chain forking, and network environment context; Weighting and deweighting correction phase: Search for the identities of high-risk privileged accounts and sensitive landing directories, and implement rigid score compensation; Advanced semantic anomaly detection stage: Utilizing the long contextual capabilities of a large language model, it identifies implicit semantic anomalies that are difficult to enumerate in traditional code, and provides adaptive score fine-tuning within a preset closed interval for the total score. The implicit semantic anomalies include: the hollowing out of normal white processes and the white-on-black exploitation method. Reverse falsification test phase: Force the large language model to construct a benign and reasonable explanation from the opposite side. If the evidence chain in the fact list is closed and cannot be successfully falsified, then lock the high-risk judgment, output the five-level judgment result, and dynamically map and bind it with the MITREATT&CK tactical matrix.
[0015] Optionally, the method further includes: Consistency verification of item-by-item cumulative scoring: The large language model writes the reasoning draft and the details of each deduction into the specified text format field according to the specification. After receiving the text, the hybrid dual-track scoring fusion engine uses regular expression capture groups to extract all the individual scores in the reasoning draft string and executes the secondary closed-loop recalculation verification algorithm to obtain the recalculated score. If the verification engine finds that the top-level scalar total score generated by the large language model is inconsistent with the recalculated score, it will directly trigger a forced rewrite in memory and use the recalculated score to overwrite the final threat score.
[0016] Optionally, an illusion circuit breaker mechanism is implemented in the post-processing layer using a reverse graph mapping filtering algorithm, including: A dictionary mapping high-risk core technology entities and fact list keys for fuse initialization; The circuit breaker layer traverses the array of analytical evidence chains generated by the large language model; If the text evidence in the evidence chain array contains preset high-risk keywords, the circuit breaker layer will reverse the search for the corresponding field in the verified fact list. If the field is empty in the verified fact list, the corresponding textual evidence is determined to be a fabricated illusion by the large language model. The circuit breaker triggers the circuit breaker logic in memory and performs forced erasure.
[0017] Optionally, the method further includes: For unclosed text generated by the maximum token truncation in the large language model, perform bracket depth scanning, calculate the unclosed difference, and automatically fill in the corresponding number of closed brackets at the end of the text. For truncation that produces an unterminated string, static self-healing flag interception is performed by locating the end flag to execute the structure self-healing mechanism.
[0018] Optionally, the method further includes: Dual-architecture parallel disassembly of unknown binary shellcode Hex streams; The actual architecture is automatically determined using regular feature word frequency and REX prefix density inversion detection algorithm; The Shellcode diverted to the AI slow track is format-simplified and JIT Warmup is performed. The vLLM framework is driven to load the local preset quantized large language model. Functional semantic inference is performed on the disassembly result of the format-simplified Shellcode, and a structured list is output. The structured list includes: calling method, exception instructions, and function summary dimension. The structured list is then populated back into the complete event JSON to form a complete structured event list that can be consumed in subsequent stages.
[0019] Optionally, before the complete event JSON enters the distillation model, a full, illusion-free hard extraction is performed on all fields at the code level to form a non-empty structured fact list. The non-empty structured fact list is then injected into the large language model as a boundary strong constraint using a physical prefix hard-locking technique to eliminate the illusion of the large language model. The large language model is an offline reasoning large language model.
[0020] Optionally, the multidimensional feature indicators include: risk severity identifier, lifecycle of behavioral assets, global access frequency of endpoints, and number of independently associated devices. The process of triaging the original logs based on these multidimensional feature indicators includes: By using a deterministic rule engine to integrate multi-dimensional feature indicators, dynamic multi-path cleaning and diversion are performed on massive amounts of raw logs; When the risk severity of an event in the original log is determined to reach a preset high-risk threshold range or be in a pending state based on the risk severity identifier, and the life cycle of the corresponding event behavior asset is less than a preset time window threshold, and the event behavior carrier explicitly contains preset Shellcode features or abnormal stack execution trajectory, the corresponding original log is diverted to the AI slow track stream through the diversion engine. If the number of independent associated devices corresponding to the event is lower than the preset popularity flood baseline, an asynchronous thread is started through the traffic splitting engine to transfer the corresponding event records and write them to the underlying low popularity event archive database. When the risk severity of an event in the original log is determined to be within a specific range of low to medium risk based on the risk severity identifier, and the destination address of the communication is determined to meet the preset private intranet IP characteristic boundary through the network topology attribute matching algorithm, the changes in the process execution subject identity and file entity are audited; if the process execution subject identity is a system high-privileged identity, or the behavioral characteristics contain a specific file upload hash record, the event is dynamically diverted to a dedicated audit file for high-risk intranet environments through the diversion engine, so as to achieve isolation and containment of highly concealed environment characteristics. The system high-privileged identity includes: built-in management or core service permissions of the system.
[0021] Optionally, the method further includes: During the process of routing the original logs based on multidimensional feature indicators, the auxiliary field calculation component is started simultaneously, and nonlinear statistical algorithms are used to assess the endpoint popularity and risk confidence of the communication network assets. The endpoint popularity assessment for network assets includes: based on a configured multi-dimensional frequency determination matrix, when the global access frequency and the number of independent devices of an asset are both in a preset extremely low interaction range, or exhibit high-frequency communication characteristics of an isolated single device, the endpoint popularity label is adaptively assigned as low popularity; when the risk severity is in a preset specific multi-point range, a feature dimensionality reduction and truncation algorithm is used to force the popularity label to an undefined state to prevent low-level noise features from polluting subsequent high-risk AI inference. The risk confidence mapping includes: cross-validating the multi-dimensional geo-asset attributes and the host mapping environment to assess the malicious probability of communicating with external IPs; if the geo-region of the detected target IP does not belong to the trusted local country range and does not match the preset domestic public cloud or whitelisted virtual private server (VPS) resource pool, then a high-risk environmental semantic weight is assigned, and the malicious probability is dynamically output as high risk.
[0022] On the other hand, embodiments of the present invention provide an unknown threat detection device based on a large language model, comprising: The receiving module is used to receive the raw logs to be detected, the raw logs including: host behavior logs and network communication behavior logs; The traffic splitting module is used to split the original logs based on multi-dimensional feature indicators; The detection module is used to perform unknown threat detection on the original logs diverted to the AI slow track based on a large language model. The model constraint layer of the large language model is injected with a list of verified facts forcibly extracted from the underlying data source, and the illusion circuit breaker mechanism is verified and executed in the post-processing layer through a reverse graph mapping filtering algorithm.
[0023] Thirdly, embodiments of the present invention provide an electronic device, including: a memory and a processor, wherein the memory and the processor are connected; Memory, used to store computer programs; A processor is used to invoke a computer program stored in memory to perform any of the above methods.
[0024] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when run by a computer, performs any of the methods described above.
[0025] This invention provides a method, apparatus, electronic device, and storage medium for detecting unknown threats based on a large language model. The method includes: receiving raw logs to be detected, the raw logs including host behavior logs and network communication behavior logs; splitting the raw logs based on multi-dimensional feature indicators; and performing unknown threat detection on the raw logs split to the AI slow-track stream based on a large language model. The large language model's model constraint layer is injected with a verified fact list forcibly extracted from the underlying data source, and a phantom circuit breaker mechanism is executed at the post-processing layer using a reverse graph mapping filtering algorithm. This invention effectively eliminates AI illusions in large language models, achieving a high-confidence evidence chain at a production security level. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0027] Figure 1 A flowchart illustrating an unknown threat detection method based on a large language model, provided as an embodiment of the present invention; Figure 2 A system overall architecture and data flow topology diagram provided for embodiments of the present invention; Figure 3This is the current process for evaluating unidirectional linear large language models. Figure 4 This invention provides a high-confidence adversarial judgment data processing flow based on physical locking and dual-track fact anchoring. Figure 5 This invention provides a device hardware and virtualization software stack structure as an embodiment of the invention. Figure 6 This is a block diagram of an unknown threat detection device based on a large language model, provided as an embodiment of the present invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0029] The terms "first," "second," etc., used in this invention are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention can be implemented in orders other than those illustrated or described herein, and that the objects distinguished by "first," "second," etc., are generally of the same class.
[0030] The proper nouns and terms used in this patent application are explained below: 1. Large Language Model: Refers to a large-scale language model based on a deep learning architecture, pre-trained on massive multimodal or text data, possessing deep natural language understanding, contextual reasoning, and structured text generation capabilities. In this invention, it specifically refers to a localized or distributed computing model used for advanced behavioral semantic parsing and adversarial reasoning of heterogeneous security logs, malicious assembly code, or fuzzy command lines.
[0031] 2. Multi-stage traffic diversion mechanism: This refers to a data processing mechanism that performs hierarchical, multi-dimensional feature comparison and classification of raw massive security data based on a preset filtering topology. This mechanism is used to divert security events with different risk weights or feature densities to differentiated processing pipelines to maximize the optimization of computing resource allocation and improve real-time throughput efficiency.
[0032] 3. Dual-track inference architecture: This refers to a heterogeneous computing architecture that decouples the security event analysis path into a parallel or asynchronous "deterministic rule track" and an "AI semantic enhancement track." The deterministic rule track (fast track) implements zero-bias quantization scoring and rapid interception through hard-coded feature baselines; the AI semantic enhancement track (slow track) performs deep contextual intent inference through a large language model, achieving a decoupled balance between high-throughput feature filtering and high-dimensional semantic mining.
[0033] 4. Fact Anchoring Extraction: This refers to the use of deterministic parsing components to extract structured technical facts that have been verified with confidence from multi-source heterogeneous original security logs or environmental metadata without loss, forming a "fact anchoring list" as a strong constraint boundary condition to be dynamically injected into the context hint layer of the large language model, which is used to limit the free reasoning domain of the model.
[0034] 5. Illusion Circuit Breaker Mechanism: This refers to an automatic auditing and confidence-based filtering mechanism implemented after the output of the generative model. By performing source tracing verification based on reverse graph mapping on each piece of analytical evidence output by the large language model, once a generated field (i.e., illusion data) that cannot be supported by non-empty metadata in the "fact anchor list" is identified, the circuit breaker logic is immediately triggered to automatically remove or correct it, ensuring the objectivity and certainty of the analytical evidence chain.
[0035] 6. Adversarial Assessment: This refers to a security deduction mechanism based on the verification of asymmetric opposing assumptions. The assessment process introduces the baseline assumptions of "complete skepticism" and "security priority." By constructing multi-stage progressive evidence verification, context chain evaluation, and reverse falsification testing, it tends to make a high-confidence ruling that is favorable to security defense when technical evidence conflicts with business logic.
[0036] 7. Shellcode Analysis: Perform dynamic / static disassembly on the intercepted memory injection fragments or temporary machine code in a non-running state, and extract features of its control flow, API addressing mode and payload semantics to identify its specific attack intent and malicious behavior pattern.
[0037] 8. Reflective loading: A persistent loading technique that does not rely on standard system APIs (such as LoadLibrary) to directly write executable files (such as PE / DLL / ELF) from memory and initialize them into the virtual memory space of the target process. It is often used to bypass traditional security monitoring based on file system-level file creation and loading.
[0038] 9. DLL side loading: This technique exploits the default search path priority flaw (such as current directory priority) of whitelisted processes (legitimate signed programs) when loading dynamic link libraries (DLLs) in the operating system (whitelisted processes). It uses a malicious DLL to disguise itself as a legitimate DLL with the same name, thereby inducing legitimate processes to execute malicious payloads.
[0039] 10. Unowned memory / unmappable stack: This refers to a region in the operating system's virtual memory where the corresponding page attribute or return address in the execution stack cannot be mapped to the physical memory of any legitimate module (such as an .exe or .dll file) loaded on disk. This type of memory region is often the core target of fileless attacks such as shellcode execution, memory injection, and process hijacking.
[0040] 11. Reverse Falsification Test: This refers to the adversarial deduction process in the final stage of adversarial analysis, where a large language model attempts to construct a completely benign business logic and configure a normal or officially legitimate release chain to reasonably explain all currently captured abnormal technical evidence. If a benign and reasonable explanation cannot be successfully constructed, the predetermined malicious or high-risk judgment is reversed and locked.
[0041] 12. Hybrid Dual-Track Scoring: This refers to a threat measurement algorithm system that nonlinearly fuses, weights down, and performs multi-level verification of "rule-level deterministic scores" calculated based on hard technical indicators such as expert experience, statistical popularity, and blacklists and whitelists with "semantic-level fuzzy scores" generated based on LLM command line intents, process chain anomalies, etc.
[0042] The technical solution of this patent application will be explained and illustrated through specific embodiments below.
[0043] This invention provides a method for detecting unknown threats based on a large language model, such as... Figure 1 As shown, the method includes steps 11-13: Step 11: Receive the raw logs to be detected, including: host behavior logs and network communication behavior logs; Step 12: Divide the original logs based on multi-dimensional feature indicators; Step 13: Perform unknown threat detection on the original logs diverted to the AI slow track based on a large language model. The model constraint layer of the large language model is injected with a list of verified facts forcibly extracted from the underlying data source, and an illusion circuit breaker mechanism is executed in the post-processing layer through a reverse graph mapping filtering algorithm.
[0044] Optionally, the large language model includes: a pre-built offline large language model serving as the first inference model, the pre-built offline large language model possessing streaming concurrency and dynamic batch processing scheduling capabilities, and the method further includes: The pre-built offline large language model is used to mine deep hidden malicious semantics at the code level and output a middleware JSON object with structured features. The middleware JSON object includes: specific abnormal instruction judgment and call addressing method. By using an asynchronous callback mechanism in the main control flow, the key metadata in the middleware JSON object is backfilled and integrated into the original security event master log data packet, thereby completing heterogeneous semantic enhancement and obtaining a complete security event data packet.
[0045] Optionally, the large language model further includes: a tactical-level deductive large language model serving as a second inference engine and a distillation inference model; the method further includes: Under the highest priority constraints of the physical prefix hard lock technology and the verified fact list, the second inference engine drives the localized large language model into a five-stage adversarial state machine deduction based on asymmetric opposition hypothesis verification, so as to perform reverse falsification deduction on all currently captured abnormal technical evidence. The five-stage adversarial state machine derivation includes: Technical verification phase: Based on the large language model, the underlying code and call stack facts in the verified fact list are fully verified to generate a basic technical score; Tactical context assessment phase: Perform multi-dimensional semantic assessment of process command line intent, rationality of process chain forking, and network environment context; Weighting and deweighting correction phase: Search for the identities of high-risk privileged accounts and sensitive landing directories, and implement rigid score compensation; Advanced semantic anomaly detection stage: Utilizing the long contextual capabilities of a large language model, it identifies implicit semantic anomalies that are difficult to enumerate in traditional code, and provides adaptive score fine-tuning within a preset closed interval for the total score. The implicit semantic anomalies include: the hollowing out of normal white processes and the white-on-black exploitation method. Reverse falsification test phase: Force the large language model to construct a benign and reasonable explanation from the opposite side. If the evidence chain in the fact list is closed and cannot be successfully falsified, then lock the high-risk judgment, output the five-level judgment result, and dynamically map and bind it with the MITREATT&CK tactical matrix.
[0046] Optionally, the method further includes: Consistency verification of item-by-item cumulative scoring: The large language model writes the reasoning draft and the details of each deduction into the specified text format field according to the specification. After receiving the text, the hybrid dual-track scoring fusion engine uses regular expression capture groups to extract all the individual scores in the reasoning draft string and executes the secondary closed-loop recalculation verification algorithm to obtain the recalculated score. If the verification engine finds that the top-level scalar total score generated by the large language model is inconsistent with the recalculated score, it will directly trigger a forced rewrite in memory and use the recalculated score to overwrite the final threat score.
[0047] Optionally, an illusion circuit breaker mechanism is implemented in the post-processing layer using a reverse graph mapping filtering algorithm, including: A dictionary mapping high-risk core technology entities and fact list keys for fuse initialization; The circuit breaker layer traverses the array of analytical evidence chains generated by the large language model; If the text evidence in the evidence chain array contains preset high-risk keywords, the circuit breaker layer will reverse the search for the corresponding field in the verified fact list. If the field is empty in the verified fact list, the corresponding textual evidence is determined to be a fabricated illusion by the large language model. The circuit breaker triggers the circuit breaker logic in memory and performs forced erasure.
[0048] Optionally, the method further includes: For unclosed text generated by the maximum token truncation in the large language model, perform bracket depth scanning, calculate the unclosed difference, and automatically fill in the corresponding number of closed brackets at the end of the text. For truncation that produces an unterminated string, static self-healing flag interception is performed by locating the end flag to execute the structure self-healing mechanism.
[0049] Optionally, the method further includes: Dual-architecture parallel disassembly of unknown binary shellcode Hex streams; The actual architecture is automatically determined using regular feature word frequency and REX prefix density inversion detection algorithm; The Shellcode diverted to the AI slow track is format-simplified and JIT Warmup is performed. The vLLM framework is driven to load the local preset quantized large language model. Functional semantic inference is performed on the disassembly result of the format-simplified Shellcode, and a structured list is output. The structured list includes: calling method, exception instructions, and function summary dimension. The structured list is then populated back into the complete event JSON to form a complete structured event list that can be consumed in subsequent stages.
[0050] Optionally, before the complete event JSON enters the distillation model, a full, illusion-free hard extraction is performed on all fields at the code level to form a non-empty structured fact list. The non-empty structured fact list is then injected into the large language model as a boundary strong constraint using a physical prefix hard-locking technique to eliminate the illusion of the large language model. The large language model is an offline reasoning large language model.
[0051] Optionally, the multidimensional feature indicators include: risk severity identifier, lifecycle of behavioral assets, global access frequency of endpoints, and number of independently associated devices. The process of triaging the original logs based on these multidimensional feature indicators includes: By using a deterministic rule engine to integrate multi-dimensional feature indicators, dynamic multi-path cleaning and diversion are performed on massive amounts of raw logs; When the risk severity of an event in the original log is determined to reach a preset high-risk threshold range or be in a pending state based on the risk severity identifier, and the life cycle of the corresponding event behavior asset is less than a preset time window threshold, and the event behavior carrier explicitly contains preset Shellcode features or abnormal stack execution trajectory, the corresponding original log is diverted to the AI slow track stream through the diversion engine. If the number of independent associated devices corresponding to the event is lower than the preset popularity flood baseline, an asynchronous thread is started through the traffic splitting engine to transfer the corresponding event records and write them to the underlying low popularity event archive database. When the risk severity of an event in the original log is determined to be within a specific range of low to medium risk based on the risk severity identifier, and the destination address of the communication is determined to meet the preset private intranet IP characteristic boundary through the network topology attribute matching algorithm, the changes in the process execution subject identity and file entity are audited; if the process execution subject identity is a system high-privileged identity, or the behavioral characteristics contain a specific file upload hash record, the event is dynamically diverted to a dedicated audit file for high-risk intranet environments through the diversion engine, so as to achieve isolation and containment of highly concealed environment characteristics. The system high-privileged identity includes: built-in management or core service permissions of the system.
[0052] Optionally, the method further includes: During the process of routing the original logs based on multidimensional feature indicators, the auxiliary field calculation component is started simultaneously, and nonlinear statistical algorithms are used to assess the endpoint popularity and risk confidence of the communication network assets. The endpoint popularity assessment for network assets includes: based on a configured multi-dimensional frequency determination matrix, when the global access frequency and the number of independent devices of an asset are both in a preset extremely low interaction range, or exhibit high-frequency communication characteristics of an isolated single device, the endpoint popularity label is adaptively assigned as low popularity; when the risk severity is in a preset specific multi-point range, a feature dimensionality reduction and truncation algorithm is used to force the popularity label to an undefined state to prevent low-level noise features from polluting subsequent high-risk AI inference. The risk confidence mapping includes: cross-validating the multi-dimensional geo-asset attributes and the host mapping environment to assess the malicious probability of communicating with external IPs; if the geo-region of the detected target IP does not belong to the trusted local country range and does not match the preset domestic public cloud or whitelisted virtual private server (VPS) resource pool, then a high-risk environmental semantic weight is assigned, and the malicious probability is dynamically output as high risk.
[0053] This invention achieves production-grade high-confidence assessment through structured fact anchoring and dynamic illusion circuit breaking. Specifically, by forcibly extracting a list of verified facts from the underlying data source and injecting it into the model constraint layer, and implementing reverse graph mapping verification in the post-processing layer, it completely circuit breaks down and eliminates false evidence output from the model, ensuring that every alarm evidence chain can be traced 100% back to objective facts. Through a hybrid dual-track scoring system combining deterministic rules and AI semantic enhancement, along with multi-level verification, it achieves complete auditability of the scoring results. The solution nonlinearly fuses precise deterministic computation with flexible implicit semantic anomaly detection and introduces a progressive accumulation verification mechanism, eliminating the free computational errors of large language models and giving the assessment scores clear mathematical interpretability and legal-level auditability. Through a multi-stage adversarial assessment workflow and reverse falsification testing, it significantly improves the detection rate of advanced hidden unknown threats (APTs) and reduces false alarms. By introducing asymmetric opposing hypothesis verification, it forces the model to perform comprehensive, benign business logic falsification deductions before final adjudication. This mechanism can not only accurately identify advanced fileless attacks disguised as legitimate system processes and business operations, but also efficiently eliminate high-frequency daily business interference, achieving a leap in the efficiency of automated threat hunting.
[0054] This invention provides an unknown threat detection system based on a large language model using fact anchoring and adversarial reasoning, such as... Figure 2 The diagram shown is a topology diagram of the overall system architecture and data flow.
[0055] Step 101: Data cleaning, multi-indicator multi-path splitting, and auxiliary field calculation.
[0056] By using a deterministic rule engine to integrate multi-dimensional feature indicators, dynamic multi-path cleaning and diversion are performed on massive log data. This process isolates slow-track objects to be analyzed by AI (i.e., diverts them to the AI slow-track stream) and archives specific environment records, preventing them from entering the subsequent inference stage.
[0057] Step 102: Heterogeneous dual-architecture disassembly and self-developed regular word frequency adjudication.
[0058] For unknown binary Shellcode Hex streams, we perform parallel disassembly in both x86 and x64 architectures. We automatically determine the actual architecture using regular expression feature word frequency and REX prefix density inversion detection algorithms. We perform static diagnostics on all-zero or PE structure headers in the fast track and perform format simplification and JIT Warmup in the slow track.
[0059] Step 103: vLLM offline shellcode semantic analysis and structured backfilling.
[0060] For slow-track Shellcode events, the vLLM framework loads a local preset quantization large language model (such as the Qwen2.5-14B-AWQ quantization model), performs functional semantic inference on the disassembled Shellcode results after format reduction, outputs a structured list containing dimensions such as calling method, exception instructions, and function summary, and fills it back into the complete event JSON to form a complete structured event list that can be consumed in subsequent stages.
[0061] Step 104: Hybrid dual-track, five-stage deduction and scoring verification.
[0062] Before the complete event JSON enters the distillation model, a 100% illusion-free hard extraction is performed on all fields at the code level (such as the Python code level) to form a non-empty structured fact list. This list is then injected into the offline large language model as a strong boundary constraint using a physical prefix hard-locking technique (physical first character injection), completely eliminating the illusion space. The offline reasoning large language model is then driven into a five-stage iterative state machine containing the "asymmetric opposition hypothesis" under the constraint of the verified fact list. A comprehensive score is achieved using techniques, tactics, weighting, and semantic adjustments, and scoring correction and fictitious evidence erasure are completed through item-by-item accumulation formulas and post-processing graph mapping circuit breakers.
[0063] The following comparison of specific flowcharts illustrates the differences between the proposed solution and existing technologies. Figure 3 This is a process for evaluating unidirectional linear large language models in existing technologies. Figure 4 This invention provides a high-confidence adversarial judgment data processing flow based on physical locking and dual-track fact anchoring.
[0064] like Figure 3 As shown, existing technical solutions lack fact anchoring and scoring verification, making AI output unreliable and difficult to analyze programmatically.
[0065] Furthermore, in existing technologies, the decoupling of rules and semantic analysis leads to a lack of validation in the model's free output, resulting in unauditable scores. This is because the hard-coded scoring of the rule engine in existing solutions is completely disconnected from the semantic analysis of the large language model. The rule engine only understands quantifiable numbers, while the large language model only understands free text. Since the large language model lacks precise mathematical weighting and accumulation capabilities, when its freely output textual conclusions (e.g., "judged as high-risk malicious") conflict with the system's rule-based scoring (e.g., the rule determines only low-risk), the system lacks an adaptive cross-validation and error correction mechanism. This results in randomness in the calculation of the final threat measurement score, making it impossible for security auditors to trace and interpret it.
[0066] One-way linear analysis workflow → lack of reverse falsification logic → leading to missed detection of highly covert whitelist attacks: Existing analysis workflows typically follow a one-way linear process of "data input → feature matching → model output conclusion." Faced with advanced covert attacks (such as whitelisting / blacklisting, or using legitimate management tools like LOLBINs) that exploit system whitelist processes, official legitimate update channels, or low-frequency overseas cloud services as cover, this one-way process can only capture obvious surface-level anomalies. Due to the lack of an advanced "reverse falsification" mechanism that simulates human experts (i.e., attempting to refute malicious assumptions with reasonable and benign business logic), when encountering complex business scenarios that are highly suspected of being malicious but are actually whitelisted, the system is prone to paralyzing production systems due to a "better safe than sorry" approach; or conversely, being directly allowed to proceed due to the covert nature of the features, resulting in serious missed detection of APT events.
[0067] The following section elaborates on the complete implementation process of the embodiment of the present invention by combining the underlying logic of each solidified component and performing mathematical and structured mapping on the captured code logic.
[0068] Step 1: Multi-indicator multi-path cleaning and diversion with auxiliary field calculation The heterogeneous data acquisition and distribution module receives raw logs to be audited or inspected, including host behavior logs and network communication behavior logs. The distribution engine breaks through the limitations of relying on a single security indicator, adopts an independent abnormal event capture mechanism, and integrates multi-dimensional feature indicators such as risk severity indicators in log items, lifecycle of behavioral assets, global access frequency of endpoints, and number of independently associated devices to perform dynamic multi-path parallel cleaning and diversion of massive log data.
[0069] 1. First diversion path (high-risk behavior diversion rules): The system verifies the risk severity and lifecycle characteristics of log streams in real time. When the risk severity of an event reaches a preset high-risk threshold (or is in a pending state), and the lifecycle of the asset involved is less than a preset time window threshold, while the event carrier explicitly contains preset shellcode characteristics or an exception stack trace, the traffic distribution engine marks it as a target slow-track object for AI dynamic analysis. Based on this, if the number of unique associated devices corresponding to the event is lower than a preset prevalence baseline, the traffic distribution engine synchronously starts an asynchronous thread to record and transfer the event and write it to the underlying low-prevalence event archive database.
[0070] 2. Second routing path (Internal high-risk environment audit rules): When the traffic distribution engine detects that an event's risk severity falls within a specific range of low to medium risk, and determines through a network topology attribute matching algorithm that its destination address meets the preset private intranet IP characteristic boundaries, it further audits the identity of the process execution entity and changes in the file entity. If the process execution user possesses high-level system privileges (such as built-in management or core service permissions), or if their behavioral characteristics include specific file upload hash records, the traffic distribution engine dynamically distributes such events to a dedicated audit file for high-risk intranet environments, achieving isolation and containment of highly concealed environment characteristics.
[0071] 3. Adaptive mapping based on asset environment context: While the multi-path splitting is being executed, the auxiliary field calculation component is started simultaneously, using nonlinear statistical algorithms to map the popularity and risk confidence of the network assets.
[0072] Regarding endpoint popularity assessment: The system is configured with a multi-dimensional frequency determination matrix. If the global access frequency and the number of independent devices for an asset are both within a preset extremely low interaction range, or exhibit high-frequency communication characteristics of a highly isolated single device, its endpoint popularity label is adaptively assigned as "low popularity". To prevent low-level noise features from contaminating subsequent high-risk AI inference, when the risk severity is within a preset specific multi-point range, the system uses a feature dimensionality reduction truncation algorithm to forcibly set the popularity label to an undefined state (Unknown).
[0073] Risk confidence mapping (for assessing the malicious potential of external IPs): The system cross-validates the multi-dimensional geo-asset attributes with the host mapping environment. If the geographical region of the target IP detected is not within the trusted local country range, and it does not match the preset domestic public cloud or whitelisted virtual private server (VPS) resource pool, the system assigns it a high-risk environmental semantic weight and dynamically outputs its malicious potential as "high risk".
[0074] Step 2: Heterogeneous Dual-Architecture Disassembly Adjudication and Cascaded Pre-Language Model Semantic Enhancement For binary and hexadecimal feature fields identified as AI analysis streams (or AI slow-track streams), the heterogeneous data parsing engine first removes non-standard prefixes such as \x and 0x, and then checks whether they meet the characteristics for rapid diagnosis: Zero-byte filling fast track: If the hexadecimal stream consists entirely of the character 0, the AI slow track is directly blocked, triggering a static risk diagnosis and directly filling in the structured fast track conclusion containing the "Zero-byte filling" marker.
[0075] MZ Head Fast Track: If the hexadecimal stream physically starts with 4D5A (PE structure head), it is directly diagnosed as module injection or reflective loading.
[0076] If the characteristics do not belong to the static fast track, the Capstone disassembly matrix is used at the Python code level to synchronously call the 32-bit (CS_MODE_32) and 64-bit (CS_MODE_64) dual-architecture decoding engines for parallel disassembly. To achieve architecture-adaptive decision-making without the involvement of a large language model, the system extracts the registers and addressing term frequencies from the dual-architecture disassembled text and executes the following term frequency mathematical decision-making logic:
[0077] The system activates the front-end offline large language model inference cluster (using the first inference engine with advantages in streaming concurrency and dynamic batch processing scheduling). To eliminate latency spikes in the generation of the first character of long texts, the system, upon startup of the front-end pipeline, retrieves a preset set of typical benign machine code instructions as probes and executes JIT kernel adaptive warm start and prefix cache initialization. The front-end concurrent engine uses the cleaned and simplified disassembled instruction stream as local context input to the front-end large language model. The front-end large language model focuses on mining deep, implicit malicious semantics at the code level (such as dynamic API addressing obfuscation, abnormal jump control flow, and persistent memory load characteristics), outputting a structured feature middleware JSON object containing specific abnormal instruction judgments and call addressing methods. The system's main control flow uses an asynchronous callback mechanism to backfill and integrate the key metadata in this middleware JSON object into the original security event master log data packet, completing heterogeneous semantic enhancement and obtaining a complete security event data packet.
[0078] Step 3: Python-based fact anchoring and physical prefix hard-locking techniques with zero language model overhead: Before submitting the semantically enhanced complete security event data packet to the subsequent tactical-level inference big language model (which employs a second inference engine with high accuracy and low localization computational overhead, along with a distillation inference model), the system uses a pure code-level fact extraction component, independent of the subsequent big language model, to perform strongly constrained fact extraction: 1. Hard extraction of fact-anchored list (or verified fact list): The extraction component forcibly extracts semantic metadata from multi-confidence traffic splitting, auxiliary calculations, and pre-filling, dynamically assembling it in memory to generate a fully objective list of verified facts (verified_facts). This list covers key-value pairs for all deterministic dimensions, including stack security status, whether it's loaded using reflection, abnormal instruction characteristics, endpoint popularity level, and potential malicious network context. Dimensions for which no valid values are extracted are explicitly set to null, and this missing evidence must not be used as a basis for excluding threats in subsequent processes.
[0079] 2. Physical prefix hard lock technique (physical first character injection): To prevent subsequent large language models from exhibiting illusions due to probabilistic generalization during inference, or from refusing to output standard structured JSON text, this invention employs a physical prefix hard-lock technique (physical first character injection). When constructing the ChatML communication protocol, the system physically concatenates a pre-defined nested header string immediately after the Assistant Token: Prompt_final = ⟨|im_start|>system…⟨|im_end|>…⟨|im_start|>assistant\n{"functional_summary": This forces the model's first token generation probability to be constrained within a predetermined trajectory.
[0080] Step 4: Five-stage adversarial simulation state machine and scoring closed-loop recalculation verification Under the constraints of physical prefix hard-lock technology and the highest priority red line of the "verified fact list", the second inference engine drives the localized large language model into a five-stage iterative state machine deduction workflow based on asymmetric opposition hypothesis verification (or five-stage adversarial state machine). It attempts to construct a completely benign business logic or official upgrade chain to perform reverse falsification deduction on all currently captured abnormal technical evidence. Five-stage adversarial state machine derivation, including: Technical verification phase: The large language model comprehensively verifies the underlying code and call stack facts in the verified fact list and generates a basic technical score.
[0081] Tactical context assessment phase: Perform multi-dimensional semantic assessment of process command line intent, process chain forking rationality, and network environment context.
[0082] Weighting and deweighting correction phase: Search for high-risk privileged account identities and sensitive landing directories, and implement rigid score compensation.
[0083] Advanced semantic anomaly detection stage: Utilizing the long contextual capabilities of large language models, it identifies implicit semantic anomalies that are difficult to enumerate in traditional code (such as the hollowing out of normal white processes, white-on-black exploitation techniques, etc.), and provides adaptive score fine-tuning within a preset closed interval for the total score.
[0084] Reverse falsification test phase: Force the model to construct a benign and reasonable explanation from the opposite perspective. If the chain of evidence in the checklist is closed and cannot be successfully falsified, a high-risk judgment is locked, a level 5 assessment result is output, and it is dynamically mapped and bound to the MITRE ATT&CK tactical matrix.
[0085] Consistency verification of item-by-item cumulative scoring: The large language model, in accordance with the specification, writes the reasoning draft and the details of each deduction into the specified text format fields. After receiving the output text, the hybrid dual-track scoring fusion engine uses regular expression capture groups to extract all individual scores in the draft string and executes a secondary closed-loop recalculation verification algorithm to calculate the recalculated score. S_recalc = Σᵢ Q_technology.i + Σⱼ Q_tactics.j + Σ k Weighted k | - Σ m |Reduction in weight m | +S_Advanced semantic fine-tuning.
[0086] If the validation engine finds that the top-level scalar total score generated by the large language model is inconsistent with the recalculated score $S_{recalc}$, it will directly trigger a forced rewrite in memory, using the recalculated score $S_{recalc}$ to overwrite the final threat score, thus completely eliminating the generalization error of the large language model in mathematical free computation.
[0087] Step 5: Post-processing image mapping illusion fracturing and structural self-healing mechanism Before the analysis report is delivered to the production environment for demonstration or written to the intelligence database, the data packet flows through the post-processing illusion circuit breaker layer, and the final confidence interception filtering is performed using the reverse graph mapping filtering algorithm: The circuit breaker first initializes a dictionary mapping high-risk core technology entities to fact list keys. The circuit breaker layer then iterates through the array of analytical evidence chains generated by the large language model. If a piece of textual evidence contains specific high-risk feature words, the circuit breaker layer will reverse-search the corresponding field in the fact list extracted in step three. If this field is empty in the fact list, it indicates that the evidence is entirely fabricated by the large language model, and the circuit breaker immediately triggers the circuit breaker logic in memory, performing forced erasure and preventing this false evidence from being written into the final report.
[0088] Symbol depth scanning and text structure self-healing: For unclosed text generated by the model due to maximum token truncation, a bracket depth scan is performed. The unclosed difference is calculated, and the corresponding number of closing brackets are automatically added to the end of the text. For extreme truncations that produce unterminated strings, static self-healing markers are used to intercept them by locating the end marker.
[0089] like Figure 5 The diagram shown is a hardware and virtualization software stack structure diagram of the unknown threat detection device based on a large language model provided in an embodiment of the present invention.
[0090] The multi-stage adversarial unknown threat assessment device is composed of a bottom-level hardware computing layer, a middle virtualization and driver layer, and a top-level core security business function component layer. Specifically, it includes: Data input and cleaning offloading component 401: Corresponding to the multi-core CPU and high-speed network interface of the hardware layer, it has offloading state machine instructions embedded on a computer-readable medium for performing multi-index multi-path offloading, dynamic environmental mapping and risk event offloading and archiving.
[0091] Dual-architecture disassembler and pre-semantic concatenated cluster 402: It has heterogeneous control flow compilation instructions embedded, responsible for parallel output of 32 / 64-bit disassembled text and using prefix density algorithm for hard architecture decision; at the same time, it uses the first inference engine (such as vLLM engine) that supports streaming concurrency and dynamic batch processing scheduling to drive the acceleration chip with embedded first offline large language model weights to perform batch extraction of Shellcode local assembly stream and metadata JSON backfilling.
[0092] Fact Hard Extraction and Physical Prefix Locking Module 403: This is a core fact anchoring component used to forcibly strip 100% deterministic technical facts before reasoning in a large language model and to construct a ChatML communication protocol with physical first character locking features.
[0093] The localized adversarial simulation computing cluster 404 includes a dedicated AI acceleration chip (GPU / NPU) and a non-transient large-capacity memory (for storing the weight files of the second offline large language model). It provides global macro-level tactical simulations by supporting a second inference engine (such as the llama-cpp-python engine and distillation inference model) that supports the advantages of localized low-localized computing power overhead.
[0094] Scoring Recalculation and Graph Mapping Circuit Breaker 405: Responsible for parsing the scoring draft string of the large language model and executing the mathematical formula for secondary recalculation. At the same time, it uses the mapping dictionary to implement reverse fact verification, forcibly erases the chain of illusory evidence without original fact support, and implements structural self-healing for truncated text.
[0095] High-risk external output interface 406 with multiple features: The hardware manifestation is a high-speed PCIe bus and external storage medium interface, which is responsible for diverting high-risk events that pass the circuit breaker consistency check to a structured external malicious domain name and malicious IP threat intelligence database.
[0096] The embodiments of the present invention contain at least the following technical innovations: 1. Multi-indicator heterogeneous cleaning and diversion architecture with multi-path environment containment: Breaking away from the traditional single-dimensional initial screening relying solely on malicious signatures, this architecture pioneers a multi-path diversion state machine that combines heterogeneous network metadata such as "risk identifier, asset cycle, global access frequency (PV), and number of unique devices (UV)". Through dynamic threshold interval truncation, massive amounts of raw logs are decoupled into fast-track diagnostic streams, AI slow-track streams, intranet privileged risk isolation streams, and low-prevalence archive streams, achieving adaptive mapping of computing power tilt and environmental context at the engineering layer.
[0097] 2. Heterogeneous Dual-Architecture Parallel Disassembly and REX Prefix Density-Based Inversion Judgment Algorithm: For obfuscated binary payloads (such as unknown shellcode hexadecimal streams), parallel decoding of x86 / x64 dual architectures can be achieved at the pure code level without relying on AI inference. A mathematical judgment formula combining "classic mode term frequency weighting" and "REX prefix density inversion detection" is designed. By calculating the density of implicit feature instructions in the assembly stream, the actual running architecture is hard-locked, fundamentally solving the problem of inflated term frequencies and architecture misjudgment caused by instruction misinterpretation during low-dimensional disassembly of heterogeneous machine code.
[0098] 3. Heterogeneous Semantic Data Backfilling Mechanism Based on Dual-Model Cascading: This pioneering heterogeneous dual-model cascading pipeline combines "pre-processing high-concurrency extraction (vLLM cluster) + post-processing tactical-level adversarial decision-making (LLAM-CPP / distillation model)". The pre-processing engine focuses on deep control flow semantic mining of micro-machine code and regularizes latent malicious features into standard secure entity JSON objects, asynchronously backfilling them into the main log data packet, providing "semantic-level data enhancement" for subsequent processes.
[0099] 4. Zero AI Overhead Python Hard Extraction of Fact Anchoring and Physical Prefix Hard Locking Technique: Before the final inference, a pure code component completely independent of LLM is used to forcibly extract the context and generate a "verified facts list". After the Assistant bootstrap token in the ChatML specification protocol, a nested header string (such as {\n "functional_summary":) is physically forcibly concatenated. By utilizing the physical lock of the underlying probability distribution, the illusion of false evidence caused by formatting errors and fabrication is completely eliminated from the large language model.
[0100] 5. Five-stage state machine and reverse falsification test based on asymmetric opposition hypothesis verification: Introducing the principles of "complete skepticism" and "safety first". The state machine not only performs routine verification and weight fine-tuning in the first four stages, but also forces the model to perform "reverse falsification deduction" in the fifth stage (i.e., forcing the large language model to try to harmlessly explain the current complex technical facts using reasonable benign business or official system upgrade logic). If falsification fails, a malicious judgment is locked, simulating the reverse thinking process of top human experts.
[0101] 6. Scoring Closed-Loop Recalculation Verification Algorithm and Post-Processing Graph Mapping Illusion Circuit Breaker Mechanism: Instead of directly trusting the top-level total score of the large language model, the algorithm extracts the individual deduction details from its scoring draft using regular expressions, performs a second recalculation using hard-coded mathematical formulas, and forces a rewrite of the generalization error. Simultaneously, the post-processing layer establishes a mapping dictionary between high-risk feature words and fact list keys, and retrieves the original facts using a reverse graph. If the large language model is found to have fabricated a technical entity in the evidence chain array that is empty in the fact list, a forced erasure circuit breaker is immediately executed.
[0102] The unknown threat detection method based on a large language model provided in this invention has at least the following beneficial effects: 1. Effectively eradicate or eliminate the AI illusion of large language models, achieving a high-confidence evidence chain of production safety level. Existing technical solutions: Directly handing over massive amounts of raw logs to a large language model for black-box inference causes the model to frequently fabricate non-existent processes or network communication records, resulting in a large number of security false alarms.
[0103] The solution of this invention is as follows: By introducing a zero-AI-overhead hard-extraction component at the pure code layer, absolutely reliable verified facts are extracted to form a fact list. This is combined with a physical prefix lock technique to hard-constrain the probability of the first token generation in the model. In the post-processing stage, a reverse graph mapping filtering algorithm is used to traverse the evidence array. Once a technical entity with an empty fact list (null) is found in the evidence chain, a forced memory erasure circuit breaker is immediately implemented. This completely breaks down and eliminates false evidence output from the large language model, ensuring that every alarm evidence chain in the final assessment report can be 100% traced back to the underlying objective facts. This reduces the false alarm rate of automated threat hunting to an extremely low level acceptable for production-level security operations.
[0104] 2. It pioneered a dual-language model cascaded computing architecture, achieving non-linear decoupling of computing power between micro-level code semantics and macro-level tactical deduction, and significantly improving efficiency. Using a single model to simultaneously process complex binary assembly and a massive global process tree log can lead to severe overload of the model context and a catastrophic spike in inference latency. This invention's embodiment pioneers a heterogeneous cascaded pipeline of "pre-processing high-concurrency extraction (vLLM cluster) + post-processing tactical-level adversarial decision-making (llama-cpp / distillation model)". The first inference engine (vLLM) is dedicated to performing microscopic implicit semantic mining on massive high-concurrency disassembly control flow and backfilling it into the main log, while the second inference engine (llama-cpp / distillation model) focuses on tactical falsification decisions for the global macro-level fact list under low-computing-power architecture.
[0105] This cascaded architecture enables non-linear decoupling of computational demands and model capacity across different stages. Combined with JIT kernel adaptive warm-start technology, it not only provides deep insights into subtle, hidden malicious semantics such as shellcode dynamic API addressing and memory injection, but also significantly reduces first-word inference latency, greatly improving the overall throughput and concurrent processing capabilities of the system.
[0106] 3. The introduction of asymmetric opposition hypothesis verification and reverse falsification tests significantly improves the detection rate of advanced hidden unknown threats (APTs). Traditional unidirectional linear analysis workflows are prone to significant false negatives when facing advanced covert attacks (such as white-on-black attacks) that utilize system white-on-black exploits (LOLBINs) and official legitimate signature update channels as cover, due to their superficially similar behavior to normal business operations. This invention introduces a reverse falsification test into the five-stage state machine, forcing the instruction large language model to attempt to construct a completely legitimate set of daily business logic or official system upgrade patches to neutralize the current complex anomaly evidence. If the interpretation fails, the high-risk malicious judgment is reverse-locked.
[0107] This invention, through simulating the opposing thought process of top human reverse engineering security experts, accurately identifies fileless advanced persistent threats (APTs) disguised as legitimate system processes and normal command lines, breaking the industry deadlock of traditional security defenses that "attack one thing while neglecting another."
[0108] 4. By implementing hard-coded scoring closed-loop recalculation and verification, the generalization error of the model was eliminated, and the legal-level auditability of the judgment results was achieved. While large language models excel at processing pure text semantics, they are prone to generalization drift when performing precise numerical weighting and multi-level cumulative calculations, leading to discrepancies between the final risk score and the detailed deductions. This invention, however, does not directly trust the top-level total score of the large language model. Instead, it utilizes a hybrid dual-track scoring fusion engine to extract all individual deduction details from the large language model's reasoning draft using regular expressions. A hard-coded mathematical formula $S_{recalc}$ is then executed in memory for a secondary closed-loop recalculation and verification. If any deviation is found, a forced rewrite and overwrite occurs, thus completely eliminating the generalization error of the large language model in free mathematical calculations. This meets the rigid compliance requirements of high-end enterprise clients in finance, energy, and government sectors, who demand that security assessment conclusions possess "full auditability and traceability."
[0109] 5. Achieved adaptive adjudication of pure code-level dual-architecture disassembly without AI intervention, and built a multi-path explosion-proof containment mechanism throughout the entire lifecycle. Existing technologies directly feed unknown binary Hex streams into the AI recognition architecture, resulting in significant overhead and inaccuracy. This invention addresses this issue by employing a REX prefix density inversion detection algorithm at the pure logic layer. By calculating the density of implicit feature instructions ($D_{prefix}$) in the assembly stream, it achieves parallel decoding and hard adjudication for x86 / x64 architectures with zero computational cost for large language models, resolving the problem of inflated word frequencies caused by misinterpretation of heterogeneous machine code. Simultaneously, a multi-path cleaning and distribution state machine is implemented based on severity, age, page views (PV), and unique device counts (UV).
[0110] By implementing fast and slow track separation at the forefront of massive raw logs, events such as all-zero and standard PE are directly intercepted, diagnosed, and written to disk in the fast track. Low-prevalence and internal network privilege risk events are classified and contained, maximizing the protection of the back-end AI computing power cluster from flood attacks of high-frequency noise and garbage data, and realizing green adaptive mapping of the entire network asset environment context.
[0111] On the other hand, embodiments of the present invention provide an unknown threat detection device based on a large language model, such as... Figure 6 As shown, it includes: The receiving module 21 is used to receive the raw logs to be detected, the raw logs including: host behavior logs and network communication behavior logs; The routing module 22 is used to route the original logs based on multi-dimensional feature indicators; The detection module 23 is used to perform unknown threat detection on the original logs diverted to the AI slow track based on a large language model. The model constraint layer of the large language model is injected with a list of verified facts forcibly extracted from the underlying data source, and the illusion circuit breaker mechanism is verified and executed in the post-processing layer through a reverse graph mapping filtering algorithm.
[0112] Thirdly, embodiments of the present invention provide an electronic device, including: a memory and a processor, wherein the memory and the processor are connected; Memory, used to store computer programs; A processor is used to invoke a computer program stored in memory to perform any of the above methods.
[0113] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when run by a computer, performs any of the methods described above.
[0114] This invention provides a method, apparatus, electronic device, and storage medium for detecting unknown threats based on a large language model. The method includes: receiving raw logs to be detected, the raw logs including host behavior logs and network communication behavior logs; splitting the raw logs based on multi-dimensional feature indicators; and performing unknown threat detection on the raw logs split to the AI slow-track stream based on a large language model. The large language model's model constraint layer is injected with a verified fact list forcibly extracted from the underlying data source, and a phantom circuit breaker mechanism is executed at the post-processing layer using a reverse graph mapping filtering algorithm. This invention effectively eliminates AI illusions in large language models, achieving a high-confidence evidence chain at a production security level.
[0115] It should be noted that the content of the method embodiments and device embodiments provided in this patent application corresponds one-to-one with each other. The content involved in any embodiment can be referenced or combined with other embodiments to form part of that embodiment. For ease of description, this patent application focuses on explaining the method embodiments. The description of the relevant technical features and solutions of the device, system, electronic device, and computer-readable storage medium embodiments can be referred to the relevant content in the method embodiments.
[0116] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, systems, electronic devices, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0117] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1The function specified in one or more boxes.
[0118] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0119] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for unknown threat detection based on a large language model, characterized in that, include: Receive raw logs to be detected, including: host behavior logs and network communication behavior logs; The original logs are then split based on multidimensional feature indicators; The original logs diverted to the AI slow track are used for unknown threat detection based on a large language model. The model constraint layer of the large language model is injected with a list of verified facts forcibly extracted from the underlying data source, and an illusion circuit breaker mechanism is executed in the post-processing layer through a reverse graph mapping filtering algorithm.
2. The method of claim 1, wherein, The large language model includes: a pre-built offline large language model serving as the first inference model, wherein the pre-built offline large language model possesses streaming concurrency and dynamic batch processing scheduling capabilities; the method further includes: The pre-built offline large language model is used to mine deep hidden malicious semantics at the code level and output a middleware JSON object with structured features. The middleware JSON object includes: specific abnormal instruction judgment and call addressing method. By using an asynchronous callback mechanism in the main control flow, the key metadata in the middleware JSON object is backfilled and integrated into the original security event master log data packet, thereby completing heterogeneous semantic enhancement and obtaining a complete security event data packet.
3. The method of claim 1, wherein, The large language model also includes: a tactical-level deductive large language model serving as a second inference engine and a distillation inference model; the method further includes: Under the highest priority constraints of the physical prefix hard lock technology and the verified fact list, the second inference engine drives the localized large language model into a five-stage adversarial state machine deduction based on asymmetric opposition hypothesis verification, so as to perform reverse falsification deduction on all currently captured abnormal technical evidence. The five-stage adversarial state machine derivation includes: Technical verification phase: Based on the large language model, the underlying code and call stack facts in the verified fact list are fully verified to generate a basic technical score; Tactical context assessment phase: Perform multi-dimensional semantic assessment of process command line intent, rationality of process chain forking, and network environment context; Weighting and deweighting correction phase: Search for the identities of high-risk privileged accounts and sensitive landing directories, and implement rigid score compensation; Advanced semantic anomaly detection stage: Utilizing the long contextual capabilities of a large language model, it identifies implicit semantic anomalies that are difficult to enumerate in traditional code, and provides adaptive score fine-tuning within a preset closed interval for the total score. The implicit semantic anomalies include: the hollowing out of normal white processes and the white-on-black exploitation method. Reverse falsification testing phase: The large language model is forced to construct a benign and reasonable explanation from the opposing perspective. If the chain of evidence in the fact list is closed and cannot be successfully falsified, a high-risk judgment is locked, a five-level assessment result is output, and it is dynamically mapped and bound to the MITRE ATT&CK tactical matrix; and / or, The method further includes: Consistency verification of item-by-item cumulative scoring: The large language model writes the reasoning draft and the details of each deduction into the specified text format field according to the specification. After receiving the text, the hybrid dual-track scoring fusion engine uses regular expression capture groups to extract all the individual scores in the reasoning draft string and executes the secondary closed-loop recalculation verification algorithm to obtain the recalculated score. If the verification engine finds that the top-level scalar total score generated by the large language model is inconsistent with the recalculated score, it will directly trigger a forced rewrite in memory and use the recalculated score to overwrite the final threat score.
4. The method of claim 1, wherein, The illusion circuit breaker mechanism is implemented in the post-processing layer using a reverse graph mapping filtering algorithm, including: A dictionary mapping high-risk core technology entities and fact list keys for fuse initialization; The circuit breaker layer traverses the array of analytical evidence chains generated by the large language model; If the text evidence in the evidence chain array contains preset high-risk keywords, the circuit breaker layer will reverse the search for the corresponding field in the verified fact list. If the field is empty in the verified fact list, the corresponding textual evidence is determined to be a fabricated illusion by the large language model, the circuit breaker triggers circuit breaker logic in memory, and performs forced erasure; and / or, The method further includes: For unclosed text generated by the maximum token truncation in the large language model, perform bracket depth scanning, calculate the unclosed difference, and automatically fill in the corresponding number of closed brackets at the end of the text. For truncation that produces an unterminated string, static self-healing flag interception is performed by locating the end flag to execute the structure self-healing mechanism.
5. The method of claim 1, wherein, The method further includes: Dual-architecture parallel disassembly of unknown binary shellcode Hex streams; The actual architecture is automatically determined using regular feature word frequency and REX prefix density inversion detection algorithm; The Shellcode diverted to the AI slow track is format-simplified and JIT Warmup is performed. The vLLM framework is driven to load the local preset quantized large language model. Functional semantic inference is performed on the disassembly result of the format-simplified Shellcode, and a structured list is output. The structured list includes: calling method, exception instructions, and function summary dimension. The structured list is then populated back into the complete event JSON to form a complete structured event list that can be consumed in subsequent stages; and / or, Before the complete event JSON enters the distillation model, a full, illusion-free hard extraction is performed on all fields at the code level to form a non-empty structured fact list. The non-empty structured fact list is then injected into the large language model as a boundary strong constraint through physical prefix hard locking technology to eliminate the illusion of the large language model. The large language model is an offline reasoning large language model.
6. The method of claim 1, wherein, The multidimensional feature indicators include: risk severity identifier, lifecycle of behavioral assets, global access frequency of endpoints, and number of independently associated devices. The process of routing the raw logs based on these multidimensional feature indicators includes: A deterministic rule engine is used to integrate multi-dimensional feature indicators to dynamically clean and distribute massive amounts of raw logs in multiple ways. When the risk severity of an event in the original log is determined to reach a preset high-risk threshold range or be in a pending state based on the risk severity identifier, and the life cycle of the corresponding event behavior asset is less than a preset time window threshold, and the event behavior carrier explicitly contains preset Shellcode features or abnormal stack execution trajectory, the corresponding original log is diverted to the AI slow track stream through the diversion engine. If the number of independent associated devices corresponding to the event is lower than the preset popularity flood baseline, an asynchronous thread is started through the traffic splitting engine to transfer the corresponding event records and write them to the underlying low popularity event archive database. When the risk severity of an event in the original log is determined to be within a specific range of low to medium risk based on the risk severity identifier, and the destination address of the communication is determined to meet the preset private intranet IP characteristic boundary through the network topology attribute matching algorithm, the changes in the process execution subject identity and file entity are audited; if the process execution subject identity is a system high-privileged identity, or the behavioral characteristics contain a specific file upload hash record, the event is dynamically diverted to a dedicated audit file for high-risk intranet environments through the diversion engine, so as to achieve isolation and containment of highly concealed environment characteristics. The system high-privileged identity includes: built-in management or core service permissions of the system.
7. The method of claim 1, wherein, The method further includes: During the process of routing the original logs based on multidimensional feature indicators, the auxiliary field calculation component is started simultaneously, and nonlinear statistical algorithms are used to assess the endpoint popularity and risk confidence of the communication network assets. The endpoint popularity assessment for network assets includes: based on a configured multi-dimensional frequency determination matrix, when the global access frequency and the number of independent devices of an asset are both in a preset extremely low interaction range, or exhibit high-frequency communication characteristics of an isolated single device, the endpoint popularity label is adaptively assigned as low popularity; when the risk severity is in a preset specific multi-point range, a feature dimensionality reduction and truncation algorithm is used to force the popularity label to an undefined state to prevent low-level noise features from polluting subsequent high-risk AI inference. The risk confidence mapping includes: cross-validating the multi-dimensional geo-asset attributes and the host mapping environment to assess the malicious probability of communicating with external IPs; if the geo-region of the detected target IP does not belong to the trusted local country range and does not match the preset domestic public cloud or whitelisted virtual private server (VPS) resource pool, then a high-risk environmental semantic weight is assigned, and the malicious probability is dynamically output as high risk.
8. A large language model-based unknown threat detection apparatus, characterized by, include: The receiving module is used to receive the raw logs to be detected, the raw logs including: host behavior logs and network communication behavior logs; The traffic splitting module is used to split the original logs based on multi-dimensional feature indicators; The detection module is used to perform unknown threat detection on the original logs diverted to the AI slow track based on a large language model. The model constraint layer of the large language model is injected with a list of verified facts forcibly extracted from the underlying data source, and the illusion circuit breaker mechanism is verified and executed in the post-processing layer through a reverse graph mapping filtering algorithm.
9. An electronic device, comprising: include: Memory and processor, and the connection between memory and processor; Memory, used to store computer programs; A processor for invoking a computer program stored in memory to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a computer, performs the method as described in any one of claims 1-7.
