WO2020134033A1 - 用于确定应用程序在运行时的安全性的方法及其装置 - Google Patents

用于确定应用程序在运行时的安全性的方法及其装置 Download PDF

Info

Publication number
WO2020134033A1
WO2020134033A1 PCT/CN2019/096312 CN2019096312W WO2020134033A1 WO 2020134033 A1 WO2020134033 A1 WO 2020134033A1 CN 2019096312 W CN2019096312 W CN 2019096312W WO 2020134033 A1 WO2020134033 A1 WO 2020134033A1
Authority
WO
WIPO (PCT)
Prior art keywords
stack
task
name
package name
security
Prior art date
Application number
PCT/CN2019/096312
Other languages
English (en)
French (fr)
Inventor
熊璐
杨阳
陈舟
黄自力
胡景秀
Original Assignee
中国银联股份有限公司
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 中国银联股份有限公司 filed Critical 中国银联股份有限公司
Publication of WO2020134033A1 publication Critical patent/WO2020134033A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/566Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities

Definitions

  • the present invention relates to computer technology, and in particular to a method for determining the security of an application program at runtime, a device for implementing the method, and a computer-readable storage medium.
  • One aspect of the present invention is to provide a method for determining the security of an application at runtime.
  • a method for determining the security of an application at runtime wherein the client performs the following steps:
  • security detection is performed when one or more task stack names named the target application package name are detected in step B).
  • the security detection includes the following steps:
  • black and white list matching further includes:
  • abnormal Activity package name information exists in the black list or the abnormal Activity package name information does not exist in the black and white list, it indicates that the current system environment is unsafe and there is a risk of task hijacking.
  • the security detection includes the following steps:
  • a push bullet box warns the user that the current application program is at risk of hiding a malicious task.
  • the stack name matches the Activity package name contained in the stack, it means that the application corresponding to the task stack is a normal application
  • the stack name does not match the Activity package name contained in the stack, it indicates that the application corresponding to the task stack is at risk of task hiding attacks.
  • the needle further includes the following steps:
  • a pop-up box warns the user and pushes related information of the malicious application program.
  • the operating system is an Android operating system, wherein the client is configured to start the Service component upon boot to perform the security detection.
  • Another object of the present invention is to provide a method for determining the security of an application at runtime.
  • a method for determining the security of an application at runtime wherein the server performs the following steps:
  • security detection is performed when one or more task stack names named the target application package name are detected in step B).
  • the security detection includes the following steps:
  • black and white list matching further includes:
  • abnormal Activity package name information exists in the black list or the abnormal Activity package name information does not exist in the black and white list, it indicates that the current system environment is unsafe and there is a risk of task hijacking.
  • the security detection includes the following steps:
  • a push bullet box warns the user that there is a risk of malicious hiding in the current application.
  • the stack name matches the Activity package name contained in the stack, it means that the application corresponding to the task stack is a normal application
  • the needle further includes the following steps:
  • a pop-up box warns the user and pushes related information of the malicious application program.
  • An object of another aspect of the present invention is to provide a computer-readable storage medium.
  • a computer-readable storage medium according to yet another aspect of the present invention stores thereon a computer program, which when executed by a processor implements the above-described method for determining the security of an application program at runtime.
  • Another aspect of the present invention is to provide an apparatus for determining the security of an application program at runtime.
  • an apparatus for determining the security of an application program at runtime includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor When the computer program is executed, the above method for determining the security of the application program at runtime is implemented.
  • the method for determining the security of an application program at runtime can be implemented on a client or a remote server side, with a method based on Service background stack name matching for new task hijacking and Android system applications.
  • the hidden attack mode is used for defense, and the target application can still detect and warn the security of the current environment when the target application cannot be started. In addition, there is no need to install additional applications, so it will not affect other applications. Based on the detection and warning of its own applications, it maximizes the balance between user experience and security.
  • FIG. 1 shows a flowchart of an operating system security defense method according to an embodiment of the present invention.
  • FIG. 2 shows a schematic diagram of the task hijacking effect according to an embodiment of the invention.
  • FIG. 3 shows a schematic diagram of a task hiding effect according to an embodiment of the invention.
  • FIG. 4 is a specific implementation of the security detection step for task hijacking according to an embodiment of the present invention.
  • FIG. 5 is a specific implementation of the task hiding security detection step according to still another embodiment of the present invention.
  • FIG. 6 is a schematic block diagram of an apparatus for determining the security of an application program at runtime according to an embodiment of the present invention.
  • These computer program instructions may be stored in a computer-readable memory, and these instructions may instruct the computer or other programmable processor to implement functions in a specific manner, so that these instructions stored in the computer-readable memory constitute an implementation flowchart and/or A block of one or more blocks of the specified function / operation of the instruction component production products.
  • Android refers to a free and open source operating system based on Linux
  • Service refers to one of the four major components in the Android system, which is a long-life cycle, without visual interface and A service program running in the background
  • Activity refers to the component responsible for interacting with the user in the application
  • Task refers to a collection of a certain type of Activity in the Android system.
  • FIG. 1 shows a flowchart of an operating system security defense method according to an embodiment of the present invention.
  • the security defense method of the operating system of the present invention includes the following steps:
  • Real-time detection step 110 acquiring the task list of the operating system and monitoring all task lists in real time to determine whether to perform the security detection step 120 based on the presence status of the application in the task list, wherein the presence status Including the existence or number of task stack names associated with the application program;
  • a security detection step 120 for determining the security of the application based on a preset detection algorithm to perform security detection
  • the security action execution step 130 is used to alert the user when the operating system is unsafe, and push relevant information of the malicious application program and prompt the user to check the program in the operating system to uninstall the malicious program.
  • step 110 the user installs and starts the target application for the first time.
  • the application automatically runs the Service component and registers the Service to start automatically after booting. It stays in the background in the manner of Service and accompanies the entire system life cycle to achieve real-time security detection.
  • step 120 when a task stack name named a target application package name is detected, a preset detection algorithm is used to perform system security detection.
  • the judgment algorithm can be implemented directly in the Service component by logic, and the matching can be detected by reading the relevant package name and stack name information.
  • the judgment algorithm can also collect the relevant package name and stack name information in the Service component, and then transmit it to a remote server (such as the cloud) for detection and matching, all the preset detection algorithms are in Implemented on the remote server side.
  • a remote server such as the cloud
  • all the preset detection algorithms are in Implemented on the remote server side.
  • the preset detection algorithm detects that the current system is unsafe, it immediately pushes the malicious package name and its related information, and prompts the user to check the programs in the system to uninstall the malicious programs.
  • FIG. 2 shows a schematic diagram of the task hijacking effect according to an embodiment of the invention.
  • the task hijacking attack can cause the target program to fail to start, and conduct phishing, extortion and other attacks on the target program.
  • FIG. 2 The basic effect of this type of attack is shown in Figure 2, where 210 is the target application icon that the user wants to use, and 220 is the false interface of the malicious program hidden in the background of the system.
  • the malicious program is running in the background.
  • the package is a phishing interface consistent with the target application, or a ransomware interface where ransomware users enter key information such as unlock codes and transaction passwords. During the entire operation of the user, the target application has not been started.
  • FIG. 3 shows a schematic diagram of the task hiding effect according to an embodiment of the present invention.
  • the basic implementation effect of this type of attack is shown in FIG. 3, where 310 is the currently running task list, which includes the false task A and task B And task C, 320 is the target application to be used by the user, and its name is A.
  • the task hiding attack method does not affect the normal operation of the target application (task name A, package name com.A), but when the target is applied to the background, the malicious application (task name A, package name com.B) starts After that, the target application will disappear from the background running program list and be replaced by the malicious application with the same name. Therefore, only the malicious application with the task name A and the package name com.B will exist in the task list 310.
  • a background detection method based on Service is adopted to realize real-time detection and defense against such attack methods.
  • a self-starting Service component can be added to accompany the entire system life cycle to detect the current program running environment in real time. For example, when the application A is installed for the first time and opened on the device, it automatically starts the Service component and ensures that it is registered and starts automatically, and stays in the background forever in the form of Service.
  • the package name of application A is com.A.
  • FIG. 4 is a specific implementation of the security detection step for task hijacking according to an embodiment of the present invention.
  • step 1201 the operating system starts the application program upon startup.
  • the application program automatically runs the Service component and registers the service to start automatically upon startup, so as to be permanently in the background in the form of Service to exist throughout the entire operating system life cycle.
  • step 1202 the task list of the operating system and the real-time monitoring background task list are acquired and a task stack (stack name com.A) named the target application package name is detected.
  • step 1203 the task stack name (com. A) Extract the package name information of all the activities in the stack, and perform the security detection step 120, and compare and determine all the package names corresponding to the Actity in the stack according to the task stack name (com.A).
  • the following sub-steps are performed in the security detection step 120:
  • the Activity package name in the stack is the same as the task stack name (for example, the Activity package name is com.A), it means that the current environment is safe; if there is an Activity whose package name is not com.A (For example, the package name is com.B), the package name of the abnormal Activity is extracted to perform the following black and white list matching steps:
  • abnormal activity package name com.B exists in the whitelist (where the application package name with the cooperative relationship is stored), it indicates that the current calling relationship is legal, indicating that the current environment is safe;
  • Extract information about the abnormal Activity such as Activity package name information, application name, runtime, etc.
  • Bullet box warning and abnormal information push the bullet box warns the user that the current application is hijacked, and pushes the abnormal package name and related information, and prompts the user to check the current system program to uninstall the malicious program or provide the user to handle the malicious program Suggestions.
  • FIG. 5 is a specific implementation of the task hiding security detection step according to still another embodiment of the present invention.
  • step S1201 the operating system starts the application program at startup, and the application program automatically runs the Service component and registers the service to start automatically at startup, so as to be permanently in the background in the manner of Service to exist throughout the entire operating system life cycle.
  • step S1202 the task list of the operating system and the real-time monitoring background task list are obtained and a plurality of task stacks named the target application package name (stack name com.A) are detected, and the ID described in the task stack name is acquired and Compare whether there are currently tasks with the same name but different IDs.
  • the target application package name stack name com.A
  • step S1204 a pop-up box warns the user that the current application is malicious Hidden risks, and execute step S1203 to extract activity-related information in the stack according to the task stack name (com.A). Then, a security detection step S120 is performed, and all the package names corresponding to the Actity in the stack are matched and judged according to the task stack name (com.A).
  • the security detection step S120 the following steps of matching the task stack name with the activity package name in the stack are performed:
  • Abnormal information push bullet box warning to push the package name and name of the abnormal application, and prompt the user to check the current system program to uninstall the malicious program.
  • a function of clearing background abnormal tasks may be added or suggestions for handling malicious programs may be provided to users to ensure the security of their own application programs.
  • FIG. 4 and FIG. 5 are carried out in an environment where the Android device is not rooted.
  • the abnormal application program can be directly checked and killed.
  • it in addition to real-time detection of its own products, it can also monitor and detect global tasks in the system.
  • all the steps in FIG. 4 and FIG. 5 described above can be directly implemented in the Service component by logic, including reading the relevant package name and stack name information of the task, and performing security detection steps.
  • the collection of the relevant package name and stack name information in FIG. 4 and FIG. 5 may be implemented in the Service component, and then the collected information is transmitted to a remote server (for example, cloud) for the security detection step.
  • the computer device 60 includes a memory 610, a processor 620, and a computer program 630 stored on the memory and executable on the processor.
  • the processor 620 runs the program 630 to implement the above method for determining the security of an application program at runtime.
  • a computer-readable storage medium on which a computer program is stored, which when executed by a processor can implement the above method for determining the security of an application program at runtime.
  • the operating system and the operating system security defense method of the present invention it is possible to defend against the newly-emerged task hijacking and task hiding attack methods in the Android application, and the target application can still be safe to the current environment when it cannot be started Carry out detection and early warning.
  • the target application can still be safe to the current environment when it cannot be started Carry out detection and early warning.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明涉及计算机技术,具体涉及用于确定应用程序在运行时的安全性的方法、实现该方法的装置和计算机可读存储介质。按照本发明一个方面的用于确定应用程序在运行时的安全性的方法包含下列步骤:A)获取操作系统的Task任务栈列表;B)基于所述应用程序在所述Task任务栈列表中的存在状态确定是否执行安全性检测,其中,所述存在状态包括与所述应用程序相关联的任务栈名的存在性或数量;以及C)基于预设的检测算法确定所述应用程序的安全性来执行安全性检测任务。

Description

用于确定应用程序在运行时的安全性的方法及其装置 技术领域
本发明涉及计算机技术,具体涉及用于确定应用程序在运行时的安全性的方法、实现该方法的装置和计算机可读存储介质。
背景技术
随着智能操作系统的发展,以安卓为代表的智能操作系统因为界面功能丰富、应用开发便捷等原因而在智能设备中广泛使用。由于安卓系统属于通用操作系统,且版本更新频繁,不可避免地存在大量安全漏洞。目前操作系统的防御方案主要针对Activity攻击,其主要通过对安卓生命周期函数的调用进行监控以及软件黑白名单的方式来实现。然而该防御方案无法应对目前出现的一种新的可对安卓应用进行攻击的方式,即任务劫持和任务隐藏,其攻击效果与Activity劫持相似,均可对安卓应用进行钓鱼或勒索攻击等。由于目前尚未被人熟知,因此还未引起应用厂商的重视。然而,该攻击可以造成比Activity劫持更加严重的后果,其可能导致目标应用在恶意软件运行周期内永远无法被启动。
同时,经过测试发现,该类攻击方式可以在安卓几乎所有版本以及多个机型上重复出现。因此有必要找到一种能够防御任务攻击的防御机制,能够及时发现任务劫持及其隐藏攻击并且对当前环境的安全性进行检测预警。
公开于本发明背景部分的信息仅仅旨在增加对本发明的总体背景的理解,而不应当被视为承认或以任何形式暗示该信息构成已为本领域一般技术人员所公知的现有技术。
发明内容
本发明的一个方面是提供一种用于确定应用程序在运行时的安全性的方法。
按照本发明的一个方面的一种用于确定应用程序在运行时的安全性的方法,其中,客户端执行下列步骤:
A)获取操作系统的Task任务栈列表;
B)基于所述应用程序在所述Task任务栈列表中的存在状态确定是否执行安全性检测,其中,所述存在状态包括与所述应用程序相关联的任务栈名的存在性或数量;以及
C)基于预设的检测算法确定所述应用程序的安全性来执行安全性检测。
可选地,在上述方法中,当在步骤B)中检测到一个或多个名为所述目 标应用包名的任务栈名时执行安全性检测。
可选地,在上述方法中,当在步骤B)中检测到一个名为所述目标应用包名的任务栈名时,所述安全性检测包括以下步骤:
将所述任务栈名与其栈内包含的Activity包名进行比对;以及
对与所述任务栈名不一致的异常Activity包名进行提取以进行黑白名单匹配。
可选地,其中,所述黑白名单匹配进一步包括:
如果白名单中存在所述异常Activity包名信息,则表示当前系统环境安全;
如果黑名单中存在所述异常Activity包名信息或者黑白名单中均不存在所述异常Activity包名信息,则表示当前系统环境不安全,存在任务劫持风险。
可选地,在上述方法中,当在步骤B)中检测到多个名为所述目标应用包名的任务栈名时,所述安全性检测包括以下步骤:
获取所述多个任务栈名所属的ID并比对当前是否存在同名任务却不同ID的情况;以及
将所述栈名与其栈内包含的Activity包名进行匹配。
可选地,在上述方法中,进一步包括:
如果所述不同的ID对应于相同栈名,则推送弹框警示用户当前应用程序存在恶意任务隐藏的风险。
可选地,在上述方法中,进一步包括:
如果所述栈名与其栈内包含的Activity包名匹配,则表示所述任务栈对应的应用程序为正常应用程序;
如果所述栈名与其栈内包含的Activity包名不匹配,则表示所述任务栈对应的应用程序存在任务隐藏攻击的风险。
可选地,在上述方法中,针进一步包括以下步骤:
D)当基于预设的检测算法确定所述应用程序不安全时,推送弹框警示用户并推送恶意应用程序的相关信息。
可选地,在上述方法中,所述操作系统是安卓操作系统,其中,所述客户端配置为开机自启动Service组件以执行所述安全性检测。
本发明另一方面的目的是提供一种用于确定应用程序在运行时的安全性的方法。
按照本发明的另一方面的一种用于确定应用程序在运行时的安全性的方法,其中,服务器执行下列步骤:
A)从客户端接收操作系统的Task任务栈列表;
B)基于所述应用程序在所述Task任务栈列表中的存在状态确定是否执行安全性检测,其中,所述存在状态包括与所述应用程序相关联的任务栈名的存在性或数量;
C)通过基于预设的检测算法确定所述应用程序的安全性来执行安全性检测。
可选地,在上述方法中,当在步骤B)中检测到一个或多个名为所述目标应用包名的任务栈名时执行安全性检测。
可选地,在上述方法中,当在步骤B)中检测到一个名为所述目标应用包名的任务栈名时,所述安全性检测包括以下步骤:
将所述任务栈名与其栈内包含的Activity包名进行比对;以及
对与所述任务栈名不一致的异常Activity包名进行提取以进行黑白名单匹配。
可选地,其中,所述黑白名单匹配进一步包括:
如果白名单中存在所述异常Activity包名信息,则表示当前系统环境安全;
如果黑名单中存在所述异常Activity包名信息或者黑白名单中均不存在所述异常Activity包名信息,则表示当前系统环境不安全,存在任务劫持风险。
可选地,在上述方法中,当在步骤B)中检测到多个名为所述目标应用包名的任务栈名时,所述安全性检测包括以下步骤:
获取所述多个任务栈名所属的ID并比对当前是否存在同名任务却不同ID的情况;以及
将所述栈名与其栈内包含的Activity包名进行匹配。
可选地,在上述方法中,进一步包括:
如果所述不同的ID对应于相同栈名,则推送弹框警示用户当前应用程序存在恶意隐藏的风险。
可选地,在上述方法中,进一步包括:
如果所述栈名与其栈内包含的Activity包名匹配,则表示所述任务栈对应的应用程序为正常应用程序;
如果所述栈名与其栈内包含的Activity包名不匹配,则表示所述任务栈对应的应用程序存在任务隐藏攻击的风险。可选地,在上述方法中,针进一步包括以下步骤:
D)当基于预设的检测算法确定所述应用程序不安全时,推送弹框警示用户并推送恶意应用程序的相关信息。
本发明又一方面的目的是提供一种计算机可读存储介质。按照本发明又 一方面的计算机可读存储介质,其上存储计算机程序,该计算机程序被处理器执行时实现上述的用于确定应用程序在运行时的安全性的方法。
本发明还有一方面的目的是提供一种用于确定应用程序在运行时的安全性的装置。
按照本发明还有一方面的用于确定应用程序在运行时的安全性的装置,其包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现上述用于确定应用程序在运行时的安全性的方法。
根据本发明的用于确定应用程序在运行时的安全性的方法,其能够实现在客户端或远程服务器端,以基于Service后台栈名匹配的方法针对安卓系统应用程序中新出现的任务劫持和任务隐藏的攻击方式进行防御,目标应用程序在无法启动的情况下,依然可以对当前环境的安全性进行检测预警。此外,无需再安装额外的应用程序,因此也不会对其他应用程序造成影响,基于对自身应用程序的检测预警而最大程度地保障了用户体验与安全性的平衡。
多种其它特征和优点将从如下详细描述和附图中显而易见。
附图说明
本发明的上述和/或其它方面和优点将通过以下结合附图的各个方面的描述变得更加清晰和更容易理解,附图中相同或相似的单元采用相同的标号表示。附图包括:
图1示出了按照本发明一实施例的操作系统安全防御方法的流程图。
图2示出了按照本发明一实施例的任务劫持效果的示意图。
图3示出了按照本发明一实施例的任务隐藏效果的示意图。
图4为按照本发明一实施例的针对任务劫持的安全性检测步骤的一个具体的实施方式。
图5为按照本发明还一实施例的任务隐藏的安全性检测步骤的一个具体的实施方式。
图6为按照本发明一实施例的用于确定应用程序在运行时的安全性的装置的示意框图。
具体实施方式
在本说明书中,参照其中图示了本发明示意性实施例的附图更为全面地说明本发明。但本发明可以按不同形式来实现,而不应解读为仅限于本文给出的各实施例。给出的各实施例旨在使本文的披露全面完整,以将本发明的 保护范围更为全面地传达给本领域技术人员。
诸如“包含”和“包括”之类的用语表示除了具有在说明书和权利要求书中有直接和明确表述的单元和步骤以外,本发明的技术方案也不排除具有未被直接或明确表述的其它单元和步骤的情形。诸如“第一”和“第二”之类的用语并不表示单元在时间、空间、大小等方面的顺序而仅仅是作区分各单元之用。
下文参考根据本发明实施例的方法和系统的流程图说明、框图和/或流程图来描述本发明。将理解这些流程图说明和/或框图的每个框、以及流程图说明和/或框图的组合可以由计算机程序指令来实现。可以将这些计算机程序指令提供给通用计算机、专用计算机或其他可编程数据处理设备的处理器以构成机器,以便由计算机或其他可编程数据处理设备的处理器执行的这些指令创建用于实施这些流程图和/或框和/或一个或多个流程框图中指定的功能/操作的部件。
可以将这些计算机程序指令存储在计算机可读存储器中,这些指令可以指示计算机或其他可编程处理器以特定方式实现功能,以便存储在计算机可读存储器中的这些指令构成包含实施流程图和/或框图的一个或多个框中指定的功能/操作的指令部件的制作产品。
可以将这些计算机程序指令加载到计算机或其他可编程数据处理器上以使一系列的操作步骤在计算机或其他可编程处理器上执行,以便构成计算机实现的进程,以使计算机或其他可编程数据处理器上执行的这些指令提供用于实施此流程图和/或框图的一个或多个框中指定的功能或操作的步骤。还应该注意在一些备选实现中,框中所示的功能/操作可以不按流程图所示的次序来发生。例如,依次示出的两个框实际可以基本同时地执行或这些框有时可以按逆序执行,具体取决于所涉及的功能/操作。
贯穿本说明书中,安卓指的是一种基于Linux的自由及开放源代码的操作系统;Service指的是安卓系统中的四大组件之一,其是一种长生命周期的、没有可视化界面且运行于后台的一种服务程序;Activity指的是应用程序中负责与用户交互的组件;以及任务(Task)指的是安卓系统中某一类Activity的集合。
图1示出了按照本发明一实施例的操作系统安全防御方法的流程图。
如图1所示,本发明的操作系统安全防御方法包括以下步骤:
实时检测步骤110,获取操作系统的任务列表并对所有任务列表进行实时监控,以基于所述应用程序在所述任务列表中的存在状态确定是否执行安全性检测步骤120,其中,所述存在状态包括与所述应用程序相关联的任务栈名的存在性或数量;
安全性检测步骤120,用于基于预设的检测算法确定所述应用程序的安全性来执行安全性检测;以及
安全动作执行步骤130,用于在检测到操作系统不安全时,推送弹框警示用户并推送恶意应用程序的相关信息以及提示用户对操作系统内程序进行检查以对恶意程序进行卸载。
接着,对于上述步骤的内容进行具体说明。在步骤110中,用户首次安装并启动目标应用程序,应用程序自动运行Service组件并注册Service开机自启动,以Service的方式永驻后台,伴随整个系统生命周期存在,以实现实时的安全性检测。在步骤120中,当检测到名为目标应用包名的任务栈名时,利用预设的检测算法进行系统安全性检测。可选地,所述判断算法可以直接在Service组件内进行逻辑实现,通过读取相关包名、栈名信息进行检测匹配。可选地,所述判断算法也可以在Service组件内实现对相关包名、栈名信息的收集,然后将其传送至远程服务器端(诸如云端)进行检测匹配,所有预设的检测算法均在远程服务器端进行实现。在步骤130中,当预设的检测算法检测到当前系统不安全时,则立即推送恶意包名及其相关信息,并提示用户对系统内的程序进行检查以对恶意程序进行卸载。可选地,在步骤130中也可以选择直接对异常应用进行拦截以及查杀或者为用户提供处理恶意程序的建议。
图2示出了按照本发明一实施例的任务劫持效果的示意图。任务劫持攻击可造成目标程序无法启动,对目标程序进行钓鱼、勒索等攻击行为。
该类攻击的基本实现效果如图2所示,其中,210为用户要使用的目标应用程序图标,220为隐藏于系统后台的恶意程序的虚假界面。在本实施例中,恶意程序在后台运行,用户在桌面点击所要使用的目标应用程序图标210时,将无法启动目标应用程序,而是出现隐藏于后台的恶意程序的虚假界面220,该界面可以包装为与目标应用一致的钓鱼界面,或勒索用户输入解锁码、交易密码等关键信息的勒索界面。用户在整个操作过程中,目标应用程序全程未被启动。
图3示出了按照本发明一实施例的任务隐藏效果的示意图,该类攻击的基本实现效果如图3所示,其中,310为当前正在运行的任务列表,其包括虚假任务A、任务B和任务C,320为用户要使用的目标应用,其名为A。
任务隐藏攻击方式不影响目标应用(任务名为A,包名为com.A)的正常运行,但是在目标应用于后台运行时,恶意应用(任务名为A,包名为com.B)启动后将导致目标应用程序从后台运行程序列表中消失,而由同名的恶意应用程序取而代之,因此任务列表310中将仅存在任务名为A,包名为com.B的恶意应用。
针对上述两种攻击方式,在本发明中,采取基于Service后台检测方法,实现对该类攻击方式的实时检测和防御。具体而言,在安卓产品开发过程中,可以增加一个自启动的Service组件,伴随整个系统生命周期存在,来对当前的程序运行环境进行实时检测。例如,应用程序A首次安装并在设备上打开时,自动开启Service组件并保证其注册开机自启动,以Service的方式永驻后台。其中,应用程序A的包名为com.A。
图4为按照本发明一实施例的针对任务劫持的安全性检测步骤的一个具体的实施方式。
如图4所示,在步骤1201中操作系统开机启动应用程序,应用程序自动运行Service组件并注册Service开机自启动,从而以Service的方式永驻后台,以在整个操作系统生命周期内存在。在步骤1202中获取操作系统的任务列表以及实时监控后台任务列表并且检测到名为目标应用包名的任务栈(栈名为com.A)被创建,在步骤1203中根据任务栈名(com.A)提取栈内所有Activity的包名信息,以及执行安全性检测步骤120,根据任务栈名(com.A)对其栈内所有Acticity对应包名进行比对判断。
具体而言,在安全性检测步骤120中执行以下子步骤:
比对Activity包名与任务栈名,如果栈内Activity包名与任务栈名一致时(例如Activity包名为com.A),则表示当前环境安全;如果存在包名不为com.A的Activity(例如包名为com.B),则对异常的Activity的包名进行提取以执行下列黑白名单匹配步骤:
如果白名单(其中存储具有合作关系的应用包名)中存在该异常的Activity的包名com.B,则表明当前为合法调用关系,则表示当前环境安全;
如果黑名单(其中存储已知的相关恶意程序包名)中存在该异常的Activity的包名com.B或者黑白名单中均不存在该异常的Activity的包名com.B,则执行以下子步骤:
提取该异常的Activity的相关信息,诸如Activity的包名信息、应用名称、运行时间等信息;以及
弹框警示以及异常信息推送,弹框警示用户当前应用存在劫持风险,并推送异常包名以及相关信息,以及提示用户对当前系统内程序进行检查以对恶意程序进行卸载或者为用户提供处理恶意程序的建议。
图5为按照本发明还一实施例的任务隐藏的安全性检测步骤的一个具体的实施方式。
如图5所示,在步骤S1201中操作系统开机启动应用程序,应用程序自动运行Service组件并注册Service开机自启动,从而以Service的方式永驻后台,以在整个操作系统生命周期内存在。在步骤S1202中获取操作系统的 任务列表以及实时监控后台任务列表并且检测到多个名为目标应用包名(栈名为com.A)的任务栈,获取所述任务栈名所述的ID并比对当前是否存在同名任务却不同ID的情况。如果所述不同的ID对应于相同的栈名(例如,存在栈名为A的多个任务,但是ID分别为1、2…n),则在步骤S1204中推送弹框警示用户当前应用存在恶意隐藏风险,,以及执行步骤S1203以根据任务栈名(com.A)提取栈内Activity相关信息。之后进行安全性检测步骤S120,根据任务栈名(com.A)对其栈内所有Acticity对应包名进行匹配判断。
具体而言,在安全性检测步骤S120中执行任务栈名与栈内Activity包名匹配的以下步骤:
对后台所有名为com.A的任务进行任务栈名与栈内Activity包名匹配,将任务栈名与栈内Activity包名匹配的任务记为正常目标应用(图中的Task1),将任务栈名与栈内Activity包名不匹配的任务(图中的Task2,…,Taskn)记为异常目标应用且执行下一步骤:
异常信息推送,弹框警示以推送异常应用的包名及其名称,以及提示用户对当前系统内程序进行检查以对恶意程序进行卸载。可选地,可增加清除后台异常任务的功能或者为用户提供处理恶意程序的建议,以保证自身应用程序的安全性。
上述图4和图5所示的具体实施方式均在安卓设备未Root的环境下进行,可选地,在安卓设备Root的环境下,可以直接对异常应用程序进行查杀。可选地,除了对自身产品进行实时检测外,也可对系统内全局任务进行监控检测。
可选地,上述图4和图5中的所有步骤可以直接在Service组件内进行逻辑实现,包括读取任务的相关包名、栈名信息以及进行安全性检测步骤。可选地,上述图4和图5中的相关包名、栈名信息的收集可以在Service组件内实现,之后将所收集的信息传输至远程服务器(例如云端)进行安全性检测步骤。
图6为按照本发明一实施例的计算机设备的示意框图。该计算机设备60包含存储器610、处理器620以及存储在所述存储器上并且可在所述处理器上运行的计算机程序630。所述处理器620运行所述程序630以实现上述用于确定应用程序在运行时的安全性的方法。
按照本发明的另一方面,还提供了一种计算机可读存储介质,其上存储计算机程序,该程序被处理器执行时可实现上述用于确定应用程序在运行时的安全性的方法。
根据本发明的操作系统以及操作系统安全防御的方法,能够针对安卓应 用中新出现的任务劫持和任务隐藏的攻击方式进行防御,目标应用程序在无法启动的情况下,依然可以对当前环境的安全性进行检测预警。此外,无需再安装额外的应用程序,因此也不会对其他应用程序造成影响,最大程度地保障了用户体验与安全性的平衡。
提供本文中提出的实施例和示例,以便最好地说明按照本技术及其特定应用的实施例,并且由此使本领域的技术人员能够实施和使用本发明。但是,本领域的技术人员将会知道,仅为了便于说明和举例而提供以上描述和示例。所提出的描述不是意在涵盖本发明的各个方面或者将本发明局限于所公开的精确形式。
鉴于以上所述,本公开的范围通过以下权利要求书来确定。

Claims (19)

  1. 一种用于确定应用程序在运行时的安全性的方法,其特征在于,客户端执行下列步骤:
    A)获取操作系统的Task任务栈列表;
    B)基于所述应用程序在所述Task任务栈列表中的存在状态确定是否执行安全性检测,其中,所述存在状态包括与所述应用程序相关联的任务栈名的存在性或数量;以及
    C)基于预设的检测算法确定所述应用程序的安全性来执行安全性检测。
  2. 如权利要求1所述的方法,其中,当在步骤B)中检测到一个或多个名为所述目标应用包名的任务栈名时执行安全性检测。
  3. 如权利要求2所述的方法,其中,当在步骤B)中检测到一个名为所述目标应用包名的任务栈名时,所述安全性检测包括以下步骤:
    将所述任务栈名与其栈内包含的Activity包名进行比对;以及
    对与所述任务栈名不一致的异常Activity包名进行提取以进行黑白名单匹配。
  4. 如权利要求3所述的方法,其中,所述黑白名单匹配进一步包括:
    如果白名单中存在所述异常Activity包名信息,则表示当前系统环境安全;
    如果黑名单中存在所述异常Activity包名信息或者黑白名单中均不存在所述异常Activity包名信息,则表示当前系统环境不安全,存在任务劫持风险。
  5. 如权利要求2所述的方法,其中,当在步骤B)中检测到多个名为所述目标应用包名的任务栈名时,所述安全性检测包括以下步骤:
    获取所述多个任务栈名所属的ID并比对当前是否存在同名任务却不同ID的情况;以及
    将所述栈名与其栈内包含的Activity包名进行匹配。
  6. 如权利要求5所述的方法,其中,进一步包括:
    如果所述不同的ID对应于相同栈名,则推送弹框警示用户当前应用程序存在恶意任务隐藏的风险。
  7. 如权利要求5所述的方法,其中,进一步包括:
    如果所述栈名与其栈内包含的Activity包名匹配,则表示所述任务栈对应的应用程序为正常应用程序;
    如果所述栈名与其栈内包含的Activity包名不匹配,则表示所述任务栈对应的应用程序存在任务隐藏攻击的风险。
  8. 如权利要求1所述的方法,其中,进一步包括以下步骤:
    D)当基于预设的检测算法确定所述应用程序不安全时,推送弹框警示用户并推送恶意应用程序的相关信息。
  9. 如权利要求1至8中任一项所述的方法,所述操作系统是安卓操作系统,其中,所述客户端配置为开机自启动Service组件以执行所述安全性检测。
  10. 一种用于确定应用程序在运行时的安全性的方法,其特征在于,服务器执行下列步骤:
    A)从客户端接收操作系统的Task任务栈列表;
    B)基于所述应用程序在所述Task任务栈列表中的存在状态确定是否执行安全性检测,其中,所述存在状态包括与所述应用程序相关联的任务栈名的存在性或数量;
    C)通过基于预设的检测算法确定所述应用程序的安全性来执行安全性检测。
  11. 如权利要求10所述的方法,其中,当在步骤B)中检测到一个或多个名为所述目标应用包名的任务栈名时执行安全性检测。
  12. 如权利要求11所述的方法,其中,当在步骤B)中检测到一个名为所述目标应用包名的任务栈名时,所述安全性检测包括以下步骤:
    将所述任务栈名与其栈内包含的Activity包名进行比对;以及
    对与所述任务栈名不一致的异常Activity包名进行提取以进行黑白名单匹配。
  13. 如权利要求12所述的方法,其中,所述黑白名单匹配进一步包括:
    如果白名单中存在所述异常Activity包名信息,则表示当前系统环境安全;
    如果黑名单中存在所述异常Activity包名信息或者黑白名单中均不存在所述异常Activity包名信息,则表示当前系统环境不安全,存在任务劫持风险。
  14. 如权利要求11所述的方法,其中,当在步骤B)中检测到多个名为所述目标应用包名的任务栈名时,所述安全性检测包括以下步骤:
    获取所述多个任务栈名所属的ID并比对当前是否存在同名任务却不同ID的情况;以及
    将所述栈名与其栈内包含的Activity包名进行匹配。
  15. 如权利要求14所述的方法,其中,进一步包括:
    如果所述不同的ID对应于相同栈名,则推送弹框警示用户当前应用程序存在恶意任务隐藏的风险。
  16. 如权利要求14所述的方法,其中,进一步包括:
    如果所述栈名与其栈内包含的Activity包名匹配,则表示所述任务栈对应的应用程序为正常应用程序;
    如果所述栈名与其栈内包含的Activity包名不匹配,则表示所述任务栈对应的应用程序存在任务隐藏攻击的风险。
  17. 如权利要求10所述的方法,其中,进一步包括以下步骤:
    D)当基于预设的检测算法确定所述应用程序不安全时,推送弹框警示用户并推送恶意应用程序的相关信息。
  18. 一种用于确定应用程序在运行时的安全性的装置,其包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至17中任一项所述的操作系统安全防御方法。
  19. 一种计算机可读介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时实现权利要求1至17中任一项所述的操作系统安全防御方法。
PCT/CN2019/096312 2018-12-24 2019-07-17 用于确定应用程序在运行时的安全性的方法及其装置 WO2020134033A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811580091.5A CN110020530B (zh) 2018-12-24 2018-12-24 用于确定应用程序在运行时的安全性的方法及其装置
CN201811580091.5 2018-12-24

Publications (1)

Publication Number Publication Date
WO2020134033A1 true WO2020134033A1 (zh) 2020-07-02

Family

ID=67188661

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/096312 WO2020134033A1 (zh) 2018-12-24 2019-07-17 用于确定应用程序在运行时的安全性的方法及其装置

Country Status (2)

Country Link
CN (1) CN110020530B (zh)
WO (1) WO2020134033A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020530B (zh) * 2018-12-24 2023-07-04 中国银联股份有限公司 用于确定应用程序在运行时的安全性的方法及其装置
CN112948830B (zh) * 2021-03-12 2023-11-10 安天科技集团股份有限公司 文件风险识别的方法和装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346560A (zh) * 2014-06-25 2015-02-11 腾讯科技(深圳)有限公司 一种安全验证方法及装置
CN105354486A (zh) * 2015-10-20 2016-02-24 奇酷互联网络科技(深圳)有限公司 运行控制方法、运行控制系统和终端
EP3148157A1 (en) * 2015-09-22 2017-03-29 Comptel OYJ Method and system of identifying an access request of an application on a mobile device in a telecommunication network
CN107992745A (zh) * 2017-11-29 2018-05-04 暨南大学 一种基于安卓平台的界面劫持应对方法
CN110020530A (zh) * 2018-12-24 2019-07-16 中国银联股份有限公司 用于确定应用程序在运行时的安全性的方法及其装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182686A (zh) * 2013-05-23 2014-12-03 阿里巴巴集团控股有限公司 一种Android系统Activity劫持风险检测方法及装置
CN105335654B (zh) * 2014-06-27 2018-12-14 北京金山安全软件有限公司 一种Android恶意程序检测和处理方法、装置及设备
CN104123498B (zh) * 2014-07-18 2017-12-05 广州猎豹网络科技有限公司 一种安卓系统Activity的安全性确定方法及装置
CN104123493B (zh) * 2014-07-31 2017-09-26 百度在线网络技术(北京)有限公司 应用程序的安全性检测方法和装置
EP3225010B1 (en) * 2014-11-25 2018-09-26 Ensilo Ltd. Systems and methods for malicious code detection accuracy assurance
CN106709324A (zh) * 2016-11-10 2017-05-24 京东方科技集团股份有限公司 用于验证应用安全性的方法和设备
CN106650427B (zh) * 2016-12-28 2019-10-22 北京奇虎测腾科技有限公司 沙箱运行环境的检测方法及检测装置
CN107729753A (zh) * 2017-09-22 2018-02-23 郑州云海信息技术有限公司 一种计算机未知病毒的防御方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346560A (zh) * 2014-06-25 2015-02-11 腾讯科技(深圳)有限公司 一种安全验证方法及装置
EP3148157A1 (en) * 2015-09-22 2017-03-29 Comptel OYJ Method and system of identifying an access request of an application on a mobile device in a telecommunication network
CN105354486A (zh) * 2015-10-20 2016-02-24 奇酷互联网络科技(深圳)有限公司 运行控制方法、运行控制系统和终端
CN107992745A (zh) * 2017-11-29 2018-05-04 暨南大学 一种基于安卓平台的界面劫持应对方法
CN110020530A (zh) * 2018-12-24 2019-07-16 中国银联股份有限公司 用于确定应用程序在运行时的安全性的方法及其装置

Also Published As

Publication number Publication date
CN110020530B (zh) 2023-07-04
CN110020530A (zh) 2019-07-16

Similar Documents

Publication Publication Date Title
US9824217B2 (en) Runtime detection of self-replicating malware
US10055585B2 (en) Hardware and software execution profiling
EP3420489B1 (en) Cybersecurity systems and techniques
RU2531861C1 (ru) Система и способ оценки вредоносности кода, исполняемого в адресном пространстве доверенного процесса
US8918878B2 (en) Restoration of file damage caused by malware
EP2786295B1 (en) Preventing execution of task scheduled malware
US10382468B2 (en) Malware identification via secondary file analysis
US20140053267A1 (en) Method for identifying malicious executables
US10372909B2 (en) Determining whether process is infected with malware
US20150310211A1 (en) Method, apparatus and system for detecting malicious process behavior
US10216934B2 (en) Inferential exploit attempt detection
US10783246B2 (en) Comparing structural information of a snapshot of system memory
US9910983B2 (en) Malware detection
CN105760787A (zh) 用于检测随机存取存储器中的恶意代码的系统及方法
WO2016008355A1 (zh) 一种利用Android设备管理器对抗卸载的软件的识别方法及装置
WO2020134033A1 (zh) 用于确定应用程序在运行时的安全性的方法及其装置
CN105791250B (zh) 应用程序检测方法及装置
JP5326063B1 (ja) デバッグイベントを用いた悪意のあるシェルコードの検知装置及び方法
EP3127036A1 (en) Systems and methods for identifying a source of a suspect event
US10880316B2 (en) Method and system for determining initial execution of an attack
US11316873B2 (en) Detecting malicious threats via autostart execution point analysis
WO2016095671A1 (zh) 一种应用程序的消息处理方法和装置
CN111444510A (zh) 基于虚拟机实现的cpu漏洞检测方法及系统
JP6591832B2 (ja) ソフトウェア改ざん検知システム、及びネットワークセキュリティシステム
US11449610B2 (en) Threat detection system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19905316

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19905316

Country of ref document: EP

Kind code of ref document: A1