[go: up one dir, main page]

CN103279706B - Intercept the method and apparatus installing Android application program in the terminal - Google Patents

Intercept the method and apparatus installing Android application program in the terminal Download PDF

Info

Publication number
CN103279706B
CN103279706B CN201310226610.9A CN201310226610A CN103279706B CN 103279706 B CN103279706 B CN 103279706B CN 201310226610 A CN201310226610 A CN 201310226610A CN 103279706 B CN103279706 B CN 103279706B
Authority
CN
China
Prior art keywords
application program
android
gray
mobile terminal
adb
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.)
Active
Application number
CN201310226610.9A
Other languages
Chinese (zh)
Other versions
CN103279706A (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.)
Beijing 360 Zhiling Technology Co ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201310226610.9A priority Critical patent/CN103279706B/en
Publication of CN103279706A publication Critical patent/CN103279706A/en
Application granted granted Critical
Publication of CN103279706B publication Critical patent/CN103279706B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

本发明公开了一种拦截在移动终端中安装安卓应用程序的方法和装置。本发明实施例提供的一种拦截在移动终端中安装安卓应用程序的方法,包括:在网络驱动层对计算机中与ADB工具相绑定的预定端口进行监测;当监测到计算机中的进程通过ADB工具与移动终端建立连接时,判断进程是否是灰进程;若判断出该进程是灰进程,当获知该灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序时,判断是否允许该灰进程相关的应用程序向移动终端中安装安卓应用程序;当不允许灰进程相关的应用程序向移动终端中安装安卓应用程序时,拦截灰进程相关的应用程序向移动终端中安装安卓应用程序的操作。

The invention discloses a method and a device for intercepting the installation of an Android application program in a mobile terminal. A method for intercepting the installation of an Android application program in a mobile terminal provided by an embodiment of the present invention includes: monitoring a predetermined port bound with an ADB tool in a computer at the network driver layer; When the tool establishes a connection with the mobile terminal, it is judged whether the process is a gray process; if it is judged that the process is a gray process, when it is known that the application program related to the gray process will install an Android application program to the mobile terminal through the ADB tool, it is judged whether to allow the gray process. The application program related to the gray process installs the Android application program in the mobile terminal; when the application program related to the gray process is not allowed to install the Android application program in the mobile terminal, intercept the application program related to the gray process to install the Android application program in the mobile terminal operate.

Description

拦截在移动终端中安装安卓应用程序的方法和装置Method and device for intercepting Android application program installed in mobile terminal

技术领域technical field

本发明涉及安卓技术应用程序领域,特别涉及一种拦截在移动终端中安装安卓应用程序的方法和装置。The invention relates to the field of Android technology application programs, in particular to a method and device for intercepting the installation of Android application programs in mobile terminals.

背景技术Background technique

Android(安卓)是一种以Linux为基础的开放源码操作系统,主要使用于手机等移动终端。Android平台由操作系统、中间件、用户界面和应用程序软件组成。Android (Android) is an open source operating system based on Linux, which is mainly used in mobile terminals such as mobile phones. The Android platform consists of an operating system, middleware, user interface and application software.

随着智能手机的普及和发展,手机恶意程序成为了病毒发展的新的渠道,各种各样的APK(AndroidApplicationPackageFile,安卓安装包文件)应运而生,这其中就包括了病毒APK,例如,一些病毒APK通过诸如短信定制付费服务、弹出骚扰广告、付费电话、备份用户手机中的敏感数据至特定服务器等恶意行为来损害用户的权益,还有一些手机恶意程序可能会导致用户手机死机、关机、资料被删、向外发送垃圾邮件、拨打电话。。其中广告行为是安卓应用程序在移动设备中通过图片或文字将预设的广告信息在用户使用该应用程序时显示,或者联网从网上下载显示在用户的显示界面,还包括将图片或文字嵌入链接,引导用户点击进入等,还有一些隐私行为包括安卓应用程序未经用户授权读取或修改移动设备的信息的操作,例如获取手机号、或者获取手机内安装软件的内容并发送至其服务器统计用户的信息。With the popularization and development of smart phones, mobile malicious programs have become a new channel for virus development, and various APKs (Android Application Package File, Android installation package files) have emerged, including virus APKs, for example, some Virus APK damages the rights and interests of users through malicious behaviors such as customizing paid services for SMS, popping up harassing advertisements, paying calls, backing up sensitive data in the user's mobile phone to a specific server, and some malicious mobile phone programs may cause the user's mobile phone to crash, shut down, Data is deleted, spam is sent, phone calls are made. . Among them, the advertising behavior is that the Android application displays the preset advertising information on the mobile device through pictures or texts when the user uses the application, or downloads it from the Internet and displays it on the user's display interface, and also includes embedding pictures or texts into links. , guide users to click to enter, etc., and some privacy behaviors include Android applications that read or modify information on mobile devices without user authorization, such as obtaining mobile phone numbers, or obtaining the content of software installed in mobile phones and sending them to their servers for statistics user information.

Android设备连接计算机时需要驱动程序ADB(AndroidDebugBridge,安卓调试桥),通过ADB可以调试Android程序。利用ADB可以直接操作管理Android模拟器或者真实的Android设备(如手机终端)。When the Android device is connected to the computer, the driver ADB (AndroidDebugBridge, Android Debug Bridge) is required, and the Android program can be debugged through ADB. ADB can be used to directly operate and manage Android emulators or real Android devices (such as mobile terminals).

Android系统本身不具备拦截的机制,只是在恶意程序安装之前告知系统用户此程序可能会访问某些服务,但是对于应用程序是否是恶意程序不做判断。当用户将Android设备通过ADB连接至计算机时,第三方程序可能会在未经用户允许的情况下,监控USB接口,一旦发现Android设备,通过ADB向Android设备安装广告以推广应用程序,或者向Android设备安装一些恶意应用程序,从而导致Android设备往往由于与计算机的连接,会安装进来广告推广应用程序或者其它恶意应用程序。由于安装的程序可以不显示在Android系统的应用程序列表中,用户对这些应用程序的安装并不知情,但打开手机访问网页或者应用程序的时候会收到很多的广告推广等骚扰信息,给用户的使用带来了困扰和不便,并给用户的信息安全造成了隐患。The Android system itself does not have an interception mechanism. It just informs the system user that the program may access certain services before the malicious program is installed, but it does not judge whether the application program is a malicious program. When the user connects the Android device to the computer through ADB, the third-party program may monitor the USB interface without the user's permission. Once the Android device is found, it installs an advertisement to the Android device through ADB to promote the application, or sends an Android Some malicious applications are installed on the device, so that the Android device is often installed with advertising promotion applications or other malicious applications due to its connection with the computer. Since the installed programs may not be displayed in the application program list of the Android system, the user does not know about the installation of these application programs. The use of the system has brought trouble and inconvenience, and has caused hidden dangers to the user's information security.

发明内容Contents of the invention

鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的一种拦截在移动终端中安装安卓应用程序的方法和装置。In view of the above problems, the present invention is proposed to provide a method and device for intercepting the installation of Android applications in a mobile terminal to overcome the above problems or at least partially solve the above problems.

依据本发明的一个方面,本发明实施例提供了一种拦截在移动终端中安装安卓应用程序的方法,包括:According to one aspect of the present invention, an embodiment of the present invention provides a method for intercepting the installation of an Android application in a mobile terminal, including:

在网络驱动层对计算机中与安卓调试桥ADB工具相绑定的预定端口进行监测;In the network driver layer, the predetermined port bound to the Android debugging bridge ADB tool in the computer is monitored;

当监测到计算机中的进程通过ADB工具与移动终端建立连接时,判断进程是否是灰进程;When it is detected that the process in the computer is connected with the mobile terminal through the ADB tool, it is judged whether the process is a gray process;

若判断出上述进程是灰进程,当获知灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序时,判断是否允许该灰进程相关的应用程序向移动终端中安装安卓应用程序;If it is judged that the above process is a gray process, when it is known that the application program related to the gray process will install the Android application program to the mobile terminal through the ADB tool, judge whether to allow the application program related to the gray process to install the Android application program in the mobile terminal;

当不允许灰进程相关的应用程序向移动终端中安装安卓应用程序时,拦截灰进程相关的应用程序向移动终端中安装安卓应用程序的操作。When the application program related to the gray process is not allowed to install the Android application program in the mobile terminal, the operation of installing the Android application program in the mobile terminal by the application program related to the gray process is intercepted.

其中,上述方法还包括:当监测到计算机中的进程通过ADB工具与移动终端建立连接时,若判断进程的类型为位于白名单中的白进程,则允许该白进程相关的应用程序对移动终端执行的所有操作;Wherein, the above method also includes: when the process in the computer is monitored to establish a connection with the mobile terminal through the ADB tool, if the type of the process is judged to be a white process in the white list, then allowing the application program related to the white process to access the mobile terminal all actions performed;

若判断进程的类型为位于黑名单中的黑进程,则立即对该黑进程相关的应用程序进行拦截,禁止黑进程相关的应用程序对移动终端执行任何操作并在用户界面弹出框中展示对该黑进程相关的应用程序拦截成功的信息。If it is judged that the type of process is a black process in the blacklist, the application program related to the black process is immediately intercepted, and the application program related to the black process is prohibited from performing any operation on the mobile terminal and displayed in the pop-up box of the user interface. Information about successful interception of applications related to the black process.

其中,在判断进程是否为灰进程之前,上述方法还包括:判断进程是否为支持ADB协议的进程,是则,继续执行判断进程是否为灰进程的操作,否则,允许进程的运行。Wherein, before judging whether the process is a gray process, the above method also includes: judging whether the process is a process supporting the ADB protocol, if yes, continuing to perform the operation of judging whether the process is a gray process, otherwise, allowing the process to run.

其中,上述判断进程是否为支持ADB协议的进程包括判断进程向预定端口发送的数据包的格式和数据内容是否满足ADB协议,若满足,则进程为支持ADB协议的进程,若不满足,则进程不是支持ADB协议的进程。Wherein, whether the above-mentioned judging process is a process supporting the ADB protocol includes judging whether the format and data content of the data packet sent by the process to the predetermined port meet the ADB protocol, if satisfied, the process is a process supporting the ADB protocol, if not satisfied, the process Not a process that supports the ADB protocol.

其中,上述当获知灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序时,判断是否允许该灰进程相关的应用程序向移动终端中安装安卓应用程序包括:当监测到灰进程向预定端口发送安卓应用程序的安装指令时,获知灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序;当监测到灰进程向预定端口发送安卓安装包APK文件,获取该APK文件并对该APK文件进行扫描,当扫描结果指示APK文件安全时,判断允许该灰进程相关的应用程序向移动终端中安装安卓应用程序,否则,判断不允许该灰进程相关的应用程序向移动终端中安装安卓应用程序。Among them, when it is known that the application program related to the gray process will install the Android application program to the mobile terminal through the ADB tool, judging whether to allow the application program related to the gray process to install the Android application program in the mobile terminal includes: When the predetermined port sends the installation instruction of the Android application program, it is known that the relevant application program of the gray process will install the Android application program to the mobile terminal through the ADB tool; when it is detected that the gray process sends the Android installation package APK file to the predetermined port, the APK file is obtained and This APK file is scanned, when the scanning result indicates that the APK file is safe, it is judged that the application program related to the gray process is allowed to install the Android application program in the mobile terminal, otherwise, it is judged that the application program related to the gray process is not allowed to be installed in the mobile terminal. Install the Android app.

其中,上述对该APK文件进行扫描包括:提取述APK文件的安装包名称、版本号、数字签名、安卓组件接收器的特征、安卓组件服务的特征、安卓组件活动的特征、可执行文件中的指令和/或APK目录下各文件的消息摘要算法第五版MD5值;将提取出的信息发送至设置有安全识别库的服务器侧,以使服务器侧利用安全识别库中的特征信息对APK文件的信息进行扫描;接收服务器侧下发的APK文件对应的扫描结果。Wherein, the above-mentioned scanning of the APK file includes: extracting the installation package name, version number, digital signature, characteristics of Android component receivers, characteristics of Android component services, characteristics of Android component activities, and executable files of the APK file. Instructions and/or the MD5 value of the fifth edition of the message digest algorithm of each file in the APK directory; the extracted information is sent to the server side equipped with a security identification library, so that the server side uses the feature information in the security identification library to identify the APK file Scan the information; receive the scanning result corresponding to the APK file sent by the server side.

其中,上述当获知灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序时,判断是否允许该灰进程相关的应用程序向移动终端中安装安卓应用程序包括:在用户界面弹出框中展示提示信息,该提示信息包括灰进程相关的应用程序的图标、名称、应用描述、是否广告程序或者恶意程序的指示信息和/或处理方式信息;接收用户通过用户界面弹出框发送的选择指令;当选择指令指示允许灰进程相关的应用程序时,判断允许该灰进程相关的应用程序向移动终端中安装安卓应用程序,当选择指令指示禁止灰进程相关的应用程序时,判断禁止该灰进程相关的应用程序向移动终端中安装安卓应用程序。Wherein, when it is known that the application program related to the gray process will install the Android application program to the mobile terminal through the ADB tool, judging whether to allow the application program related to the gray process to install the Android application program in the mobile terminal includes: in the user interface pop-up box Display prompt information, which includes gray process-related application icon, name, application description, indication of whether it is an ad program or a malicious program, and/or processing information; receive selection instructions sent by the user through a pop-up box on the user interface; When the selection instruction indicates that the application program related to the gray process is allowed, it is judged that the application program related to the gray process is allowed to install the Android application program in the mobile terminal; The application program installs the Android application program in the mobile terminal.

其中,上述拦截灰进程相关的应用程序向移动终端中安装安卓应用程序的操作包括:中断灰进程与预定端口的连接,禁止通过预定端口将来自灰进程的APK文件发送至移动终端。Wherein, the above-mentioned operation of intercepting applications related to the gray process and installing the Android application in the mobile terminal includes: interrupting the connection between the gray process and the predetermined port, and prohibiting the APK file from the gray process from being sent to the mobile terminal through the predetermined port.

根据本发明的另一方面,本发明实施例提供了一种拦截在移动终端中安装安卓应用程序的装置,包括:According to another aspect of the present invention, an embodiment of the present invention provides a device for intercepting the installation of an Android application in a mobile terminal, including:

端口监测器,适于在网络驱动层对计算机中与安卓调试桥ADB工具相绑定的预定端口进行监测;The port monitor is suitable for monitoring the predetermined port bound to the Android debugging bridge ADB tool in the computer at the network driver layer;

判断器,适于当监测到计算机中的进程通过ADB工具与移动终端建立连接时,判断进程是否是灰进程;以及,若判断出进程是灰进程,当获知灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序时,判断是否允许该灰进程相关的应用程序向移动终端中安装安卓应用程序;The judger is suitable for judging whether the process is a gray process when it is detected that the process in the computer establishes a connection with the mobile terminal through the ADB tool; When the tool installs the Android application program to the mobile terminal, it judges whether to allow the gray process-related application program to install the Android application program in the mobile terminal;

拦截器,适于当不允许灰进程相关的应用程序向移动终端中安装安卓应用程序时,拦截灰进程相关的应用程序向移动终端中安装安卓应用程序的操作。The interceptor is suitable for intercepting the operation of installing the Android application program in the mobile terminal by the application program related to the gray process when the application program related to the gray process is not allowed to install the Android application program in the mobile terminal.

其中,判断器,还适于当监测到计算机中的进程通过ADB工具与移动终端建立连接时,判断进程的类型为位于白名单中的白进程,则拦截器,还适于允许该白进程相关的应用程序对移动终端执行的所有操作;以及Wherein, the judging device is also suitable for when the process in the computer is monitored to establish a connection with the mobile terminal through the ADB tool, and the type of the judging process is a white process located in the white list, then the interceptor is also suitable for allowing the white process to be associated with the mobile terminal. All operations performed by the application program on the mobile terminal; and

判断器,还适于当监测到计算机中的进程通过ADB工具与移动终端建立连接时,判断进程的类型为黑名单中的黑进程,则拦截器,还适于对该黑进程相关的应用程序进行拦截,禁止黑进程相关的应用程序对移动终端执行任何操作并在用户界面弹出框中展示对该黑进程相关的应用程序拦截成功的信息。The judger is also suitable for when the process in the computer is monitored to establish a connection with the mobile terminal through the ADB tool, and the type of the judged process is a black process in the blacklist, then the interceptor is also suitable for the application program related to the black process Intercepting, prohibiting the application program related to the black process from performing any operation on the mobile terminal and displaying the successful interception information of the application program related to the black process in the pop-up box of the user interface.

其中,判断器,还适于在判断进程是否是灰进程之前,判断进程是否为支持ADB协议的进程,是则,继续执行判断进程是否是灰进程的操作,否则,允许进程的运行。Wherein, the judging device is also suitable for judging whether the process is a process supporting the ADB protocol before judging whether the process is a gray process, if so, continue to perform the operation of judging whether the process is a gray process, otherwise, allow the operation of the process.

其中,判断器,适于判断进程向预定端口发送的数据包的格式和数据内容是否满足ADB协议,若满足,则进程为支持ADB协议的进程,若不满足,则进程不是支持ADB协议的进程。Wherein, the judging device is suitable for judging whether the format and data content of the data packet sent by the process to the predetermined port meet the ADB protocol. If it is satisfied, the process is a process that supports the ADB protocol. If it is not satisfied, the process is not a process that supports the ADB protocol. .

其中,判断器,适于当监测到灰进程向预定端口发送安卓应用程序的安装指令时,获知灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序;当监测到灰进程向预定端口发送安卓安装包APK文件,获取该APK文件并对该APK文件进行扫描,当扫描结果指示APK文件安全时,判断允许该灰进程相关的应用程序向移动终端中安装安卓应用程序,否则,判断不允许该灰进程相关的应用程序向移动终端中安装安卓应用程序。Wherein, the judging device is suitable for knowing that the application program related to the gray process will install the Android application program to the mobile terminal through the ADB tool when monitoring that the gray process sends an installation instruction of the Android application to the predetermined port; The port sends the APK file of the Android installation package, obtains the APK file and scans the APK file, and when the scanning result indicates that the APK file is safe, it is judged that the application program related to the gray process is allowed to install the Android application program in the mobile terminal, otherwise, it is judged The application program related to the gray process is not allowed to install the Android application program in the mobile terminal.

其中,判断器适于通过如下方式获取扫描结果:提取APK文件的安装包名称、版本号、数字签名、安卓组件接收器的特征、安卓组件服务的特征、安卓组件活动的特征、可执行文件中的指令和/或APK目录下各文件的MD5值;将提取出的信息发送至设置有安全识别库的服务器侧,以使服务器侧利用安全识别库中的特征信息对APK文件的信息进行扫描;接收服务器侧下发的APK文件对应的扫描结果。Wherein, the judging device is adapted to obtain the scanning result in the following manner: extracting the installation package name, version number, digital signature, characteristics of the Android component receiver, characteristics of the Android component service, characteristics of the Android component activity, and executable files in the APK file. The instruction and/or the MD5 value of each file under the APK directory; the extracted information is sent to the server side provided with the security identification library, so that the server side uses the feature information in the security identification library to scan the information of the APK file; Receive the scanning result corresponding to the APK file delivered by the server side.

其中,判断器适于在用户界面弹出框中展示提示信息,该提示信息包括灰进程相关的应用程序的图标、名称、应用描述、是否广告程序或者恶意程序的指示信息和/或处理方式信息;接收用户通过用户界面弹出框发送的选择指令;当选择指令指示允许灰进程相关的应用程序时,判断允许该灰进程相关的应用程序向移动终端中安装安卓应用程序,当选择指令指示禁止灰进程相关的应用程序时,判断禁止该灰进程相关的应用程序向移动终端中安装安卓应用程序。Wherein, the determiner is adapted to display prompt information in a pop-up box on the user interface, the prompt information includes the icon, name, application description, indication information of whether the program is an advertisement program or a malicious program, and/or processing information of the application program related to the gray process; Receive the selection instruction sent by the user through the pop-up box of the user interface; when the selection instruction indicates that the application program related to the gray process is allowed, it is judged that the application program related to the gray process is allowed to install the Android application program in the mobile terminal; when the selection instruction indicates that the gray process is prohibited When the application program is related, it is judged that the application program related to the gray process is prohibited from installing the Android application program in the mobile terminal.

其中,拦截器,适于中断灰进程与预定端口的连接,禁止通过预定端口将来自灰进程的APK文件发送至移动终端。Wherein, the interceptor is adapted to interrupt the connection between the gray process and the predetermined port, and forbids sending the APK file from the gray process to the mobile terminal through the predetermined port.

由上所述,本发明实施例通过对与ADB工具相绑定的预定端口的监测,获知到与ADB工具建立连接的所有进程,筛选出其中的灰进程并对灰进程相关的应用程序向移动终端中安装安卓应用程序的权限进行判断的技术手段,解决了现有技术中第三方程序随意向移动终端中安装应用程序造成的问题,能够对利用ADB工具与安卓交互的第三方程序进行有效监控,并通过进程类型和判断逻辑控制第三方程序的权限,从而保障了移动终端中信息的安全性,方便了用户使用。From the above, the embodiment of the present invention learns all processes that establish connections with the ADB tool by monitoring the predetermined ports bound to the ADB tool, screens out the gray processes among them, and moves the application programs related to the gray processes to The technical means for judging the permissions of installing Android applications in the terminal solves the problem caused by third-party programs randomly installing applications in the mobile terminal in the prior art, and can effectively monitor the third-party programs that use ADB tools to interact with Android , and control the authority of the third-party program through the process type and judgment logic, thereby ensuring the security of information in the mobile terminal and making it convenient for users to use.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same components. In the attached picture:

图1示出了根据本发明一个实施例的一种拦截在移动终端中安装安卓应用程序的方法流程图;Fig. 1 shows a flow chart of a method for intercepting the installation of an Android application program in a mobile terminal according to an embodiment of the present invention;

图2示出了根据本发明另一个实施例的一种拦截在移动终端中安装安卓应用程序的方法流程图;以及Fig. 2 shows a flow chart of a method for intercepting the installation of an Android application program in a mobile terminal according to another embodiment of the present invention; and

图3示出了根据本发明另一个实施例的进程利用ADB工具向移动终端中安装安卓应用程序时的交互流程示意图;Fig. 3 shows a schematic diagram of the interaction process when the process utilizes the ADB tool to install the Android application program in the mobile terminal according to another embodiment of the present invention;

图4示出了根据本发明又一个实施例一种拦截在移动终端中安装安卓应用程序的装置的结构示意图。Fig. 4 shows a schematic structural diagram of an apparatus for intercepting the installation of an Android application in a mobile terminal according to yet another embodiment of the present invention.

具体实施方式detailed description

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

本发明一个实施例提供了一种拦截在移动终端中安装安卓应用程序的方法,参见图1,该方法包括:An embodiment of the present invention provides a method for intercepting the installation of an Android application program in a mobile terminal, referring to Fig. 1, the method includes:

S100:在网络驱动层对计算机中与ADB(AndroidDebugBridge,安卓调试桥)工具相绑定的预定端口进行监测。S100: Monitor a predetermined port bound with an ADB (Android Debug Bridge, Android Debug Bridge) tool in the computer at the network driver layer.

本实施例在网络驱动层中执行对在移动终端中安装安卓应用程序的操作的拦截,该网络驱动层处于上层驱动,是作为winsock(WindowsSockets)调用转发到内核协议驱动的一个辅助中间层。处于这层的驱动可以无差别的监控到所有本地及远程的winsock调用以及监控到网络底层协议驱动。This embodiment executes the interception of the operation of installing the Android application program in the mobile terminal in the network driver layer, which is in the upper layer driver and is an auxiliary intermediate layer that is forwarded to the kernel protocol driver as a winsock (WindowsSockets) call. Drivers at this layer can monitor all local and remote winsock calls and network underlying protocol drivers indiscriminately.

上述计算机中的预定端口可以为127.0.0.1:5037端口(5037端口),其中,ADB工具与该5037端口相绑定。The predetermined port in the above computer may be 127.0.0.1:5037 port (5037 port), where the ADB tool is bound to the 5037 port.

S102:当监测到计算机中的进程通过ADB工具与移动终端建立连接时,判断进程是否是灰进程。S102: When it is detected that the process in the computer establishes a connection with the mobile terminal through the ADB tool, determine whether the process is a gray process.

本实施例中以移动终端为安卓设备(如安卓手机或其它支持安卓系统的终端)为例进行说明。In this embodiment, the mobile terminal is an Android device (such as an Android phone or other terminals supporting the Android system) as an example for illustration.

灰进程为不在白名单和黑名单中的未知进程,当监测到的进程的类型属于灰进程时,需要对该进程进行进一步的监控,确认是否允许该灰进程相关的应用程序向安卓设备中安装安卓应用程序。A gray process is an unknown process that is not in the whitelist or blacklist. When the type of the monitored process is a gray process, it is necessary to further monitor the process to confirm whether the application related to the gray process is allowed to be installed on the Android device. android app.

其中,本实施例中在服务器的数据库中会维护一个白名单和黑名单,白名单为记录安全进程的名单,黑名单为记录危险进程的名单,当进程位于白名单中时,允许该白进程后续的所有操作,不再对该白进程进行监控,当进程位于黑名单中,一旦监测出黑进程,立即执行拦截。Wherein, a whitelist and a blacklist are maintained in the database of the server in this embodiment, the whitelist is a list for recording safe processes, and the blacklist is a list for recording dangerous processes. When a process is in the whitelist, the white process is allowed For all subsequent operations, the white process will no longer be monitored. When the process is in the blacklist, once a black process is detected, it will be intercepted immediately.

需要说明的是,本实施例在进程的层次上,对拦截在移动终端(安卓设备)中安装安卓应用程序的方案进行描述。应用程序是静态的,进程是动态的,进程是一个正在执行的程序,即计算机中正在运行的程序实例;其可以分配给处理器并作为一个实体由处理器执行。进程能够得到应用程序的处理结果。一个应用程序在一个数据集上的一次运行为一个进程,进程和应用程序并非一一对应的,一个应用程序运行在多个不同的数据集上形成多个不同的进程。进程在创建时产生,因应用程序的调度而运行,在完成任务后进程会被撤消。进程能够反映一个应用程序在一定的数据集上运行的全部动态过程。上述进程相关的应用程序是指进程上正在运行的应用程序。It should be noted that this embodiment describes the solution of intercepting the installation of an Android application program in a mobile terminal (Android device) at the process level. An application is static, a process is dynamic, a process is an executing program, ie a program instance running in a computer; it can be assigned to a processor and executed by the processor as an entity. The process can get the processing result of the application program. An application running on a data set is a process. There is not a one-to-one correspondence between a process and an application. An application running on multiple different data sets forms multiple different processes. A process is created when it is created, runs due to the scheduling of the application, and is canceled after the task is completed. A process can reflect the entire dynamic process of an application running on a certain data set. The aforementioned process-related application programs refer to the application programs running on the process.

S104:当获知灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序时,判断是否允许该灰进程相关的应用程序向移动终端中安装安卓应用程序。S104: When it is learned that the application program related to the gray process will install the Android application program to the mobile terminal through the ADB tool, determine whether to allow the application program related to the gray process to install the Android application program in the mobile terminal.

进程相关的应用程序利用ADB工具可以执行多种类型的操作,例如,枚举当前系统连接的安卓设备、与安卓设备建立连接、读写安卓设备中的文件及目录、给安卓设备安装APK文件、执行安卓设备上的shell指令等等。在此,本方案主要关注基于ADB协议安装APK文件的功能,则在本步骤中,当获知灰进程相关的应用程序要通过ADB工具向安卓设备安装安卓应用程序时启动拦截操作的逻辑判断。Process-related applications can use ADB tools to perform various types of operations, such as enumerating Android devices connected to the current system, establishing connections with Android devices, reading and writing files and directories in Android devices, installing APK files on Android devices, Execute shell commands on Android devices, etc. Here, this solution mainly focuses on the function of installing APK files based on the ADB protocol. In this step, when it is known that the application program related to the gray process will install the Android application program to the Android device through the ADB tool, the logical judgment of the interception operation is started.

S106:当不允许灰进程相关的应用程序向移动终端中安装安卓应用程序时,拦截灰进程相关的应用程序向移动终端中安装安卓应用程序的操作。S106: When the application program related to the gray process is not allowed to install the Android application program in the mobile terminal, intercept the operation of the application program related to the gray process to install the Android application program in the mobile terminal.

由上所述,本发明实施例在PC端设备例如电脑与安卓设备连接传输时,保护安卓设备不被强制安装广告软件或恶意软件。本方案不仅能够拦截到恶意骚扰程序,也可以拦截到任何通过ADB工具获得在手机上安装应用程序的权限的恶意程序。As mentioned above, the embodiment of the present invention protects the Android device from being forced to install adware or malicious software when a PC terminal device such as a computer is connected to the Android device for transmission. This solution can not only intercept malicious harassing programs, but also intercept any malicious programs that obtain permission to install applications on mobile phones through the ADB tool.

现有的安卓系统中无法对利用ADB工具在手机上安装安卓应用程序的第三方应用进行检查,而ADB工具又可以获得安卓应用程序的所有权限,包括执行shell指令等等,从而导致手机与计算机连接后,病毒易于传播至手机,为解决这一问题,本实施例通过对与ADB工具相绑定的预定端口的监测,获知到与ADB工具建立连接的所有进程,筛选出其中的灰进程并对灰进程相关的应用程序向安卓设备中安装安卓应用程序的权限进行判断的技术手段,解决了现有技术中第三方程序随意向安卓设备中安装应用程序造成的问题,能够对利用ADB工具与安卓交互的第三方程序进行有效监控,并通过进程类型和判断逻辑控制第三方程序的权限,从而保障了移动终端中信息的安全性,方便了用户使用。In the existing Android system, it is impossible to check the third-party application that uses the ADB tool to install the Android application program on the mobile phone, and the ADB tool can obtain all the permissions of the Android application program, including executing shell commands, etc. After the connection, the virus is easy to spread to the mobile phone. In order to solve this problem, the present embodiment learns all the processes connected with the ADB tool by monitoring the predetermined port bound with the ADB tool, screens out gray processes therein and The technical means for judging the authority of the gray process-related application program to install the Android application program in the Android device solves the problem caused by the third-party program randomly installing the application program in the Android device in the prior art, and can use the ADB tool and The Android-interactive third-party program is effectively monitored, and the authority of the third-party program is controlled through the process type and judgment logic, thereby ensuring the security of information in the mobile terminal and making it convenient for users to use.

在图1所示实施例的基础上,本发明另一个实施例提供的一种拦截在移动终端中安装安卓应用程序的方法,参见图2,包括如下步骤:On the basis of the embodiment shown in Figure 1, another embodiment of the present invention provides a method for intercepting the installation of an Android application in a mobile terminal, referring to Figure 2, comprising the following steps:

S200:对与ADB工具绑定的5037端口进行监测。S200: Monitor port 5037 bound with the ADB tool.

本步骤中,在后台程序中监测5037端口中通过的数据包,这些数据包可以为发送指令的数据包,也可以为发送实体数据的数据包。In this step, monitor the data packets passing through port 5037 in the background program, and these data packets may be data packets for sending instructions or data packets for sending entity data.

上述监测可以由ADB工具或者设置在ADB工具中的器件实现。The above monitoring can be implemented by the ADB tool or a device set in the ADB tool.

ADB工具的功能主要包括:运行安卓设备的命令,管理安卓模拟器或安卓设备的端口映射,控制计算机或者安卓设备之间的上传或者下载文件,以及将本地的APK文件安装至安卓模拟器或者安卓设备。ADB工具在计算机和安卓设备之间起到了一个中转的作用。The functions of the ADB tool mainly include: running commands of Android devices, managing port mapping of Android emulators or Android devices, controlling upload or download files between computers or Android devices, and installing local APK files to Android emulators or Android devices. equipment. The ADB tool acts as an intermediary between the computer and the Android device.

ADB工具是基于客户端-服务端模型实现的,包括三个部分:ADB客户端、ADB服务端和守护进程。The ADB tool is implemented based on the client-server model, including three parts: ADB client, ADB server and daemon.

ADB客户端,运行在开发用的电脑上,可以在命令行中运行ADB命令来调用该客户端,像ADB插件和DDMS这样的安卓工具也可以调用ADB客户端。The ADB client, which runs on the development computer, can be invoked by running ADB commands on the command line, and Android tools such as ADB plugins and DDMS can also invoke the ADB client.

ADB服务端,是运行在开发用电脑上的后台进程,管理设备并负责计算机与设备之间的数据交换;The ADB server is a background process running on the development computer, which manages the device and is responsible for the data exchange between the computer and the device;

ADB客户端和ADB服务端在可以存在于同一个可执行文件之中,例如Windows系统中名为adb.exe的可执行文件中。ADB客户端负责与用户交互,执行完命令后就退出;而ADB服务端在启动后一直运行于计算机中。The ADB client and the ADB server can exist in the same executable file, such as the executable file named adb.exe in the Windows system. The ADB client is responsible for interacting with the user, and exits after executing the command; and the ADB server has been running in the computer after it is started.

守护进程,运行在安卓系统中的进程,接收ADB服务端发来的数据并执行指令。Daemon process, a process running in the Android system, receives data from the ADB server and executes instructions.

当启动ADB客户端时,客户端首先检测ADB服务端进程是否运行,如果没有运行,则启动ADB服务端。当ADB服务端启动时,它会绑定到本地的TCP5037端口,并且监听从ADB客户端发来的命令。所有的ADB客户端都使用5037端口与ADB服务端通信。When starting the ADB client, the client first detects whether the ADB server process is running, and if not, starts the ADB server. When the ADB server starts, it binds to the local TCP port 5037 and listens for commands sent from the ADB client. All ADB clients use port 5037 to communicate with the ADB server.

S202:当监测到计算机中的进程通过ADB工具与安卓设备建立连接。S202: When it is detected that the process in the computer establishes a connection with the Android device through the ADB tool.

ADB工具可以通过预定端口操作安卓手机、向安卓手机中安装应用程序、执行手机同步和上传文件等功能,第三方程序可以通过捆绑一个ADB工具和向安卓设备发送命令进行通信。The ADB tool can operate the Android phone through a predetermined port, install applications to the Android phone, perform functions such as phone synchronization and upload files, and third-party programs can communicate by bundling an ADB tool and sending commands to the Android device.

ADB工具包括ADB客户端和ADB服务端。ADB服务端一直在后台运行,负责和安卓设备通讯,可以通过网络将APK文件传递到ADB服务端,从而通过中转安装到移动终端上去;ADB客户端负责第三方程序与预定端口的连接,而本地网络层中设置有ADB通讯协议,以支持ADB工具的通信。例如,手机助手就相当于一个ADB服务端,当其他的应用程序与手机助手连接上后,其他的应用程序也可会利用手机助手的服务向安卓设备安装应用程序等。ADB tools include ADB client and ADB server. The ADB server has been running in the background and is responsible for communicating with Android devices. It can transfer the APK file to the ADB server through the network, so as to install it on the mobile terminal through transit; the ADB client is responsible for the connection between the third-party program and the predetermined port, and the local The ADB communication protocol is set in the network layer to support the communication of the ADB tool. For example, the mobile assistant is equivalent to an ADB server. When other applications are connected to the mobile assistant, other applications may also use the service of the mobile assistant to install applications to the Android device.

第三方程序会通过ADB客户端与5037端口建立Socket(套接字)连接,然后通过该Socket连接和ADB服务端连接至安卓设备。如在将应用程序安装到手机上时,ADB客户端将应用程序的安装包传递给ADB服务端,ADB服务端就安装该应用程序到手机上。The third-party program will establish a Socket (socket) connection with port 5037 through the ADB client, and then connect to the Android device through the Socket connection and the ADB server. For example, when the application is installed on the mobile phone, the ADB client sends the installation package of the application to the ADB server, and the ADB server installs the application on the mobile phone.

S204:判断进程是否为支持ADB协议的进程,是则执行步骤S206。S204: Determine whether the process is a process supporting the ADB protocol, if yes, execute step S206.

通过5037端口传输的数据包除了与安卓设备通讯的数据包之外,还会包括其他类型的数据包,为了避免拦截到其他正常的程序,保证其他程序的正常运行,本实施例中,判断监测到的进程的是否使用ADB协议,当使用ADB协议时,说明该进程为会与安卓设备通信的进程,继续对该进程进行监控,当不使用ADB协议时,说明该进程为不与安卓设备通信的其他进程,不再对该进程进行监控,允许该进程的运行。In addition to the data packets communicated with the Android device, the data packets transmitted through the 5037 port will also include other types of data packets. In order to avoid intercepting other normal programs and ensure the normal operation of other programs, in this embodiment, the judgment monitoring Whether the received process uses the ADB protocol. When the ADB protocol is used, it means that the process is a process that communicates with the Android device. Continue to monitor the process. When the ADB protocol is not used, it means that the process does not communicate with the Android device. other processes, the process is no longer monitored, and the process is allowed to run.

ADB协议支持的操作包括使用ADB枚举当前系统连接的安卓设备、与安卓设备建立连接、读写安卓设备中的文件及目录、给安卓设备安装APK文件、执行安卓设备上的shell指令等等。The operations supported by the ADB protocol include using ADB to enumerate the Android devices connected to the current system, establish a connection with the Android device, read and write files and directories in the Android device, install APK files on the Android device, execute shell commands on the Android device, and so on.

在判断进程是否为支持ADB协议的进程时,可以判断该进程向预定端口(5037端口)发送的数据包的格式和数据内容是否满足ADB协议,若满足,则该进程为支持ADB协议的进程,若不满足,则该进程不是支持ADB协议的进程。例如,当判断数据包的格式满足ADB协议的格式要求,且数据内容中指示了本数据包为基于ADB协议的数据包时,确认进程为支持ADB协议的进程。When judging whether the process is a process supporting the ADB protocol, it can be judged whether the format and data content of the data packet sent by the process to the predetermined port (port 5037) meet the ADB protocol. If satisfied, the process is a process supporting the ADB protocol. If not, the process does not support the ADB protocol. For example, when it is determined that the format of the data packet meets the format requirements of the ADB protocol, and the data content indicates that the data packet is a data packet based on the ADB protocol, the confirmation process is a process supporting the ADB protocol.

S206:判断进程的类型。S206: Determine the type of the process.

本实施例会预先对进程的信息进行收集和统计,维护和保存进程的白名单和黑名单。In this embodiment, the process information will be collected and counted in advance, and the white list and black list of the process will be maintained and saved.

白名单为记录安全进程的名单,黑名单为记录危险进程的名单。位于白名单中进程的类型为白进程,位于黑名单中进程的类型为黑进程,在白名单和黑名单之外的所有未知进程属于灰进程。另外,本实施例还可以通过客户端收集程序行为并关联到程序特征,从而在数据库中记录程序特征及其对应的程序行为,根据收集到的程序行为和程序特征的关联关系,可以在数据库中对样本进行分析归纳,从而有助于对软件或程序属于黑名单或者白名单的判断。由于在数据库中记录了程序特征及该特征对应的行为记录,因此可以结合已知白名单对未知程序进行分析。例如,如果未知程序特征与现有白名单中的已知程序特征相同,则将该未知程序特征及其程序行为都列入白名单。如果未知程序行为与现有白名单中的已知程序行为相同或近似,则将该未知程序行为及其程序特征都列入白名单。The white list is a list that records safe processes, and the black list is a list that records dangerous processes. The type of process in the white list is a white process, the type of process in the black list is a black process, and all unknown processes outside the white list and black list are gray processes. In addition, this embodiment can also collect program behaviors through the client and associate them with program features, so as to record program features and their corresponding program behaviors in the database. According to the association between the collected program behaviors and program features, the Analyzing and summarizing the samples helps to judge whether the software or program belongs to the blacklist or whitelist. Since the program characteristics and the corresponding behavior records of the characteristics are recorded in the database, unknown programs can be analyzed in combination with the known white list. For example, if the unknown program signature is the same as the known program signature in the existing whitelist, both the unknown program signature and its program behavior are whitelisted. If the unknown program behavior is the same as or similar to the known program behavior in the existing whitelist, the unknown program behavior and its program characteristics are both included in the whitelist.

当进程为白进程(如360手机助手、91手机助手或豌豆荚调用的进程等)时,确认该进程相关的应用程序为可信的应用程序,允许该进程的运行。When the process is a white process (such as the process called by 360 mobile assistant, 91 mobile assistant or pea pod, etc.), confirm that the application program related to the process is a trusted application program, and allow the operation of the process.

当进程为黑进程时(如恶意推广APK的应用程序调用的进程等),确认该进程相关的应用程序为不可信的应用程序,在判断出该进程的类型后,立即拦截该进程的运行(如通过断开该进程与5037端口的连接来拦截该进程),禁止该进程相关的应用程序对安卓设备进行任何操作(如枚举系统中连接的安卓设备),并将拦截成功的信息发送至用户,如在用户界面弹出框中展示对该黑进程相关的应用程序拦截成功的信息。When the process is a black process (such as a process called by an application program that maliciously promotes APK, etc.), confirm that the application program related to the process is an untrusted application program, and immediately intercept the operation of the process after judging the type of the process ( Such as intercepting the process by disconnecting the process from port 5037), prohibiting the application program related to the process from performing any operations on the Android device (such as enumerating the Android devices connected in the system), and sending the successfully intercepted information to For the user, the information that the application program related to the black process is successfully intercepted is displayed in the pop-up box of the user interface.

当进程为灰进程时,进入步骤S208,继续对该灰进程进行监控。When the process is a gray process, go to step S208 and continue to monitor the gray process.

S208:判断是否允许该灰进程相关的应用程序向安卓设备中安装安卓应用程序。S208: Determine whether to allow the application program related to the gray process to install the Android application program in the Android device.

本方案主要关注第三方程序利用ADB协议在安卓设备上安装应用程序的场景,当灰进程执行其他操作时,如枚举操作、读写安卓设备目录的操作,可以允许这些操作的执行。This solution mainly focuses on the scenario where a third-party program uses the ADB protocol to install an application on an Android device. When the gray process performs other operations, such as enumeration operations and operations to read and write Android device directories, these operations can be allowed to execute.

为了更清楚地说明本方案,下面首先结合图3对进程相关的应用程序利用ADB工具向安卓设备中安装安卓应用程序的场景的进行说明,图3示出了进程利用ADB工具向安卓设备中安装安卓应用程序时的交互流程示意图。其中,进程通过ADB客户端与5037端口建立Socket连接,通过该Socket连接将各种指令和数据发送至5037端口,然后再由ADB服务端将指令和数据发送至安卓设备,在执行APK文件安装时,主要包括如下操作:In order to illustrate this solution more clearly, the scenario of installing an Android application program to an Android device by a process-related application program using the ADB tool is firstly described below in conjunction with Figure 3. Figure 3 shows that the process uses the ADB tool to install an Android application program on an Android device. Schematic diagram of the interaction process for Android applications. Among them, the process establishes a Socket connection with the 5037 port through the ADB client, and sends various instructions and data to the 5037 port through the Socket connection, and then the ADB server sends the instructions and data to the Android device. When installing the APK file , mainly including the following operations:

1)、进程通过ADB客户端和ADB服务端向安卓设备发送install(安装)指令。1), the process sends an install (installation) instruction to the Android device through the ADB client and the ADB server.

上述install指令指示进程即将要执行向安卓设备安装安卓应用程序的操作。The above install command indicates that the process is about to perform an operation of installing an Android application program to the Android device.

2)、进程通过ADB客户端和ADB服务端向安卓设备发送Sync(synchronous,同步)指令,指示进入同步状态。2), the process sends a Sync (synchronous, synchronization) command to the Android device through the ADB client and the ADB server, indicating to enter the synchronization state.

3)、进程通过ADB客户端和ADB服务端向安卓设备发送SEND(发送)指令,指定APK文件的存放路径。3), the process sends a SEND (send) instruction to the Android device through the ADB client and the ADB server, specifying the storage path of the APK file.

4)、进程通过ADB客户端和ADB服务端向安卓设备发送DATA(数据)指令,从而将需要安装的APK文件发送给安卓设备。4), the process sends DATA (data) instructions to the Android device through the ADB client and the ADB server, thereby sending the APK file to be installed to the Android device.

5)、进程通过ADB客户端和ADB服务端向安卓设备发送pmshell指令,启动APK文件在安卓设备上的安装。5), the process sends the pmshell command to the Android device through the ADB client and the ADB server, and starts the installation of the APK file on the Android device.

在APK文件安装后,还可以包括下述步骤6)。After the APK file is installed, the following step 6) may also be included.

6)、进程通过ADB客户端和ADB服务端向安卓设备发送rmshell指令,删除在安装过程中上传的APK文件等数据。6), the process sends the rmshell command to the Android device through the ADB client and the ADB server to delete the data such as the APK file uploaded during the installation process.

本步骤在获知灰进程相关的应用程序要通过ADB工具向安卓设备安装安卓应用程序时触发开始执行。当监测到灰进程调用ADB工具的install功能向预定端口发送安卓应用程序的install指令时,获知灰进程相关的应用程序要通过ADB工具向安卓设备安装安卓应用程序;在发送完install指令后,灰进程还会通过ADB工具向预定端口发送Sync(synchronous,同步)指令、SEND(发送)指令等,然后灰进程向预定端口发送携带有APK文件的DATA(数据)指令,则当监测到灰进程向预定端口发送安卓安装包APK文件,获取该APK文件并对该APK文件进行扫描,扫描该要安装的APK文件中是否含有恶意扣费、恶意骚扰、窃取隐私的代码等恶意内容,当没有恶意内容时扫描结果为APK文件安全,否则扫描结果为APK文件危险。This step is triggered to start execution when it is learned that the application program related to the gray process will install the Android application program to the Android device through the ADB tool. When it is detected that the gray process invokes the install function of the ADB tool to send the install command of the Android application to the predetermined port, it is known that the application program related to the gray process will install the Android application program to the Android device through the ADB tool; after sending the install command, the gray The process will also send Sync (synchronous, synchronization) commands, SEND (send) commands, etc. to the predetermined port through the ADB tool, and then the gray process will send the DATA (data) command carrying the APK file to the predetermined port. The predetermined port sends the APK file of the Android installation package, obtains the APK file and scans the APK file, and scans whether the APK file to be installed contains malicious content such as malicious deduction, malicious harassment, and privacy-stealing codes. If there is no malicious content When the scan result is APK file safe, otherwise the scan result is APK file dangerous.

当扫描结果指示APK文件安全时,判断允许该灰进程相关的应用程序向安卓设备中安装安卓应用程序,否则,判断不允许该灰进程相关的应用程序向安卓设备中安装安卓应用程序。When the scanning result indicates that the APK file is safe, it is judged that the application program related to the gray process is allowed to install the Android application program in the Android device, otherwise, it is judged that the application program related to the gray process is not allowed to install the Android application program in the Android device.

在执行对APK文件的扫描时,具体执行如下操作:When scanning the APK file, the specific operations are as follows:

提取APK文件的各种信息,这些信息包括但不局限于安装包名称、版本号、数字签名、安卓组件接收器(receiver)的特征、安卓组件服务(service)的特征、安卓组件活动(activity)的特征、可执行文件中的指令(或字符串)和/或APK目录下各文件的MD5值;然后,将提取出的信息发送至设置有安全识别库的服务器侧,以使服务器侧利用安全识别库中的特征信息对APK文件的信息进行扫描;接收服务器侧下发的APK文件对应的扫描结果,从而获知扫描结果,程序包名称、证书等信息。Extract various information of APK files, including but not limited to installation package name, version number, digital signature, characteristics of Android component receiver (receiver), characteristics of Android component service (service), and Android component activity (activity) characteristics, instructions (or character strings) in the executable file and/or the MD5 value of each file in the APK directory; then, the extracted information is sent to the server side equipped with a security identification library, so that the server side uses the security The feature information in the identification library scans the information of the APK file; receives the scanning result corresponding to the APK file sent by the server side, so as to obtain the scanning result, program package name, certificate and other information.

优选的,上述安全识别库可以为云查杀引擎。Preferably, the above security identification library may be a cloud scanning and killing engine.

其中,上述可执行文件包括Dex文件和/或ELF文件,该Dex文件包括classes.dex文件、扩展名为.jar的文件以及Dex格式的文件等。Wherein, the above-mentioned executable file includes a Dex file and/or an ELF file, and the Dex file includes a classes.dex file, a file with an extension of .jar, a file in a Dex format, and the like.

需要说明的是,本实施例在采用上述方式进行扫描之前,需要预先对APK文件的信息进行收集,例如,选取样本安卓安装包,该样本安卓安装包包括各种安全级别下的安卓安装包。对各种样本安卓安装包的包名、版本号、数字签名、安卓组件receiver的特征、安卓组件service的特征、安卓组件activity的特征、可执行文件中的指令或字符串,安卓安装包目录下各文件的MD5值进行收集,将收集到的信息预置在服务器侧的安全识别库中。It should be noted that, in this embodiment, before scanning in the above manner, the information of the APK file needs to be collected in advance, for example, a sample Android installation package is selected, and the sample Android installation package includes Android installation packages under various security levels. For the package name, version number, digital signature, characteristics of Android component receiver, characteristics of Android component service, characteristics of Android component activity, instructions or strings in executable files of various sample Android installation packages, the Android installation package directory The MD5 value of each file is collected, and the collected information is preset in the security identification library on the server side.

服务器侧预置的安全识别库中既收集了识别病毒、木马等各种恶意软件的APK文件的特征信息,也收集了识别正常应用的APK文件的特征信息。当APK文件的信息中有一项信息命中恶意软件的特征信息,则得到的该APK文件对应的扫描结果指示该APK文件不是安全的。The security identification library preset on the server side not only collects feature information of APK files that identify viruses, Trojan horses and other malicious software, but also collects feature information of APK files that identify normal applications. When one item of information in the APK file matches the characteristic information of malicious software, the obtained scanning result corresponding to the APK file indicates that the APK file is not safe.

进一步的,本实施例中还允许用户对安卓应用程序的安装进行选择,即在通过上述判断逻辑对是否允许进程相关的应用程序向安卓设备中安装安卓应用程序进行判断之后,结合用户的选择做出最终的判决结果。当根据上述判断逻辑确认允许灰进程相关的应用程序向安卓设备中安装安卓应用程序时(或者其他允许在安卓设备中安装应用程序的场景,如白进程),本方法还包括:Further, in this embodiment, the user is also allowed to choose the installation of the Android application program, that is, after the above judgment logic is used to determine whether the application program related to the process is allowed to install the Android application program in the Android device, combined with the user's choice to make a selection. issue the final verdict. When it is confirmed according to the above judgment logic that the application program related to the gray process is allowed to install the Android application program in the Android device (or other scenarios that allow the application program to be installed in the Android device, such as a white process), the method also includes:

在用户界面弹出框中展示提示信息,该提示信息包括灰进程相关的应用程序的图标、名称、应用描述、是否广告程序或者恶意程序的指示信息和/或处理方式信息,该处理方式信息可以包括所推荐的对应用程序的处理建议等。然后,接收用户通过用户界面弹出框发送的选择指令;当选择指令指示允许灰进程相关的应用程序时,最终判断允许该灰进程相关的应用程序向安卓设备中安装安卓应用程序,并执行该安卓应用程序的安装操作,当选择指令指示禁止灰进程相关的应用程序时,判断禁止该灰进程相关的应用程序向安卓设备中安装安卓应用程序,不再执行该安卓应用程序的安装过程。Display prompt information in a pop-up box on the user interface, the prompt information includes the icon, name, application description of the application program related to the gray process, indication information whether it is an advertising program or a malicious program, and/or processing method information, and the processing method information may include Recommended processing recommendations for applications, etc. Then, receive the selection instruction sent by the user through the pop-up box of the user interface; when the selection instruction indicates that the application program related to the gray process is allowed, finally judge that the application program related to the gray process is allowed to install the Android application program in the Android device, and execute the Android application program. For the installation operation of the application program, when the selection instruction indicates that the application program related to the gray process is prohibited, it is judged that the application program related to the gray process is prohibited from installing the Android application program in the Android device, and the installation process of the Android application program is no longer executed.

S210:拦截灰进程相关的应用程序向安卓设备中安装安卓应用程序的操作。S210: Intercept the operation of installing the Android application program to the Android device by the application program related to the gray process.

本方案的拦截机制中,中断灰进程与5037端口的连接,如控制ADB客户端终端与灰进程断开连接,以及,禁止通过5037端口将来自灰进程的APK文件发送至安卓设备,例如,控制ADB服务端,禁止将该灰进程的APK文件发送至安卓设备。In the interception mechanism of this solution, the connection between the gray process and the 5037 port is interrupted, such as controlling the ADB client terminal to disconnect the gray process, and prohibiting the APK file from the gray process from being sent to the Android device through the 5037 port, for example, controlling The ADB server is prohibited from sending the APK file of the gray process to the Android device.

本发明又一个实施例提供了一种拦截在移动终端中安装安卓应用程序的装置400,参见图4,包括端口监测器410、判断器412和拦截器414。Yet another embodiment of the present invention provides an apparatus 400 for intercepting the installation of an Android application in a mobile terminal, as shown in FIG. 4 , which includes a port monitor 410 , a determiner 412 and an interceptor 414 .

端口监测器410,适于在网络驱动层对计算机中与安卓调试桥ADB工具相绑定的预定端口进行监测。该预定端口为127.0.0.1:5037端口(5037端口)。参见图4,ADB工具包括ADB客户端和ADB服务端。第三方应用程序的进程通过ADB客户端与5037端口建立Socket连接,5037端口与ADB服务端相绑定,ADB服务端通过USB与安卓设备相连接。装置400能够对计算机中的ADB工具和5037端口进行控制。The port monitor 410 is adapted to monitor a predetermined port bound with the Android debugging bridge ADB tool in the computer at the network driver layer. The predetermined port is 127.0.0.1:5037 port (5037 port). Referring to Figure 4, the ADB tool includes an ADB client and an ADB server. The process of the third-party application program establishes a Socket connection with the 5037 port through the ADB client, and the 5037 port is bound to the ADB server, and the ADB server is connected to the Android device through USB. The device 400 can control the ADB tool and the 5037 port in the computer.

本实施例中以移动终端为安卓设备(如安卓手机或其它支持安卓系统的终端)为例进行说明。In this embodiment, the mobile terminal is an Android device (such as an Android phone or other terminals supporting the Android system) as an example for illustration.

判断器412适于当监测到计算机中的进程通过ADB工具与移动终端(安卓设备)建立连接时,判断进程是否是灰进程;以及,若判断出进程是灰进程,当获知灰进程相关的应用程序要通过ADB工具向安卓设备安装安卓应用程序时,判断是否允许该灰进程相关的应用程序向安卓设备中安装安卓应用程序。具体的,判断器412当监测到灰进程向预定端口发送安卓应用程序的安装指令时,获知灰进程相关的应用程序要通过ADB工具向安卓设备安装安卓应用程序;当监测到灰进程向预定端口发送安卓安装包APK文件,获取该APK文件并对该APK文件进行扫描,当扫描结果指示APK文件安全时,判断允许该灰进程相关的应用程序向安卓设备中安装安卓应用程序,否则,判断不允许该灰进程相关的应用程序向安卓设备中安装安卓应用程序。The determiner 412 is adapted to determine whether the process is a gray process when it is detected that the process in the computer establishes a connection with the mobile terminal (Android device) through the ADB tool; When the program wants to install the Android application program to the Android device through the ADB tool, it is judged whether to allow the application program related to the gray process to install the Android application program in the Android device. Specifically, when the determiner 412 detects that the gray process sends an installation instruction of the Android application to the predetermined port, it knows that the application related to the gray process will install the Android application to the Android device through the ADB tool; Send the APK file of the Android installation package, obtain the APK file and scan the APK file. When the scanning result indicates that the APK file is safe, it is judged that the application program related to the gray process is allowed to install the Android application program in the Android device, otherwise, it is judged not The application program related to the gray process is allowed to install the Android application program in the Android device.

判断器412在执行对APK文件的扫描时,具体执行如下操作:提取APK文件的各种信息,这些信息包括但不局限于安装包名称、版本号、数字签名、安卓组件接收器(receiver)的特征、安卓组件服务(service)的特征、安卓组件活动(activity)的特征、可执行文件中的指令(或字符串)和/或APK目录下各文件的MD5值(也可以是SHA1值);然后,将提取出的信息发送至设置有安全识别库的服务器侧,以使服务器侧利用安全识别库中的特征信息对APK文件的信息进行扫描;接收服务器侧下发的APK文件对应的扫描结果,从而获知扫描结果。其中,在服务器侧,将判断器上报的APK文件的信息与安全识别库中的恶意软件的特征信息进行比对,只要有一项信息命中,则该APK文件就不是安全的文件。优选的,上述安全识别库可以为云查杀引擎。When the judging unit 412 scans the APK file, it specifically performs the following operations: extract various information of the APK file, which information includes but is not limited to the installation package name, version number, digital signature, android component receiver (receiver) Features, features of Android component services (service), features of Android component activities (activity), instructions (or character strings) in executable files and/or MD5 values (or SHA1 values) of files in the APK directory; Then, the extracted information is sent to the server side provided with the security identification library, so that the server side uses the feature information in the security identification library to scan the information of the APK file; the scanning result corresponding to the APK file issued by the server side is received , to get the scan results. Wherein, on the server side, the information of the APK file reported by the judger is compared with the feature information of the malicious software in the security identification library, and as long as one piece of information matches, the APK file is not a safe file. Preferably, the above security identification library may be a cloud scanning and killing engine.

灰进程为预设的白名单和黑名单之外的所有进程,本实施例还利用预设的白名单和黑名单对白进程和黑进程进行识别,具体的,判断器412还适于当监测到计算机中的进程通过ADB工具与安卓设备建立连接时,判断进程的类型为位于白名单中的白进程,则拦截器414还适于允许该白进程相关的应用程序对安卓设备执行的所有操作。The gray process is all processes except the preset white list and black list. This embodiment also uses the preset white list and black list to identify the white process and the black process. Specifically, the determiner 412 is also suitable for monitoring When the process in the computer establishes a connection with the Android device through the ADB tool, it is judged that the type of the process is a white process located in the white list, and the interceptor 414 is also suitable for allowing all operations performed by the application program related to the white process on the Android device.

以及,判断器412还适于当监测到计算机中的进程通过ADB工具与安卓设备建立连接时,判断进程的类型为位于黑名单中的黑进程,则拦截器414还适于立即对该黑进程相关的应用程序进行拦截,禁止黑进程相关的应用程序对安卓设备执行任何操作。And, the judger 412 is also suitable for when the process in the computer is monitored to establish a connection with the Android device through the ADB tool, and the type of the judged process is a black process located in the blacklist, then the interceptor 414 is also suitable for immediately identifying the black process. Relevant applications are intercepted, and applications related to black processes are prohibited from performing any operations on Android devices.

进一步的,由于通过5037端口传输的数据包除了与安卓设备通讯的数据包之外,还会包括其他类型的数据包,为了避免拦截到其他正常的程序,保证其他程序的正常运行,本实施例中,判断器412还适于在判断进程是否是灰进程之前,判断进程是否为支持ADB协议的进程,是则,继续执行判断进程是否是灰进程的操作,否则,允许进程的运行。具体的,判断器412判断进程向预定端口发送的数据包的格式和数据内容是否满足ADB协议,若满足,则进程为支持ADB协议的进程,若不满足,则进程不是支持ADB协议的进程。Further, since the data packets transmitted through the 5037 port will include other types of data packets in addition to the data packets communicated with the Android device, in order to avoid intercepting other normal programs and ensure the normal operation of other programs, this embodiment Among them, the judging unit 412 is further adapted to judge whether the process is a process supporting the ADB protocol before judging whether the process is a gray process, and if so, continue to perform the operation of judging whether the process is a gray process, otherwise, allow the running of the process. Specifically, the judging unit 412 judges whether the format and data content of the data packet sent by the process to the predetermined port meet the ADB protocol. If so, the process is a process supporting the ADB protocol; if not, the process is not a process supporting the ADB protocol.

进一步的,本实施例在通过判断器412按照上述判断逻辑对是否允许进程向安卓设备中安装安卓应用程序进行判断之后,还结合用户的选择做出最终的判决结果。例如,判断器412在用户界面弹出框中展示提示信息,该提示信息包括灰进程相关的应用程序的图标、名称、应用描述、是否广告程序或者恶意程序的指示信息和/或处理方式信息;接收用户通过用户界面弹出框发送的选择指令;当选择指令指示允许灰进程相关的应用程序时,判断允许该灰进程相关的应用程序向安卓设备中安装安卓应用程序,当选择指令指示禁止灰进程相关的应用程序时,判断禁止该灰进程相关的应用程序向安卓设备中安装安卓应用程序。Further, in this embodiment, after the judging unit 412 judges whether to allow the process to install the Android application program in the Android device according to the above judgment logic, the final judgment result is also made in combination with the user's choice. For example, the determiner 412 displays prompt information in a pop-up box on the user interface, and the prompt information includes the icon, name, application description, indication information of whether an advertising program or a malicious program and/or processing method information of an application program related to the gray process; The selection instruction sent by the user through the pop-up box of the user interface; when the selection instruction indicates that the application program related to the gray process is allowed, it is judged that the application program related to the gray process is allowed to install the Android application program in the Android device; when the selection instruction indicates that the application program related to the gray process is prohibited When the application program is used, it is judged that the application program related to the gray process is prohibited from installing the Android application program in the Android device.

对于灰进程的拦截,拦截器414当不允许灰进程相关的应用程序向安卓设备中安装安卓应用程序时,拦截灰进程相关的应用程序向安卓设备中安装安卓应用程序的操作。例如,拦截器414中断灰进程与预定端口的连接,禁止通过预定端口将来自灰进程的APK文件发送至安卓设备。对于白进程和黑进程的拦截,参见上文的相关内容的描述。For the interception of the gray process, the interceptor 414 intercepts the operation of installing the Android application program to the Android device by the application program related to the gray process when the application program related to the gray process is not allowed to install the Android application program in the Android device. For example, the interceptor 414 interrupts the connection between the gray process and the predetermined port, and prohibits sending the APK file from the gray process to the Android device through the predetermined port. For the interception of white process and black process, refer to the description of related content above.

本发明装置实施例中各器件的具体工作方式可以参见本发明的方法实施例,在此不再赘述。For the specific working modes of each device in the device embodiment of the present invention, reference may be made to the method embodiment of the present invention, which will not be repeated here.

由上所述,本发明实施例通过对与ADB工具相绑定的预定端口的监测,获知到与ADB工具建立连接的所有进程,筛选出其中的灰进程并对灰进程相关的应用程序向移动终端中安装安卓应用程序的权限进行判断的技术手段,解决了现有技术中第三方程序随意向移动终端中安装应用程序造成的问题,能够对利用ADB工具与安卓交互的第三方程序进行有效监控,并通过进程类型和判断逻辑控制第三方程序的权限,从而保障了移动终端中信息的安全性,方便了用户使用。From the above, the embodiment of the present invention learns all processes that establish connections with the ADB tool by monitoring the predetermined ports bound to the ADB tool, screens out the gray processes among them, and moves the application programs related to the gray processes to The technical means for judging the permissions of installing Android applications in the terminal solves the problem caused by third-party programs randomly installing applications in the mobile terminal in the prior art, and can effectively monitor the third-party programs that use ADB tools to interact with Android , and control the authority of the third-party program through the process type and judgment logic, thereby ensuring the security of information in the mobile terminal and making it convenient for users to use.

在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.

类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的拦截在移动终端中安装安卓应用程序的装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) can be used in practice to implement the interception of some or all of the components in the device for installing an Android application program in a mobile terminal according to an embodiment of the present invention. Some or all functions. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

本发明的实施例揭示了A1、一种拦截在移动终端中安装安卓应用程序的方法,包括:在网络驱动层对计算机中与安卓调试桥ADB工具相绑定的预定端口进行监测;当监测到计算机中的进程通过ADB工具与移动终端建立连接时,判断所述进程是否是灰进程;若判断出所述进程是灰进程,当获知所述灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序时,判断是否允许该灰进程相关的应用程序向移动终端中安装安卓应用程序;当不允许所述灰进程相关的应用程序向移动终端中安装安卓应用程序时,拦截所述灰进程相关的应用程序向移动终端中安装安卓应用程序的操作。A2、根据权利要求A1所述的方法,其中,所述方法还包括:当监测到计算机中的进程通过ADB工具与移动终端建立连接时,若判断所述进程的类型为位于白名单中的白进程,则允许该白进程相关的应用程序对移动终端执行的所有操作;若判断所述进程的类型为位于黑名单中的黑进程,则立即对该黑进程相关的应用程序进行拦截,禁止所述黑进程相关的应用程序对移动终端执行任何操作并在用户界面弹出框中展示对该黑进程相关的应用程序拦截成功的信息。A3、根据权利要求A1或A2所述的方法,其中,在判断所述进程是否是灰进程之前,所述方法还包括:判断所述进程是否为支持ADB协议的进程,是则,继续执行判断所述进程是否是灰进程的操作,否则,允许所述进程的运行。A4、根据权利要求A3所述的方法,其中,所述判断所述进程是否为支持ADB协议的进程包括:判断所述进程向所述预定端口发送的数据包的格式和数据内容是否满足ADB协议,若满足,则所述进程为支持ADB协议的进程,若不满足,则所述进程不是支持ADB协议的进程。A5、根据权利要求A3所述的方法,其中,所述当获知所述灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序时,判断是否允许该灰进程相关的应用程序向移动终端中安装安卓应用程序包括:当监测到所述灰进程向所述预定端口发送安卓应用程序的安装指令时,获知所述灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序;当监测到所述灰进程向所述预定端口发送安卓安装包APK文件,获取该APK文件并对该APK文件进行扫描,当扫描结果指示APK文件安全时,判断允许该灰进程相关的应用程序向移动终端中安装安卓应用程序,否则,判断不允许该灰进程相关的应用程序向移动终端中安装安卓应用程序。A6、根据权利要求A5所述的方法,其中,所述对该APK文件进行扫描包括:提取所述APK文件的安装包名称、版本号、数字签名、安卓组件接收器的特征、安卓组件服务的特征、安卓组件活动的特征、可执行文件中的指令和/或APK目录下各文件的消息摘要算法第五版MD5值;将提取出的信息发送至设置有安全识别库的服务器侧,以使服务器侧利用安全识别库中的特征信息对所述APK文件的信息进行扫描;接收服务器侧下发的所述APK文件对应的扫描结果。A7、根据权利要求A1所述的方法,其中,所述当获知所述灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序时,判断是否允许该灰进程相关的应用程序向移动终端中安装安卓应用程序包括:在用户界面弹出框中展示提示信息,所述提示信息包括所述灰进程相关的应用程序的图标、名称、应用描述、是否广告程序或者恶意程序的指示信息和/或处理方式信息;接收用户通过所述用户界面弹出框发送的选择指令;当所述选择指令指示允许所述灰进程相关的应用程序时,判断允许该灰进程相关的应用程序向移动终端中安装安卓应用程序,当所述选择指令指示禁止所述灰进程相关的应用程序时,判断禁止该灰进程相关的应用程序向移动终端中安装安卓应用程序。A8、根据权利要求A1所述的方法,其中,所述拦截所述灰进程相关的应用程序向移动终端中安装安卓应用程序的操作包括:中断所述灰进程与所述预定端口的连接,禁止通过所述预定端口将来自所述灰进程的APK文件发送至移动终端。A9、一种拦截在移动终端中安装安卓应用程序的装置,包括:端口监测器,适于在网络驱动层对计算机中与安卓调试桥ADB工具相绑定的预定端口进行监测;判断器,适于当监测到计算机中的进程通过ADB工具与移动终端建立连接时,判断所述进程是否是灰进程;以及,若判断出所述进程是灰进程,当获知所述灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序时,判断是否允许该灰进程相关的应用程序向移动终端中安装安卓应用程序;拦截器,适于当不允许所述灰进程相关的应用程序向移动终端中安装安卓应用程序时,拦截所述灰进程相关的应用程序向移动终端中安装安卓应用程序的操作。A10、根据权利要求A9所述的装置,其中,所述判断器,还适于当监测到计算机中的进程通过ADB工具与移动终端建立连接时,判断所述进程的类型为白名单中的白进程,则所述拦截器,还适于允许该白进程相关的应用程序对移动终端执行的所有操作;以及所述判断器,还适于当监测到计算机中的进程通过ADB工具与移动终端建立连接时,判断所述进程的类型为黑名单中的黑进程,则所述拦截器,还适于对该黑进程相关的应用程序进行拦截,禁止所述黑进程相关的应用程序对移动终端执行任何操作并在用户界面弹出框中展示对该黑进程相关的应用程序拦截成功的信息。A11、根据权利要求A9或A10所述的装置,其中,所述判断器,还适于在判断所述进程是否是灰进程之前,判断所述进程是否为支持ADB协议的进程,是则,继续执行判断所述进程是否是灰进程的操作,否则,允许所述进程的运行。A12、根据权利要求A11所述的装置,其中,所述判断器,适于判断所述进程向所述预定端口发送的数据包的格式和数据内容是否满足ADB协议,若满足,则所述进程为支持ADB协议的进程,若不满足,则所述进程不是支持ADB协议的进程。A13、根据权利要求A11所述的装置,其中,所述判断器,适于当监测到所述灰进程向所述预定端口发送安卓应用程序的安装指令时,获知所述灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序;当监测到所述灰进程向所述预定端口发送安卓安装包APK文件,获取该APK文件并对该APK文件进行扫描,当扫描结果指示APK文件安全时,判断允许该灰进程相关的应用程序向移动终端中安装安卓应用程序,否则,判断不允许该灰进程相关的应用程序向移动终端中安装安卓应用程序。A14、根据权利要求A9所述的装置,其中,所述判断器,适于通过如下方式获取所述扫描结果:提取所述APK文件的安装包名称、版本号、数字签名、安卓组件接收器的特征、安卓组件服务的特征、安卓组件活动的特征、可执行文件中的指令和/或APK目录下各文件的MD5值;将提取出的信息发送至设置有安全识别库的服务器侧,以使服务器侧利用安全识别库中的特征信息对所述APK文件的信息进行扫描;接收服务器侧下发的所述APK文件对应的扫描结果。A15、根据权利要求A9所述的装置,其中,所述判断器适于在用户界面弹出框中展示提示信息,所述提示信息包括所述灰进程相关的应用程序的图标、名称、应用描述、是否广告程序或者恶意程序的指示信息和/或处理方式信息;接收用户通过所述用户界面弹出框发送的选择指令;当所述选择指令指示允许所述灰进程相关的应用程序时,判断允许该灰进程相关的应用程序向移动终端中安装安卓应用程序,当所述选择指令指示禁止所述灰进程相关的应用程序时,判断禁止该灰进程相关的应用程序向移动终端中安装安卓应用程序。A16、根据权利要求A9所述的装置,其中,所述拦截器,适于中断所述灰进程与所述预定端口的连接,禁止通过所述预定端口将来自所述灰进程的APK文件发送至移动终端。Embodiments of the present invention disclose A1, a method for intercepting the installation of an Android application program in a mobile terminal, comprising: monitoring the predetermined port bound to the Android debugging bridge ADB tool in the computer at the network driver layer; When the process in the computer establishes a connection with the mobile terminal through the ADB tool, it is judged whether the process is a gray process; When installing the Android application program, judge whether to allow the application program related to the gray process to install the Android application program in the mobile terminal; when the application program related to the gray process is not allowed to install the Android application program in the mobile terminal, intercept the gray process The process-related application program installs the Android application program into the mobile terminal. A2. The method according to claim A1, wherein the method further comprises: when it is detected that the process in the computer establishes a connection with the mobile terminal through the ADB tool, if it is determined that the type of the process is a white in the white list process, then allow the application program related to the white process to perform all operations on the mobile terminal; if it is judged that the type of the process is a black process in the blacklist, then immediately intercept the application program related to the black process and prohibit all operations The application program related to the black process performs any operation on the mobile terminal and displays the information that the application program related to the black process is successfully intercepted in a pop-up box on the user interface. A3. The method according to claim A1 or A2, wherein, before judging whether the process is a gray process, the method further includes: judging whether the process is a process supporting the ADB protocol, and if so, continue to execute the judgment Whether the process is a gray process operation, otherwise, the process is allowed to run. A4. The method according to claim A3, wherein the judging whether the process is a process supporting the ADB protocol comprises: judging whether the format and data content of the data packet sent by the process to the predetermined port meet the ADB protocol , if satisfied, the process is a process supporting the ADB protocol; if not satisfied, the process is not a process supporting the ADB protocol. A5. The method according to claim A3, wherein, when it is known that the application program related to the gray process will install the Android application program to the mobile terminal through the ADB tool, it is judged whether to allow the application program related to the gray process to move to the mobile terminal. Installing the Android application program in the terminal includes: when monitoring that the gray process sends an installation instruction of the Android application program to the predetermined port, knowing that the application program related to the gray process will install the Android application program to the mobile terminal through the ADB tool; When it is detected that the gray process sends the Android installation package APK file to the predetermined port, the APK file is obtained and the APK file is scanned, and when the scan result indicates that the APK file is safe, it is judged that the application program related to the gray process is allowed to send to the predetermined port. An Android application program is installed in the mobile terminal, otherwise, it is judged that the application program related to the gray process is not allowed to install the Android application program in the mobile terminal. A6. The method according to claim A5, wherein said scanning the APK file comprises: extracting the name of the installation package, the version number, the digital signature, the characteristics of the receiver of the Android component, and the information of the Android component service of the APK file. Features, characteristics of Android component activities, instructions in the executable file and/or the MD5 value of the fifth version of the message digest algorithm of each file in the APK directory; the extracted information is sent to the server side provided with a security identification library, so that The server side uses the feature information in the security identification database to scan the information of the APK file; and receives the scanning result corresponding to the APK file sent by the server side. A7. The method according to claim A1, wherein, when it is known that the application program related to the gray process will install the Android application program to the mobile terminal through the ADB tool, it is judged whether to allow the application program related to the gray process to move to the mobile terminal. Installing the Android application program in the terminal includes: displaying prompt information in a pop-up box on the user interface, the prompt information including the icon, name, application description, indication information of the gray process-related application program, whether it is an advertising program or a malicious program, and/or or processing method information; receive a selection instruction sent by the user through the pop-up box of the user interface; when the selection instruction indicates that the application program related to the gray process is allowed, determine that the application program related to the gray process is allowed to be installed in the mobile terminal For the Android application program, when the selection instruction indicates that the application program related to the gray process is prohibited, it is judged that the application program related to the gray process is prohibited from installing the Android application program in the mobile terminal. A8. The method according to claim A1, wherein the operation of intercepting the application program related to the gray process to install the Android application program in the mobile terminal comprises: interrupting the connection between the gray process and the predetermined port, prohibiting Send the APK file from the gray process to the mobile terminal through the predetermined port. A9, a device for intercepting the Android application program installed in a mobile terminal, comprising: a port monitor, adapted to monitor the predetermined port bound to the Android debug bridge ADB tool in the computer at the network driver layer; a judger, suitable for When it is detected that the process in the computer establishes a connection with the mobile terminal through the ADB tool, it is judged whether the process is a gray process; When the Android application program is installed to the mobile terminal by the ADB tool, it is judged whether to allow the application program related to the gray process to install the Android application program in the mobile terminal; When the Android application program is installed in the mobile terminal, the operation of installing the Android application program in the mobile terminal by the application program related to the gray process is intercepted. A10. The device according to claim A9, wherein the determiner is further adapted to determine that the type of the process is white in the white list when it is monitored that the process in the computer establishes a connection with the mobile terminal through the ADB tool process, then the interceptor is also adapted to allow all operations performed by the application program related to the white process on the mobile terminal; and the judger is also adapted to establish When connecting, if it is judged that the type of the process is a black process in the blacklist, then the interceptor is also suitable for intercepting the application programs related to the black process, and prohibiting the application programs related to the black process from executing on the mobile terminal. Any operation and display the successful interception information of the application related to the black process in the pop-up box of the user interface. A11. The device according to claim A9 or A10, wherein the judger is further adapted to judge whether the process is a process supporting the ADB protocol before judging whether the process is a gray process, and if so, continue Execute the operation of judging whether the process is a gray process, otherwise, allow the running of the process. A12. The device according to claim A11, wherein the judger is adapted to judge whether the format and data content of the data packet sent by the process to the predetermined port meet the ADB protocol, and if so, the process It is a process supporting the ADB protocol, if not satisfied, the process is not a process supporting the ADB protocol. A13. The device according to claim A11, wherein the determiner is adapted to learn the application program related to the gray process when it is detected that the gray process sends an Android application installation instruction to the predetermined port To install the Android application program to the mobile terminal through the ADB tool; when monitoring the gray process to send the Android installation package APK file to the predetermined port, obtain the APK file and scan the APK file, when the scanning result indicates that the APK file is safe , it is determined that the application program related to the gray process is allowed to install the Android application program in the mobile terminal, otherwise, it is determined that the application program related to the gray process is not allowed to install the Android application program in the mobile terminal. A14. The device according to claim A9, wherein the judger is adapted to obtain the scan result by: extracting the installation package name, version number, digital signature, and Android component receiver of the APK file. Features, features of Android component services, features of Android component activities, instructions in executable files and/or the MD5 value of each file in the APK directory; the extracted information is sent to the server side provided with a security identification library, so that The server side uses the feature information in the security identification database to scan the information of the APK file; and receives the scanning result corresponding to the APK file sent by the server side. A15. The device according to claim A9, wherein the determiner is adapted to display prompt information in a pop-up box on the user interface, the prompt information including the icon, name, application description, Whether it is an advertisement program or malicious program indication information and/or processing information; receiving a selection instruction sent by the user through the user interface pop-up box; An application program related to a gray process installs an Android application program in the mobile terminal, and when the selection instruction indicates that the application program related to the gray process is prohibited, it is judged that the application program related to the gray process is prohibited from installing an Android application program in the mobile terminal. A16. The device according to claim A9, wherein the interceptor is adapted to interrupt the connection between the gray process and the predetermined port, and prohibit sending the APK file from the gray process to the predetermined port through the predetermined port. mobile terminal.

Claims (14)

1.一种拦截在移动终端中安装安卓应用程序的方法,包括:1. A method for intercepting Android application programs installed in mobile terminals, comprising: 在网络驱动层对计算机中与安卓调试桥ADB工具相绑定的预定端口进行监测;In the network driver layer, the predetermined port bound to the Android debugging bridge ADB tool in the computer is monitored; 当监测到计算机中的进程通过ADB工具与移动终端建立连接时,判断所述进程是否是灰进程;When monitoring the process in the computer to establish a connection with the mobile terminal through the ADB tool, judge whether the process is a gray process; 若判断出所述进程是灰进程,当获知所述灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序时,判断是否允许该灰进程相关的应用程序向移动终端中安装安卓应用程序,包括:当监测到所述灰进程向所述预定端口发送安卓应用程序的安装指令时,获知所述灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序;当监测到所述灰进程向所述预定端口发送安卓安装包APK文件,获取该APK文件并对该APK文件进行扫描,当扫描结果指示APK文件安全时,判断允许该灰进程相关的应用程序向移动终端中安装安卓应用程序,否则,判断不允许该灰进程相关的应用程序向移动终端中安装安卓应用程序;If it is judged that the process is a gray process, when it is known that the application program related to the gray process will install the Android application program to the mobile terminal through the ADB tool, judge whether to allow the application program related to the gray process to install the Android application program in the mobile terminal The program includes: when it is detected that the gray process sends an installation instruction of the Android application to the predetermined port, it is learned that the application related to the gray process will install the Android application to the mobile terminal through the ADB tool; The ash process sends the Android installation package APK file to the predetermined port, obtains the APK file and scans the APK file, and when the scan result indicates that the APK file is safe, it judges that the application program related to the ash process is allowed to be installed in the mobile terminal Android application program, otherwise, it is judged that the application program related to the gray process is not allowed to install the Android application program in the mobile terminal; 当不允许所述灰进程相关的应用程序向移动终端中安装安卓应用程序时,拦截所述灰进程相关的应用程序向移动终端中安装安卓应用程序的操作。When the application program related to the gray process is not allowed to install the Android application program in the mobile terminal, the operation of installing the Android application program in the mobile terminal by the application program related to the gray process is intercepted. 2.根据权利要求1所述的方法,其中,所述方法还包括:2. The method of claim 1, wherein the method further comprises: 当监测到计算机中的进程通过ADB工具与移动终端建立连接时,若判断所述进程的类型为位于白名单中的白进程,则允许该白进程相关的应用程序对移动终端执行的所有操作;When monitoring the process in the computer to establish a connection with the mobile terminal through the ADB tool, if it is judged that the type of the process is a white process located in the white list, then allow the application program related to the white process to perform all operations on the mobile terminal; 若判断所述进程的类型为位于黑名单中的黑进程,则立即对该黑进程相关的应用程序进行拦截,禁止所述黑进程相关的应用程序对移动终端执行任何操作并在用户界面弹出框中展示对该黑进程相关的应用程序拦截成功的信息。If it is judged that the type of the process is a black process located in the blacklist, then the application program related to the black process is intercepted immediately, and the application program related to the black process is prohibited from performing any operation on the mobile terminal and pops up a box on the user interface displays information about successful interception of applications related to the black process. 3.根据权利要求1或2所述的方法,其中,在判断所述进程是否是灰进程之前,所述方法还包括:3. The method according to claim 1 or 2, wherein, before judging whether the process is a gray process, the method further comprises: 判断所述进程是否为支持ADB协议的进程,是则,继续执行判断所述进程是否是灰进程的操作,否则,允许所述进程的运行。Judging whether the process is a process supporting the ADB protocol, if so, continue to perform the operation of judging whether the process is a gray process, otherwise, allow the operation of the process. 4.根据权利要求3所述的方法,其中,所述判断所述进程是否为支持ADB协议的进程包括:4. The method according to claim 3, wherein said judging whether said process is a process supporting the ADB protocol comprises: 判断所述进程向所述预定端口发送的数据包的格式和数据内容是否满足ADB协议,若满足,则所述进程为支持ADB协议的进程,若不满足,则所述进程不是支持ADB协议的进程。Judging whether the format and data content of the data packet sent by the process to the predetermined port meet the ADB protocol, if satisfied, the process is a process that supports the ADB protocol, and if not satisfied, the process does not support the ADB protocol process. 5.根据权利要求1所述的方法,其中,所述对该APK文件进行扫描包括:5. The method according to claim 1, wherein said scanning the APK file comprises: 提取所述APK文件的安装包名称、版本号、数字签名、安卓组件接收器的特征、安卓组件服务的特征、安卓组件活动的特征、可执行文件中的指令和/或APK目录下各文件的消息摘要算法第五版MD5值;Extract the name of the installation package, the version number, the digital signature, the characteristics of the Android component receiver, the characteristics of the Android component service, the characteristics of the Android component activity, the instructions in the executable file and/or the contents of each file in the APK directory of the APK file. MD5 value of the fifth edition of the message digest algorithm; 将提取出的信息发送至设置有安全识别库的服务器侧,以使服务器侧利用安全识别库中的特征信息对所述APK文件的信息进行扫描;The extracted information is sent to the server side provided with the security identification library, so that the server side uses the feature information in the security identification library to scan the information of the APK file; 接收服务器侧下发的所述APK文件对应的扫描结果。The scanning result corresponding to the APK file delivered by the server side is received. 6.根据权利要求1所述的方法,其中,所述当获知所述灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序时,判断是否允许该灰进程相关的应用程序向移动终端中安装安卓应用程序包括:6. The method according to claim 1, wherein, when it is known that the application program related to the gray process will install the Android application program to the mobile terminal through the ADB tool, it is judged whether to allow the application program related to the gray process to move to the mobile terminal. Android applications installed in the terminal include: 在用户界面弹出框中展示提示信息,所述提示信息包括所述灰进程相关的应用程序的图标、名称、应用描述、是否广告程序或者恶意程序的指示信息和/或处理方式信息;Display prompt information in a pop-up box on the user interface, where the prompt information includes the icon, name, application description, indication information of whether the gray process is an ad program or a malicious program, and/or processing information of an application program related to the gray process; 接收用户通过所述用户界面弹出框发送的选择指令;receiving a selection instruction sent by the user through the pop-up box of the user interface; 当所述选择指令指示允许所述灰进程相关的应用程序时,判断允许该灰进程相关的应用程序向移动终端中安装安卓应用程序,当所述选择指令指示禁止所述灰进程相关的应用程序时,判断禁止该灰进程相关的应用程序向移动终端中安装安卓应用程序。When the selection instruction indicates that the application program related to the gray process is allowed, it is judged that the application program related to the gray process is allowed to install the Android application program in the mobile terminal, and when the selection instruction indicates that the application program related to the gray process is prohibited , it is judged that the application program related to the gray process is prohibited from installing the Android application program in the mobile terminal. 7.根据权利要求1所述的方法,其中,所述拦截所述灰进程相关的应用程序向移动终端中安装安卓应用程序的操作包括:7. The method according to claim 1, wherein the operation of installing an Android application program in the mobile terminal by intercepting the application program related to the gray process comprises: 中断所述灰进程与所述预定端口的连接,禁止通过所述预定端口将来自所述灰进程的APK文件发送至移动终端。The connection between the gray process and the predetermined port is interrupted, and the APK file from the gray process is prohibited from being sent to the mobile terminal through the predetermined port. 8.一种拦截在移动终端中安装安卓应用程序的装置,包括:8. A device for intercepting the installation of an Android application program in a mobile terminal, comprising: 端口监测器,适于在网络驱动层对计算机中与安卓调试桥ADB工具相绑定的预定端口进行监测;The port monitor is suitable for monitoring the predetermined port bound to the Android debugging bridge ADB tool in the computer at the network driver layer; 判断器,适于当监测到计算机中的进程通过ADB工具与移动终端建立连接时,判断所述进程是否是灰进程;以及,若判断出所述进程是灰进程,当获知所述灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序时,判断是否允许该灰进程相关的应用程序向移动终端中安装安卓应用程序;具体地,适于当监测到所述灰进程向所述预定端口发送安卓应用程序的安装指令时,获知所述灰进程相关的应用程序要通过ADB工具向移动终端安装安卓应用程序;当监测到所述灰进程向所述预定端口发送安卓安装包APK文件,获取该APK文件并对该APK文件进行扫描,当扫描结果指示APK文件安全时,判断允许该灰进程相关的应用程序向移动终端中安装安卓应用程序,否则,判断不允许该灰进程相关的应用程序向移动终端中安装安卓应用程序;The judger is suitable for judging whether the process in the computer is a gray process when it is detected that the process in the computer establishes a connection with the mobile terminal through the ADB tool; and, if it is judged that the process is a gray process, when it is known that the gray process is related When the application program of the gray process is to install the Android application program to the mobile terminal through the ADB tool, it is judged whether to allow the application program related to the gray process to install the Android application program in the mobile terminal; When the predetermined port sends the installation instruction of the Android application program, it is known that the relevant application program of the gray process will install the Android application program to the mobile terminal through the ADB tool; when monitoring the gray process, the Android installation package APK file is sent to the predetermined port , obtain the APK file and scan the APK file. When the scanning result indicates that the APK file is safe, it is judged that the application program related to the gray process is allowed to install the Android application program in the mobile terminal, otherwise, it is judged that the application program related to the gray process is not allowed. The application program installs the Android application program in the mobile terminal; 拦截器,适于当不允许所述灰进程相关的应用程序向移动终端中安装安卓应用程序时,拦截所述灰进程相关的应用程序向移动终端中安装安卓应用程序的操作。The interceptor is suitable for intercepting the operation of installing the Android application program in the mobile terminal by the application program related to the gray process when the application program related to the gray process is not allowed to install the Android application program in the mobile terminal. 9.根据权利要求8所述的装置,其中,9. The apparatus of claim 8, wherein, 所述判断器,还适于当监测到计算机中的进程通过ADB工具与移动终端建立连接时,判断所述进程的类型为白名单中的白进程,则所述拦截器,还适于允许该白进程相关的应用程序对移动终端执行的所有操作;以及The judger is also suitable for judging that the type of the process is a white process in the white list when the process in the computer is monitored to establish a connection with the mobile terminal through the ADB tool, then the interceptor is also suitable for allowing the All operations performed by applications related to the white process on the mobile terminal; and 所述判断器,还适于当监测到计算机中的进程通过ADB工具与移动终端建立连接时,判断所述进程的类型为黑名单中的黑进程,则所述拦截器,还适于对该黑进程相关的应用程序进行拦截,禁止所述黑进程相关的应用程序对移动终端执行任何操作并在用户界面弹出框中展示对该黑进程相关的应用程序拦截成功的信息。The judger is also suitable for judging that the type of the process is a black process in the blacklist when the process in the computer is monitored to establish a connection with the mobile terminal through the ADB tool, then the interceptor is also suitable for the The application program related to the black process is intercepted, the application program related to the black process is prohibited from performing any operation on the mobile terminal and the information that the application program related to the black process is successfully intercepted is displayed in a pop-up box on the user interface. 10.根据权利要求权利要求8或9所述的装置,其中,10. Apparatus according to claim 8 or 9, wherein, 所述判断器,还适于在判断所述进程是否是灰进程之前,判断所述进程是否为支持ADB协议的进程,是则,继续执行判断所述进程是否是灰进程的操作,否则,允许所述进程的运行。The judger is also suitable for judging whether the process is a process supporting the ADB protocol before judging whether the process is a gray process, if so, continue to perform the operation of judging whether the process is a gray process, otherwise, allow the operation of the process. 11.根据权利要求权利要求10所述的装置,其中,11. The apparatus of claim 10, wherein: 所述判断器,适于判断所述进程向所述预定端口发送的数据包的格式和数据内容是否满足ADB协议,若满足,则所述进程为支持ADB协议的进程,若不满足,则所述进程不是支持ADB协议的进程。The judger is suitable for judging whether the format and data content of the data packet sent by the process to the predetermined port meet the ADB protocol, if satisfied, the process is a process supporting the ADB protocol, if not satisfied, the The above process does not support the ADB protocol. 12.根据权利要求8所述的装置,其中,12. The apparatus of claim 8, wherein, 所述判断器,适于通过如下方式获取所述扫描结果:提取所述APK文件的安装包名称、版本号、数字签名、安卓组件接收器的特征、安卓组件服务的特征、安卓组件活动的特征、可执行文件中的指令和/或APK目录下各文件的MD5值;将提取出的信息发送至设置有安全识别库的服务器侧,以使服务器侧利用安全识别库中的特征信息对所述APK文件的信息进行扫描;接收服务器侧下发的所述APK文件对应的扫描结果。The judger is adapted to obtain the scan result in the following manner: extracting the installation package name, version number, digital signature, characteristics of the Android component receiver, characteristics of the Android component service, and characteristics of the Android component activity of the APK file , the instructions in the executable file and/or the MD5 value of each file under the APK directory; the extracted information is sent to the server side provided with the security identification library, so that the server side uses the feature information in the security identification library to identify the described The information of the APK file is scanned; and the scanning result corresponding to the APK file sent by the server side is received. 13.根据权利要求8所述的装置,其中,13. The apparatus of claim 8, wherein, 所述判断器适于在用户界面弹出框中展示提示信息,所述提示信息包括所述灰进程相关的应用程序的图标、名称、应用描述、是否广告程序或者恶意程序的指示信息和/或处理方式信息;接收用户通过所述用户界面弹出框发送的选择指令;当所述选择指令指示允许所述灰进程相关的应用程序时,判断允许该灰进程相关的应用程序向移动终端中安装安卓应用程序,当所述选择指令指示禁止所述灰进程相关的应用程序时,判断禁止该灰进程相关的应用程序向移动终端中安装安卓应用程序。The determiner is adapted to display prompt information in a pop-up box on the user interface, the prompt information includes the icon, name, application description, indication information and/or processing of the application program related to the gray process, whether it is an advertising program or a malicious program Mode information; receiving a selection instruction sent by the user through the pop-up box of the user interface; when the selection instruction indicates that the application program related to the gray process is allowed, it is judged that the application program related to the gray process is allowed to install the Android application in the mobile terminal When the selection instruction indicates that the application program related to the gray process is prohibited, it is judged that the application program related to the gray process is prohibited from installing the Android application program in the mobile terminal. 14.根据权利要求8所述的装置,其中,所述拦截器,适于当不允许所述灰进程相关的应用程序向移动终端中安装安卓应用程序时,中断所述灰进程与所述预定端口的连接,禁止通过所述预定端口将来自所述灰进程的APK文件发送至移动终端。14. The device according to claim 8, wherein the interceptor is adapted to interrupt the connection between the gray process and the predetermined process when the application program related to the gray process is not allowed to install the Android application in the mobile terminal. The connection of the port prohibits sending the APK file from the gray process to the mobile terminal through the predetermined port.
CN201310226610.9A 2013-06-07 2013-06-07 Intercept the method and apparatus installing Android application program in the terminal Active CN103279706B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310226610.9A CN103279706B (en) 2013-06-07 2013-06-07 Intercept the method and apparatus installing Android application program in the terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310226610.9A CN103279706B (en) 2013-06-07 2013-06-07 Intercept the method and apparatus installing Android application program in the terminal

Publications (2)

Publication Number Publication Date
CN103279706A CN103279706A (en) 2013-09-04
CN103279706B true CN103279706B (en) 2016-06-22

Family

ID=49062221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310226610.9A Active CN103279706B (en) 2013-06-07 2013-06-07 Intercept the method and apparatus installing Android application program in the terminal

Country Status (1)

Country Link
CN (1) CN103279706B (en)

Families Citing this family (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744686B (en) * 2013-10-18 2017-03-08 聚好看科技股份有限公司 Control method and the system of installation is applied in intelligent terminal
CN103593212A (en) * 2013-11-01 2014-02-19 小米科技有限责任公司 Method and device for installing application and apparatus
CN103617387B (en) * 2013-11-25 2016-12-14 北京奇虎科技有限公司 A kind of method and device preventing automatic set up applications
CN104683996B (en) * 2013-11-29 2018-07-24 中国移动通信集团公司 A kind of mobile application security management-control method and equipment
CN103646215A (en) * 2013-12-23 2014-03-19 北京奇虎科技有限公司 Application installation control method, related system and related device
CN104750458A (en) * 2013-12-26 2015-07-01 三亚中兴软件有限责任公司 Control method, control device, monitoring processing method and monitoring processing device for terminal application
CN103914423B (en) * 2014-03-14 2018-07-03 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN105204884A (en) * 2014-06-27 2015-12-30 联想(北京)有限公司 Information processing method and electronic equipment
CN104239106B (en) * 2014-09-22 2018-08-07 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN104375831B (en) * 2014-11-06 2018-04-20 北京奇虎科技有限公司 Realize the methods, devices and systems of the webpage and inter-application communication on terminal device
CN104462952B (en) * 2014-12-31 2017-11-10 北京奇虎科技有限公司 A kind of method and device forbidden using self-starting
CN105005494A (en) * 2015-08-28 2015-10-28 广东欧珀移动通信有限公司 A method and system for preventing silent installation of applications
CN105678161A (en) * 2015-12-23 2016-06-15 北京奇虎科技有限公司 Installation monitoring method and apparatus of applications
CN106919413A (en) * 2015-12-25 2017-07-04 北京奇虎科技有限公司 A kind of method and apparatus that application APP is called by webpage
CN107026764B (en) * 2016-02-02 2020-01-14 腾讯科技(深圳)有限公司 Remote debugging method, device, server and system
CN105975320B (en) * 2016-05-26 2020-03-17 宇龙计算机通信科技(深圳)有限公司 Method and device for forbidding installation of third-party application and terminal
CN106055357A (en) * 2016-05-26 2016-10-26 北京小米移动软件有限公司 Application installation method and device
CN106022106A (en) * 2016-05-30 2016-10-12 努比亚技术有限公司 Application installation method and device and terminal
CN107798240B (en) * 2016-09-07 2019-10-18 武汉安天信息技术有限责任公司 A kind of method and device operating mobile device for monitoring the end PC
CN106534342B (en) * 2016-12-07 2019-09-17 腾讯科技(深圳)有限公司 Connect control method, host and system
CN106648783A (en) * 2016-12-27 2017-05-10 北京奇虎科技有限公司 Method and device for installing application program and mobile terminal
CN108280343B (en) * 2017-01-06 2021-04-09 阿里巴巴(中国)有限公司 Method, device and system for detecting application security in android environment
CN107678912B (en) * 2017-09-12 2020-09-22 上海展扬通信技术有限公司 Application program monitoring method and monitoring system based on intelligent terminal
CN107592665A (en) * 2017-10-27 2018-01-16 维沃移动通信有限公司 A kind of control method of application program, device and mobile terminal
CN110022340B (en) * 2018-01-10 2021-05-25 腾讯科技(深圳)有限公司 Application installation method and device and terminal
CN108255677A (en) * 2018-01-16 2018-07-06 中电福富信息科技有限公司 The vehicle-mounted vehicle device of car networking and Android device communication means and its device
CN108537040B (en) * 2018-04-12 2023-03-14 腾讯科技(深圳)有限公司 Method, device, terminal and storage medium for intercepting telecom fraud Trojan horse program
CN110969815A (en) * 2018-09-28 2020-04-07 北京国双科技有限公司 Alarm method and device based on android device
CN109992430B (en) * 2019-02-28 2021-07-20 维沃移动通信有限公司 Data transmission method, first terminal and second terminal
CN110737887B (en) * 2019-10-22 2021-11-30 厦门美图之家科技有限公司 Malicious code detection method and device, electronic equipment and storage medium
CN114491506A (en) * 2020-11-13 2022-05-13 奇安信科技集团股份有限公司 Behavior control method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063588A (en) * 2010-12-15 2011-05-18 北京北信源软件股份有限公司 Control method and system for safety protection of computer terminal network
CN102254113A (en) * 2011-06-27 2011-11-23 深圳市安之天信息技术有限公司 Method and system for detecting and intercepting malicious code of mobile terminal
CN102663285A (en) * 2012-03-21 2012-09-12 奇智软件(北京)有限公司 Extracting method and extracting device for APK (android package) virus characteristic code
CN102779257A (en) * 2012-06-28 2012-11-14 奇智软件(北京)有限公司 Security detection method and system of Android application program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130067577A1 (en) * 2011-09-14 2013-03-14 F-Secure Corporation Malware scanning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063588A (en) * 2010-12-15 2011-05-18 北京北信源软件股份有限公司 Control method and system for safety protection of computer terminal network
CN102254113A (en) * 2011-06-27 2011-11-23 深圳市安之天信息技术有限公司 Method and system for detecting and intercepting malicious code of mobile terminal
CN102663285A (en) * 2012-03-21 2012-09-12 奇智软件(北京)有限公司 Extracting method and extracting device for APK (android package) virus characteristic code
CN102779257A (en) * 2012-06-28 2012-11-14 奇智软件(北京)有限公司 Security detection method and system of Android application program

Also Published As

Publication number Publication date
CN103279706A (en) 2013-09-04

Similar Documents

Publication Publication Date Title
CN103279706B (en) Intercept the method and apparatus installing Android application program in the terminal
US11960605B2 (en) Dynamic analysis techniques for applications
US11604878B2 (en) Dynamic analysis techniques for applications
US11210390B1 (en) Multi-version application support and registration within a single operating system environment
CN103632096B (en) A kind of method and apparatus that safety detection is carried out to equipment
US11720666B2 (en) Application-level sandboxing on devices
US11687653B2 (en) Methods and apparatus for identifying and removing malicious applications
US10198574B1 (en) System and method for analysis of a memory dump associated with a potentially malicious content suspect
Xing et al. Upgrading your android, elevating my malware: Privilege escalation through mobile os updating
CN104239786B (en) ROOT-free active defense configuration method and device
US9912698B1 (en) Malicious content analysis using simulated user interaction without user involvement
US9268946B2 (en) Quantifying the risks of applications for mobile devices
CN102694817B (en) The whether abnormal method of the network behavior of a kind of recognizer, Apparatus and system
CN104517054B (en) Method, device, client and server for detecting malicious APK
US9811665B1 (en) Static and dynamic security analysis of apps for mobile devices
US20210264030A1 (en) Integrated application analysis and endpoint protection
US20140013429A1 (en) Method for processing an operating application program and device for the same
CN104392176A (en) Mobile terminal and method for intercepting device manager authority thereof
CN111782416A (en) Data reporting method, device, system, terminal and computer readable storage medium
CN103595774A (en) System application uninstalling method and device with terminal based on server side
CN104462997B (en) Method, device and system for protecting work data in mobile terminal
CN104239797B (en) Active defense method and device
WO2014117652A1 (en) Method and device for preventing application in an operating system from being uninstalled
US20170372311A1 (en) Secure payment-protecting method and related electronic device
EP4478226A1 (en) System and method of anti-virus scanning of objects on a mobile device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220725

Address after: 300450 No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science Park, Binhai New Area, Tianjin

Patentee after: 3600 Technology Group Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230713

Address after: 1765, floor 17, floor 15, building 3, No. 10 Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: Beijing Hongxiang Technical Service Co.,Ltd.

Address before: 300450 No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science Park, Binhai New Area, Tianjin

Patentee before: 3600 Technology Group Co.,Ltd.

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 1765, floor 17, floor 15, building 3, No. 10 Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: Beijing 360 Zhiling Technology Co.,Ltd.

Country or region after: China

Address before: 1765, floor 17, floor 15, building 3, No. 10 Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee before: Beijing Hongxiang Technical Service Co.,Ltd.

Country or region before: China