Camouflage App identification method and system based on metadata and code features

Through a method based on metadata and code characteristics, combining metadata inconsistency analysis and code similarity recognition of camouflage apps, the problem of low recognition efficiency and inability to identify mixed mode apps in the existing technology is solved, and efficient and accurate camouflage apps are achieved. Identify.

CN118886006APending Publication Date: 2024-11-01INSTITUTE OF INFORMATION ENGINEERING CHINESE ACADEMY OF SCIENCES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410900563.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-04-07
Filing Date
2024-07-05
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

It is difficult for the prior art to effectively identify the disguised apps in iOS Apps, especially those developed in hybrid modes, and the method based on the native user interface determination is inefficient and cannot identify the disguised apps developed in network or hybrid modes.

Method used

The camouflage app recognition method based on metadata and code features is adopted to filter suspicious apps through metadata inconsistency, and the code similarity and content features are combined with random forest classifiers to identify camouflage apps to improve recognition efficiency and accuracy.

Benefits of technology

It achieves the high recall and accuracy while improving the recognition efficiency of camouflage apps, and can identify camouflage apps developed in the network or hybrid mode, solving the problem of large static analysis overhead and is not limited by the camouflage app development model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118886006A_ABST
    Figure CN118886006A_ABST
Patent Text Reader

Abstract

The invention discloses a camouflage App identification method and system based on metadata and code features, and belongs to the field of software security. According to the method, the metadata of the App is obtained for preprocessing, the suspicious App is filtered out through different filtering modes, then the similarity between the suspicious App and family representatives in a camouflage App sample library in code structure and code content is calculated, and the camouflage App and the benign App are recognized through a random forest classifier in combination with code content statistical characteristics of the suspicious App. According to the method, the recognition efficiency of the disguised App is improved, and meanwhile, the relatively high recall rate and accuracy rate are obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software security, and in particular to a method and system for identifying disguised apps based on metadata and code features. Background Art

[0002] With the rapid growth of the number of mobile applications, the threat of malicious mobile apps has become increasingly serious, posing a huge threat to the property and information security of users. To this end, various application stores, such as the App Store, have introduced strict review mechanisms. In response to the strict review procedures of the App Store and the limited distribution channels in the iOS ecosystem, some developers have proposed camouflage strategies to hide the illegal functions of the App and package them as benign apps to be put on the store. These apps present benign user interfaces and functions in the store, but their hidden interfaces and functions will be activated after the user downloads or when an activation event is triggered. The illegal hidden functions and malware that may exist in the disguised apps will bring significant risks to users, leading to privacy leaks, financial fraud, device damage and other security issues. Therefore, identifying the disguised apps in the App Store is of great significance to protecting the personal information and property security of users, ensuring the security and stability of the App market, and promoting the governance and development of cyberspace.

[0003] Several reports in recent years have highlighted the existence and risks of fake apps, but there is still little research on fake apps. Lee et al. proposed the Cruiser method (see Lee Y, Wang X, Liao X, et al. Understanding illicit UI in iOS apps through hidden UI analysis [J / OL]. IEEE Trans. Dependable Secur. Comput., 2021, 18(5): 2390-2402.), which is the first attempt to identify hidden crowdsourced user interfaces in iOS apps, revealing the mobile-based crowdsourcing ecosystem and the strategies used by underground developers to evade app review. Subsequently, they further proposed the detection tool Chameleon-Hunter based on the Cruiser method (see Lee Y, WangX, Lee K, et al. Understanding iOS-based crowdturfing through hidden UI analysis [C / OL] / / Heninger N, Traynor P. 28th USENIX Security Symposium, USENIX Security 2019, Santa Clara, CA, USA, August 14-16, 2019. USENIX Association, 2019: 765-781.), which uses binary analysis to check the binary files and user interface layout files of the App to identify the hidden user interface, and then uses the features derived from these user interfaces and metadata to determine the legitimacy of these hidden user interfaces, achieving a precision of 92.6% and a recall of 94.7%. Although the Cruiser method and the Chameleon-Hunter tool analyzed and identified disguised apps for the first time, the amount of disguised sample data used was small (only 34), and binary analysis of all apps was required, which was costly. At the same time, this judgment method based on the native user interface is greatly affected by the App development model. For Apps developed in the current mainstream hybrid mode, their main functions are implemented in the form of H5 pages, and the native code part only provides interaction with the device hardware. Therefore, this method cannot identify such disguised Apps. Summary of the invention

[0004] The purpose of the present invention is to provide a method and system for identifying disguised apps based on metadata and code features, which filters suspicious disguised apps through metadata inconsistency and identifies disguised apps through code similarity and content features, thereby improving the efficiency of disguised app identification and obtaining a higher recall rate and precision rate.

[0005] The technical solution adopted by the present invention to achieve the above-mentioned purpose is as follows:

[0006] A method for identifying fake apps based on metadata and code features, comprising the following steps:

[0007] Get the App's metadata from the App Store and pre-process it;

[0008] Differentiate between apps with user reviews and apps without user reviews based on metadata;

[0009] For apps with user reviews, filter out suspicious apps based on whitelists and regular rules;

[0010] For the remaining apps with user reviews, candidate suspicious apps are filtered out based on the consistency of phrase similarity between the app’s declared functions and actual functions;

[0011] For apps without user reviews and candidate suspicious apps, a recommendation relationship graph is constructed based on the recommendation relationship between apps. The nodes in the graph represent apps, and the edges represent the recommendation relationship between apps. The nodes in the graph are assigned with declared category set and actual category set attributes. If there is no intersection between the declared category set and the actual category set, the app corresponding to the node is determined to be a suspicious app.

[0012] The similarity between the code structure and code content of the family representatives in the suspicious app and disguised app sample library is calculated, and the similarity is spliced ​​with the statistical features of the code content of the suspicious app and input into the random forest classifier for classification to identify disguised apps and benign apps.

[0013] Furthermore, the metadata of the App includes name, category, application description, recommendation relationship and user comments; preprocessing refers to removing redundant information irrelevant to the function from the application description and user comments, and then performing word segmentation and filtering of stop words.

[0014] Furthermore, the steps of filtering out suspicious apps based on the whitelist and regular rules include:

[0015] Use whitelist to filter out top-ranked apps;

[0016] Based on regular rules, apps that provide movie, comic, music, and book resources are screened out, and then comments containing pirated resources are screened out. Apps with multiple such comments are identified as suspicious apps.

[0017] Furthermore, the step of filtering out candidate suspicious apps based on the consistency of phrase similarity between the declared functions and the actual functions of the apps includes:

[0018] Use LDA to identify different topics for the app description phrases, extract the subject words belonging to each topic and their occurrence probability, and build a subject word list. The subject words in the subject word list are used as the declared functions of the App.

[0019] For each app’s user reviews, we use LDA to identify several topics and select the keywords with probabilities above the threshold. Then, we calculate the average probability of the selected keywords in all topics and take the keywords with average probabilities above the threshold as the actual functions of the app.

[0020] The two groups of keywords of the App’s declared functions and actual functions are vectorized using Word2Vec, and then the average similarity, similarity of similar words, and similarity of high-frequency words between the two groups of word vectors are calculated. If at least two of the similarities are less than the preset threshold, the App is determined to be a candidate suspicious App.

[0021] Furthermore, cosine similarity refers to the average value of the cosine similarities between two groups of word vectors, similar word similarity refers to the average value of the first multiple cosine similarities between two groups of word vectors arranged in descending order of similarity, and high-frequency word similarity refers to the average value of the first multiple cosine similarities between two groups of word vectors arranged in descending order of occurrence frequency.

[0022] Furthermore, the step of assigning a declaration category set to a node in the recommendation relationship graph includes:

[0023] The word vectors of the App's declared functions are used as features to train a random forest classifier to classify nodes, and the basic probability vectors of the App's declared functions belonging to multiple categories are obtained;

[0024] The basic probability vector is fine-tuned according to the name of the App and its category in the app store, and finally the probability vector of the App's declared functions belonging to each category is obtained. The categories with probabilities greater than the threshold are added to the declared category set of the corresponding node of the App.

[0025] Furthermore, the step of fine-tuning the basic probability vector according to the name of the App and its category in the App Store includes:

[0026] Select keywords that represent the characteristics of each category and generate a one-hot category probability vector for each keyword. For each app, extract keywords in the app name that are similar to the keywords selected above, average the category probability vectors of the extracted keywords, and obtain a name-based probability vector.

[0027] According to the correspondence between the categories in the app store and the declared function categories, a probability vector for each category in the app store is set; for each App, a probability vector based on the store category is generated according to the category to which it belongs in the app store;

[0028] The basic probability vector of the App, the probability vector based on the name, and the probability vector based on the store category are weighted to obtain the final category probability vector.

[0029] Furthermore, the step of assigning actual category set attributes to nodes in the recommendation relationship graph includes:

[0030] Initialize the feature vector of the node to the word vector of the actual function of the App. If the App corresponding to the node has no comments, initialize it randomly.

[0031] A three-layer graph convolutional network is used to process the feature vectors of the nodes, and the nodes are classified to obtain the probability vector representing that the actual functions of the App belong to each category. The categories with probabilities greater than the threshold are added to the actual category set of the corresponding nodes of the App.

[0032] Furthermore, the steps of calculating the similarity between the suspicious App and the family representatives in the disguised App sample library in terms of code structure and code content include:

[0033] Extract the binary file from the suspicious app’s IPA file;

[0034] Obtain an App sample library, which contains 23 disguised App families, each family containing one representative; extract the representatives of the 23 disguised App families as 23 disguised App samples;

[0035] Use IDA Pro's BinDiff plug-in to calculate the similarity between the suspicious app and 23 disguised app samples, and obtain 23-dimensional code structure similarity;

[0036] Use the String instruction to extract static strings from the binary file of the suspicious App, from which the App's used frameworks and visited URLs are extracted. The Jaccard similarity coefficients of the suspicious App and 23 disguised App samples in static strings, used frameworks, and visited URLs are calculated to obtain three 23-dimensional code content similarities.

[0037] Furthermore, the statistical features of the code content of suspicious apps include: the number of static strings in the suspicious app code, the number of non-repeating static strings, the number of static strings with a length greater than 5, the number of static strings with a length less than 5, the total length of static strings, the average length of static strings, the number of frames used, the number of URLs visited, the total length of URLs visited, the average length of URLs visited, and the number of domain names visited.

[0038] A disguised App identification system based on metadata and code features includes a memory and a processor. The memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0039] The present invention has the following advantages:

[0040] 1. The present invention adopts a progressive disguised app identification. First, a metadata inconsistency analysis method with low overhead and low accuracy is used to quickly filter out suspicious apps that account for a small proportion. Then, a code similarity detection method with high accuracy and high overhead is used to identify the disguised apps. This can improve the detection efficiency while maintaining high accuracy.

[0041] 2. The present invention filters suspicious apps based on metadata inconsistency. By analyzing the inconsistency of metadata such as app descriptions, user comments, and recommendation relationships, the present invention extracts information about the actual functions hidden in disguised apps, and filters out suspected disguised apps. This can solve the problem of high static analysis overhead and achieve efficient filtering of suspected disguised apps without any loss.

[0042] 3. The present invention recognizes disguised apps based on code similarity and content features. It detects the similarity between suspicious apps and disguised app samples in code structure and code content, and uses a random forest classifier in combination with the code content features of the suspicious apps themselves to recognize disguised apps. It is not limited by the development mode of disguised apps and can accurately identify disguised apps developed in network or hybrid modes. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a flow chart of the method of the present invention for identifying whether an App is a disguised App. DETAILED DESCRIPTION

[0044] In order to make the various technical features and advantages or technical effects in the above technical solutions of the present invention more obvious and easy to understand, they are described in detail below with reference to the accompanying drawings.

[0045] The present invention provides a method for identifying disguised apps based on metadata and code features, which mainly includes three steps: data collection and processing, suspicious app filtering based on metadata inconsistency, and disguised app identification based on code similarity and content features. Figure 1 As shown, the specific processing process of each step is described in detail below.

[0046] 1. Data collection and processing:

[0047] Get the App's metadata from the App Store and iTunes, including the name, category, app description, recommendation relationship, and the latest 500 user reviews. Then pre-process the app description and user reviews in the metadata to remove redundant information that is not related to the function, perform word segmentation, and filter stop words.

[0048] 2. Filtering suspicious apps based on metadata inconsistency:

[0049] Three filters are used to filter apps: suspicious app filtering based on app tendency inconsistency, suspicious app filtering based on app behavior inconsistency, and suspicious app filtering based on graph node attribute inconsistency.

[0050] 1. Filtering suspicious apps based on inconsistency of app tendencies: For apps with user reviews, first use the whitelist to filter out the top-ranked apps from well-known developers or companies, then use regular rules to filter out apps that provide resources such as movies, comics, music, and books. Then use regular rules to filter out comments related to "the app provides abundant resources" and "how to activate the app" that imply that the app provides pirated resources. Apps with multiple relevant comments are judged as suspicious apps. For example, apps with more than 90 relevant comments or the proportion of relevant comments reaching more than 30% can be judged as suspicious apps.

[0051] 2. Filtering suspicious apps based on inconsistency of app behavior: For the remaining apps with user reviews, we extract phrases related to the app’s declared functions and actual functions, and identify apps with obvious inconsistencies between these two groups of functional phrases as candidate suspicious apps. The rest of the apps are judged as benign apps.

[0052] (1) The method for extracting the declared functions of apps is: using LDA to identify multiple (e.g., 25) topics for all app description phrases, and extracting the subject words with a probability of occurrence exceeding 0.005 from each topic to construct a subject word list. The topics identified by LDA are composed of each subject word and its probability, for example: Topic 1: (music, 0.033), (video, 0.008), (animation, 0.008), (song, 0.007); Topic 2: (subway, 0.016), (bus, 0.013), (travel, 0.011), (line, 0.006). At the same time, some words describing the functions of apps (e.g., "copy", "notes", "font", etc.) are manually included. Finally, the app description phrases are processed according to the subject word list, and only the subject words in the subject word list are retained as the declared functions of apps.

[0053] (2) The method for extracting the actual functions of the App is as follows: for each user review of the App, use LDA to identify 5 topics, and then only retain the subject words with a probability equal to or greater than 0.01 in each topic; count all the subject words and their probabilities retained in the 5 topics, add up the probabilities of the same subject words, and then average the statistical probabilities based on the number of topics to obtain the average probability, select the subject words with an average probability greater than 0.005 as the actual functions of the App, and remove the remaining words from the user review phrases. For example, among the 5 topics, topics 1-4 all contain the subject word "reading" with probabilities of 0.026, 0.026, 0.102, and 0.036; only topic 1 contains the subject word "check-in" with a probability of 0.02; the average probabilities of these two subject words are 0.038 and 0.004 respectively, so "reading" is the actual function of the App, and "check-in" is removed.

[0054] (3) The method for judging whether the declared function and the actual function of an App are inconsistent is as follows: use Word2Vec to vectorize the phrases, and then use three methods to calculate the similarity between the two sets of vectors: average similarity (i.e., the average of the cosine similarities of all word pairs), similar word similarity (i.e., the average of the top 10% of the cosine similarities of all word pairs arranged in descending order of similarity), and high-frequency word similarity (i.e., the average of the top 10% of the cosine similarities of all word pairs arranged in descending order of word pair frequency); if at least two of the three similarities are equal to or exceed the set threshold (e.g., 0.3, 0.6, 0.3), the declared function of the App is considered to be consistent with the actual function and it is determined to be a benign App; if at least two of the three similarities are less than the set threshold, the declared function of the App is considered to be inconsistent with the actual function and it is determined to be a candidate suspicious App.

[0055] The specific calculation of the above three similarity averages is as follows:

[0056] For an App, it has a set of declared function word vectors Vd =(v d1 , v d2 , ..., v dm ) and a set of actual function word vectors V a =(v a1 , v a2 , ..., v an ), containing m and n word vectors respectively.

[0057] V d The word vectors in V a The word vectors in are combined in pairs to form m*n declared function-actual function word pairs, denoted as C=((v d1 , v a1 ), (v d1 , v a2 ),…,(v d1 , v an ), (v d2 , v a1 ), (v d2 , v a2 ),…,(v d2 , v an ),…,(v dm , v an )).

[0058] First, calculate the cosine similarity of all word pairs, the formula is:

[0059]

[0060] where v di Indicates V d The i-th word vector in , v aj Indicates V a The j-th word vector in .

[0061] Then, the average values ​​of the three similarities are calculated:

[0062] Average similarity Sim avg : The average cosine similarity of all word pairs, the formula is:

[0063]

[0064] Similarity of similar words Sim sw : Arrange all word pairs in descending order of cosine similarity and take the first 10% to form C sw , and then take the average value, the formula is:

[0065]

[0066] High frequency word similarity Simhfw : Arrange all word pairs in descending order of frequency, and take the first 10% to form C hfw , and then take the average value, the formula is:

[0067]

[0068] 3. Filtering suspicious apps based on inconsistency of graph node attributes: For apps without user reviews and candidate suspicious apps, we use the recommendation relationship between apps to build a recommendation relationship graph. We use the random forest classifier and graph convolutional network to assign two attributes, the declared category set and the actual category set, to the nodes. We filter out suspicious apps by evaluating the inconsistency of graph node attributes, and judge the remaining apps as benign apps.

[0069] (1) The recommended relationship graph constructed is: undirected graph G = {N, E, C d , C a}, where the node set N represents apps, the edge set E represents the recommendation relationship between apps (if App A's recommendation list includes App B, there is an edge between node A and node B), and each node has a declared category set C d and the actual category set C a Two attributes, the category set can take values ​​within the range of 25 custom categories (theme wallpapers, sports events, parenting, life services, takeaway shopping, food recipes, note-taking, weather, travel, medical care, sports and health, lending, financial services, social networking, live video, audio tools, picture tools, comics, reading, newspapers and news, learning, games, document tools, office tools, and network tools).

[0070] (2) The method for assigning declared category set attributes to nodes in the recommended relationship graph is as follows: the word vectors of the declared functions of the App are used as features to train a random forest classifier to classify the nodes, and the basic probability vector V that the declared functions of the App belong to the 25 categories is obtained. r Then, the basic probability vector is fine-tuned according to the name of the App and its category in the App Store, and finally the probability vector of the App's declared function belonging to each category is obtained. Categories with probabilities greater than a threshold (the threshold range is between 0 and 1, such as 0.5) will be added to the declared category set of the node corresponding to the App.

[0071] The above steps of fine-tuning the basic probability vector include:

[0072] First, we manually select some keywords that can represent each category, such as "bus" and "subway" in the "travel" category, and then generate a one-hot category probability vector for each keyword. For each app, we extract the keywords of this category in the app name, average the category probability vectors of these keywords, and get the name-based probability vector V n .

[0073] Then, according to the correspondence between the categories in the App Store and the declared functional categories (which may be one-to-one, one-to-many, or many-to-one), the probability vector of each category in the App Store is manually set. For each App, according to the category it belongs to in the App Store, a probability vector V based on the store category is generated. c .

[0074] Finally, the basic probability vector V of App r , the probability vector V based on the name n , the probability vector V based on store category c Weighted, get the final category probability vector V, for example V = 0.5V r +0.2V n +0.3V c .

[0075] (3) The method for assigning the actual category set attributes to the nodes in the recommendation relationship graph is as follows: the feature vector of the node is initialized to the word vector of the actual function of the App, and the initialization value is the average value of all word vectors of the actual function. If the App corresponding to the node has no comments, it is randomly initialized. Then, a three-layer graph convolutional network (GCN) is used to process the feature vector of the node, and the node is classified to obtain a probability vector representing that the actual function of the App belongs to each category. If the probability that the App belongs to a certain category is higher than a predetermined threshold (the threshold range is between 0 and 1, such as 0.05), the category will be added to the actual category set of the node corresponding to the App.

[0076] (4) The method for determining whether the attributes of the recommendation graph nodes are inconsistent is as follows: if there is no intersection between the declared category set and the actual category set of a node, the attributes of the node are considered inconsistent and it is determined to be a suspicious App.

[0077] 3. Identification of fake apps based on code similarity and content features:

[0078] For apps that are judged to be suspicious, their IPA files are obtained, and the binary files therein are extracted. The similarity in code structure and content between the suspicious apps and the family representatives in the disguised app sample library is calculated, and then concatenated with the statistical features of the code content of the suspicious apps to form a feature vector that is input into the random forest classifier for classification to identify disguised apps and benign apps.

[0079] (1) The disguised app sample library consists of manually collected disguised app samples. These disguised apps are divided into 23 disguised app families based on hidden functions and user interfaces. Disguised apps belonging to the same family have similar user interfaces and hidden functions. At the same time, one representative from each family will be selected for the following similarity calculation.

[0080] (2) The code structure similarity is calculated by using the BinDiff plug-in of IDA Pro to calculate the 23 similarities between the suspicious App and the 23 disguised App samples to form a 23-dimensional feature vector.

[0081] (3) The method for calculating code content similarity is as follows: use the String instruction to extract static strings from the binary file of the suspicious App, including URLs, field names, paths of the libraries / frameworks used, function names / class names, meaningful prompt phrases, meaningless strings (possibly encrypted), etc., and use regular expressions to extract the frameworks used by the App and the URLs visited. Finally, calculate the three Jaccard similarity coefficients between the suspicious App and the 23 disguised App samples in terms of static strings, used frameworks, and visited URLs, and obtain three 23-dimensional feature vectors.

[0082] (4) Statistical features of the suspicious app code content include: the number of static strings in the suspicious app code, the number of non-repeating static strings, the number of static strings with a length greater than 5, the number of static strings with a length less than 5, the total length of static strings, the average length of static strings, the number of frames used, the number of URLs visited, the total length of URLs visited, the average length of URLs visited, and the number of domain names visited.

[0083] (5) The code structure similarity vector, code content similarity vector, and code content statistical features are concatenated to form the final feature vector, which is then input into the random forest classifier for binary classification to identify disguised apps and benign apps.

[0084] A specific example is provided below:

[0085] For a batch of apps to be tested, the AppIDs of these apps are known, and the steps of using the method of the present invention to identify the disguised apps therein include:

[0086] 1. Based on AppID, use web crawler tools to collect the names, categories, application descriptions, recommendation relationships, and the latest 500 user reviews of these apps from App Store and iTuns, remove redundant information in the application descriptions and user reviews, perform word segmentation, and filter stop words;

[0087] 2. Mark the apps in the whitelist as benign apps;

[0088] 3. For apps with user reviews, use regular rules to analyze their app descriptions to filter out resource-providing apps. Analyze the user reviews of these apps and select apps that provide rich resources and mark them as suspicious.

[0089] 4. For the remaining apps with user reviews, use LDA to extract their declared functions and actual function phrases, use Word2Vec to vectorize them, and calculate the cosine similarity of the two pairs of phrases as functional inconsistency. Apps with high inconsistency are marked as candidate suspicious apps, and the rest are marked as benign apps;

[0090] 5. Take apps without user reviews and candidate suspicious apps as seed nodes, build a recommendation graph based on the recommendation relationship, obtain the metadata of these recommended apps, remove redundant information, segment words, filter stop words, extract declared functions and actual function phrases, and vectorize them;

[0091] 6. For each node in the recommendation graph, use the random forest classifier to assign the declared category set attribute, and use the graph convolutional network to assign the actual category set attribute. The apps corresponding to the nodes with no intersection between the declared category set and the actual category set are marked as suspicious apps, and the rest are marked as benign apps;

[0092] 7. For suspicious apps, obtain their IPA files, decode them, and extract the binary files;

[0093] 8. Calculate the similarity between the code structure and content of the suspicious apps and the representatives of the disguised app family, count the content statistical features of the suspicious apps, form a feature vector, and use the random forest classifier to classify the suspicious apps into disguised apps and benign apps. At this point, all the apps to be tested are marked as disguised or benign, and the identification of disguised apps is completed.

[0094] Experimental test:

[0095] The total time taken by the method of the present invention to process 69,178 apps is 125.5 hours, with an average time of 6.53 seconds per app, which is 77.57% higher than the 29.11 seconds per app of Chameleon-Hunter. On the constructed labeled data set (including 1,500 benign apps and 180 manually verified disguised apps), the method can achieve a recall rate of 99.23% and a precision rate of 99.45%, while Chameleon-Hunter only achieves a recall rate of 15.38% and a precision rate of 75.68%.

[0096] Although the present invention has been disclosed as above by way of embodiments, it is not intended to limit the present invention. Appropriate modifications or equivalent substitutions of the technical solutions of the present invention made by ordinary technicians in the field should all be included in the protection scope of the present invention. The protection scope of the present invention shall be based on what is defined in the claims.

Claims

1. A method for identifying fake apps based on metadata and code features, characterized in that: The following steps are involved: Get the App's metadata from the App Store and pre-process it; Differentiate between apps with user reviews and apps without user reviews based on metadata; For apps with user reviews, filter out suspicious apps based on whitelists and regular rules; For the remaining apps with user reviews, candidate suspicious apps are filtered out based on the consistency of phrase similarity between the app’s declared functions and actual functions; For apps without user reviews and candidate suspicious apps, a recommendation relationship graph is constructed based on the recommendation relationship between apps. In the graph, nodes represent apps and edges represent the recommendation relationship between apps. Assign declared category set and actual category set attributes to the nodes in the graph. If there is no intersection between the declared category set and the actual category set, the App corresponding to the node is determined to be a suspicious App. The similarity between the code structure and code content of the family representatives in the suspicious app and disguised app sample library is calculated, and the similarity is spliced ​​with the statistical features of the code content of the suspicious app and input into the random forest classifier for classification to identify disguised apps and benign apps.

2. The method according to claim 1, characterized in that The metadata of an app includes its name, category, application description, recommendation relationship, and user comments. Preprocessing refers to removing redundant information irrelevant to the function from the application description and user comments, and then performing word segmentation and filtering of stop words.

3. The method according to claim 1, characterized in that The steps to filter out suspicious apps based on whitelist and regular rules include: Use whitelist to filter out top-ranked apps; Based on regular rules, apps that provide movie, comic, music, and book resources are screened out, and then comments containing pirated resources are screened out. Apps with multiple such comments are identified as suspicious apps.

4. The method according to claim 1, characterized in that The steps of filtering out candidate suspicious apps based on the consistency of phrase similarity between the declared functions and actual functions of the apps include: Use LDA to identify different topics for the app description phrases, extract the subject words belonging to each topic and their occurrence probability, and build a subject word list. The subject words in the subject word list are used as the declared functions of the App. For each app’s user reviews, we use LDA to identify several topics and select the keywords with probabilities above the threshold. Then, we calculate the average probability of the selected keywords in all topics and take the keywords with average probabilities above the threshold as the actual functions of the app. The two groups of keywords of the App's declared functions and actual functions are vectorized using Word2Vec, and then the average similarity, similarity of similar words and similarity of high-frequency words between the two groups of word vectors are calculated. Among them, cosine similarity refers to the average value of the cosine similarities between the two groups of word vectors, similarity of similar words refers to the average value of the first multiple cosine similarities between the two groups of word vectors arranged in descending order of similarity, and high-frequency word similarity refers to the average value of the first multiple cosine similarities between the two groups of word vectors arranged in descending order of frequency of occurrence; if at least two of the similarities are less than the preset threshold, it is determined to be a candidate suspicious App.

5. The method according to claim 1, characterized in that The steps of assigning a set of declaration categories to nodes in the recommendation relationship graph include: The word vectors of the App's declared functions are used as features to train a random forest classifier to classify nodes, and the basic probability vectors of the App's declared functions belonging to multiple categories are obtained; The basic probability vector is fine-tuned according to the name of the App and its category in the app store, and finally the probability vector of the App's declared functions belonging to each category is obtained. The categories with probabilities greater than the threshold are added to the declared category set of the corresponding node of the App.

6. The method according to claim 5, characterized in that The steps to fine-tune the base probability vector based on the app’s name and its category in the app store include: Select keywords that represent the characteristics of each category and generate a one-hot category probability vector for each keyword. For each app, extract keywords in the app name that are similar to the keywords selected above, average the category probability vectors of the extracted keywords, and obtain a name-based probability vector. According to the correspondence between the categories in the app store and the declared function categories, a probability vector for each category in the app store is set; for each App, a probability vector based on the store category is generated according to the category to which it belongs in the app store; The basic probability vector of the App, the probability vector based on the name, and the probability vector based on the store category are weighted to obtain the final category probability vector.

7. The method according to claim 1, characterized in that The steps of assigning actual category set attributes to nodes in the recommendation relationship graph include: Initialize the feature vector of the node to the word vector of the actual function of the App. If the App corresponding to the node has no comments, initialize it randomly. A three-layer graph convolutional network is used to process the feature vectors of the nodes, and the nodes are classified to obtain the probability vector representing that the actual functions of the App belong to each category. The categories with probabilities greater than the threshold are added to the actual category set of the corresponding nodes of the App.

8. The method according to claim 1, characterized in that The steps for calculating the similarity between the code structure and code content of the suspicious app and the family representatives in the disguised app sample library include: Extract the binary file from the suspicious app’s IPA file; Obtain an App sample library, which contains 23 disguised App families, each family containing one representative; extract the representatives of the 23 disguised App families as 23 disguised App samples; Use IDA Pro's BinDiff plug-in to calculate the similarity between the suspicious app and 23 disguised app samples, and obtain 23-dimensional code structure similarity; Use the String instruction to extract static strings from the binary file of the suspicious App, from which the App's used frameworks and visited URLs are extracted. The Jaccard similarity coefficients of the suspicious App and 23 disguised App samples in static strings, used frameworks, and visited URLs are calculated to obtain three 23-dimensional code content similarities.

9. The method according to claim 1, characterized in that The statistical features of the code content of suspicious apps include: the number of static strings in the suspicious app code, the number of non-repeating static strings, the number of static strings with a length greater than 5, the number of static strings with a length less than 5, the total length of static strings, the average length of static strings, the number of frames used, the number of URLs visited, the total length of URLs visited, the average length of URLs visited, and the number of domain names visited.

10. A fake App identification system based on metadata and code features, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 9 when executing the computer program.