Software type detection method and device, terminal equipment and storage medium

By extracting multiple features from software data and classifying them, and generating composite software features to determine types, the problems of low detection accuracy and high maintenance costs in the prior art are solved, and higher detection accuracy and robustness are achieved , and reduce maintenance costs.

CN118965354AActive Publication Date: 2024-11-15EAST CHINA JIAOTONG UNIVERSITY

Patent Information

Application Number
CN202411434631.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2024-11-15
Estimated Expiration
2044-10-15

AI Technical Summary

Technical Problem

Existing software type detection methods rely on a library of known malware feature, low detection accuracy and difficult to resist zero-day attacks and high maintenance costs.

Method used

By extracting opcode features, text features, permission features and image features from software data, classifying and integrating them, generating composite software features to determine software types, and using a variety of machine learning models to improve detection accuracy.

Benefits of technology

Improve the accuracy and robustness of software type detection, reduce maintenance costs, and avoid the need for feature library updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118965354A_ABST
    Figure CN118965354A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of data processing, and provides a software type detection method and device, terminal equipment and a storage medium, and the method comprises the following steps: obtaining software data of to-be-detected software; software features of the to-be-tested software are extracted from the software data, and the software features comprise operation code features, text features, permission features and image features; classifying the to-be-tested software according to the software characteristics to obtain a plurality of classification results of the to-be-tested software; determining composite software characteristics of the to-be-tested software according to the plurality of classification results; and determining the software type of the to-be-tested software according to the composite software characteristics. According to the invention, the defect of low detection accuracy caused by using a single data type in the prior art can be solved, the detection accuracy and robustness can be improved, the feature library does not need to be updated, and the maintenance cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a software type detection method, apparatus, terminal device and storage medium. Background Art

[0002] In recent years, with the development of the Internet industry, different software has emerged in an endless stream. Some of these software may disguise themselves as various software to confuse users. These software are highly confusing and deceptive and may cause harm to users.

[0003] At present, these disguised software are generally detected by rule-based and signature-based methods. This method relies heavily on known malware feature libraries. It needs to detect by matching software behavior and known features. Not only is the detection and classification not accurate enough, but it is also difficult to resist zero-day attacks (Zero-Day Attacks), that is, attacks that exploit vulnerabilities that have not yet been discovered or fixed. In addition, this method also requires continuous updating of feature libraries, which has high maintenance costs. Therefore, how to improve the accuracy of software type detection while reducing maintenance costs has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The embodiments of the present application provide a software type detection method, apparatus, terminal device and storage medium, which can solve the technical problems of low software type detection accuracy and high subsequent maintenance cost in the prior art.

[0005] In a first aspect, an embodiment of the present application provides a software type detection method, comprising: Obtain software data of the software to be tested; Extracting software features of the software to be tested from the software data, wherein the software features include operation code features, text features, permission features, and image features; Classifying the software to be tested according to the software features to obtain multiple classification results of the software to be tested; Determining the composite software features of the software to be tested according to the multiple classification results; The software type of the software to be tested is determined according to the composite software feature.

[0006] Further, extracting the software features of the software to be tested from the software data includes: Extracting file operation code data of the software to be tested from the software data; De-redundancy processing is performed on the file operation code data to obtain pure file operation code data; Vectorization is performed on the clean file operation code data to obtain the operation code features of the software to be tested.

[0007] Further, extracting the software features of the software to be tested from the software data includes: Extracting text information of the software to be tested from the software data; Performing word segmentation processing on the text information, and performing noise reduction processing on the text information after the word segmentation processing to obtain software keywords; The software keywords are subjected to text vectorization processing to obtain text features of the software to be tested.

[0008] Further, extracting the software features of the software to be tested from the software data includes: Parse the target format file in the software data through the software permission parsing library to obtain the application permission of the software to be tested; The application permissions are vectorized using a preset coding method to obtain permission characteristics of the software under test.

[0009] Further, extracting the software features of the software to be tested from the software data includes: Extracting a plurality of target images in a preset format from the software data; According to the image information of each target image, the corresponding target images are screened to obtain a plurality of retained target images; Formatting the multiple retained target pictures to obtain multiple standard pictures; The multiple standard pictures are determined as image features of the software to be tested.

[0010] Furthermore, the obtaining of software data of the software to be tested includes: Obtaining the application package file of the software to be tested through a preset data transmission protocol; Decompile the application package file to obtain software data of the software to be tested.

[0011] Furthermore, after determining the software type of the software to be tested according to the composite software feature, the method further includes: Inputting the type probability distribution of the software to be tested into a preset large language model to obtain a detection report of the software to be tested; The type probability distribution and the test report are integrated to obtain a comprehensive test report of the software to be tested.

[0012] In a second aspect, an embodiment of the present application provides a software type detection device, including: An acquisition unit, used for acquiring software data of the software to be tested; An extraction unit, used to extract software features of the software to be tested from the software data, wherein the software features include operation code features, text features, permission features and image features; A classification unit, used to classify the software to be tested according to the software features, and obtain multiple classification results of the software to be tested; A first determining unit, configured to determine the composite software features of the software to be tested according to the multiple classification results; The second determining unit is used to determine the software type of the software to be tested according to the composite software feature.

[0013] In a third aspect, an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of the first aspect above when executing the computer program.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method of the first aspect above is implemented.

[0015] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0016] Compared with the prior art, the embodiments of the present application have the following beneficial effects: by extracting software features including operation code features, text features, permission features and image features from software data, classifying the software according to these features to obtain multiple classification results, and then determining composite software features based on the multiple classification results, and finally determining the software type according to the composite software features, the defect of low detection accuracy caused by using a single data type in the related technology can be solved, which helps to improve the accuracy and robustness of detection, and there is no need to update the feature library, which helps to reduce maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flowchart of the implementation of the first embodiment of a software type detection method provided in an embodiment of the present application; Figure 2 is a flowchart of a second embodiment of a software type detection method provided in an embodiment of the present application; Figure 3 is a flowchart of a third embodiment of a software type detection method provided in an embodiment of the present application; Figure 4 is a structural block diagram of a software type detection device provided in an embodiment of the present application; Figure 5 It is a structural block diagram of a software type detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0020] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0021] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0022] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0023] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0024] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0025] See also Figure 1 , Figure 1 The following is a flowchart of a first embodiment of a software type detection method provided by an embodiment of the present application, including: Step S10: Acquire software data of the software to be tested.

[0026] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, or an electronic device, software type detection device, computer, tablet computer, etc. capable of realizing the above functions. The following takes the software type detection device as an example to illustrate this embodiment and the following embodiments.

[0027] It is understood that the software to be tested may be software that needs to be tested to determine its type. Software data may refer to information used, processed and stored in a software system. Such data may be in various forms, including text, numbers, images, audio, video, etc.

[0028] Step S20: extracting software features of the software to be tested from the software data.

[0029] The software features include operation code features, text features, permission features and image features.

[0030] It can be understood that software features can reflect the properties and functions of software. Opcode features can be features extracted from the software's opcode. The software's opcode (Opcode) refers to a part of the instruction set that specifies the command for the computer to perform a specific operation. It is the core of the machine language instruction and is usually used in conjunction with operands to perform operations such as arithmetic operations, data transfer, or logical judgment. Text features can be features extracted from the software's text information. Permission features can be features extracted from the software's permission information. Image features can be features extracted from the software's image data.

[0031] Step S30: classifying the software to be tested according to the software features to obtain a plurality of classification results of the software to be tested.

[0032] It can be understood that the software to be tested is classified according to each software feature to obtain a classification result corresponding to each software feature.

[0033] Step S40: Determine the composite software features of the software to be tested according to the multiple classification results.

[0034] It can be understood that the composite software feature can be a feature obtained by concatenating various classification results.

[0035] Step S50: Determine the software type of the software to be tested according to the composite software feature.

[0036] In one example, a software type detection device obtains software data of the software to be tested, extracts operation code features from the operation code in the software data, extracts permission features from the permission information in the software data, extracts text features from the text information in the software data, and extracts image features from the image data in the software data. The operation code features are input into the Random Forest algorithm for classification to obtain a first classification result. The text features are input into the Naive Bayes model for classification to obtain a second classification result. The permission features are input into the Multi-Layer Perceptron (MLP) for classification to obtain a third classification result. The image features are input into the VGG16 model for classification to obtain a fourth classification result. The first classification result, the second classification result, the third classification result, and the fourth classification result are concatenated to obtain a 4*5 (taking five categories as an example) feature vector corresponding to the software to be tested, which is a composite software feature. The feature vector is input into the trained LAN model to obtain the software type of the software to be tested, where the software types include: legal software, disguised software, entertainment software, film and television software, music software, and office software.

[0037] In another example, the software type detection device obtains an opcode feature data set, a text feature data set, a permission feature data set, and an image feature data set. The above data sets are divided into a training set, a validation set, and a test set according to 7:2:1. The random forest algorithm is trained with the training set of the opcode feature. When the number of training times reaches the set number, the trained model is verified with the validation set. After the verification, its accuracy is tested with the test set. After the test, the random forest algorithm for classification is obtained. Random Forest is an ensemble learning method that improves the accuracy and stability of classification by constructing multiple decision trees and aggregating their prediction results. Random Forest reduces the risk of overfitting by introducing randomness, and can optimize feature selection by evaluating the importance of each feature. When dealing with complex features and data sets, Random Forest exhibits high classification performance and robustness. The Naive Bayes model is trained with the training set, validation set, and test set corresponding to the text feature data set to obtain a Naive Bayes model for classification. Naive Bayes is a simple probabilistic classifier based on Bayes' theorem and the assumption of conditional independence of features. Although its assumption (independence between features) is rarely true in practical applications, the Naive Bayes classifier can still perform well in many cases and has high computational efficiency. The Multi-Layer Perceptron (MLP) is trained by the training set, validation set, and test set corresponding to the permission feature dataset to obtain a multi-layer perceptron for classification. The Multi-Layer Perceptron (MLP) is a feedforward artificial neural network model consisting of an input layer, one or more hidden layers, and an output layer. It is trained by the back-propagation algorithm and can learn complex nonlinear mapping relationships. The multi-layer perceptron classifier performs well in handling classification problems involving multiple complex features and interactions, and classification performance can be improved through automatic feature learning. VGG16 is trained by the training set, validation set, and test set corresponding to the image feature dataset to obtain a VGG16 model for classification. VGG16 is a classic deep convolutional neural network that achieves excellent performance in tasks such as image classification by stacking small-sized convolution kernels and pooling layers with a simple and unified network structure. In this solution, VGG16 can be used to extract and analyze image information in Android software to help identify its features and patterns.

[0038] In another example, the software type detection device obtains a composite software feature data set and divides the composite software feature data set into a training set, a validation set, and a test set according to a ratio of 7:2:1. The composite software features obtained after splicing are mapped to a 1 x 20 feature vector through a fully connected layer, and this vector is input into the meta-model KAN for training to obtain the final output model. Specifically: the input feature vector passes through two layers of KANLayer, each layer of KANLayer is composed of a basis function (single variable function) and a spline function (two variable function) and a linear combination of the two, and the output passes through the activation function SiLU. Finally, the output is obtained through the Symbolic_KANLayer. The SiLU activation function is an improved version of Sigmoid and ReLU. SiLU has the characteristics of no upper bound, lower bound, smoothness, and non-monotonicity, and can be regarded as a smooth ReLU activation function. KAN is an alternative to the multi-layer perceptron (MLP) inspired by the Kolmogorov-Arnold representation theorem. Unlike MLP nodes ("neurons") which have fixed activation functions, KANs have learnable activation functions on their edges ("weights"). Smaller KAN networks can match or exceed the accuracy of larger MLPs in data fitting problems. This embodiment uses KAN as a metamodel to effectively integrate the prediction results of multiple base models, thereby improving the overall detection accuracy. Compared with the traditional MLP metamodel, KAN has fewer model parameters, which can reduce computational costs and resource thresholds.

[0039] In some optional implementations, step S10 may be implemented through the following steps: obtaining the application package file of the software to be tested through a preset data transmission protocol; and decompiling the application package file to obtain the software data of the software to be tested.

[0040] It is understandable that the preset data transmission protocol may be a pre-set communication protocol for transmitting software data.

[0041] In an example, the software to be tested is an Android software. The software type detection device obtains the application package (APK) file of the Android software by directly uploading the APK file, downloading the URL or downloading the QR code. The software type detection device detects the suffix of the uploaded file. After the suffix indicates that the file is an APK file, the data is transmitted through the HTTPS protocol, and the data packet verification and transport layer encryption technology (SSL / TLS) are used to ensure data integrity and security. Transport layer security protocols, such as SSL (Secure Sockets Layer) and TLS (Transport Layer Security), can encrypt data in transmission to prevent data from being eavesdropped or tampered with during transmission. Then, the software type detection device decompiles the APK file to obtain a file (AndroidManifest.xml) and Smali opcodes that reflect the internal structure of the original APK file. Among them, the AndroidManifest file contains important information and metadata of the application, such as basic information of the application (package, version information, etc.), permission information, components (such as Activity, Service, BroadcastReceiver and ContentProvider) and their configuration. Opcodes are bytecode instructions for Android applications that are run on the Dalvik virtual machine (before Android 5.0) or ART (Android 5.0 and later). Each opcode represents a specific operation, such as load, store, calculate, branch, etc.

[0042] In some optional implementations, after step S50, it also includes: inputting the type probability distribution of the software to be tested into a preset large language model to obtain a test report of the software to be tested; integrating the type probability distribution and the test report to obtain a comprehensive test report of the software to be tested.

[0043] In one example, the software type detection device inputs the type probability distribution of the discrimination result into a preset large language model. By presetting the input text, a detection report output by the preset large language model is obtained. Among them, the preset input text can be: 1. Parsing time; 2. The analyzed apk file name, app name, and apk size; 3. The probability of each category obtained by discriminating the apk according to the text feature, the probability of each category obtained by discriminating the apk according to the permission feature, the probability of each category obtained by discriminating the apk according to the image feature, and the probability of each category obtained by discriminating the apk according to the operation code feature; what is the category obtained by combining the above four features, and what is the probability. Write a report based on the above content. The title of the report is: XXX analysis report. Do not use the * symbol as the sub-point title in the report. The sub-point titles are all in Arabic numerals. Note: Do not use symbols such as # and *. Use Python-docx to integrate the type probability distribution with the text content of the detection report and export it as a comprehensive detection report in Microsoft Word (.docx) format. Among them, Python-docx is a Python library developed based on openXML for automatically creating and modifying Microsoft Word (.docx) documents. You can also set a threshold to determine whether the classification is clear. If the classification result is clear, the information of the detected software will be updated to the black / white list of the database. If the classification result is not clear, it will be added to the system gray list, and the system administrator will assist in the subsequent detection.

[0044] The method provided in this embodiment extracts software features including operation code features, text features, permission features and image features from software data, classifies the software according to these features to obtain multiple classification results, determines composite software features based on the multiple classification results, and finally determines the software type according to the composite software features. This can solve the defect of low detection accuracy caused by using a single data type in related technologies, helps to improve the accuracy and robustness of detection, and does not require updating the feature library, which helps to reduce maintenance costs.

[0045] In the optional implementation of each embodiment of the present application, the above step S20 may include the following steps: step S201 to step S203. Figure 2 This is a flowchart for implementing the second embodiment of the software type detection method provided in the embodiment of the present application.

[0046] Step S201: extracting file operation code data of the software to be tested from the software data.

[0047] It can be understood that the file operation code data may be data consisting of an operation code.

[0048] Step S202: performing redundancy removal processing on the file operation code data to obtain pure file operation code data.

[0049] It is understandable that the pure file operation code data may be data obtained by removing redundant digits in the file operation code.

[0050] Step S203: vectorizing the clean file operation code data to obtain the operation code features of the software under test.

[0051] In one example, the software type detection device extracts file operation code data from the software data, deletes redundant numbers in the file operation code data, and obtains pure file operation code data. The operation codes in the pure file operation code data are vectorized by one-hot encoding to obtain the operation code features of the software to be tested.

[0052] In some optional implementations, the above-mentioned step S20 can also be implemented through the following steps: extracting the text information of the software to be tested from the software data; performing word segmentation processing on the text information, and performing noise reduction processing on the text information after word segmentation processing to obtain software keywords; performing text vectorization processing on the software keywords to obtain text features of the software to be tested.

[0053] It is understandable that text information can refer to text data processed and displayed in the software system. Such data may include: user interface text: buttons, menus, labels, prompt information, etc., used to interact with users; help documents: user manuals, online help, FAQ, etc., providing operation guides and support; log information: system-generated operation logs, error reports, etc., recording the operating status and abnormal conditions of the software; input and output data: text data entered by users in the software (such as forms, comments, etc.) and text results output by the software (such as reports, notifications, etc.).

[0054] In one example, the lxml library is used to parse the decompiled XML file and extract the text information therein. Among them, lxml is an XML and HTML parsing library based on C language, which is widely used in Python. In this solution, lxml can quickly parse XML files and extract text from XML files as required. The jieba word segmentation tool is used to perform Chinese and English precise mode word segmentation on the extracted text information, and stop words are removed to obtain software keywords to reduce noise in the text and improve the accuracy and efficiency of subsequent text analysis. Among them, jieba is a widely used word segmentation tool, which is developed based on Python and provides a variety of word segmentation modes, including precise mode, full mode and search engine mode. Then, the software type detection device extracts software keywords and performs text vectorization through the Tfidf method to construct the text features of the software to be tested. Among them, Tfidf (Term Frequency-Inverse Document Frequency) is a commonly used text feature extraction method that can measure the importance of a word in a text. Specifically, the higher the Tfidf value, the higher the frequency of the word in the text, and the lower the frequency of the word in the entire data set, so it can better represent the theme and emotion of the text. By calculating the Tfidf value of each word and converting it into a vector, this scheme can obtain a vector space model that can reflect the text topic.

[0055] The method proposed in this embodiment obtains the operation code features of the software to be tested by vectorizing the file operation code, and then determines the classification result of the software to be tested based on the operation code features, which helps to improve the accuracy of software type detection.

[0056] In the optional implementation of each embodiment of the present application, the above step S20 may also include the following steps: step S21 to step S22. Figure 3 This is a flowchart for implementing the third embodiment of the software type detection method provided in the embodiments of the present application.

[0057] S21: parsing the target format file in the software data through the software permission parsing library to obtain the application permission of the software to be tested.

[0058] It is understandable that the software permission analysis library may be a database for analyzing the permissions of the software. The application permission may be the permission granted by the software application system.

[0059] S22: vectorizing the application permissions using a preset coding method to obtain permission features of the software under test.

[0060] In an example, the software to be tested is an Android software. The lxml library is used to parse the xml file to obtain the application permissions of the Android software, where the application permissions include android.permission.INTERNET: allowing applications to open network sockets, android.permission.WRITE_EXTERNAL_STORAGE: allowing applications to write to external storage, android.permission.ACCESS_NETWORK_STATE: allowing applications to access information about the network, android.permission.ACCESS_WIFI_STATE: allowing applications to access information about Wi-Fi networks, android.permission.READ_LOGS: allowing applications to read low-level log files of the system, android.permission.READ_PHONE_STATE: allowing applications to access phone status, android.permission.RECORD_AUDIO: allowing applications to record audio, etc. Then, the software type detection device vectorizes the application permissions through one-hot encoding, and writes each permission as an independent vector for subsequent machine learning processing to obtain the permission characteristics of the software to be tested. Among them, one-hot encoding is unique hot encoding, and its method is to use an N-bit state register to encode N states.

[0061] In some optional implementations, the above-mentioned step S20 can also be implemented through the following steps: extracting multiple target images in a preset format from the software data; screening the corresponding target images according to the image information of each target image to obtain multiple retained target images; formatting the multiple retained target images to obtain multiple standard images; and determining the multiple standard images as the image features of the software to be tested.

[0062] In one example, the software type detection device obtains multiple target images in the software format of PNG, JPG, and JPEG by matching the file suffix. Then, the multiple target images are screened. Considering that images with too small files may contain limited information, this solution screens out images with file sizes greater than 50KB based on rules to obtain multiple retained target images to ensure that the input image has sufficient quality and details, thereby improving the recognition accuracy. Then, the software type detection device converts the retained target images into RGB format, and unifies the size of the input images to 256*256 to obtain multiple standard images. The multiple standard images are determined as the image features of the software to be tested, which can ensure the consistency of the input images, so that the subsequent model can more accurately learn and recognize the features in the image.

[0063] In another example, the Django framework can be used to connect to the Mysql database to build a platform webpage. The platform webpage is deployed to the server, and a cloud database is established to record the blacklist, whitelist, and graylist of Android software. The software type detection device compares the software package name (package_name) and the application name (app_name) of the software to be tested to detect whether the software to be tested is recorded in the existing blacklist, whitelist, or graylist of the system.

[0064] The method proposed in this embodiment obtains the permission characteristics of the software to be tested by vectorizing the application permissions of the software to be tested, and determines the software type of the software to be tested based on the permission characteristics. It can integrate data features from different sources to detect the software to be tested, thereby obtaining the type of the software to be tested, which helps to improve the accuracy and generalization ability of software type detection.

[0065] See also Figure 4 , Figure 4 4 is a structural block diagram of a software type detection device 400 provided in an embodiment of the present application. In this embodiment, the software type detection device includes various units for executing Figure 1-Figure 3 For details, please refer to the steps in the corresponding embodiment. Figure 1-Figure 3 as well as Figure 1-Figure 3 For the convenience of explanation, only the parts related to this embodiment are shown. Figure 4 , the software type detection device 400 includes: The acquisition unit 401 is used to acquire software data of the software to be tested; An extraction unit 402 is used to extract software features of the software to be tested from the software data, wherein the software features include operation code features, text features, permission features and image features; The classification unit 403 is used to classify the software to be tested according to the software features to obtain multiple classification results of the software to be tested; A first determining unit 404 is used to determine the composite software features of the software to be tested according to the multiple classification results; The second determining unit 405 is used to determine the software type of the software to be tested according to the composite software feature.

[0066] As an embodiment of the present application, the extraction unit 402 is further used to extract the file operation code data of the software under test from the software data; perform redundancy removal processing on the file operation code data to obtain pure file operation code data; and perform vectorization processing on the pure file operation code data to obtain the operation code characteristics of the software under test.

[0067] As an embodiment of the present application, the extraction unit 402 is also used to extract text information of the software to be tested from the software data; perform word segmentation on the text information, and perform noise reduction on the text information after word segmentation to obtain software keywords; perform text vectorization on the software keywords to obtain text features of the software to be tested.

[0068] As an embodiment of the present application, the extraction unit 402 is also used to parse the target format file in the software data through the software permission parsing library to obtain the application permissions of the software under test; vectorize the application permissions through a preset encoding method to obtain the permission characteristics of the software under test.

[0069] As an embodiment of the present application, the extraction unit 402 is also used to extract multiple target images in a preset format from the software data; screen the corresponding target images according to the image information of each target image to obtain multiple retained target images; format the multiple retained target images to obtain multiple standard images; and determine the multiple standard images as image features of the software to be tested.

[0070] As an embodiment of the present application, the acquisition unit 401 is further used to acquire the application package file of the software to be tested through a preset data transmission protocol; and decompile the application package file to obtain the software data of the software to be tested.

[0071] As an embodiment of the present application, the second determination unit 405 is further used to input the type probability distribution of the software to be tested into a preset large language model to obtain a detection report of the software to be tested; and integrate the type probability distribution and the detection report to obtain a comprehensive detection report of the software to be tested.

[0072] The device provided in this embodiment extracts software features including operation code features, text features, permission features and image features from software data, classifies the software according to these features to obtain multiple classification results, determines composite software features based on the multiple classification results, and finally determines the software type according to the composite software features. This can solve the defect of low detection accuracy caused by using a single data type in related technologies, helps to improve the accuracy and robustness of detection, and does not require updating the feature library, which helps to reduce maintenance costs.

[0073] It should be understood that Figure 4 In the structural block diagram of the software type detection device shown, each unit is used to execute Figure 1-Figure 3 The steps in the corresponding embodiments, and for Figure 1-Figure 3 Each step in the corresponding embodiment has been explained in detail in the above embodiment. Figure 1-Figure 3 as well as Figure 1-Figure 3The relevant descriptions in the corresponding embodiments are not repeated here.

[0074] Figure 5 is a structural block diagram of a terminal device provided by another embodiment of the present application. Figure 5 As shown, the terminal device 500 of this embodiment includes: a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processor 501, such as a program of the software type detection method. When the processor 501 executes the computer program 503, the steps in each embodiment of the above-mentioned software type detection method are implemented, such as Figure 1 Alternatively, the processor 501 executes the computer program 503 to implement the above Figure 4 The functions of each unit in the corresponding embodiment are, for example, Figure 4 For details on the functions of the acquisition unit 401 to the second determination unit 405, please refer to Figure 4 The relevant descriptions in the corresponding embodiments are not repeated here.

[0075] Exemplarily, the computer program 503 may be divided into one or more units, one or more units are stored in the memory 502, and are executed by the processor 501 to complete the present application. One or more units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program 503 in the terminal device 500. For example, the computer program 503 may be divided into an acquisition unit, an extraction unit, a classification unit, a first determination unit, and a second determination unit, and the specific functions of each unit are as described above.

[0076] The terminal device may include, but is not limited to, a processor 501 and a memory 502. Those skilled in the art will appreciate that Figure 5 It is only an example of the terminal device 500 and does not constitute a limitation of the terminal device 500. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the turntable terminal device may also include an input and output terminal device, a network access terminal device, a bus, etc.

[0077] The processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0078] The memory 502 may be an internal storage unit of the terminal device 500, such as a hard disk or memory of the terminal device 500. The memory 502 may also be an external storage terminal device of the terminal device 500, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 500. Further, the memory 502 may also include both an internal storage unit of the terminal device 500 and an external storage terminal device. The memory 502 is used to store computer programs and other programs and data required by the turntable terminal device. The memory 502 may also be used to temporarily store data that has been output or is to be output.

[0079] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0080] If the integrated module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium can be non-volatile or volatile. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in computer-readable storage media can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable storage media do not include electrical carrier signals and telecommunication signals.

[0081] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application 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. 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 application, and should all be included in the protection scope of the present application.

Claims

1. A software type detection method, characterized in that: The method comprises: Obtain software data of the software to be tested; Extracting software features of the software to be tested from the software data, wherein the software features include operation code features, text features, permission features, and image features; Classifying the software to be tested according to the software features to obtain multiple classification results of the software to be tested; Determining the composite software features of the software to be tested according to the multiple classification results; The software type of the software to be tested is determined according to the composite software feature.

2. The method according to claim 1, characterized in that The step of extracting the software features of the software to be tested from the software data includes: Extracting file operation code data of the software to be tested from the software data; De-redundancy processing is performed on the file operation code data to obtain pure file operation code data; Vectorization is performed on the clean file operation code data to obtain the operation code features of the software to be tested.

3. The method according to claim 1, characterized in that The step of extracting the software features of the software to be tested from the software data includes: Extracting text information of the software to be tested from the software data; Performing word segmentation processing on the text information, and performing noise reduction processing on the text information after the word segmentation processing to obtain software keywords; The software keywords are subjected to text vectorization processing to obtain text features of the software to be tested.

4. The method according to claim 1, characterized in that The step of extracting the software features of the software to be tested from the software data includes: Parse the target format file in the software data through the software permission parsing library to obtain the application permission of the software to be tested; The application permissions are vectorized using a preset coding method to obtain permission characteristics of the software under test.

5. The method according to claim 1, characterized in that The step of extracting the software features of the software to be tested from the software data includes: Extracting a plurality of target images in a preset format from the software data; According to the image information of each target image, the corresponding target images are screened to obtain a plurality of retained target images; Formatting the multiple retained target pictures to obtain multiple standard pictures; The multiple standard pictures are determined as image features of the software to be tested.

6. The method according to any one of claims 1 to 5, characterized in that: The step of obtaining the software data of the software to be tested includes: Obtaining the application package file of the software to be tested through a preset data transmission protocol; Decompile the application package file to obtain software data of the software to be tested.

7. The method according to any one of claims 1 to 5, characterized in that: After determining the software type of the software to be tested according to the composite software feature, the method further includes: Inputting the type probability distribution of the software to be tested into a preset large language model to obtain a detection report of the software to be tested; The type probability distribution and the test report are integrated to obtain a comprehensive test report of the software to be tested.

8. A software type detection device, characterized in that: The software type detection device comprises: An acquisition unit, used for acquiring software data of the software to be tested; An extraction unit, used to extract software features of the software to be tested from the software data, wherein the software features include operation code features, text features, permission features and image features; A classification unit, used to classify the software to be tested according to the software features, and obtain multiple classification results of the software to be tested; A first determining unit, configured to determine the composite software features of the software to be tested according to the multiple classification results; The second determining unit is used to determine the software type of the software to be tested according to the composite software feature.

9. A terminal 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 method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Hybrid feature screening method for Android malicious software detection

    CN107577942A

  • Method for dynamically and real-time mining software process activities from SVN log event streams

    CN109062763A

  • Open set recognition method and device for APT malicious software organization, equipment and medium

    CN112001423A

  • Malicious software detection method and device based on machine learning and storage medium

    CN112861127A

  • Android malicious software detection and classification method based on multi-feature fusion deep learning

    CN115730310A

Cited By

  • Data authority management and data isolation method of power database

    CN119577804A

  • A data authority management and data isolation method for power database

    CN119577804B

  • Remote scanning missing report generation method and device, computer equipment and storage medium

    CN119848835A

  • Remote scan miss report generation method, device, computer equipment and storage medium

    CN119848835B