CN105631325A - Malicious application detection method and apparatus - Google Patents

Malicious application detection method and apparatus Download PDF

Info

Publication number
CN105631325A
CN105631325A CN201410610791.XA CN201410610791A CN105631325A CN 105631325 A CN105631325 A CN 105631325A CN 201410610791 A CN201410610791 A CN 201410610791A CN 105631325 A CN105631325 A CN 105631325A
Authority
CN
China
Prior art keywords
api
sending
user information
execution parameters
execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410610791.XA
Other languages
Chinese (zh)
Other versions
CN105631325B (en
Inventor
张二鹏
彭华熹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201410610791.XA priority Critical patent/CN105631325B/en
Publication of CN105631325A publication Critical patent/CN105631325A/en
Application granted granted Critical
Publication of CN105631325B publication Critical patent/CN105631325B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a malicious application detection method and apparatus, which are used for improving the accuracy of malicious application detection. According to whether a message is sent or not, an API is divided into a sending type API and a non sending type API. The method comprises the steps of extracting all user information in a mobile terminal; obtaining parameter variables of APIs contained in an application installed in the mobile terminal, wherein the parameter variables include an execution parameter or the execution parameter and a result variable; and matching the obtained execution parameter of the sending type API with all the extracted user information or the obtained result variable of the non sending type API, and determining whether the application is a malicious application or not according to a matching result.

Description

一种恶意应用程序检测方法和装置A malicious application detection method and device

技术领域technical field

本发明涉及智能终端应用安全技术领域,尤其涉及一种恶意应用程序检测方法和装置。The present invention relates to the technical field of smart terminal application security, in particular to a method and device for detecting malicious application programs.

背景技术Background technique

随着移动互联网的迅速发展以及智能移动终端的增多,移动终端上相应的恶意应用程序威胁也逐渐增多。由于Android平台的开放性以及Android应用由JAVA语言开发,相对来说反编译分析和逆向修改较为容易,同时Android应用研发的门槛较低,直接导致了Android平台恶意应用程序的泛滥。With the rapid development of the mobile Internet and the increase of smart mobile terminals, the corresponding threats of malicious applications on mobile terminals are also gradually increasing. Due to the openness of the Android platform and the development of Android applications in the JAVA language, it is relatively easy to decompile, analyze and reverse modify. At the same time, the threshold for developing Android applications is low, which directly leads to the proliferation of malicious applications on the Android platform.

目前主流的移动终端恶意应用程序中,大多数的恶意应用程序都存在搜集获取用户敏感信息等恶意行为,如通讯录信息、通话记录、短信信息、银行账户信息、位置信息等,部分恶意应用程序对这些信息进行加密,然后向远程服务器(或目标移动终端)发送搜集的用户敏感信息,数据加密增加了对应用程序的恶意行为进行分析的难度。Among the current mainstream mobile terminal malicious applications, most malicious applications have malicious behaviors such as collecting and obtaining user sensitive information, such as address book information, call records, SMS information, bank account information, location information, etc. Some malicious applications The information is encrypted, and then the collected user sensitive information is sent to the remote server (or the target mobile terminal). Data encryption increases the difficulty of analyzing the malicious behavior of the application.

目前针对移动终端中的恶意应用程序以及互联网病毒的恶意行为分析,主要采用的手段有:At present, for the analysis of malicious behaviors of malicious applications in mobile terminals and Internet viruses, the main methods used are:

1)对恶意应用程序进行静态分析。1) Static analysis of malicious applications.

主要是通过对Android应用程序进行逆向、反编译生成Smali代码或反汇编生成JAVA源码,然后对反编译代码进行全文遍历、解析,将应用程序使用的API(应用程序编程接口,ApplicationProgramInterface)与预定义恶意行为库中的API进行匹配,将匹配成功的应用程序的API标记为恶意行为API,同时扫描应用程序权限信息,与预定义的危险权限库中记载的权限信息进行匹配,结合标记的恶意行为API判定待测应用程序是否为恶意应用程序。由于其只检测到了应用程序的具体行为,无法检测出行为本身具体的操作内容,例如,只能检测到发短信的行为,无法检测到发送短信的内容,这使得恶意应用程序检测准确性较低,同时该方法也只能检测到已知的恶意行为。Mainly generate Smali code or JAVA source code by decompilation through reverse engineering and decompilation of Android applications, and then perform full-text traversal and analysis on the decompiled codes, and combine the API (Application Programming Interface, ApplicationProgramInterface) used by the application with the predefined The API in the malicious behavior library is matched, and the API of the successfully matched application is marked as a malicious behavior API. At the same time, the application permission information is scanned, and the permission information recorded in the predefined dangerous permission library is matched. Combined with the marked malicious behavior The API determines whether the application under test is a malicious application. Because it only detects the specific behavior of the application, it cannot detect the specific operation content of the behavior itself. For example, it can only detect the behavior of sending text messages, but cannot detect the content of the sent text messages, which makes the detection accuracy of malicious applications low. , and this method can only detect known malicious behaviors.

2)对恶意应用程序在沙箱中进行养殖,采集并分析恶意应用程序发送的网络数据包,确定其恶意行为,这种方法只能分析恶意应用程序使用明文发送的数据包,而对于加密数据包无能为力,因此其也无法准确检测到移动终端中存在的恶意应用程序。2) Breed malicious applications in the sandbox, collect and analyze network data packets sent by malicious applications, and determine their malicious behavior. This method can only analyze data packets sent by malicious applications in plain text, while encrypted data There is nothing the package can do, so it cannot accurately detect malicious applications that exist in the mobile terminal.

发明内容Contents of the invention

本发明实施例提供一种恶意应用程序检测方法和装置,用以提高恶意应用程序检测的准确性。Embodiments of the present invention provide a malicious application program detection method and device, which are used to improve the accuracy of malicious application program detection.

本发明实施例提供一种恶意应用程序检测方法,包括:An embodiment of the present invention provides a malicious application detection method, including:

提取移动终端中的所有用户信息;Extract all user information in the mobile terminal;

获取移动终端安装的应用程序所包含的各应用程序编程接口API的参数变量,所述参数变量包括执行参数,或者,执行参数和结果变量,其中,各API根据是否发送消息,被划分为发送类API和非发送类API;Obtain the parameter variables of each application programming interface API included in the application program installed in the mobile terminal, the parameter variables include execution parameters, or execution parameters and result variables, wherein each API is divided into sending classes according to whether to send messages API and non-sending API;

将获取的发送类API的执行参数与提取的所有用户信息或者获取的非发送类API的结果变量进行匹配,根据匹配结果确定所述应用程序是否为恶意应用程序。Match the obtained execution parameters of the sending API with all the extracted user information or the obtained result variables of the non-sending API, and determine whether the application is a malicious application according to the matching result.

本发明实施例提供一种恶意应用程序检测装置,包括:An embodiment of the present invention provides a malicious application detection device, including:

提取单元,用于提取移动终端中的所有用户信息;an extracting unit, configured to extract all user information in the mobile terminal;

获取单元,用于获取移动终端安装的应用程序所包含的各应用程序编程接口API的参数变量,所述参数变量包括执行参数,或者,执行参数和结果变量,其中,各API根据是否发送消息,被划分为发送类API和非发送类API;The obtaining unit is used to obtain the parameter variables of each application programming interface API included in the application program installed on the mobile terminal, the parameter variables include execution parameters, or execution parameters and result variables, wherein each API depends on whether to send a message, Divided into sending API and non-sending API;

确定单元,用于将获取的发送类API的执行参数与提取的所有用户信息或者获取的非发送类API的结果变量进行匹配,根据匹配结果确定所述应用程序是否为恶意应用程序。The determining unit is configured to match the obtained execution parameters of the sending API with all the extracted user information or the obtained result variables of the non-sending API, and determine whether the application is a malicious application according to the matching result.

本发明实施例提供的恶意应用程序检测方法和装置,将API划分为发送类API和非发送类API,对于应用程序包含的发送类API,将其执行参数与提取的移动终端中的用户信息匹配,或者将其与非发送类API的结果变量进行匹配,根据匹配结果确定应用程序是否为恶意程序。上述过程中,可以根据发送类API的执行参数从非发送类API中追溯到该执行参数在被处理之前的原始信息,因此,即使应用程序将获取的用户信息进行加密等处理,也能够确定出其是否为恶意应用程序,从而,提高了应用程序检测的确定性。The malicious application detection method and device provided by the embodiments of the present invention divide APIs into sending APIs and non-sending APIs, and match the execution parameters of the sending APIs included in the application with the extracted user information in the mobile terminal , or match it with the result variable of the non-sending API, and determine whether the application program is a malicious program according to the matching result. In the above process, according to the execution parameters of the sending API, the original information of the execution parameters before being processed can be traced from the non-sending API. Therefore, even if the application program encrypts the obtained user information, it can also be determined. Whether it is a malicious application program, thereby improving the certainty of application program detection.

本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.

附图说明Description of drawings

此处所说明的附图用来提供对本发明的进一步理解,构成本发明的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described here are used to provide a further understanding of the present invention, and constitute a part of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention, and do not constitute improper limitations to the present invention. In the attached picture:

图1a为本发明实施例中,恶意应用程序检测方法的实施流程示意图;FIG. 1a is a schematic diagram of the implementation flow of a malicious application program detection method in an embodiment of the present invention;

图1b为本发明实施中,确定应用程序是否为恶意应用程序的实施流程示意图;Fig. 1b is a schematic diagram of an implementation flow for determining whether an application is a malicious application during the implementation of the present invention;

图2为本发明实施例中,发送类API的执行参数与提取的用户信息进行匹配的示意图;2 is a schematic diagram of matching the execution parameters of the sending API with the extracted user information in an embodiment of the present invention;

图3为本发明实施例中,递归查找目标API的实施流程示意图;FIG. 3 is a schematic diagram of an implementation process of recursively searching for a target API in an embodiment of the present invention;

图4为本发明实施例中,恶意应用程序检测装置的结构示意图。FIG. 4 is a schematic structural diagram of an apparatus for detecting malicious applications in an embodiment of the present invention.

具体实施方式detailed description

为了提高恶意应用程序检测方法的准确性,本发明实施例中,提取移动终端中用户信息,结合对应用程序包含的API的分析结果来判断移动终端安装的应用程序是否为恶意应用程序。In order to improve the accuracy of the malicious application detection method, in the embodiment of the present invention, the user information in the mobile terminal is extracted, and combined with the analysis result of the API included in the application, it is judged whether the application installed in the mobile terminal is a malicious application.

以下结合说明书附图对本发明的优选实施例进行说明,应当理解,此处所描述的优选实施例仅用于说明和解释本发明,并不用于限定本发明,并且在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。The preferred embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described here are only used to illustrate and explain the present invention, and are not intended to limit the present invention, and in the absence of conflict, the present invention The embodiments and the features in the embodiments can be combined with each other.

由于移动终端中的恶意应用程序通常具有以下明显的特征:搜集移动终端上的用户信息,并将搜集的用户信息发送给远程服务器或者目标移动终端。因此,根据API是否发送信息,将API划分为发送类API和非发送类API并标记,如表1所示。Malicious application programs in mobile terminals usually have the following obvious features: collecting user information on the mobile terminal, and sending the collected user information to a remote server or a target mobile terminal. Therefore, according to whether the API sends information, APIs are divided into sending APIs and non-sending APIs and marked, as shown in Table 1.

表1Table 1

具体实施时,发送类API包括以任何方式发送信息的API,例如,以短信方式发送信息、以蓝牙方式发送信息或者以网络数据包方式发送信息等等。非发送类API包括除发送类API以外的API,例如,可以是读取信息的API,包括读取短信信息、通话记录信息、通讯录信息、位置信息等,还可以是加密的API。During specific implementation, the sending APIs include APIs for sending information in any way, for example, sending information in the form of SMS, sending information in the form of bluetooth, or sending information in the form of network data packets, and so on. Non-sending APIs include APIs other than sending APIs. For example, they can be APIs for reading information, including reading SMS information, call record information, address book information, location information, etc., and can also be encrypted APIs.

基于此,本发明实施例中,在进行恶意应用程序检测时,主要检测发送类API发送的信息是否为移动终端上的用户信息。如图1a所示,为本发明实施例提供的恶意应用程序检测方法的实施流程示意图,包括以下步骤:Based on this, in the embodiment of the present invention, when detecting malicious applications, it is mainly detected whether the information sent by the sending API is user information on the mobile terminal. As shown in Figure 1a, it is a schematic diagram of the implementation flow of the malicious application detection method provided by the embodiment of the present invention, including the following steps:

S11、提取移动终端中的所有用户信息。S11. Extract all user information in the mobile terminal.

其中,提取的用户信息可以包括短信信息、通话记录信息、通讯录信息、位置信息等移动终端上与用户有关的信息。Wherein, the extracted user information may include short message information, call record information, address book information, location information and other information related to the user on the mobile terminal.

较佳的,为了便于后续比较,可以为提取的每一用户信息分配一信息标识,如表2所示:Preferably, in order to facilitate subsequent comparisons, an information identifier can be assigned to each extracted user information, as shown in Table 2:

表2Table 2

信息内容information 信息标识information identification 短信信息SMS message ID1ID1 通话记录信息call log information ID2ID2 位置信息location information ID3ID3 ……... ……...

S12、获取移动终端安装的应用程序所包含的各API的参数变量。S12. Obtain parameter variables of each API included in the application program installed on the mobile terminal.

需要说明的是,API的类别不同,获取的API的参数变量也不同,例如,对于发送类API来说,其参数变量包括执行参数,即发送的信息内容,而对于非发送类的API来说,其参数变量可能包括执行参数和结果变量。但不限于此,在实际应用中,也有可能发送类API的参数变量也同时包括执行参数和结果变量。It should be noted that the parameter variables of the acquired API are different for different types of APIs. For example, for sending APIs, the parameter variables include execution parameters, that is, the content of the sent information, while for non-sending APIs , whose parameter variables may include execution parameters and result variables. But not limited thereto, in practical applications, it is also possible to send the parameter variables of the API-like to include execution parameters and result variables at the same time.

具体的,步骤S12可以按照以下步骤实施:Specifically, step S12 can be implemented according to the following steps:

步骤一、对应用程序进行逆向反编译,得到其对应的源码。Step 1: Perform reverse decompilation on the application program to obtain its corresponding source code.

具体实施时,对应用程序安装包(扩展名为.apk的文件)进行逆向反编译,得到smali源码。During specific implementation, the application installation package (the file with the extension .apk) is reversely decompiled to obtain the smali source code.

步骤二、根据源码获取该应用程序包含的各API的参数变量。Step 2: Obtain the parameter variables of each API included in the application program according to the source code.

具体实施时,可以针对每一API,分别在源码中、该API执行前和执行后插入标记代码,所述标记代码包括API分类标记代码;记录每一API的执行信息,根据该API的执行信息和该API的标记代码,获取该API的类别和该API的参数变量。可以通过用于记录各API的执行信息的日志,获取各API的参数变量,并输出记录各API的执行信息的日志。During specific implementation, for each API, markup codes can be inserted in the source code, before and after execution of the API, the markup codes include API classification markup codes; record the execution information of each API, according to the execution information of the API and the markup code of the API to obtain the category of the API and the parameter variables of the API. The parameter variable of each API can be obtained through the log used to record the execution information of each API, and the log recording the execution information of each API can be output.

较佳的,利用获得的smali源码,可以采用以下方式输出应用程序中包含的各API的执行参数或者结果变量:扫描smali源码中包含的所有API,针对每一API,在该API执行前和执行后插入标记代码,其中包括API分类标记代码;并将逆向的源码重打包后运行,输出运行结果即为API的变量参数,具体实施时,可以使用输出日志的方式进行输出,如下所示:Preferably, by using the obtained smali source code, the execution parameters or result variables of each API contained in the application program can be output in the following manner: scan all APIs contained in the smali source code, and for each API, before and after execution of the API Then insert the markup code, including the API classification markup code; repackage the reversed source code and run it, and the output operation result will be the variable parameters of the API. When implementing it, you can use the output log to output, as shown below:

Uriuri=Uri.parse(AllFinalInfo.SMS_URI_INBOX);Uriuri = Uri.parse(AllFinalInfo.SMS_URI_INBOX);

SmsContentsc=newSmsContent(this,uri);SmsContentsc = newSmsContent(this, uri);

Log.v(tag,API名称+API分类标记+代码位置);Log.v(tag, API name + API classification mark + code position);

List<SmsInfo>infos=sc.getSmsInfo();List<SmsInfo>infos=sc.getSmsInfo();

body.setText(infos.get(position).getSmsbody());body.setText(infos.get(position).getSmsbody());

name.setText(infos.get(position).getName());name.setText(infos.get(position).getName());

log.v(tag,infos.get(position).getSmsbody());log.v(tag, infos.get(position).getSmsbody());

log.v(tag,infos.get(position).getSmsbody());log.v(tag, infos.get(position).getSmsbody());

Log.v(tag,API名称);Log.v(tag, API name);

以发送类API为例,其执行参数是指API发送的信息内容,而对于加密API来说,其执行参数为待加密的原信息,而结果变量为加密后的加密信息。Taking the sending API as an example, the execution parameter refers to the content of the information sent by the API, while for the encryption API, the execution parameter is the original information to be encrypted, and the result variable is the encrypted encrypted information.

需要说明的是,步骤S11和步骤S12并无先后执行顺序,步骤S12也可以先于步骤S11执行,两个步骤也可以同时执行。It should be noted that step S11 and step S12 are not performed sequentially, step S12 may also be performed prior to step S11, and the two steps may also be performed simultaneously.

S13、将获取的发送类API的执行参数与提取的所有用户信息或者获取的非发送类API的结果变量进行匹配,根据匹配结果确定所述应用程序是否为恶意应用程序。S13. Match the acquired execution parameters of the sending API with all the extracted user information or the obtained result variables of the non-sending API, and determine whether the application is a malicious application according to the matching result.

较佳的,如图1b所示,步骤S13中,可以按照以下步骤实施:Preferably, as shown in Figure 1b, in step S13, it can be implemented according to the following steps:

S131、针对应用程序包含的每一发送类API,判断提取的用户信息中是否存在与该发送类API的执行参数匹配的用户信息,如果是,执行步骤S132,否则执行步骤S133。S131. For each sending API included in the application program, determine whether there is user information matching the execution parameters of the sending API in the extracted user information, if yes, execute step S132, otherwise execute step S133.

如图2所示,为将发送类API的执行参数与提取的用户信息进行匹配的示意图。以发送类API1为例,按照为用户信息分配的信息标识的顺序,依次比较API1的执行参数与提取的每一用户信息,如果其执行参数与当前比较的用户信息相同,则确定提取的用户信息中存在与API1的执行参数匹配的用户信息。如果遍历所有的用户信息之后发现,API1的执行参数与提取的每一用户信息均不相同,则确定提取的用户信息中不存在与API1的执行参数匹配的用户信息。假设API1的执行参数与信息标识为ID1的用户信息相同,则确定提取的用户信息中存在与API1的执行参数匹配的用户信息,即信息标识为ID1的用户信息。As shown in FIG. 2 , it is a schematic diagram of matching the execution parameters of the sending API with the extracted user information. Taking the sending API1 as an example, according to the order of the information identification assigned to the user information, compare the execution parameters of API1 with each extracted user information in turn, and if the execution parameters are the same as the currently compared user information, determine the extracted user information User information matching the execution parameters of API1 exists in . If it is found after traversing all the user information that the execution parameters of API1 are different from each extracted user information, it is determined that there is no user information matching the execution parameters of API1 among the extracted user information. Assuming that the execution parameters of API1 are the same as the user information whose information identifier is ID1, it is determined that there is user information matching the execution parameters of API1 in the extracted user information, that is, the user information whose information identifier is ID1.

S132、确定该应用程序为恶意应用程序,流程结束。S132. Determine that the application program is a malicious application program, and the process ends.

S133、根据该发送类API的执行参数和该应用程序包含的非发送类API的结果变量,从非发送类API中递归查找是否存在执行参数与提取的用户信息匹配的非发送类API,如果是,执行步骤S132,否则,流程结束。S133. According to the execution parameters of the sending API and the result variables of the non-sending API included in the application, recursively search from the non-sending APIs whether there is a non-sending API whose execution parameters match the extracted user information, if yes , execute step S132, otherwise, the process ends.

需要说明的是,具体实施时,需要遍历应用程序包含的每一API,只要有一个API满足上述条件,即可确定该应用程序为恶意应用程序,只有所有的API均不满足上述条件,才可确定该应用程序不是恶意应用程序。It should be noted that, during the specific implementation, it is necessary to traverse each API contained in the application program. As long as there is one API that meets the above conditions, the application program can be determined to be a malicious application program. Only when all APIs do not meet the above conditions can the Make sure the app is not malicious.

如图3所示,在步骤S133中,可以按照以下方法在非发送类API中递归查找是否存在与执行参数与提取的用户信息匹配的非发送类API,为了便于描述,图3中将发送类API称为源API:As shown in Figure 3, in step S133, it can be recursively searched in the non-sending API according to the following method to see if there is a non-sending API that matches the execution parameters and the extracted user information. The API is called the source API:

S31、在非发送类API中查找是否存在结果变量与源API的执行参数一致的目标API,如果存在,执行步骤S32,否则,执行步骤S35。S31. Search whether there is a target API whose result variable is consistent with the execution parameters of the source API among the non-sending APIs. If yes, execute step S32; otherwise, execute step S35.

S32、判断目标API的执行参数是否与提取的至少一个用户信息匹配,如果是,执行步骤S33,否则,执行步骤S34。S32. Determine whether the execution parameter of the target API matches the extracted at least one user information, if yes, perform step S33, otherwise, perform step S34.

S33、确定非发送类API中存在执行参数与提取的用户信息匹配的非发送类API,流程结束。S33. It is determined that there is a non-sending API whose execution parameters match the extracted user information among the non-sending APIs, and the process ends.

S34、确定目标API为源API,并执行步骤S31。S34. Determine that the target API is the source API, and execute step S31.

S35、确定包含源API的应用程序不是恶意应用程序。S35. Determine that the application program containing the source API is not a malicious application program.

由上述流程可知,本发明实施例中,如果目标API的执行参数与提取的所有用户信息均不匹配时,则继续根据该目标API的执行参数查找非发送类API的结果变量中是否存在与其执行参数一致的非发送类API,直至遍历所有的非发送类API,如果仍然未查找到,则可以确定源API所在的应用程序不是恶意应用程序,即其发送的信息不是移动终端中的用户信息。As can be seen from the above process, in the embodiment of the present invention, if the execution parameters of the target API do not match all the extracted user information, then continue to search for the result variable of the non-sending API according to the execution parameters of the target API. Non-sending APIs with consistent parameters, until all non-sending APIs are traversed, if still not found, it can be determined that the application where the source API is located is not a malicious application, that is, the information it sends is not user information in the mobile terminal.

为了更好的理解本发明实施例中,以下以图2中的发送类API2为例对本发明实施例的实施过程进行说明。图2中,发送类API2包含两个执行参数,假设分别为A1和A2,即API1发送的信息为A1和A2。In order to better understand the embodiment of the present invention, the implementation process of the embodiment of the present invention will be described below by taking the sending API2 in FIG. 2 as an example. In Fig. 2, the sending class API2 includes two execution parameters, which are assumed to be A1 and A2 respectively, that is, the information sent by API1 is A1 and A2.

对于A1来说,假设提取的用户信息中不存在与其匹配的用户信息,即API2发送的信息A1可能是被处理后的信息。则还需要从非发送类API中查找结果变量为A1的API,假设为非发送类API1,此时,需要判断A1被处理之前的信息即非发送类API1的执行参数是否与提取的至少一个用户信息匹配,假设匹配到信息标识为ID2的用户信息,也就是说API2发送的信息为被处理后的用户信息,因此,可以确定包含API2的应用程序为恶意应用程序。For A1, it is assumed that there is no matching user information among the extracted user information, that is, the information A1 sent by API2 may be processed information. It is also necessary to find the API whose result variable is A1 from the non-sending APIs, assuming it is a non-sending API1. At this time, it is necessary to judge whether the information before A1 is processed, that is, whether the execution parameters of the non-sending API1 are consistent with the extracted at least one user For information matching, it is assumed that the user information whose information identifier is ID2 is matched, that is to say, the information sent by API2 is processed user information. Therefore, it can be determined that the application program containing API2 is a malicious application program.

对于A2来说,假设提取的用户信息中不存在与其匹配的用户信息,即API2发送的信息A2也可能是被处理后的信息。则还需要从非发送类API中查找结果变量为A2的API,假设为非发送类API1,此时,需要判断A2被处理之前的信息即非发送类API1的执行参数B1是否与提取的至少一个用户信息匹配,假设不匹配,B1还可能是被处理之后的信息,因此,继续在非发送类API中查找结果变量为B1的非发送类API,假设非发送类API2的结果变量为B1,则判断非发送类API2的执行参数(即B2被处理之前的信息)是否与至少一个用户信息匹配,如果匹配,确定包含发送类API2的应用程序为恶意应用程序。具体实施时,如果仍不匹配,则在非发送类API中继续递归查找,直至遍历所有的非发送类API为止。For A2, it is assumed that there is no matching user information in the extracted user information, that is, the information A2 sent by API2 may also be processed information. It is also necessary to find the API whose result variable is A2 from the non-sending APIs, assuming it is a non-sending API1. At this time, it is necessary to judge whether the information before A2 is processed, that is, the execution parameter B1 of the non-sending API1 is consistent with at least one of the extracted The user information matches, assuming they do not match, B1 may be processed information, so continue to search for the non-sending API with the result variable B1 in the non-sending API, assuming that the result variable of the non-sending API2 is B1, then Determine whether the execution parameters of the non-sending API2 (ie, the information before B2 is processed) match at least one user information, and if so, determine that the application containing the sending API2 is a malicious application. During specific implementation, if there is still no match, the recursive search is continued in the non-sending API until all non-sending APIs are traversed.

由此可见,本发明实施例中,即使恶意应用程序将用户信息进行多次处理之后再进行发送,根据上述流程,依然能够追溯到原始的用户信息,从而能够准确检测出该应用程序是否为恶意应用程序。It can be seen that in the embodiment of the present invention, even if the malicious application program processes the user information multiple times before sending it, according to the above process, the original user information can still be traced back, so that it can be accurately detected whether the application program is malicious or not. application.

本发明实施例中,对于应用程序包含的发送类API,如果其执行参数与提取的移动终端中的用户信息匹配,则直接确定该应用程序为恶意应用程序,否则,根据其执行参数和非发送类API的结果变量,在非发送类中递归查找执行参数与提取的用户信息匹配的非发送类API,如果查找到,则确定该应用程序为恶意应用程序。上述过程中,如果发送类API的执行参数与提取的用户信息不匹配时,也可以从非发送类API中追溯到该执行参数在被处理之前的原始信息,因此,即使应用程序将获取的用户信息进行加密等处理,也能够确定出其是否为恶意应用程序,从而,提高了应用程序检测的确定性。In the embodiment of the present invention, for the sending API included in the application, if its execution parameters match the extracted user information in the mobile terminal, it is directly determined that the application is a malicious application; otherwise, according to its execution parameters and non-sending The result variable of the class API, recursively search the non-sending class API whose execution parameters match the extracted user information in the non-sending class, if found, determine that the application is a malicious application. In the above process, if the execution parameters of the sending API do not match the extracted user information, the original information of the execution parameters before being processed can also be traced from the non-sending API. Therefore, even if the application will obtain the user information By performing encryption and other processing on the information, it is also possible to determine whether it is a malicious application program, thereby improving the certainty of application program detection.

基于同一发明构思,本发明实施例中还提供了一种恶意应用程序检测装置,由于上述装置解决问题的原理与恶意应用程序检测方法相似,因此上述装置的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, a malicious application detection device is also provided in the embodiment of the present invention. Since the problem-solving principle of the above-mentioned device is similar to the malicious application detection method, the implementation of the above-mentioned device can refer to the implementation of the method. No longer.

如图4所示,为本发明实施例提供的恶意应用程序检测装置的结构示意图,包括:As shown in Figure 4, it is a schematic structural diagram of a malicious application detection device provided by an embodiment of the present invention, including:

提取单元41,用于提取移动终端中的所有用户信息;An extracting unit 41, configured to extract all user information in the mobile terminal;

获取单元42,用于获取移动终端安装的应用程序所包含的各应用程序编程接口API的参数变量,所述参数变量包括执行参数,或者,执行参数和结果变量,其中,各API根据是否发送消息,被划分为发送类API和非发送类API;The obtaining unit 42 is used to obtain the parameter variables of each application programming interface API included in the application program installed in the mobile terminal, the parameter variables include execution parameters, or execution parameters and result variables, wherein each API depends on whether to send a message , is divided into sending API and non-sending API;

确定单元43,用于将获取的发送类API的执行参数与提取的所有用户信息或者获取的非发送类API的结果变量进行匹配,根据匹配结果确定所述应用程序是否为恶意应用程序。The determining unit 43 is configured to match the obtained execution parameters of the sending API with all the extracted user information or the obtained result variables of the non-sending API, and determine whether the application is a malicious application according to the matching result.

其中,确定单元43,可以包括:Wherein, the determining unit 43 may include:

判断子单元,用于针对所述应用程序包含的每一发送类API,判断提取的用户信息中是否存在与该发送类API的执行参数匹配的用户信息;A judging subunit, configured to, for each sending API included in the application program, judge whether there is user information matching the execution parameters of the sending API in the extracted user information;

确定子单元,用于在所述判断子单元的判断结果为是时,确定所述应用程序为恶意应用程序;或者用于在查找子单元从非发送类API中查找到执行参数与提取的用户信息匹配的非发送类API时,确定所述应用程序为恶意应用程序;The determining subunit is used to determine that the application program is a malicious application program when the judgment result of the judging subunit is yes; or it is used to find out the execution parameters and extract the user from the non-sending API in the searching subunit When the information matches the non-sending API, it is determined that the application is a malicious application;

查找子单元,用于在所述判断子单元的判断结果为否时,根据所述发送类API的执行参数和所述应用程序包含的非发送类API的结果变量,从非发送类API中递归查找是否存在执行参数与提取的用户信息匹配的非发送类API。The search subunit is used to recurse from the non-sending API according to the execution parameters of the sending API and the result variables of the non-sending API contained in the application program when the judgment result of the judging sub-unit is No Find whether there is a non-sending API whose execution parameters match the extracted user information.

较佳的,查找子单元,可以包括:Preferably, the search for subunits may include:

查找模块,用于根据所述发送类API的执行参数,从所述非发送类API中查找是否存在结果变量与所述发送类API的执行参数一致的目标API;以及用于在判断模块的判断结果为否时,根据目标API的执行参数,从未遍历的非发送类API中继续递归查找是否存在结果变量与目标API的执行参数一致的非发送类API,直至查找到执行参数与提取的用户信息匹配的非发送类API或者遍历所有非发送类API为止;The search module is used to search from the non-transmission API according to the execution parameters of the transmission API to find whether there is a target API whose result variable is consistent with the execution parameters of the transmission API; and for judging in the judgment module When the result is no, according to the execution parameters of the target API, continue to recursively search whether there is a non-sending API whose result variable is consistent with the execution parameters of the target API, until the execution parameters and the extracted user are found Information matching non-sending API or traversing all non-sending APIs;

判断模块,用于在所述查找模块查找到所述目标API时,判断目标API的执行参数否是与提取的至少一个用户信息匹配;A judging module, configured to judge whether the execution parameters of the target API match the extracted at least one user information when the search module finds the target API;

第一确定模块,用于在所述判断模块的判断结果为是时,确定所述非发送类API中存在执行参数与提取的用户信息匹配的非发送类API。The first determining module is configured to determine that there is a non-sending API among the non-sending APIs whose execution parameters match the extracted user information when the judging result of the judging module is yes.

较佳的,获取单元42,可以包括:Preferably, the acquisition unit 42 may include:

逆向反编译子单元,用于对所述应用程序进行逆向反编译,得到所述应用程序对应的源码;The reverse decompilation subunit is used to reversely decompile the application program to obtain the source code corresponding to the application program;

获取子单元,用于根据所述源码获取所述应用程序包含的各API变量参数。The acquiring subunit is configured to acquire various API variable parameters included in the application program according to the source code.

其中,获取子单元,包括:Among them, subunits are obtained, including:

标记模块,用于针对每一API,分别在该所述源码中、该API执行前和执行后插入标记代码,所述标记代码包括API分类标记代码;A marking module, for each API, respectively inserting marking codes in the source code, before and after execution of the API, where the marking codes include API classification marking codes;

记录模块,用于记录每一API的执行信息,根据该API的执行信息和该API的标记代码,获取该API的类别和该API的参数变量。The recording module is used to record the execution information of each API, and obtain the category of the API and the parameter variables of the API according to the execution information of the API and the mark code of the API.

其中,获取子单元,可以用于通过用于记录所述各API的执行信息的日志,获取所述各API的参数变量。Wherein, the acquiring subunit may be configured to acquire parameter variables of each API through a log for recording execution information of each API.

具体实施时,本发明实施例提供的恶意应用程序检测装置,还可以包括:During specific implementation, the malicious application detection device provided in the embodiment of the present invention may also include:

输出单元,用于输出记录各API的执行信息的日志。The output unit is configured to output a log recording execution information of each API.

具体实施时,判断子单元,可以包括:During specific implementation, the judging subunit may include:

比较模块,用于依次比较该发送类的执行参数与提取的每一用户信息;A comparison module, used to sequentially compare the execution parameters of the sending class with the extracted user information;

第二确定模块,用于如果该发送类的执行参数与当前比较的用户信息相同,则确定提取的用户信息中存在与该发送类API的执行参数匹配的用户信息;如果该发送类的执行参数与提取的每一用户信息均不相同,则确定提取的用户信息中不存在与该发送类API的执行参数匹配的用户信息。The second determination module is used to determine that there is user information matching the execution parameters of the sending class API in the extracted user information if the execution parameters of the sending class are the same as the currently compared user information; if the execution parameters of the sending class If it is different from each of the extracted user information, it is determined that there is no user information matching the execution parameters of the sending API among the extracted user information.

为了描述的方便,以上各部分按照功能划分为各模块(或单元)分别描述。当然,在实施本发明时可以把各模块(或单元)的功能在同一个或多个软件或硬件中实现。For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Certainly, when implementing the present invention, the functions of each module (or unit) can be implemented in one or more pieces of software or hardware.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow diagram procedure or procedures and/or block diagram procedures or blocks.

尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While preferred embodiments of the present invention have been described, additional changes and modifications can be made to these embodiments by those skilled in the art once the basic inventive concept is appreciated. Therefore, it is intended that the appended claims be construed to cover the preferred embodiment as well as all changes and modifications which fall within the scope of the invention.

显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and equivalent technologies thereof, the present invention also intends to include these modifications and variations.

Claims (16)

1.一种恶意应用程序检测方法,其特征在于,包括:1. A method for detecting malicious applications, comprising: 提取移动终端中的所有用户信息;Extract all user information in the mobile terminal; 获取移动终端安装的应用程序所包含的各API的参数变量,所述参数变量包括执行参数,或者,执行参数和结果变量,其中,各API根据是否发送消息,被划分为发送类API和非发送类API;Obtain the parameter variables of each API contained in the application program installed on the mobile terminal, the parameter variables include execution parameters, or execution parameters and result variables, wherein each API is divided into sending APIs and non-sending APIs according to whether to send messages Class API; 将获取的发送类API的执行参数与提取的所有用户信息或者获取的非发送类API的结果变量进行匹配,根据匹配结果确定所述应用程序是否为恶意应用程序。Match the obtained execution parameters of the sending API with all the extracted user information or the obtained result variables of the non-sending API, and determine whether the application is a malicious application according to the matching result. 2.如权利要求1所述的方法,其特征在于,将获取的发送类API的执行参数与提取的所有用户信息或者获取的非发送类API的结果变量进行匹配,根据匹配结果确定所述应用程序是否为恶意应用程序,具体包括:2. The method according to claim 1, wherein the obtained execution parameters of the sending API are matched with all the extracted user information or the obtained result variables of the non-sending API, and the application is determined according to the matching result. Whether the program is a malicious application, including: 针对所述应用程序包含的每一发送类API,判断提取的用户信息中是否存在与该发送类API的执行参数匹配的用户信息;For each sending API included in the application program, determine whether there is user information matching the execution parameters of the sending API in the extracted user information; 如果存在,则确定所述应用程序为恶意应用程序;If there is, then determining that the application is a malicious application; 如果不存在,则根据所述发送类API的执行参数和所述应用程序包含的非发送类API的结果变量,从非发送类API中递归查找是否存在执行参数与提取的用户信息匹配的非发送类API;If it does not exist, according to the execution parameters of the sending API and the result variables of the non-sending API included in the application program, recursively search whether there is a non-sending API whose execution parameters match the extracted user information. Class API; 如果存在,确定所述应用程序为恶意应用程序。If there is, it is determined that the application program is a malicious application program. 3.如权利要求2所述的方法,其特征在于,根据所述发送类API的执行参数和所述应用程序包含的非发送类API的结果变量,从非发送类API中递归查找是否存在执行参数与提取的用户信息匹配的非发送类API,具体包括:3. The method according to claim 2, wherein, according to the execution parameters of the sending API and the result variable of the non-sending API included in the application program, it is recursively searched whether there is an execution variable from the non-sending API. Non-sending API whose parameters match the extracted user information, including: 根据所述发送类API的执行参数,从所述非发送类API中查找是否存在结果变量与所述发送类API的执行参数一致的目标API;According to the execution parameters of the sending API, search whether there is a target API whose result variable is consistent with the execution parameters of the sending API from the non-sending API; 如果存在,则判断目标API的执行参数是否与提取的至少一个用户信息匹配;If it exists, it is judged whether the execution parameters of the target API match the extracted at least one user information; 如果是,则确定所述非发送类API中存在执行参数与提取的用户信息匹配的非发送类API;If yes, then determine that there is a non-sending API whose execution parameters match the extracted user information in the non-sending API; 如果否,则根据目标API的执行参数,从未遍历的非发送类API中继续递归查找是否存在结果变量与目标API的执行参数一致的非发送类API,直至查找到执行参数与提取的用户信息匹配的非发送类API或者遍历所有非发送类API为止。If not, according to the execution parameters of the target API, continue to recursively search whether there is a non-sending API whose result variable is consistent with the execution parameters of the target API, until the execution parameters and the extracted user information are found Matching non-sending APIs or traversing all non-sending APIs. 4.如权利要求1所述的方法,其特征在于,获取移动终端安装的应用程序所包含的各应用程序编程接口API的参数变量,具体包括:4. The method according to claim 1, wherein obtaining the parameter variable of each application programming interface API contained in the application program installed in the mobile terminal specifically includes: 对所述应用程序进行逆向反编译,得到所述应用程序对应的源码;performing reverse decompilation on the application program to obtain the source code corresponding to the application program; 根据所述源码获取所述应用程序包含的各API的参数变量。The parameter variables of each API included in the application program are acquired according to the source code. 5.如权利要求4所述的方法,其特征在于,根据所述源码获取所述应用程序包含的各API执行参数变量,具体包括:5. The method according to claim 4, wherein, according to the source code, obtaining each API execution parameter variable contained in the application program specifically includes: 针对每一API,分别在该所述源码中、该API执行前和执行后插入标记代码,所述标记代码包括API分类标记代码;For each API, insert markup codes in the source code, before and after execution of the API, the markup codes include API classification markup codes; 记录每一API的执行信息,根据该API的执行信息和该API的标记代码,获取该API的类别和该API的参数变量。Record the execution information of each API, and obtain the category of the API and the parameter variables of the API according to the execution information of the API and the mark code of the API. 6.如权利要求1至5任一权利要求所述的方法,其特征在于,所述获取移动终端安装的应用程序所包含的各API的参数变量,包括:6. The method according to any one of claims 1 to 5, wherein said acquisition of parameter variables of each API included in the application program installed on the mobile terminal comprises: 通过用于记录所述各API的执行信息的日志,获取所述各API的参数变量。The parameter variables of the various APIs are acquired through the log for recording the execution information of the various APIs. 7.如权利要求6所述的方法,其特征在于,还包括:7. The method of claim 6, further comprising: 输出记录各API的执行信息的日志。Output a log that records the execution information of each API. 8.如权利要求1所述的方法,其特征在于,判断提取的用户信息中是否存在与该发送类API的执行参数匹配的用户信息,具体包括:8. The method according to claim 1, wherein judging whether there is user information matching the execution parameters of the sending API in the extracted user information includes: 依次比较该发送类的执行参数与提取的每一用户信息;Sequentially compare the execution parameters of the sending class with the extracted user information; 如果该发送类的执行参数与当前比较的用户信息相同,则确定提取的用户信息中存在与该发送类API的执行参数匹配的用户信息;If the execution parameters of the sending class are the same as the currently compared user information, it is determined that there is user information matching the execution parameters of the sending class API in the extracted user information; 如果该发送类的执行参数与提取的每一用户信息均不相同,则确定提取的用户信息中不存在与该发送类API的执行参数匹配的用户信息。If the execution parameters of the sending class are different from each of the extracted user information, it is determined that there is no user information matching the execution parameters of the sending class API among the extracted user information. 9.一种恶意应用程序检测装置,其特征在于,包括:9. A device for detecting malicious applications, comprising: 提取单元,用于提取移动终端中的所有用户信息;an extracting unit, configured to extract all user information in the mobile terminal; 获取单元,用于获取移动终端安装的应用程序所包含的各API的参数变量,所述参数变量包括执行参数,或者,执行参数和结果变量,其中,各API根据是否发送消息,被划分为发送类API和非发送类API;The obtaining unit is used to obtain the parameter variables of each API included in the application program installed on the mobile terminal, the parameter variables include execution parameters, or execution parameters and result variables, wherein each API is divided into sending class API and non-send class API; 确定单元,用于将获取的发送类API的执行参数与提取的所有用户信息或者获取的非发送类API的结果变量进行匹配,根据匹配结果确定所述应用程序是否为恶意应用程序。The determining unit is configured to match the obtained execution parameters of the sending API with all the extracted user information or the obtained result variables of the non-sending API, and determine whether the application is a malicious application according to the matching result. 10.如权利要求9所述的装置,其特征在于,所述确定单元,包括:10. The device according to claim 9, wherein the determining unit comprises: 判断子单元,用于针对所述应用程序包含的每一发送类API,判断提取的用户信息中是否存在与该发送类API的执行参数匹配的用户信息;A judging subunit, configured to, for each sending API included in the application program, judge whether there is user information matching the execution parameters of the sending API in the extracted user information; 确定子单元,用于在所述判断子单元的判断结果为是时,确定所述应用程序为恶意应用程序;或者用于在查找子单元从非发送类API中查找到执行参数与提取的用户信息匹配的非发送类API时,确定所述应用程序为恶意应用程序;The determining subunit is used to determine that the application program is a malicious application program when the judgment result of the judging subunit is yes; or it is used to find out the execution parameters and extract the user from the non-sending API in the searching subunit When the information matches the non-sending API, it is determined that the application is a malicious application; 查找子单元,用于在所述判断子单元的判断结果为否时,根据所述发送类API的执行参数和所述应用程序包含的非发送类API的结果变量,从非发送类API中递归查找是否存在执行参数与提取的用户信息匹配的非发送类API。The search subunit is used to recurse from the non-sending API according to the execution parameters of the sending API and the result variables of the non-sending API contained in the application program when the judgment result of the judging sub-unit is No Find whether there is a non-sending API whose execution parameters match the extracted user information. 11.如权利要求10所述的装置,其特征在于,所述查找子单元,具体包括:11. The device according to claim 10, wherein the search subunit specifically comprises: 查找模块,用于根据所述发送类API的执行参数,从所述非发送类API中查找是否存在结果变量与所述发送类API的执行参数一致的目标API;以及用于在判断模块的判断结果为否时,根据目标API的执行参数,从未遍历的非发送类API中继续递归查找是否存在结果变量与目标API的执行参数一致的非发送类API,直至查找到执行参数与提取的用户信息匹配的非发送类API或者遍历所有非发送类API为止;The search module is used to search from the non-transmission API according to the execution parameters of the transmission API to find whether there is a target API whose result variable is consistent with the execution parameters of the transmission API; and for judging in the judgment module When the result is no, according to the execution parameters of the target API, continue to recursively search whether there is a non-sending API whose result variable is consistent with the execution parameters of the target API, until the execution parameters and the extracted user are found Information matching non-sending API or traversing all non-sending APIs; 判断模块,用于在所述查找模块查找到所述目标API时,判断目标API的执行参数是否与提取的至少一个用户信息匹配;A judging module, configured to judge whether the execution parameters of the target API match the extracted at least one user information when the search module finds the target API; 第一确定模块,用于在所述判断模块的判断结果为是时,确定所述非发送类API中存在执行参数与提取的用户信息匹配的非发送类API。The first determining module is configured to determine that there is a non-sending API among the non-sending APIs whose execution parameters match the extracted user information when the judging result of the judging module is yes. 12.如权利要求9所述的装置,其特征在于,所述获取单元,具体包括:12. The device according to claim 9, wherein the acquiring unit specifically comprises: 逆向反编译子单元,用于对所述应用程序进行逆向反编译,得到所述应用程序对应的源码;The reverse decompilation subunit is used to reversely decompile the application program to obtain the source code corresponding to the application program; 获取子单元,用于根据所述源码获取所述应用程序包含的各API的参数变量。The acquisition subunit is configured to acquire parameter variables of each API included in the application program according to the source code. 13.如权利要求12所述的装置,其特征在于,所述获取子单元,包括:13. The device according to claim 12, wherein the acquiring subunit comprises: 标记模块,用于针对每一API,分别在该所述源码中、该API执行前和执行后插入标记代码,所述标记代码包括API分类标记代码;A marking module, for each API, respectively inserting marking codes in the source code, before and after execution of the API, where the marking codes include API classification marking codes; 记录模块,用于记录每一API的执行信息,根据该API的执行信息和该API的标记代码,获取该API的类别和该API的参数变量。The recording module is used to record the execution information of each API, and obtain the category of the API and the parameter variables of the API according to the execution information of the API and the mark code of the API. 14.如权利要求9~13任一权利要求所述的装置,其特征在于,14. The device according to any one of claims 9-13, characterized in that, 所述获取子单元,具体用于通过用于记录所述各API的执行信息的日志,获取所述各API的参数变量。The acquiring subunit is specifically configured to acquire parameter variables of each API through a log for recording execution information of each API. 15.如权利要求14所述的装置,其特征在于,所述装置还包括:15. The device of claim 14, further comprising: 输出单元,用于输出记录各API的执行信息的日志。The output unit is configured to output a log recording execution information of each API. 16.如权利要求10所述的装置,其特征在于,所述判断子单元,具体包括:16. The device according to claim 10, wherein the judging subunit specifically comprises: 比较模块,用于依次比较该发送类的执行参数与提取的每一用户信息;A comparison module, used to sequentially compare the execution parameters of the sending class with the extracted user information; 第二确定模块,用于如果该发送类的执行参数与当前比较的用户信息相同,则确定提取的用户信息中存在与该发送类API的执行参数匹配的用户信息;如果该发送类的执行参数与提取的每一用户信息均不相同,则确定提取的用户信息中不存在与该发送类API的执行参数匹配的用户信息。The second determination module is used to determine that there is user information matching the execution parameters of the sending class API in the extracted user information if the execution parameters of the sending class are the same as the currently compared user information; if the execution parameters of the sending class If it is different from each of the extracted user information, it is determined that there is no user information matching the execution parameters of the sending API among the extracted user information.
CN201410610791.XA 2014-11-03 2014-11-03 Method and device for detecting malicious application Active CN105631325B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410610791.XA CN105631325B (en) 2014-11-03 2014-11-03 Method and device for detecting malicious application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410610791.XA CN105631325B (en) 2014-11-03 2014-11-03 Method and device for detecting malicious application

Publications (2)

Publication Number Publication Date
CN105631325A true CN105631325A (en) 2016-06-01
CN105631325B CN105631325B (en) 2019-04-30

Family

ID=56046250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410610791.XA Active CN105631325B (en) 2014-11-03 2014-11-03 Method and device for detecting malicious application

Country Status (1)

Country Link
CN (1) CN105631325B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107958154A (en) * 2016-10-17 2018-04-24 中国科学院深圳先进技术研究院 A kind of malware detection device and method
CN108573151A (en) * 2017-03-10 2018-09-25 武汉安天信息技术有限责任公司 A kind of counterfeit applied analysis system and method
CN109492391A (en) * 2018-11-05 2019-03-19 腾讯科技(深圳)有限公司 A kind of defence method of application program, device and readable medium
CN111523063A (en) * 2019-02-01 2020-08-11 北京搜狗科技发展有限公司 Application processing method and device and application processing device
CN113190835A (en) * 2021-02-04 2021-07-30 恒安嘉新(北京)科技股份公司 Application program violation detection method, device, equipment and storage medium
CN113711559A (en) * 2019-04-16 2021-11-26 北京嘀嘀无限科技发展有限公司 System and method for detecting anomalies

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779255A (en) * 2012-07-16 2012-11-14 腾讯科技(深圳)有限公司 Method and device for judging malicious program
CN102938040A (en) * 2012-09-29 2013-02-20 中兴通讯股份有限公司 Malicious Android application program detection method, system and device
CN103186740A (en) * 2011-12-27 2013-07-03 北京大学 Automatic detection method for Android malicious software
CN103916365A (en) * 2012-12-31 2014-07-09 西门子公司 Method and apparatus for exporting and verifying network behavioral characteristics of malicious code

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186740A (en) * 2011-12-27 2013-07-03 北京大学 Automatic detection method for Android malicious software
CN102779255A (en) * 2012-07-16 2012-11-14 腾讯科技(深圳)有限公司 Method and device for judging malicious program
CN102938040A (en) * 2012-09-29 2013-02-20 中兴通讯股份有限公司 Malicious Android application program detection method, system and device
CN103916365A (en) * 2012-12-31 2014-07-09 西门子公司 Method and apparatus for exporting and verifying network behavioral characteristics of malicious code

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107958154A (en) * 2016-10-17 2018-04-24 中国科学院深圳先进技术研究院 A kind of malware detection device and method
CN108573151A (en) * 2017-03-10 2018-09-25 武汉安天信息技术有限责任公司 A kind of counterfeit applied analysis system and method
CN109492391A (en) * 2018-11-05 2019-03-19 腾讯科技(深圳)有限公司 A kind of defence method of application program, device and readable medium
CN109492391B (en) * 2018-11-05 2023-02-28 腾讯科技(深圳)有限公司 Application program defense method and device and readable medium
CN111523063A (en) * 2019-02-01 2020-08-11 北京搜狗科技发展有限公司 Application processing method and device and application processing device
CN111523063B (en) * 2019-02-01 2024-06-07 北京搜狗科技发展有限公司 Application processing method and device for application processing
CN113711559A (en) * 2019-04-16 2021-11-26 北京嘀嘀无限科技发展有限公司 System and method for detecting anomalies
CN113711559B (en) * 2019-04-16 2023-09-29 北京嘀嘀无限科技发展有限公司 System and method for detecting anomalies
CN113190835A (en) * 2021-02-04 2021-07-30 恒安嘉新(北京)科技股份公司 Application program violation detection method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN105631325B (en) 2019-04-30

Similar Documents

Publication Publication Date Title
US9824212B2 (en) Method and system for recognizing advertisement plug-ins
CN105631325A (en) Malicious application detection method and apparatus
ES2808954T3 (en) Procedure and device for use in risk management of application information
CN104346566A (en) Method, device, terminal, server and system for detecting privacy authority risks
KR20160109870A (en) System and method of fast searching of android malware
US10607011B1 (en) Method to detect zero-day malware applications using dynamic behaviors
CN105426706A (en) Pirate application detection method, device and system
CN104700029B (en) A kind of software online test method, device and server
CN103793649A (en) Method and device for cloud-based safety scanning of files
CN109828780B (en) Open source software identification method and device
CN105760761A (en) Software behavior analyzing method and device
CN105959294B (en) A kind of malice domain name discrimination method and device
CN114021115A (en) Malicious application detection method and device, storage medium and processor
CN105791250B (en) Application detection method and device
CN108234484B (en) Computer readable storage medium for tracing Trojan horse source and Trojan horse source tracing system applying same
CN115391230A (en) Test script generation method, test script penetration method, test script generation device, test penetration device, test equipment and test medium
CN109145589B (en) Application program acquisition method and device
CN115310087A (en) Website backdoor detection method and system based on abstract syntax tree
CN106650439A (en) Suspicious application program detection method and device
KR101579175B1 (en) Apparatus and method for detection of repackaging
CN107229865B (en) Method and device for analyzing Webshell intrusion reason
CN111683089A (en) Method, server, medium and computer equipment for identifying phishing website
CN115004185B (en) Privacy information leakage detection method, device and electronic equipment
Kedziora et al. Android malware detection using machine learning and reverse engineering
CN108322912B (en) Method and device for distinguishing short messages

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant