Malicious sample clustering processing method and device

By using a vector database for similar sample retrieval and incremental clustering processing in malicious sample clustering, the problem of low efficiency of malicious sample clustering in the existing technology is solved, and efficient malicious sample clustering processing is achieved.

CN118536111APending Publication Date: 2024-08-23QI AN XIN TECHNOLOGY GROUP INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410575264.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-10
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Existing machine learning-based malicious sample clustering methods require a lot of time and computing resources when updating the model, resulting in poor efficiency in malicious sample clustering processing.

Method used

By obtaining the attribute characteristics of the new sample to be processed, similar sample retrieval is performed based on the constructed vector database, the similar or new cluster center information of the new sample is determined, incremental clustering is performed, and new cluster center information is generated to update the cluster. class result.

Benefits of technology

It effectively improves the efficiency of malicious sample clustering processing, reduces computing overhead, increases the speed of malicious sample clustering, and achieves timely response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536111A
    Figure CN118536111A
Patent Text Reader

Abstract

The invention provides a malicious sample clustering processing method and device. The method comprises the following steps: acquiring attribute characteristics of a new sample to be processed, and performing similar sample retrieval based on a constructed vector database and the attribute characteristics of the new sample to obtain a similar sample retrieval result; the vector database is constructed based on clustering center information generated after initial clustering of historical samples, and the clustering center information comprises attribute features to which clustering centers belong; wherein the attribute feature to which the clustering center belongs is a logical attribute feature selected for the clustering center in advance or an attribute feature of a historical sample closest to the clustering center; and performing incremental clustering processing on the new sample based on the similar sample retrieval result to obtain a sample clustering processing result. According to the malicious sample clustering processing method provided by the invention, the malicious sample clustering processing efficiency can be effectively improved, the calculation overhead is reduced, and the malicious sample clustering speed is improved, so that timely response is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security technology, and in particular to a method and device for clustering malicious samples, and also to an electronic device and a processor-readable storage medium. Background Art

[0002] In recent years, the network security situation has become increasingly severe. In order to improve the ability to trace malicious code, more and more researchers have applied machine learning technology to the fields of threat detection and sample homology analysis, especially malicious sample clustering. However, most of the existing machine learning-based sample clustering methods perform full clustering. However, when updating the model, if the clustering model is retrained, it takes a lot of time and computing resources, resulting in poor efficiency in the actual malicious sample clustering processing. Summary of the invention

[0003] To this end, the present invention provides a malicious sample clustering processing method and device to solve the defect of poor efficiency of malicious sample clustering processing solutions in the prior art.

[0004] In a first aspect, the present invention provides a malicious sample clustering processing method, comprising:

[0005] Acquire the attribute characteristics of the new sample to be processed, perform similar sample retrieval based on the constructed vector database and the attribute characteristics of the new sample, and obtain similar sample retrieval results; the vector database is constructed based on the cluster center information generated after the initial clustering of the historical samples, and the cluster center information includes the attribute characteristics to which the cluster center belongs; wherein the attribute characteristics to which the cluster center belongs are the logical attribute characteristics pre-selected for the cluster center or the attribute characteristics of the historical sample closest to the cluster center;

[0006] Based on the similar sample retrieval result, incremental clustering processing is performed on the new sample to obtain a sample clustering processing result.

[0007] Furthermore, performing incremental clustering processing on the new sample based on the similar sample retrieval result to obtain a sample clustering processing result specifically includes:

[0008] Based on the similar sample retrieval result, in the case of determining that a similar cluster center of the new sample is retrieved in the vector database, obtaining cluster center information of the similar cluster center corresponding to the new sample;

[0009] Incremental clustering processing is performed on the new sample according to the cluster center information to obtain a sample clustering processing result; wherein the cluster center information includes an identifier of the cluster center.

[0010] Furthermore, performing incremental clustering processing on the new sample based on the similar sample retrieval result to obtain a sample clustering processing result specifically includes:

[0011] Based on the similar sample retrieval result, when it is determined that no similar historical sample of the new sample is retrieved in the vector database, incremental cluster analysis is performed based on the attribute characteristics of the new sample to obtain new cluster center information corresponding to the new sample; wherein the new cluster center information includes an identifier of the cluster center to which the new sample belongs;

[0012] Output the new cluster center information corresponding to the new sample.

[0013] Furthermore, before obtaining the attribute features of the new sample to be processed, the following steps are also included:

[0014] Based on the cluster center information obtained after the initial clustering of historical samples, a vector database is constructed; wherein the vector database includes attribute features belonging to at least one cluster center.

[0015] Furthermore, performing incremental cluster analysis based on the attribute features of the new sample to obtain new cluster center information corresponding to the new sample specifically includes:

[0016] Inputting the attribute features of the new sample into a preset incremental clustering model for incremental feature clustering processing to obtain an incremental clustering result;

[0017] Among them, the incremental clustering model is trained based on the attribute characteristics of the preset first training sample that is similar to the new sample and the first sample clustering result corresponding to the attribute characteristics of the first training sample; the incremental clustering result includes new cluster center information generated after the incremental clustering of the new sample, and the new cluster center information includes a new cluster center identifier and the attribute characteristics to which the new cluster center belongs.

[0018] Furthermore, before constructing the vector database based on the cluster center information obtained after the initial clustering of the historical samples, the following steps are also included:

[0019] Obtaining attribute characteristics of historical samples to be processed;

[0020] Inputting the attribute features of the historical samples into a preset initial clustering model for initial feature clustering processing to obtain an initial clustering result;

[0021] Among them, the initial clustering model is trained based on the attribute characteristics of a preset second training sample that is similar to the historical sample and the second sample clustering results corresponding to the attribute characteristics of the second training sample; the initial clustering results include multiple cluster center information corresponding to the initial clustering of the historical samples.

[0022] Furthermore, the constructing of the vector database based on the cluster center information obtained after the initial clustering of the historical samples specifically includes: obtaining the cluster center information obtained after the initial clustering of the historical samples, the cluster center information including a cluster center identifier of at least one cluster center and at least an attribute feature to which the cluster center belongs;

[0023] The vector database is constructed based on a cluster center identifier of the at least one cluster center and at least an attribute feature to which the cluster center belongs.

[0024] In a second aspect, the present invention further provides a malicious sample clustering processing device, comprising:

[0025] An incremental clustering analysis unit is used to obtain the attribute characteristics of a new sample to be processed, perform similar sample retrieval based on the constructed vector database and the attribute characteristics of the new sample, and obtain similar sample retrieval results; the vector database is constructed based on the cluster center information generated after the initial clustering of the historical samples, and the cluster center information includes the attribute characteristics to which the cluster center belongs; wherein the attribute characteristics to which the cluster center belongs are the logical attribute characteristics pre-selected for the cluster center or the attribute characteristics of the historical sample closest to the cluster center;

[0026] The incremental clustering processing unit is used to perform incremental clustering processing on the new sample based on the similar sample retrieval result to obtain a sample clustering processing result.

[0027] Furthermore, the incremental clustering processing unit is specifically used to:

[0028] Based on the similar sample retrieval result, in the case of determining that a similar cluster center of the new sample is retrieved in the vector database, obtaining cluster center information of the similar cluster center corresponding to the new sample;

[0029] Incremental clustering processing is performed on the new sample according to the cluster center information to obtain a sample clustering processing result; wherein the cluster center information includes an identifier of the cluster center.

[0030] Furthermore, the incremental clustering processing unit is specifically used to:

[0031] Based on the similar sample retrieval result, when it is determined that no similar historical sample of the new sample is retrieved in the vector database, incremental cluster analysis is performed based on the attribute characteristics of the new sample to obtain new cluster center information corresponding to the new sample; wherein the new cluster center information includes an identifier of the cluster center to which the new sample belongs;

[0032] Output the new cluster center information corresponding to the new sample.

[0033] Furthermore, before obtaining the attribute features of the new sample to be processed, the following steps are also included:

[0034] The vector database construction unit is used to construct a vector database based on the cluster center information obtained after the initial clustering of historical samples; wherein the vector database includes attribute features belonging to at least one cluster center.

[0035] Furthermore, performing incremental cluster analysis based on the attribute features of the new sample to obtain new cluster center information corresponding to the new sample specifically includes:

[0036] Inputting the attribute features of the new sample into a preset incremental clustering model for incremental feature clustering processing to obtain an incremental clustering result;

[0037] Among them, the incremental clustering model is trained based on the attribute characteristics of the preset first training sample that is similar to the new sample and the first sample clustering result corresponding to the attribute characteristics of the first training sample; the incremental clustering result includes new cluster center information generated after the incremental clustering of the new sample, and the new cluster center information includes a new cluster center identifier and the attribute characteristics to which the new cluster center belongs.

[0038] Furthermore, before constructing the vector database based on the cluster center information obtained after the initial clustering of the historical samples, the following steps are also included:

[0039] Initial clustering unit, used for:

[0040] Obtaining attribute characteristics of historical samples to be processed;

[0041] Inputting the attribute features of the historical samples into a preset initial clustering model for initial feature clustering processing to obtain an initial clustering result;

[0042] Among them, the initial clustering model is trained based on the attribute characteristics of a preset second training sample that is similar to the historical sample and the second sample clustering results corresponding to the attribute characteristics of the second training sample; the initial clustering results include multiple cluster center information corresponding to the initial clustering of the historical samples.

[0043] Furthermore, the vector database construction unit is specifically used for:

[0044] Obtaining cluster center information obtained after initial clustering of historical samples, wherein the cluster center information includes a cluster center identifier of at least one cluster center and at least an attribute feature to which the cluster center belongs;

[0045] The vector database is constructed based on a cluster center identifier of the at least one cluster center and at least an attribute feature to which the cluster center belongs.

[0046] In a third aspect, the present invention further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the malicious sample clustering processing method as described in any one of the above items are implemented.

[0047] In a fourth aspect, the present invention further provides a processor-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the malicious sample clustering processing method as described in any one of the above items are implemented.

[0048] The malicious sample clustering processing method provided by the present invention obtains the attribute characteristics of the new sample to be processed, performs similar sample retrieval based on the constructed vector database and the attribute characteristics of the new sample, and obtains the similar sample retrieval result; the vector database is constructed based on the cluster center information generated after the initial clustering of the historical samples, and the cluster center information includes the attribute characteristics belonging to the cluster center; wherein the attribute characteristics belonging to the cluster center are the logical attribute characteristics pre-selected for the cluster center or the attribute characteristics of the historical sample closest to the cluster center; based on the similar sample retrieval result, the new sample is incrementally clustered to obtain the sample clustering processing result, which can effectively improve the efficiency of malicious sample clustering processing, reduce the calculation overhead, and increase the malicious sample clustering speed, thereby achieving timely response. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 It is a flowchart of a malicious sample clustering processing method provided by an embodiment of the present invention;

[0051] Figure 2 It is a complete flow chart of the malicious sample clustering processing method provided by an embodiment of the present invention;

[0052] Figure 3 It is a complete schematic diagram of the initial clustering process provided by an embodiment of the present invention;

[0053] Figure 4 is a schematic diagram of a data processing flow provided by an embodiment of the present invention;

[0054] Figure 5is a schematic diagram of a feature extraction process provided by an embodiment of the present invention;

[0055] Figure 6 is a schematic diagram of an initial clustering process provided by an embodiment of the present invention;

[0056] Figure 7 is a schematic diagram of an incremental clustering process provided by an embodiment of the present invention;

[0057] Figure 8 It is a schematic diagram of the structure of a malicious sample clustering processing device provided by an embodiment of the present invention;

[0058] Fig. 9 It is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0060] It should be noted that the terms "first", "second", etc. in the specification of the present application and the above-mentioned drawings are used to distinguish similar users, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0061] The present invention proposes a method for fast clustering of malicious samples, which specifically includes an initial clustering process and an incremental clustering process. The initial clustering process (i.e., the full clustering process) includes: obtaining the detection result data of the full sample; extracting the attribute characteristics of the full sample based on the detection result data of the full sample; generating a clustering model (i.e., the initial clustering result) based on the attribute characteristics of the full sample using a preset clustering algorithm (i.e., the initial clustering model), and selecting a cluster center for each cluster, and saving all cluster center information. The process of incremental clustering includes: establishing a vector database based on the cluster center information generated by the full clustering process, and presetting the corresponding similar sample retrieval system; obtaining the attribute characteristics of the new sample, and inputting the attribute characteristics into the similar sample retrieval system to retrieve one or more clusters similar to the new sample; if a similar cluster is found, the cluster information of the old cluster (i.e., similar cluster or similar cluster center) corresponding to the new sample is assigned (such as cluster representation, cluster name, distance between the new sample and the old cluster, etc.); if no similar cluster is found, a new cluster is generated for the new sample, and the cluster information of the new cluster corresponding to the new sample (such as cluster representation, cluster name, distance between the new sample and the new cluster, etc.) is returned.

[0062] The following is a detailed description of an embodiment of the malicious sample clustering processing method according to the present invention. Figure 1 FIG. 1 is a flow chart of a malicious sample clustering processing method provided by an embodiment of the present invention, and the specific process includes the following steps:

[0063] Step 101: Acquire the attribute characteristics of the new sample to be processed, perform similar sample retrieval based on the constructed vector database and the attribute characteristics of the new sample, and obtain similar sample retrieval results; the vector database is constructed based on the cluster center information generated after the initial clustering of historical samples, and the cluster center information includes the attribute characteristics belonging to the cluster center; wherein the attribute characteristics belonging to the cluster center are logical attribute characteristics pre-selected for the cluster center or attribute characteristics of the historical sample closest to the cluster center.

[0064] Before executing this step, it is necessary to obtain all historical samples in advance, perform initial clustering on all historical samples, and construct a vector database based on the cluster center information obtained after the initial clustering of historical samples; wherein the vector database includes at least one attribute feature to which a cluster center belongs. Specifically, firstly, based on the cluster center information generated after the initial clustering of historical samples, the cluster center information obtained after the initial clustering of historical samples is obtained, the cluster center information includes a cluster center identifier of at least one cluster center and at least an attribute feature to which the cluster center belongs, and then the vector database is constructed based on the cluster center identifier of at least one cluster center and at least an attribute feature to which the cluster center belongs.

[0065] It should be noted that, in the embodiment of the present invention, before constructing the vector feature library based on the cluster center information generated after the initial clustering of the historical samples, it is necessary to obtain the full amount of historical samples to be processed in advance, perform information detection on the historical samples, obtain the corresponding detection result data, and perform feature extraction on the detection result data to obtain the attribute characteristics of the historical samples, which is not specifically limited here, and then input the attribute characteristics of the historical samples into the preset initial clustering model for initial feature clustering processing to obtain the initial clustering results. Among them, the initial clustering model is trained based on the attribute characteristics of the preset second training samples similar to the historical samples and the second sample clustering results corresponding to the attribute characteristics of the second training samples; the initial clustering results include multiple cluster center information corresponding to the initial clustering of the historical samples. The cluster center information is the cluster information, and the cluster center is the cluster center. Each cluster corresponds to a cluster center. The cluster center information includes the cluster center identifier of each cluster (including the cluster center ID and the cluster center name) and the attribute characteristics to which the cluster center belongs. The initial clustering result includes a plurality of clusters corresponding to the initial clustering of the historical samples, and a cluster center is selected for each cluster, so that cluster center information corresponding to the cluster center can be obtained.

[0066] Among them, the feature extraction of the detection result data to obtain the attribute characteristics of the historical sample, the corresponding specific implementation process includes: feature construction of the detection result data to fuse the data in the detection result data to obtain the second attribute characteristics of the historical sample; feature transformation of the second attribute characteristics of the historical sample to perform feature dimension reduction or feature standardization on the second attribute characteristics of the historical sample to obtain the attribute characteristics of the historical sample. It should be noted that in the process of constructing attribute characteristics, features can be constructed based on one or more detection results, that is, at least one or more of API features, ATT&CK features, sample homology features, network behavior information features, and sample basic information features. The fusion representation of each type of feature can be selected according to the actual situation, such as using splicing combination, polynomial combination, etc. to obtain the attribute characteristics.

[0067] In the specific implementation process, the present invention provides an embodiment, the main process is as follows Figure 2 As shown in the figure, the scheme of the present invention consists of two parts, namely the initial clustering process and the incremental clustering process. The initial clustering process is implemented based on 3 modules, and the incremental clustering process is implemented based on 4 modules. For ease of understanding, the initial clustering process will be briefly introduced first, and then the processing methods of the corresponding modules in the initial clustering process will be introduced in detail. Figure 3As shown, the initial clustering process includes three modules: Based on the data processing module: used to process the input data (i.e., the historical sample data to be processed), support sample detection and data analysis, and this part needs to obtain the detection result data of the full amount of samples (i.e., historical samples). Based on the feature engineering module in the initial clustering process: obtain the detection result data based on the full amount of samples, and extract the second attribute characteristics of the full amount of samples. Based on the initial clustering module, the clustering model (i.e., the initial clustering result) is generated by the initial clustering algorithm (i.e., the initial clustering model) through the second attribute characteristics of the full amount of samples, and finally the cluster information is output for incremental clustering. Among them, the initial clustering algorithm can select a machine learning clustering algorithm or a community discovery algorithm based on the information labeled by the third party, which is not specifically limited here. Specifically, during the processing of the data processing module, such as Figure 4 As shown, the data processing module includes two submodules, namely the sample detection module and the data parsing module. Among them, based on the sample detection module: the input is a historical sample, and the output is a detection result report. Among them, if the input is the historical sample itself, static detection (such as static heuristic analysis method) and dynamic detection (such as sandbox dynamic detection) are supported, and the obtained detection result data includes static detection results and dynamic detection results. Among them, the static detection results include but are not limited to sample compiler information, sample malicious label information, and sample static homology information (such as malicious family, attack group). The dynamic detection results include but are not limited to ATT&CK information, dynamic API information, network behavior information, host behavior information, and sample dynamic homology information (such as malicious group, attack group). Based on the data parsing module: the detection result report of the standard input, the output results include but are not limited to: sample compiler information, sample malicious label information, sample homology information (such as malicious family, attack group), ATT&CK information, dynamic API information, network behavior information). It can be understood that in actual applications, the output results should include one or more detection result data.

[0068] like Figure 5As shown, the feature engineering stage is to parse the detection result data output by the data processing module. Common steps include data cleaning, feature construction, and feature transformation. It can be understood that a feasible embodiment is: in data cleaning: including processing missing values ​​of the detection result data (such as not processing, deleting, etc.), data alignment, deduplication, and outlier processing. In feature construction: construct features based on one or more detection result data, that is, at least one or more detection result data including API features, ATT&CK features, sample homology features, network behavior information features, and sample basic information features. The fusion representation of each type of feature can be selected according to the actual situation, such as using splicing combination and polynomial combination, which is not specifically limited here. In feature transformation: if the final second attribute feature input is high-dimensional, you can choose to use feature dimensionality reduction. If the numerical differences between the second attribute features are very obvious, you can use feature normalization or standardization to obtain the attribute characteristics of the historical sample.

[0069] like Figure 6 As shown, the purpose of the initial clustering module is to convert the features of the full sample obtained in the feature engineering stage (i.e., the attribute features of the historical sample) into cluster center information. The following steps are included: Select a suitable clustering algorithm (i.e., the initial clustering model): If the attribute features constructed in the feature engineering stage are text feature vectors, you can consider directly using the machine learning clustering algorithm. It should be noted that the selection of the clustering algorithm is related to the feature dimension, and the feature can be reduced to observe the law of the feature. It can be understood that common machine learning clustering algorithms can be selected, including partition-based clustering (such as K-Means++, etc.), hierarchical clustering (such as CURE algorithm), density-based clustering (such as DBSCAN and its variants, etc.), grid-based clustering (such as STING algorithm), etc., which are not specifically limited here. In the initial clustering process: the feature set of the standardized attribute features of the full sample is subjected to initial feature clustering processing, and multiple cluster centers will be generated. The cluster centers to which similar historical samples belong are the same, and the cluster centers to which dissimilar historical samples belong are different. The cluster representation (i.e., cluster id) and cluster name of each historical sample are unique. It is understandable that, due to the large number of historical samples, considering the performance, a cluster center feature can be selected for each cluster. The cluster center feature can be the theoretical feature of the cluster logically, or the feature of the historical sample closest to the theoretical cluster center, etc. Output cluster center information: The cluster center information at least includes the cluster center id, cluster center name, and the feature to which the cluster center belongs. The attribute feature is Figure 6 Features in .

[0070] Step 102: performing incremental clustering processing on the new sample based on the similar sample retrieval result to obtain a sample clustering processing result.

[0071] Specifically, based on the similar sample retrieval result, when it is determined that the similar cluster center of the new sample is retrieved in the vector database, the cluster center information of the similar cluster center corresponding to the new sample is obtained; the new sample is incrementally clustered according to the cluster center information to obtain the sample clustering processing result; wherein the cluster center information includes the identifier of the cluster center.

[0072] In addition, based on the similar sample retrieval result, when it is determined that no similar historical sample of the new sample is retrieved in the vector database, incremental cluster analysis is performed based on the attribute characteristics of the new sample to obtain new cluster center information corresponding to the new sample, and the new cluster center information corresponding to the new sample is output. The new cluster center information includes the identifier of the cluster center to which the new sample belongs.

[0073] In an embodiment of the present invention, when it is determined that similar historical samples of the new sample have not been retrieved in the vector feature library (i.e., the vector database), incremental cluster analysis can be performed based on the attribute features of the new sample to obtain new cluster center information corresponding to the new sample, and the new cluster center information corresponding to the new sample can be output. Among them, the incremental cluster analysis based on the attribute features of the new sample to obtain the new cluster center information corresponding to the new sample, the corresponding specific implementation process includes: performing information detection on the new sample to obtain detection result data; performing feature extraction on the detection result data to obtain the attribute features of the new sample; inputting the attribute features of the new sample into a preset incremental clustering model to perform incremental feature clustering processing to obtain incremental clustering results. Among them, the incremental clustering model is trained based on the attribute characteristics of the preset first training sample that is similar to the new sample and the first sample clustering result corresponding to the attribute characteristics of the first training sample; the incremental clustering result includes new cluster information generated after the incremental clustering of the new sample, and the new cluster information is used as new cluster center information, and the new cluster center information includes the cluster center identifier of the new cluster, the cluster center name of the new cluster and the attribute characteristics to which the cluster center of the new cluster belongs.

[0074] Among them, the feature extraction of the detection result data to obtain the attribute characteristics of the new sample, the corresponding specific implementation process includes: feature construction of the detection result data to fuse the data in the detection result data to obtain the first attribute characteristics of the new sample; feature transformation of the first attribute characteristics of the new sample to perform feature dimension reduction or feature standardization processing on the first attribute characteristics of the new sample to obtain the attribute characteristics of the new sample.

[0075] In the specific implementation process of the present invention, the incremental clustering process is as follows: Figure 7As shown, it includes 4 modules: the data processing module is used to process the data of the input new sample, support the sample detection and data analysis of the new sample, and this part obtains the detection result data of the new sample. The feature engineering module extracts the features of the detection result data of the new sample to obtain the first attribute feature. The clustering retrieval module searches in the preset similar sample retrieval system based on the first attribute feature of the new sample. If a similar cluster with similarity matching is found, the retrieval result is directly returned; if not found, the incremental clustering module is entered to return the result after completing the incremental clustering processing. Specifically, the data processing module of the incremental clustering process supports report or sample access, where if it is report access, data analysis can be performed directly and the output is a standardized report result; if it is a new sample input, it needs to pass through the sample detection module first, and then through the data analysis module. It can be understood that the incremental data processing module is similar to the processing method of the full data processing module in the initial clustering process (i.e., the full clustering process), and will not be repeated here. The increment is more for a single sample or a single report, and the initial clustering process needs to process many samples and many reports. The feature engineering module of the incremental clustering process is similar to that of the incremental clustering process, and usually includes three steps: data cleaning, feature construction, and feature transformation, which will not be described in detail here. It is understandable that the feature engineering module of the incremental clustering process should follow the rules of the full feature engineering module. For example, only samples that conform to the specified file format can be extracted. The feature engineering module of the incremental clustering process will output the second attribute features of the new sample. The second attribute features include one or more of API features, ATT&CK features, sample homology features, network behavior information features, and sample basic information features. The fusion representation of each type of second attribute features can be selected according to actual conditions, such as using splicing combinations and polynomial combinations.

[0076] like Figure 7As shown, the incremental clustering process includes the following steps: Step 1: After the first attribute feature is extracted from the new sample in the feature engineering stage, it is input into the preset similar sample retrieval system for retrieval. If the similar sample retrieval system retrieves a similar cluster in the vector feature library, step 2 is executed, otherwise go to step 3. Step 2: If the similar sample retrieval system retrieves a similar cluster of the sample (i.e., a similar sample cluster) in the vector feature library, the old cluster information corresponding to the new sample (i.e., the cluster information or cluster center information of the similar cluster) is directly output, which at least includes one or more of the id of the old cluster (i.e., the identifier of the similar cluster), the name of the cluster, the characteristics of the cluster, and the distance d between the new sample and the cluster center, wherein the closer the value of d is to 0, the better the clustering effect. Step 3: If the similar sample retrieval system does not retrieve a similar sample cluster in the vector feature library, the incremental clustering module is entered. The incremental clustering module generates a new cluster, which at least includes one or more of the id of the new cluster, the name of the cluster, and the characteristics of the cluster. It is understandable that the selection of features for the new cluster should be as similar as possible to the selection process for the old cluster in the initial clustering process, that is, it can be a theoretical cluster center feature, or it can be represented by the features of the current sample. After confirming the id of the new cluster (i.e., the cluster center identifier of the new cluster), the name of the cluster (i.e., the name of the cluster center of the new cluster), and the features of the cluster (i.e., the attribute features to which the cluster center of the new cluster belongs), add the new cluster to the vector feature library and go to step 4. Step 4: Output the information of the new cluster corresponding to the new sample, including the id of the new cluster, the name of the cluster, the features of the cluster, and the distance d between the new sample and the cluster center. The present invention adopts the initial clustering process and the incremental clustering process. Compared with only full clustering, it reduces the computational overhead, improves the clustering speed of malicious samples, and achieves timely response. In the initial clustering process and the incremental clustering process, selecting a feature for each cluster can improve the efficiency of clustering queries and reduce the number of vector searches.

[0077] The malicious sample clustering processing method described in the embodiment of the present invention obtains the attribute characteristics of the new sample to be processed, performs similar sample retrieval based on the constructed vector database and the attribute characteristics of the new sample, and obtains the similar sample retrieval result; the vector database is constructed based on the cluster center information generated after the initial clustering of the historical samples, and the cluster center information includes the attribute characteristics belonging to the cluster center; wherein the attribute characteristics belonging to the cluster center are the logical attribute characteristics pre-selected for the cluster center or the attribute characteristics of the historical sample closest to the cluster center; based on the similar sample retrieval result, the new sample is incrementally clustered to obtain the sample clustering processing result, which can effectively improve the efficiency of malicious sample clustering processing, reduce computing overhead, and increase the malicious sample clustering speed, thereby achieving timely response.

[0078] Corresponding to the malicious sample clustering processing method provided above, the present invention also provides a malicious sample clustering processing device. Since the embodiment of the device is similar to the above method embodiment, the description is relatively simple. For relevant parts, please refer to the description of the above method embodiment. The embodiment of the malicious sample clustering processing device described below is only illustrative. Please refer to Figure 8 As shown, it is a schematic diagram of the structure of a malicious sample clustering processing device provided by an embodiment of the present invention. The malicious sample clustering processing device of the present invention specifically includes the following parts:

[0079] The incremental cluster analysis unit 801 is used to obtain the attribute characteristics of the new sample to be processed, perform similar sample retrieval based on the constructed vector database and the attribute characteristics of the new sample, and obtain similar sample retrieval results; the vector database is constructed based on the cluster center information generated after the initial clustering of the historical samples, and the cluster center information includes the attribute characteristics belonging to the cluster center; wherein the attribute characteristics belonging to the cluster center are the logical attribute characteristics pre-selected for the cluster center or the attribute characteristics of the historical sample closest to the cluster center;

[0080] The incremental clustering processing unit 802 is used to perform incremental clustering processing on the new sample based on the similar sample retrieval result to obtain a sample clustering processing result.

[0081] Furthermore, the incremental clustering processing unit is specifically used to:

[0082] Based on the similar sample retrieval result, in the case of determining that a similar cluster center of the new sample is retrieved in the vector database, obtaining cluster center information of the similar cluster center corresponding to the new sample;

[0083] Incremental clustering processing is performed on the new sample according to the cluster center information to obtain a sample clustering processing result; wherein the cluster center information includes an identifier of the cluster center.

[0084] Furthermore, the incremental clustering processing unit is specifically used to:

[0085] Based on the similar sample retrieval result, when it is determined that no similar historical sample of the new sample is retrieved in the vector database, incremental cluster analysis is performed based on the attribute characteristics of the new sample to obtain new cluster center information corresponding to the new sample; wherein the new cluster center information includes an identifier of the cluster center to which the new sample belongs;

[0086] Output the new cluster center information corresponding to the new sample.

[0087] Furthermore, before obtaining the attribute features of the new sample to be processed, the following steps are also included:

[0088] The vector database construction unit is used to construct a vector database based on the cluster center information obtained after the initial clustering of historical samples; wherein the vector database includes attribute features belonging to at least one cluster center.

[0089] Furthermore, performing incremental cluster analysis based on the attribute features of the new sample to obtain new cluster center information corresponding to the new sample specifically includes:

[0090] Inputting the attribute features of the new sample into a preset incremental clustering model for incremental feature clustering processing to obtain an incremental clustering result;

[0091] Among them, the incremental clustering model is trained based on the attribute characteristics of the preset first training sample that is similar to the new sample and the first sample clustering result corresponding to the attribute characteristics of the first training sample; the incremental clustering result includes new cluster center information generated after the incremental clustering of the new sample, and the new cluster center information includes a new cluster center identifier and the attribute characteristics to which the new cluster center belongs.

[0092] Furthermore, before constructing the vector database based on the cluster center information obtained after the initial clustering of the historical samples, the following steps are also included:

[0093] Initial clustering unit, used for:

[0094] Obtaining attribute characteristics of historical samples to be processed;

[0095] Inputting the attribute features of the historical samples into a preset initial clustering model for initial feature clustering processing to obtain an initial clustering result;

[0096] Among them, the initial clustering model is trained based on the attribute characteristics of a preset second training sample that is similar to the historical sample and the second sample clustering results corresponding to the attribute characteristics of the second training sample; the initial clustering results include multiple cluster center information corresponding to the initial clustering of the historical samples.

[0097] It should be noted that the incremental cluster analysis unit corresponds to Figure 2 The incremental clustering processing unit corresponds to Figure 2 The clustering result processing module in Figure 7 The initial clustering unit corresponds to Figure 3 The initial clustering algorithm module in Figure 2 The initial clustering module or Figure 7 Cluster initialization module in .

[0098] The malicious sample clustering processing device described in the embodiment of the present invention obtains the attribute characteristics of the new sample to be processed, performs similar sample retrieval based on the constructed vector database and the attribute characteristics of the new sample, and obtains the similar sample retrieval result; the vector database is constructed based on the cluster center information generated after the initial clustering of the historical samples, and the cluster center information includes the attribute characteristics belonging to the cluster center; wherein the attribute characteristics belonging to the cluster center are the logical attribute characteristics pre-selected for the cluster center or the attribute characteristics of the historical sample closest to the cluster center; based on the similar sample retrieval result, the new sample is incrementally clustered to obtain the sample clustering processing result, which can effectively improve the efficiency of malicious sample clustering processing, reduce computing overhead, and increase the malicious sample clustering speed, thereby achieving timely response.

[0099] Corresponding to the malicious sample clustering processing method provided above, the present invention also provides an electronic device. Since the embodiment of the electronic device is similar to the above method embodiment, the description is relatively simple. For relevant parts, please refer to the description of the above method embodiment. The electronic device described below is only exemplary. Fig. 9 As shown, it is a schematic diagram of the physical structure of an electronic device disclosed in an embodiment of the present invention. The electronic device may include: a processor 901, a memory 902 and a communication bus 903, wherein the processor 901 and the memory 902 complete mutual communication through the communication bus 903, and communicate with the outside through the communication interface 904. The processor 901 can call the logic instructions in the memory 902 to execute the malicious sample clustering processing method, the method comprising: obtaining the attribute characteristics of the new sample to be processed, performing similar sample retrieval based on the constructed vector database and the attribute characteristics of the new sample, and obtaining the similar sample retrieval result; the vector database is constructed based on the cluster center information generated after the initial clustering of the historical samples, and the cluster center information includes the attribute characteristics of the cluster center; wherein the attribute characteristics of the cluster center are the logical attribute characteristics pre-selected for the cluster center or the attribute characteristics of the historical sample closest to the cluster center; based on the similar sample retrieval result, the new sample is incrementally clustered to obtain the sample clustering processing result.

[0100] In addition, the logic instructions in the above-mentioned memory 902 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: a storage chip, a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes.

[0101] On the other hand, an embodiment of the present invention further provides a computer program product, the computer program product includes a computer program stored on a processor-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a computer, the computer can execute the malicious sample clustering processing method provided by the above-mentioned method embodiments. The method includes: obtaining the attribute characteristics of the new sample to be processed, performing similar sample retrieval based on the constructed vector database and the attribute characteristics of the new sample, and obtaining similar sample retrieval results; the vector database is constructed based on the cluster center information generated after the initial clustering of historical samples, and the cluster center information includes the attribute characteristics belonging to the cluster center; wherein the attribute characteristics belonging to the cluster center are the logical attribute characteristics pre-selected for the cluster center or the attribute characteristics of the historical sample closest to the cluster center; based on the similar sample retrieval results, the new sample is incrementally clustered to obtain a sample clustering processing result.

[0102] On the other hand, an embodiment of the present invention further provides a processor-readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor, it is implemented to execute the malicious sample clustering processing method provided by the above embodiments. The method includes: obtaining the attribute characteristics of the new sample to be processed, performing similar sample retrieval based on the constructed vector database and the attribute characteristics of the new sample, and obtaining similar sample retrieval results; the vector database is constructed based on the cluster center information generated after the initial clustering of historical samples, and the cluster center information includes the attribute characteristics belonging to the cluster center; wherein the attribute characteristics belonging to the cluster center are the logical attribute characteristics pre-selected for the cluster center or the attribute characteristics of the historical sample closest to the cluster center; based on the similar sample retrieval results, the new sample is incrementally clustered to obtain a sample clustering processing result.

[0103] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

[0104] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0105] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A malicious sample clustering processing method, characterized in that: include: Acquire the attribute characteristics of the new sample to be processed, perform similar sample retrieval based on the constructed vector database and the attribute characteristics of the new sample, and obtain similar sample retrieval results; the vector database is constructed based on the cluster center information generated after the initial clustering of the historical samples, and the cluster center information includes the attribute characteristics to which the cluster center belongs; wherein the attribute characteristics to which the cluster center belongs are the logical attribute characteristics pre-selected for the cluster center or the attribute characteristics of the historical sample closest to the cluster center; Incremental clustering processing is performed on the new sample based on the similar sample retrieval result to obtain a sample clustering processing result.

2. The malicious sample clustering processing method according to claim 1 is characterized in that: The performing incremental clustering processing on the new sample based on the similar sample retrieval result to obtain the sample clustering processing result specifically includes: Based on the similar sample retrieval result, in the case of determining that a similar cluster center of the new sample is retrieved in the vector database, obtaining cluster center information of the similar cluster center corresponding to the new sample; Incremental clustering processing is performed on the new sample according to the cluster center information to obtain a sample clustering processing result; wherein the cluster center information includes an identifier of the cluster center.

3. The malicious sample clustering processing method according to claim 1 is characterized in that: The performing incremental clustering processing on the new sample based on the similar sample retrieval result to obtain the sample clustering processing result specifically includes: Based on the similar sample retrieval result, when it is determined that no similar historical sample of the new sample is retrieved in the vector database, incremental cluster analysis is performed based on the attribute characteristics of the new sample to obtain new cluster center information corresponding to the new sample; wherein the new cluster center information includes an identifier of the cluster center to which the new sample belongs; Output the new cluster center information corresponding to the new sample.

4. The malicious sample clustering processing method according to claim 1 is characterized in that: Before obtaining the attribute features of the new sample to be processed, it also includes: Based on the cluster center information obtained after the initial clustering of historical samples, a vector database is constructed; wherein the vector database includes attribute features belonging to at least one cluster center.

5. The malicious sample clustering processing method according to claim 3 is characterized in that: The performing incremental cluster analysis based on the attribute features of the new sample to obtain new cluster center information corresponding to the new sample specifically includes: Inputting the attribute features of the new sample into a preset incremental clustering model for incremental feature clustering processing to obtain an incremental clustering result; Among them, the incremental clustering model is trained based on the attribute characteristics of the preset first training sample that is similar to the new sample and the first sample clustering result corresponding to the attribute characteristics of the first training sample; the incremental clustering result includes new cluster center information generated after the incremental clustering of the new sample, and the new cluster center information includes a new cluster center identifier and the attribute characteristics to which the new cluster center belongs.

6. The malicious sample clustering processing method according to claim 4 is characterized in that: Before constructing the vector database based on the cluster center information obtained after the initial clustering of historical samples, it also includes: Obtaining attribute characteristics of historical samples to be processed; Inputting the attribute features of the historical samples into a preset initial clustering model for initial feature clustering processing to obtain an initial clustering result; Among them, the initial clustering model is trained based on the attribute characteristics of a preset second training sample that is similar to the historical sample and the second sample clustering results corresponding to the attribute characteristics of the second training sample; the initial clustering results include multiple cluster center information corresponding to the initial clustering of the historical samples.

7. The malicious sample clustering processing method according to claim 4 is characterized in that: The constructing of the vector database based on the cluster center information obtained after the initial clustering of the historical samples specifically includes: obtaining the cluster center information obtained after the initial clustering of the historical samples, wherein the cluster center information includes a cluster center identifier of at least one cluster center and at least an attribute feature to which the cluster center belongs; The vector database is constructed based on a cluster center identifier of the at least one cluster center and at least an attribute feature to which the cluster center belongs.

8. A malicious sample clustering processing device, characterized in that: include: An incremental clustering analysis unit is used to obtain the attribute characteristics of a new sample to be processed, perform similar sample retrieval based on the constructed vector database and the attribute characteristics of the new sample, and obtain similar sample retrieval results; the vector database is constructed based on the cluster center information generated after the initial clustering of the historical samples, and the cluster center information includes the attribute characteristics to which the cluster center belongs; wherein the attribute characteristics to which the cluster center belongs are the logical attribute characteristics pre-selected for the cluster center or the attribute characteristics of the historical sample closest to the cluster center; The incremental clustering processing unit is used to perform incremental clustering processing on the new sample based on the similar sample retrieval result to obtain a sample clustering processing result.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the malicious sample clustering processing method according to any one of claims 1 to 7 are implemented.

10. A processor-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the malicious sample clustering processing method as described in any one of claims 1 to 7 are implemented.