Automated construction method for Android platform software vulnerability patterns

By combining crawler technology and natural language processing, we define and build Android platform software vulnerability pattern templates, which solves the problem that natural language descriptions cannot be converted into computer language, achieves automated detection and scalability of multiple vulnerability information, and supports new vulnerabilities. detection.

CN111859387BActive Publication Date: 2024-09-24BEIJING HUAYU ZHUOCHENG SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910338044.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-04-25
Publication Date
2024-09-24
Estimated Expiration
2039-04-25

AI Technical Summary

Technical Problem

Existing natural language processing technology cannot convert the description of Android platform software vulnerabilities into computer language, resulting in the inability to automate vulnerability detection.

Method used

Using a method that combines crawler technology and natural language processing, the vulnerability pattern template VP=(C, A, EF, TF, CF, TCT, TT) is defined, and the vulnerability is constructed by crawling relevant information and using natural language processing technology to extract feature data. mode to achieve comprehensive description and detection of multiple vulnerability information.

Benefits of technology

It realizes the transformation from natural language description to computer language, supports automated detection of multiple vulnerability information, has good scalability, and can effectively detect emerging vulnerabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000
    Figure 00000000_0000
Patent Text Reader

Abstract

An automated construction method for an Android platform software vulnerability pattern comprises the following steps: Step 1) defining a vulnerability pattern template VP for software vulnerabilities on the Android platform, VP=(C, A, EF, TF, CF, TCT, TT); Step 2) collecting prior knowledge of a vulnerability v, such as the component where the vulnerability is located, the properties of the component related to the vulnerability, related functions, etc.; Step 3) combining the prior knowledge collected in the previous step, CVE vulnerability descriptions and Android application developer documents, using natural language processing technology to extract feature data related to the vulnerability pattern, and then constructing the vulnerability pattern VPv. The present invention provides a universal vulnerability pattern definition and automated construction method for Android platform software vulnerabilities, realizes a comprehensive description of a variety of vulnerability information, has good scalability, and supports the pattern definition and detection of subsequent new vulnerabilities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an automatic construction method of an Android platform software vulnerability pattern, which is mainly used in the development of an Android platform software vulnerability detection system. Background Art

[0002] Android is a free and open source operating system based on Linux. It is mainly used in mobile devices such as smartphones and tablets, and is led and developed by Google and the Open Handset Alliance. By 2018, there were more than 2.3 billion active Android devices, and the cumulative downloads of apps in the app store reached hundreds of billions. NowSecure's latest research report stated that 25% of mobile applications contain at least one high-risk security vulnerability, and 59% of financial applications on Android expose the top three risks in OWASP mobile risks. These vulnerabilities in Android applications seriously endanger users' data privacy and property security.

[0003] A web crawler is a network robot that automatically browses the World Wide Web (Internet). Its purpose is generally to compile a web index. Web search engines and other sites use crawler software to update their own website content or their index of other websites. Web crawlers can save the pages they visit so that users can further process the collected information.

[0004] Natural language processing is a branch of artificial intelligence and linguistics. This discipline studies how to process and use natural language; natural language processing includes many aspects, including cognition, understanding, generation, etc. Natural language cognition and understanding is to let the computer turn the input language into meaningful symbols and relationships, and then process it according to the purpose.

[0005] The usual vulnerability description method is to describe the cause of the vulnerability, its location, affected scope, vulnerability host introduction, etc. in a unified format through text description. This description method is mainly based on natural text, and the existing natural language processing technology cannot extract a complete formal vulnerability description from it and convert it into computer language to input into the vulnerability detection tool for vulnerability detection. Summary of the invention

[0006] In view of the above reasons, the main purpose of the present invention is to provide an automated construction method for Android platform software vulnerability patterns. The present invention provides a universal vulnerability pattern definition and automated construction method for Android platform software vulnerabilities, realizes a comprehensive description of multiple vulnerability information, has good scalability, and supports the pattern definition and detection of subsequent new vulnerabilities.

[0007] To achieve the above object, the present invention adopts the following technical solution: an automated construction method of Android platform software vulnerability patterns combining crawler technology and natural language processing, the method comprising the following steps:

[0008] Step 1) For software vulnerabilities on the Android platform, define a vulnerability pattern template VP, VP = (C, A, EF, TF, CF, TCT, TT);

[0009] Step 2) For a vulnerability v, collect its prior knowledge, such as the component where the vulnerability is located, the properties of the component related to the vulnerability, related functions, etc.;

[0010] Step 3) Combine the prior knowledge, CVE vulnerability descriptions, and Android application developer documentation collected in the previous step, use natural language processing technology to extract feature data related to the vulnerability pattern, and then construct the vulnerability pattern VPv.

[0011] The advantages of the present invention over the prior art are: the present invention solves the defect that the current vulnerability description method based on natural language cannot be converted into computer language and input into the vulnerability detection tool for vulnerability detection. The present invention provides a universal vulnerability pattern definition and automated construction method for Android platform software vulnerabilities, realizes a comprehensive description of multiple vulnerability information, has good scalability, and supports the pattern definition and detection of subsequent new vulnerabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 Flow chart of the method of the present invention

[0013] Figure 2 The present invention implements the architecture diagram DETAILED DESCRIPTION

[0014] like Figure 1 As shown, the implementation steps of the present invention are as follows:

[0015] 1. For software vulnerabilities on the Android platform, define the vulnerability pattern template VP, VP = (C, A, EF, TF, CF, TCT, TT)

[0016] The present invention defines a general vulnerability pattern VP=(C, A, EF, TF, CF, TCT, TT) according to the causes and attack paths of Android platform software vulnerabilities. C represents the components where the Android platform software vulnerabilities are located, including activities, services, broadcast receivers, content providers, WebView, MediaBrowser, Messagingservices, FileStorage and DownloadManager, etc. These objects almost cover the user-interactive components in Android applications. A is the vulnerability-related attribute of the corresponding component. EF represents a set of vulnerability entry functions, which receive data from users or other Apps. According to the Android application developer documentation, EF usually belongs to C or a component that calls C. These functions can be rewritten by developers and accept input from users or other applications. TF represents a set of vulnerability target functions, which expose the behavior of vulnerability v. They are usually some system functions that perform security-sensitive operations, such as accessing local resources or remote resources. CF represents a set of vulnerability-related functions, and data flowing to TF will pass through these functions. TCT represents a test case template, whose structure is determined by C, A, EF and CF. TCT = {Fa, Fe}, where Fa represents the field value that can be obtained from the App itself, and Fe represents the field value controlled by the attacker, such as a custom malicious link, etc. TT represents the trigger vulnerability template, which is a pre-written App framework used to send test cases and trigger the EF of the target App.

[0017] 2. For a vulnerability v, collect prior knowledge of vulnerability v.

[0018] The present invention uses a crawler to crawl web page information related to vulnerabilities. For building a vulnerability model, a search engine is used to search for the corresponding CVE number. The request link of the corresponding search can be encapsulated into the crawler program. Then the crawler program will obtain the description web page from the URL list of the search results. These web pages may include authoritative websites that introduce various vulnerabilities, as well as blogs for various vulnerability analysis and utilization.

[0019] In order to solve the search engine search times limit, the crawler program of the present invention simulates browser behavior and sends each browser instance to the search engine. The crawler program uses a different user agent for each visit and sleeps at any time after multiple requests. If an access instance fails, we will perform a retransmission operation at the end of the search query queue. The search engine will return a list of URLs for each search query. Based on these lists, we can reduce the scale of crawling websites. Each item in the URL list returned by the browser instance is a complete HTML page. There are many redundant contents in these web pages, such as advertisements, pictures, audio, video, and dynamic scripts. For each web page, the crawler program deletes irrelevant information and retains only text content, including titles, URLs, and code snippets. All crawled data will be used as prior knowledge required for step 3.

[0020] 3. Use natural language processing to extract key vulnerability information and then construct the vulnerability pattern VPv.

[0021] After obtaining the prior knowledge in step 2. Given a vulnerability type, first crawl the CVE and related vulnerability description information of the vulnerability, which is referred to as prior knowledge. The present invention processes the prior knowledge through natural language processing technology, including operations such as word segmentation and stop word removal. And further operations are performed in combination with the CVE vulnerability description and Android application developer document information. The following takes the Android system ContentProvider component file traversal vulnerability as an example to illustrate the vulnerability pattern filling process. In the prior knowledge of the vulnerability, many component entries can be identified through natural language processing technology. The present invention extracts the Android application component with the most occurrences as C. For the ContentProvider file traversal vulnerability, the component is ContentProvider. The relevant attribute description of C is extracted as A, which corresponds to "exported = true" or "protectionLevel = normal" for this vulnerability. According to the Android developer documentation, crawl all related function sets of the C component. Among them, all system functions that perform security-sensitive operations are extracted as TF, which corresponds to the open() function for this vulnerability. Extract all functions that can accept input from users or other applications and can be rewritten by developers as EF. For this vulnerability, the corresponding function is openFile(). Extract all functions that have a data flow relationship with TF as CF. The CF of this vulnerability is empty. For TCT, its structure is determined by C, A, EF, and CF. First, extract the parameter type of EF as the type of TCT, such as Uri. Secondly, determine the main component structure of TCT based on C and A, that is, each A corresponds to a TCT field, and each field reflects the meaning of A. In CF, extract all function parameters that obtain data from EF as fields of TCT. Dynamically splice the above fields to form TCT. For this vulnerability, TCT is content: / / <authority> / <path> According to EF and Android developer documentation, the code logic that triggers EF is extracted as the main part of TT, in which TCT is used as the parameter to trigger the EF function. Thus, the vulnerability pattern VPv is constructed.< / path> < / authority>

Claims

1. An automated construction method for Android platform software vulnerability patterns, characterized in that The following steps are taken: Step 1) for the software vulnerability on the Android platform, a vulnerability pattern template VP is defined, VP = (C, A, EF, TF, CF, TCT, TT); wherein C represents the component where the Android platform software vulnerability is located, A is the vulnerability-related attribute of the corresponding component, EF represents the set of vulnerability entry functions, which receive data from users or other Apps, TF represents the set of vulnerability target functions, which will expose the behavior of the vulnerability v, CF represents the set of vulnerability-related functions, and the data flowing to TF will pass through these functions, TCT represents the test case template, and TT represents the trigger template, which is a pre-written App framework; Step 2) For a vulnerability v, collect its prior knowledge, including but not limited to the component where the vulnerability is located, the properties of the component related to the vulnerability, and related functions; Step 3) Combine the prior knowledge collected in the previous step, CVE vulnerability descriptions and Android application developer documentation, use natural language processing technology to extract feature data related to the vulnerability pattern, and then construct the vulnerability pattern VPv; specifically: process the prior knowledge of the previous step through natural language processing technology, including but not limited to word segmentation and stop word removal operations; then identify the key content required for the vulnerability pattern through named entity matching technology; in the prior knowledge of the vulnerability, extract the user-interactive Android application component as C, and extract the relevant attribute description of C as A; crawl all related function sets of C component according to Android developer documentation; among them, extract all system functions that perform security-sensitive operations as TF, and extract all functions that can Functions that accept input from users or other applications and can be rewritten by developers are extracted as EF, and all functions that have a data flow relationship with TF are extracted as CF; for TCT, its structure is determined by C, A, EF, and CF: first, the parameter type of EF is extracted as the type of TCT; secondly, the main component structure of TCT is determined based on C and A, that is, each A corresponds to a TCT field, and each field reflects the meaning of A; in CF, all function parameters that obtain data from EF are extracted as TCT fields; the above fields are dynamically spliced ​​to form TCT; according to EF and Android developer documentation, the code logic that triggers EF is extracted as the main part of TT, in which TCT is used as the parameter to trigger the EF function; thus, the vulnerability pattern VPv is constructed.

2. The method for automatically constructing an Android platform software vulnerability model according to claim 1, characterized in that: Step 2) For a vulnerability v, collect prior knowledge, including but not limited to the component where the vulnerability is located, the properties of the component related to the vulnerability, and related functions; for the vulnerability pattern to be constructed, use a search engine to search for the corresponding CVE number, and encapsulate the corresponding search request link into the crawler program; The crawler then obtains the description web page from the URL list of the search results; finally, the description web page is preliminarily processed to obtain a priori knowledge set.