A method for detecting malicious mining software based on large language model

Through the combination of large language models and machine learning models, multi-dimensional features of malware are extracted and interpretable analysis is performed, which solves the problems of low transparency and weak generalization ability of classification decisions in malware detection, and achieves high accuracy and interpretability. Sexual malware detection.

CN118585996BActive Publication Date: 2024-10-18ZHEJIANG UNIV

Patent Information

Application Number
CN202411077056.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-10-18
Estimated Expiration
2044-08-07

AI Technical Summary

Technical Problem

Existing malware detection methods have low transparency in classification decisions, weak model generalization capabilities, difficulty in gaining trust, and difficulty in interpreting classification results.

Method used

Adopt a malicious mining software detection method based on a large language model, extract hierarchical multi-dimensional features, use a machine learning model to obtain classification confidence, and map important feature vectors to binary files, combined with structured reasoning feature prompt input Large language model to achieve interpretable classification analysis of malware.

Benefits of technology

It improves the classification accuracy and interpretability of malware detection, provides human-readable analysis results, and enhances the trust and broad application of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585996B_ABST
    Figure CN118585996B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting malicious mining software based on a large language model. By constructing a self-learning malware analysis process, the reasoning ability of the large language model and the learning ability of a small number of samples are used to model the malicious causes of malware, thereby realizing the reasoning analysis and classification of malware. The method mainly includes the steps of constructing a malware feature classifier, extracting multiple malware features of binary samples, training a malware classifier, obtaining the classification results of the samples to be tested on the malware classifier, and extracting key character features of the malware analysis process using a machine learning interpretable method. The present invention proposes a malware analysis and detection method based on large language model reasoning for the first time. While obtaining efficient malware detection results, it realizes a highly interpretable analysis of malware detection results, which helps to improve the efficiency of network security emergency response and provides a highly available solution for malware analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of malware analysis and detection, and in particular to a method for detecting malicious mining software based on a large language model. Background Art

[0002] The current malware detection methods are mainly divided into hard matching methods based on rules such as signatures and feature codes and model detection methods based on machine learning and deep learning. The model detection methods of machine learning and deep learning can classify the malware to be tested based on existing malware data sets by learning the distribution characteristics of these data sets. Machine learning methods have high generalization and can identify unknown malware compared to hard matching methods such as rules and feature codes. However, since malware is a manually written engineering file, it has the characteristics of a large range of code and behavior changes, a large variety of features, and complex malicious patterns. These characteristics lead to insufficient generalization when using malware to train machine learning classifiers, and it is difficult for machine learning classifiers to model all features extensively. At the same time, due to the large number of deep learning parameters and complex network architecture, the deep learning model and the decisions made by the machine learning model are difficult to explain. Therefore, their classification results are difficult to gain trust in security-related scenarios such as malware detection, so their application is greatly limited.

[0003] Large Language Model (LLM) is a natural language processing model based on Transformer architecture and trained on large-scale text data. Large language models can understand and analyze natural language text and have strong language reasoning capabilities. Typical large language models include OpenAI's GPT series and Google's PaLM series models. In real-world applications, large language models demonstrate excellent reasoning and analysis capabilities. For example, large language models can identify implicit meanings in texts, and large language models can give logically reasonable task decomposition for complex tasks. The reasoning characteristics of large language models provide a capability foundation for the execution of complex tasks. Due to the large language model's powerful language understanding and generation capabilities and reasoning capabilities for complex tasks. Large language models can be used to increase the accuracy of malware detection, as well as to generate logically reasonable malware identification and analysis texts with certain reasoning processes, to assist humans in understanding malware classification results. Summary of the invention

[0004] The purpose of the present invention is to address the problems of low transparency of classification decisions and weak model generalization ability in existing malware detection, and provide a malicious mining software detection method based on a large language model. By designing an efficient and high-accuracy malware detection agent, the integrated classifier reasoning analysis and classification of malware results that are interpretable are realized. By constructing a malware feature processing pipeline with multi-feature integration, a large language model is used to autonomously infer the malware analysis results according to the feature importance, so as to realize human-readable and highly accurate malware classification interpretable result output.

[0005] In order to achieve the above objectives, the present application designs the following technical solutions:

[0006] The present invention discloses a method for detecting malicious mining software based on a large language model, comprising:

[0007] For binary files in malware data sets, hierarchical malware multi-dimensional features are extracted according to feature layering strategy;

[0008] Vectorize the multi-dimensional features of malware according to the characteristics of different dimensions to obtain feature vectors of different dimensions of malware;

[0009] According to the characteristics of feature vectors of different dimensions of malware, a suitable machine learning algorithm is selected to perform training, and a machine learning classification model of malware with different feature dimensions is obtained;

[0010] Extract multi-dimensional features of malware from samples to be tested;

[0011] The multi-dimensional features of malware are vectorized and input into the malware machine learning classification model of different feature dimensions to obtain the classification confidence of features of different dimensions;

[0012] According to the classification confidence of features of different dimensions, the result interpretability method of the machine learning model is used to output the important feature vectors that affect the classification results;

[0013] According to the extraction method of different dimensional features in the binary file, the important feature vectors are mapped to specific points in the binary file to obtain the important features of the sample in character form;

[0014] The important characters of the sample and the classification confidence of the sample are used as input features and converted into structured prompts to form structured reasoning feature prompts;

[0015] The structured reasoning feature prompts are combined with analysis instructions and input into the large language model to obtain the malware analysis process and its classification results.

[0016] As a further improvement, the structured prompts described in the present invention mainly include three types of features. The first type is the introduction of feature types, which includes the basic description of the features, the composition and form of the features, and the role that the features can play in classification; the second type is the important characters of the binary samples, including all the important feature characters parsed from the malware binary files; the third type of features is the classification confidence of the samples, which is the numerical sample classification probability data.

[0017] As a further improvement, the forming of structured inference feature prompts described in the present invention specifically involves converting the structured prompts into natural language according to the prompt engineering method of the large language model.

[0018] As a further improvement, the analysis instructions described in the present invention are specific instructions on how the large language model analyzes these features. The analysis instructions mainly include two parts. The first is the analysis instructions for the features, which clearly point out the analysis steps of the large language model for the important feature characters and confidence of the input. At the same time, the analysis instructions need to add the skills of prompt engineering, use the thinking chain method, and instruct the large language model to analyze the input information of the sample step by step, and finally build a reasonable analysis chain of analysis steps, and output the final result; the second is the instructions for the output content format of the large language model, instructing the large language model to first analyze the features according to the instructions to build the analysis chain, and give the classification results in the final stage of the output according to the analysis logic chain.

[0019] As a further improvement, the classification confidence of features of different dimensions described in the present invention uses the result interpretability method of the machine learning model to output important feature vectors that affect the classification results, specifically:

[0020] For decision tree type classifiers, the selected interpretability method is to use the node importance degree to sort the features in order and obtain the important feature vector;

[0021] For deep learning models, the selected interpretability method is a general value game-based method to obtain the ranking of feature vector importance;

[0022] Finally, important feature vectors are obtained through the interpretability method of machine learning.

[0023] As a further improvement, the method for extracting features of different dimensions in a binary file described in the present invention maps important feature vectors to specific points in the binary file, obtains important features of samples in the form of characters, and obtains semantic character features in the binary file. Specifically:

[0024] By examining the forward extraction method of feature vectors, the feature vectors are reversely mapped to specific text features in binary files. For the end-to-end processing method of binary files, the feature mask method is used to directly obtain the corresponding binary byte position, and the byte parsing value is obtained through format parsing. For the information parsing method of binary samples, the feature vectors obtained by counting are mapped to specific feature characters containing physical semantics according to the feature vectorization method.

[0025] As a further improvement, the present invention extracts hierarchical malware multi-dimensional features according to a feature layering strategy for binary files in a malware data set. Specifically:

[0026] The multi-dimensional features of malware are obtained from the binary code layer, bytecode layer, opcode layer, and meta-information layer of malware respectively, and these features are used according to a hierarchical strategy.

[0027] The beneficial effects of the present invention are as follows:

[0028] By extracting hierarchical multi-dimensional features of malware according to the feature layering strategy for binary files in the malware data set, we extract the extensive and representative features of malware. Such features are conducive to the formation of reasoning logic chains in large language models, thereby improving the final classification accuracy.

[0029] By using the result interpretability method of the machine learning model according to the classification confidence of features of different dimensions, the important feature vectors that affect the classification results are output, which reduces the feature characters that need to be analyzed by the large language model. Sparse features are conducive to improving the complexity of the large language model analysis and classification tasks, and improving the classification effect of the model;

[0030] By combining structured reasoning feature prompts with analysis instructions and inputting them into a large language model, we can obtain the malware analysis process and its classification results, and achieve structured analysis and output of the classification analysis process. Through clear instructions, with the goal of improving the reasoning ability of the large language model, we first analyze the beneficial effects of various features in steps, then build a logical analysis chain, and output the classification results of malware. At the same time, such analysis can output the intermediate process of malware analysis, and the generated text is human-readable, which is conducive to the use of the entire method and convenient for malware analysts to supervise the entire analysis process.

[0031] In summary, the beneficial effects of the present invention mainly include two aspects. First, the present invention introduces a large language model and analyzes the data stream by constructing a large language model, which can effectively improve the accuracy of malware classification detection in large sample data scenarios; secondly, the present invention can output the reasoning text of the malware detection results, which can realize human-readable reasoning analysis and contribute to the promotion and use of machine learning methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 This is an algorithm flow chart of the malicious mining software detection method based on a large language model produced by the present invention. DETAILED DESCRIPTION

[0033] The present invention is further described in detail below with reference to the accompanying drawings and specific implementation examples.

[0034] The present invention discloses a method for detecting malicious mining software based on a large language model. Figure 1 Flowchart of the algorithm for analyzing and classifying malware by the intelligent agent produced by the present invention.

[0035] The following takes mining malware detection as an example to illustrate the specific implementation steps of the present invention.

[0036] Step 1: For binary files in the malware data set, hierarchical malware multi-dimensional features are extracted according to the feature layering strategy. Analysts determine which features need to be extracted based on the characteristics of the malware. In mining malware, since mining operations require a large number of blockchain mining operations and mining malware has preferences for mining currencies, these features are all feature types that can be used for mining malware detection. In addition, the section features of malware, binary file similarity, etc. are all feature dimensions of malware, which can provide attribution information for the final identification and classification of malware.

[0037] Character features of mining malware: The main function of mining malware is to execute covertly to obtain control of system computing resources, participate in the calculation of the entire blockchain through continuous computing, and finally obtain benefits by contributing computing power. In this process, blockchain-related currency information, command and control information, etc. will be used as. Then, specific character features in the malware, such as the command and control (C2) server address used for mining, the mining pool address, etc., are extracted and vectorized.

[0038] Control flow graph features: The action features of malware are the most basic analysis features of malware. Since the maliciousness of malware is mainly reflected through malicious actions, the control flow graph features can more accurately construct the characteristics of the malware itself and achieve effective analysis and classification of malware.

[0039] Raw byte features: Raw bytes are the basic features of malware. Raw bytes represent the organization of malware and the most basic format information. For malware, the most prominent raw byte features are the file headers of binary files. These file headers contain the most basic format information, specify the file type, the starting position of different segments, etc., and are the most basic file similarity data.

[0040] Operation code characteristics: In a binary file, the code segment contains instruction data executed by the malware CPU. Since the CPU instruction stream data cannot be extracted in static analysis, this method parses the code segment in the malware binary file and obtains the instruction stream in the code segment as one of the comparison indicators of file similarity.

[0041] Step 2: vectorize the multi-dimensional features of malware according to the characteristics of different dimensions to obtain feature vectors of different dimensions of malware. The multi-dimensional features extracted above are standardized and vectorized to ensure the consistency and availability of the features in classifier training.

[0042] Character features of mining malware: For character features, in order to achieve comparability of features under a unified scale, this solution uses a counting method to vectorize similar characters, including mining pool features, cryptocurrency account addresses, cryptocurrency-related characters, etc. The number of these character features can clearly indicate the suspiciousness of the malware.

[0043] Raw byte features: For raw byte features, 8-bit binary digits are vectorized as one feature point. After vectorization, the binary file will form a digital sequence of 0-255, which can be directly input into the classification model for modeling.

[0044] Control flow graph features: The modeling of the control flow graph relies on the vector design of nodes and edges. In the original CFG graph, the code block as a node contains the instruction flow and data operations for executing actions. In order to effectively fit the code features, the instruction classification statistics method is used in the code block to convert the code block into a 10-dimensional feature. In order to simplify the calculation of the graph neural network, this method uniformly identifies the edge connections in the CFG, and all edges are homogenized into one edge.

[0045] Operation code sequence: Operation code sequence is essentially a time series, and its modeling method is similar to that of natural language text sequence. Therefore, in actual operation, this method builds a dictionary for the sequence and converts it into a digital sequence after numbering, which is similar to building a token sequence for natural language text.

[0046] Through the above vectorization operations, it is ensured that the multi-dimensional features of malware can be effectively processed, providing basic data for classifier training.

[0047] Step 3: Select appropriate machine learning algorithms to perform training based on the characteristics of feature vectors of different dimensions of malware to obtain machine learning classification models of malware with different feature dimensions. Since different feature forms are suitable for different machine learning algorithms, it is necessary to select machine learning models based on the type of feature vectors to improve the effect of features on malware classification results.

[0048] In the specific classification model construction, this method selects the tree model as the classification model of the character features of mining malware, uses the one-dimensional convolutional model as the classification model of raw bytes, and selects the homogeneous graph neural network as the classification network of the control flow graph. Since the opcode sequence has obvious timing characteristics, it is necessary to use a timing type classifier for modeling. The above classification model selection achieves efficient modeling of the classifier model.

[0049] In classifier training, in order to obtain the best classification network configuration parameters, it is necessary to thoroughly analyze the parameters of the machine learning network, test the best parameter configuration, search and optimize the parameter configuration through technologies such as AutoML, and finally achieve the adaptation of the best parameters.

[0050] This step ultimately obtains the best performing classifier for the selected feature type. These classifiers serve as feature models on small-scale datasets to provide basic feature confidence and a source of important feature ranking for malware analysis.

[0051] Step 4: Extract the multi-dimensional features of the malware for the sample to be tested. Extract the feature types specified in step 1 for the sample to be tested, repeat step 2, and obtain the feature vector of the sample to be tested.

[0052] Step 5: Quantize the multi-dimensional features of the malware and input them into the malware machine learning classification model of different feature dimensions to obtain the classification confidence of the features of different dimensions. Input the feature vectors obtained from the sample to be tested into the malware classifier according to the type to obtain the classification confidence.

[0053] Step 6: Use the result interpretability method of the machine learning model according to the classification confidence of features of different dimensions to output the important feature vectors that affect the classification results. Select the machine learning interpretability method according to the classification confidence and output the important feature vectors. The main types of classifiers are tree models, one-dimensional convolutional models, and homogeneous graph neural networks. Use different methods to obtain the most important k features for these features. The specific methods are as follows:

[0054] Tree model (character features of mining malware): Since tree models such as decision trees and random forests provide natural feature importance evaluation methods (based on impurity reduction), the feature importance outputs of these models can be directly used. In addition, SHAP values ​​can also be used to provide a more detailed explanation of feature contributions, by analyzing the top k feature points according to the importance scores and extracting important feature categories.

[0055] One-dimensional convolution model (for raw byte classification): For classification models with convolutional structures, methods such as class activation mapping (CAM) or gradient class activation mapping (Grad-CAM) can effectively analyze important feature activation maps, highlight the most critical areas on the convolution layer of the model, and retrospectively analyze which raw byte features are most critical to the classification decision. Finally, the most important top k feature points are obtained through the importance score.

[0056] Homogeneous Graph Neural Network (for Classification of Control Flow Graphs): For the classification network of control flow graphs, we chose to use the torch deep learning computing platform, the module of graph neural network GNNExplainer, which is an explanation tool designed specifically for graph neural networks. GNNExplainer identifies which nodes and edges are critical to model prediction by maximizing the mutual information between the prediction of the target node and the prediction of its neighbor nodes in the graph structure data. This approach helps to understand the contribution of key graph structure patterns and features in the model decision process, thereby providing deep insights into the decision logic of the graph network.

[0057] Step 7: According to the extraction method of different dimensional features in the binary file, the important feature vectors are mapped to specific points in the binary file to obtain the important features of the sample in character form. The original features are traced back based on these important feature vectors to determine the original feature points. By analyzing the actual behavior semantics of these features, the input corpus is provided for the subsequent comprehensive analysis of the large language model.

[0058] In view of the character features of mining malware, the present invention uses character counting to achieve vectorization in feature vectorization. Therefore, in feature backtracking, in order to analyze the semantics, the original character text needs to be extracted, and the semantic understanding of the specific related cryptocurrency characters is performed to obtain the correlation analysis from the features to the classification results. For important character features and their vectorized values, joint analysis is performed to convert them into text corpus as the basis for large language model analysis of binary sample classification problems.

[0059] The raw byte features in the one-dimensional convolutional model are extracted using class activation mapping (CAM) or gradient class activation mapping (Grad-CAM). These methods can highlight the areas that contribute most to the classification decision in the output feature map of the convolutional layer, thereby identifying and locating which specific bytes or byte sequences are decisive. Through these mappings, it is possible to trace back to the original input data, extract the byte fragments that the model considers to be the most critical, and perform further semantic analysis on these fragments to explain how they affect the model's prediction results.

[0060] Feature extraction is performed using the GNNExplainer tool, which identifies and highlights the most influential parts of the graph for model predictions by optimizing the importance scores of nodes and edges. These nodes and edges identified as key usually represent important decision points or abnormal behavior patterns in the control flow. By mapping these graph structure features to the actual program control flow or opcode sequence, we can specifically understand how the model interprets these structures to identify potential malicious behavior.

[0061] For the analysis of opcode sequences, time series classifiers such as LSTM or GRU are usually used. These models are able to handle time dependencies in sequence data. By integrating the attention mechanism, it is clear which parts of the sequence the model focuses on when making prediction decisions. These opcode sequence fragments highlighted by the attention weights are the key factors for the model to identify malware behavior. In this way, it is possible to explain how specific opcode sequences are directly related to the classification of malware from the perspective of the model, and then extract these sequences as key corpus for subsequent analysis.

[0062] Through the above method, key features can be systematically extracted and understood from various feature classifiers. These features will directly support the decision analysis process of the large language model based on multi-dimensional features in the subsequent steps.

[0063] Step 8: Use the important characters of the sample and the classification confidence of the sample as input features, convert them into structured prompts, and form structured reasoning feature prompts. The features extracted in the above steps provide rich corpus for the final classification of malware. In step 7, the present invention focuses on using the interpretable features of the sample classifier and the confidence score of the classifier as input features for malware detection and analysis. By inputting these mixed corpora into a large language model, the prompt engineering input for malware analysis is constructed, and finally the analysis process and classification results of the mining malware are obtained according to the template.

[0064] In actual tests, since the large language model has the ability to reason and analyze, we combined the confidence scores of the malware classifier with the logical features extracted by the large language model in the early stage and converted them all into malware detection semantic corpus. Since the malware itself is not sensitive to digital features, in actual application, the present invention converts the confidence scores into semantic features. For example, a confidence score of 09955 represents that it is very likely to be malware, 0.7756 represents that it may be malware, 0.3335 represents that it is unlikely to be malware, and 0 represents that it is impossible to be malware. Such natural language text conversion is used to improve the analysis ability of the large language model for malware.

[0065] For the extracted features, they are converted into malware reasoning materials from two main perspectives. First, the extracted features are directly used to establish a reasoning logic chain with the malware analysis results. Different features are mixed together, and a large language model is used to establish the association relationship between them and the association analysis with the final classification of malware to improve the accuracy of the malware results and the explanatory analysis chain; second, the association between different categories of features and the final results also determines the weight of different confidences in the total classification results. Therefore, through the association analysis of the language model, the weights of different classifier confidences are output based on different feature categories. Through the analysis of these two perspectives, important features are combined as input for malware analysis.

[0066] By organizing the above two types of input data, the malware classifier obtained on the small sample data set can be effectively utilized to improve the effectiveness of the entire method process.

[0067] Step 9: Combine the structured reasoning feature prompts with the analysis instructions and input them into the large language model to obtain the malware analysis process and its classification results. The large model reasoning thinking chain technology is used to design the analysis instructions of the large language model and output the malware analysis process and its judgment results that meet the analysis reasoning steps and format requirements.

[0068] The thinking chain technology can effectively improve the output effect of the large model. By instructing the large language model to reason about the classification results of malware step by step according to logical steps, the reasoning chain can achieve logical output of the malware analysis process, and ultimately improve the effect of malware detection. In actual operation, the present invention implements the thinking chain analysis by instructing the large language model to "build analysis logic and output analysis results step by step".

[0069] In terms of model selection, in order to improve the analysis effect of the large language model, the present invention selects the SOTA large language model as the basic model to realize the reasoning analysis of malware features. Through the above steps, the reasoning ability of the large language model can be effectively stimulated to realize the explanatory analysis and classification of malware.

[0070] This solution uses a series of prompt engineering techniques to guide the model to generate analysis results in the expected form. However, the generation characteristics of large language models cause errors in the generated results, so the output of the model needs to be further processed. This process is divided into two stages. First, the program matching method is used to analyze the result output and match the json format. The second step is to use the language model for recalibration to ensure that the output results can be parsed and facilitate subsequent data processing. The above steps of the present invention can achieve a better detection accuracy effect than the original method. The specific comparison is shown in the following table:

[0071]

[0072] The results achieved by the single feature method and the ensemble learning method are weaker than those of the method proposed in this invention. At the same time, the present invention can provide a specific reasoning process to assist analysts in determining the credibility of the results. The following shows the output of an analysis result, as shown in the text below:

[0073] '"Analyze this sample step by step;

[0074] First, we observe that the confidence levels of PE file features, mined malware features, malconv, and opcode features are provided. However, this sample does not provide control flow graph features;

[0075] 1. PE file characteristics: The confidence level is very high, 0.995, indicating that the statistics extracted from the PE file header and section counts suggest that it may be a mining malware;

[0076] 2. Mining malware features: The confidence level is also high, at 0.992, indicating that the sample exhibits features commonly found in mining malware;

[0077] 3. Malconv: The confidence level is 0.997, indicating that the sample is very similar to known malware based on byte sequences;

[0078] 4. Opcode features: The confidence level is significantly low, only 0.039, indicating that the opcode features alone do not support the classification of this sample as mining malware;

[0079] Considering that three out of the four available features strongly support the classification of this sample as a mining malware, and considering the high confidence levels associated with the PE file characteristics, mining malware character characteristics, and Malconv, it is reasonable to conclude that this sample is indeed some type of mining malware.”

[0080] It can be seen that the examples shown analyze the samples step by step and feature by feature, and flexibly handle the situation where some features are missing, showing good reasoning performance and analytical adaptability.

[0081] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of patent protection of the present invention. Under the enlightenment of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested for the present invention shall be based on the attached claims.

Claims

1. A method for detecting malicious mining software based on a large language model, characterized in that: include: For binary files in malware data sets, hierarchical malware multi-dimensional features are extracted according to feature layering strategy; Vectorize the multi-dimensional features of malware according to the characteristics of different dimensions to obtain feature vectors of different dimensions of malware; According to the characteristics of feature vectors of different dimensions of malware, a suitable machine learning algorithm is selected to perform training, and a machine learning classification model of malware with different feature dimensions is obtained; Extract multi-dimensional features of malware from samples to be tested; The multi-dimensional features of malware are vectorized and input into the malware machine learning classification model of different feature dimensions to obtain the classification confidence of features of different dimensions; According to the classification confidence of features of different dimensions, the result interpretability method of the machine learning model is used to output the important feature vectors that affect the classification results; According to the extraction method of different dimensional features in the binary file, the important feature vectors are mapped to specific points in the binary file to obtain the important features of the sample in character form; The important characters of the sample and the classification confidence of the sample are used as input features and converted into structured prompts to form structured reasoning feature prompts; The structured reasoning feature prompts are combined with analysis instructions and input into the large language model to obtain the malware analysis process and its classification results.

2. The method for detecting malicious mining software based on a large language model according to claim 1, characterized in that: The structured prompts mainly include three types of features. The first type is the introduction of feature types, which includes the basic description of the features, the composition and form of the features, and the role that the features can play in classification. The second type is the important characters of the binary samples, including all the important characteristic characters parsed from the malware binary files. The third type of feature is the classification confidence of the sample, which is numerical sample classification probability data.

3. The method for detecting malicious mining software based on a large language model according to claim 1 or 2, characterized in that: The forming of structured inference feature prompts specifically includes converting the structured prompts into natural language according to the prompt engineering method of the large language model.

4. The method for detecting malicious mining software based on a large language model according to claim 1, characterized in that: The analysis instructions are specific instructions on how the large language model analyzes these features. The analysis instructions mainly include two parts. The first is the analysis instructions for the features, which clearly point out the analysis steps of the large language model for the important feature characters and confidence of the input. At the same time, the analysis instructions need to add the skills of prompt engineering, use the thinking chain method, and instruct the large language model to analyze the input information of the sample step by step, and finally build a reasonable analysis chain of analysis steps and output the final result. The second is the instructions for the output content format of the large language model, which instruct the large language model to first analyze the features according to the instructions to build the analysis chain, and give the classification results in the final stage of the output according to the analysis logic chain.

5. The method for detecting malicious mining software based on a large language model according to claim 1, characterized in that: The classification confidence of features of different dimensions is described, and the result interpretability method of the machine learning model is used to output important feature vectors that affect the classification results, specifically: For decision tree type classifiers, the selected interpretability method is to use the node importance degree to sort the features in order and obtain the important feature vector; For deep learning models, the selected interpretability method is a general value game-based method to obtain the ranking of feature vector importance; Finally, important feature vectors are obtained through the interpretability method of machine learning.

6. The method for detecting malicious mining software based on a large language model according to claim 1, characterized in that: The method for extracting features of different dimensions in binary files maps important feature vectors to specific points in the binary file, obtains important features of samples in character form, and obtains semantic character features in the binary file. Specifically: By examining the forward extraction method of feature vectors, the feature vectors are reversely mapped to specific text features in binary files. For the end-to-end processing method of binary files, the feature mask method is used to directly obtain the corresponding binary byte position, and the byte parsing value is obtained through format parsing. For the information parsing method of binary samples, the feature vectors obtained by counting are mapped to specific feature characters containing physical semantics according to the feature vectorization method.

7. The method for detecting malicious mining software based on a large language model according to claim 1, characterized in that: The binary files in the malware data set are extracted according to the feature layering strategy to extract hierarchical malware multi-dimensional features. Specifically: The multi-dimensional features of the malware are obtained from the binary code layer, bytecode layer, opcode layer, and meta-information layer of the malware respectively, and these features are used according to a hierarchical strategy.

Citation Information

Patent Citations

  • Cyber threat information processing apparatus, cyber threat information processing method, and storage medium storing cyber threat information processing program

    US20230252145A1

  • System and method for analyzing binary code malware classification using artificial neural network techniques

    WO2019083737A1

Cited By

  • System and method for detecting malware by reverse engineering binary data in a distributed network

    WO2026192801A1