WO2020019521A1 - 一种风险检测方法和装置 - Google Patents

一种风险检测方法和装置 Download PDF

Info

Publication number
WO2020019521A1
WO2020019521A1 PCT/CN2018/108888 CN2018108888W WO2020019521A1 WO 2020019521 A1 WO2020019521 A1 WO 2020019521A1 CN 2018108888 W CN2018108888 W CN 2018108888W WO 2020019521 A1 WO2020019521 A1 WO 2020019521A1
Authority
WO
WIPO (PCT)
Prior art keywords
dynamic link
link library
list
name
standard
Prior art date
Application number
PCT/CN2018/108888
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 WO2020019521A1 publication Critical patent/WO2020019521A1/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
    • 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/562Static detection
    • G06F21/563Static detection by source code analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/03Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
    • G06F2221/033Test or assess software

Definitions

  • the invention relates to the field of network security, and in particular, to a risk detection method and device.
  • Embodiments of the present invention provide a risk detection method and device, which can detect whether a secure APP of an electronic device includes a hook operation by detecting a dynamic link library loaded by the APP, thereby monitoring the security of the electronic device, and improving the risk detection of the device. effectiveness.
  • a first aspect of the embodiments of the present invention provides a risk detection method.
  • the risk detection method includes:
  • the dynamic link library name corresponding to the hook operation is matched with the dynamic link library name in a preset dynamic link library list, and the preset dynamic link library list is run on a risk device
  • the list of dynamic link library names loaded on the APP is used to determine whether the electronic device corresponding to the APP is at risk according to the matching result.
  • a second aspect of the embodiments of the present invention provides a risk detection device, where the risk detection device includes:
  • a list generating unit is configured to obtain a dynamic link library name loaded by an application APP to form a first dynamic link library list, where the first dynamic link library list includes multiple dynamic link library names;
  • a matching unit configured to match the first dynamic link library list with a standard dynamic link library list, and determine whether the APP includes a hook plugin according to a matching result
  • a determining unit configured to match a dynamic link library name corresponding to the hook operation with a dynamic link library name in a preset dynamic link library list if the APP includes a hook operation, the preset dynamic link library list It is a list composed of the dynamic link library names loaded by the APP running on the risk device, and determining whether the electronic device corresponding to the APP is at risk according to the matching result.
  • a third aspect of the embodiments of the present invention provides an electronic device including a processor, a memory, a communication interface, and one or more programs.
  • the one or more programs are stored in the memory and configured by The processor executes, and the program includes instructions for performing steps in any method of the first aspect.
  • a fourth aspect of the embodiments of the present invention provides a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute instructions of the steps described in any of the methods of the first aspect.
  • the electronic device it is determined whether the electronic device includes a hook operation through the matching result of the first dynamic link library list and the standard dynamic link library list.
  • This method is convenient and fast, and improves the reliability of the standard dynamic link library, which improves It improves the efficiency and accuracy of hook operation detection.
  • it is necessary to obtain the dynamic link library name corresponding to the hook operation, and then match the dynamic link library name loaded by the risk device to finally determine the risk of the electronic device corresponding to the APP. Improved the accuracy of equipment risk judgment.
  • FIG. 1A is a schematic flowchart of a risk detection method according to an embodiment of the present invention.
  • FIG. 1B is a schematic diagram of matching a first dynamic link library list with a standard dynamic link library list according to an embodiment of the present invention
  • FIG. 1C is a schematic diagram of generating a standard dynamic link library according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for matching a first dynamic link library list with a standard dynamic link library list according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of a method for generating a standard dynamic link library list according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart of another risk detection method according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • FIG. 6 is a structural block diagram of a risk detection device according to an embodiment of the present invention.
  • FIG. 1A is a schematic flowchart of a risk detection method according to an embodiment of the present invention. As shown in FIG. 1A, the risk detection method includes:
  • APP refers to a third-party application installed on an electronic device. It can be classified into shopping apps, map apps, game apps, learning apps, and social apps according to their application scope. Different platforms can be divided into iOS system apps, Android system apps, and Microsoft system apps. Similarly, the electronic device corresponding to the APP may be an iOS device, an Android device, or a Windows device.
  • Dynamic link library (Dynamic Link Library or Dynamic-link Library, DLL) is a way to implement the concept of shared function library.
  • APP Dynamic Link Library
  • a large number of function libraries need to be loaded. If a separate function library is prepared for each APP, the amount of data will be very amazing, and the content of the function library loaded when many APPs are running is the same. Therefore, in order to reduce Memory overhead, using dynamic link library for sharing between apps.
  • the extension of the library function in the dynamic link library is ".dll”, “.ocx” (including ActiveX control library) or ".drv” (old-style system driver).
  • the name of the dynamic link library can be some specific functions Name, for example, mapi32.dll is a dedicated function for e-mail, netapi32.dll is a function to access and control the network, odbc32.dll is a DLL that opens the database connection function; it can also be a programmer-defined link library for certain functions name.
  • the obtained dynamic link library names are all collected to form a first dynamic link library list.
  • Hook is a platform for message processing mechanism.
  • An application can set a subroutine on it to monitor a certain message of a specified window, and the monitored window can be created by other processes. When the message arrives, it is processed before the target window handler.
  • An illegal person can intercept the APP's message through a hook operation, and make the APP link to an illegal dynamic link library to perform unsafe operations. Therefore, it is necessary to determine whether the APP contains a hook operation by detecting whether the dynamic link library loaded by the APP matches the standard dynamic link library, and then determine whether the electronic device corresponding to the APP is at risk.
  • matching the first dynamic link library list with the standard dynamic link library list includes: determining the number of dynamic link library names in the first dynamic link library list and the dynamic link in the standard dynamic link library list.
  • the ratio of the number of library names is within a preset range; the dynamic link library names in the first dynamic link library list are compared with the dynamic link library names in the standard dynamic link library list, if the two dynamic link library names are exactly the same , It is determined that the dynamic link library name in the first dynamic link library list matches the dynamic link library name in the standard dynamic link library list successfully; according to the dynamic link library in the first dynamic link library list that matches the standard dynamic link library list successfully
  • the ratio of the number of names to the total number of dynamic link library names in the standard dynamic link library to obtain a matching success rate; when the matching success rate is greater than a first preset threshold, it is determined that the first dynamic link library list matches the standard dynamic link library list successfully Otherwise, it is determined that the matching between the first dynamic link library list and the standard dynamic link library list fails.
  • FIG. 1B is a schematic diagram of matching between a first dynamic link library list and a standard dynamic link library list according to an embodiment of the present application.
  • list 1 is the first dynamic link library list
  • list 2 It is a standard dynamic link library list.
  • the list contains multiple dynamic link library names, and it can also include an ordering of these dynamic link library names. To match two lists, you must first determine whether the ratio of the number of dynamic link libraries is within a preset range.
  • the preset range can be [99%, 101%], or 0.8 to 1.2.
  • the ratio is greater than 100% or 1, otherwise the ratio is less than 100% or 1. Because the number of dynamic link library names in List 1 and List 2 is 5, the ratio of the two is 1, which is within a preset range, and the next comparison can be performed.
  • the five dynamic link library names in list 1 are compared with those in list 2. The order of the comparisons can be compared sequentially. For example, the dynamic link library A corresponding to sequence 1 in list 1 is in sequence with the sequences 1-5 in list 2. The dynamic link library name is compared.
  • the dynamic link library A in list 1 is completely the same as the dynamic link library A in sequence 3 in list 2. It is determined that the dynamic link library A matches successfully, and the dynamic link library A in list 1 stops the comparison.
  • the matched first dynamic link library list is created according to the successfully matched dynamic link library name, that is, list 0, and the original dynamic link library and the standard dynamic link library are updated to remove the successfully matched dynamic link library names and generate a table. 3 and Table 4, continue the next round of dynamic link library name comparison, until all the dynamic link library names in the first dynamic link library list have been compared with the standard dynamic link library, or the standard dynamic link library does not Then there are unmatched dynamic link libraries.
  • the comparison order may be sequentially compared according to the dynamic link library order, or it may be matched from the last time.
  • the next successful comparison starts.
  • the dynamic link library A in the first dynamic link library list in FIG. 1B matches the dynamic link library A in the standard dynamic link library.
  • the next comparison object can be dynamically linked from the standard.
  • the last successful matching position in the library list, the position of order 3, the reverse order comparison or the order comparison, that is, the dynamic link library B in the first dynamic link library list can be sorted 2 or 4 with the standard dynamic link library list.
  • the comparison of the dynamic link library names may also be combined, for example, the dynamic link library A of order 1 in list 1 is compared with the dynamic link library C of standard dynamic link library order 1, and the matching fails.
  • the comparison of dynamic link library names can also be a combination of multiple dynamic link library names, such as the dynamic list in Listing 1.
  • Link library A and dynamic link library B can be combined to compare with list 2.
  • the standard dynamic link library does not have dynamic link library A and dynamic link library B adjacent to each other, so the matching fails.
  • the matching success rate is obtained according to the ratio of the number of dynamic link library names that successfully matched the standard dynamic link library list in the first dynamic link library list to the total number of dynamic link library names in the standard dynamic link library, for example, list 1 in FIG. 1B
  • the first preset The threshold is 75%
  • the matching success rate is greater than the first preset threshold, and it is determined that the first dynamic link library list is successfully matched with the standard dynamic link library list.
  • the first dynamic link library list is compared with multiple dynamic link library names in the standard dynamic link library list to obtain the first dynamic link library list and the standard dynamic link library list.
  • the matching success rate of the dynamic link library names is then determined according to the matching success rate to determine whether the first dynamic link library list and the standard dynamic link library list match successfully.
  • the comparison of dynamic link library names can set different comparison rules according to requirements, obtain different matching success rates, and then obtain different matching results of the first dynamic link library list and the standard dynamic link library list. It improves the pertinence and accuracy of the matching process, and further improves the effectiveness of the obtained matching results for equipment safety determination.
  • the method before comparing the dynamic link library name in the first dynamic link library list with the dynamic link library name in the standard dynamic link library list, the method further includes: determining a version of the first dynamic link library list The number is the same as the version number of the standard dynamic link library, and the version number is obtained according to the version number of the electronic device and / or the version number of the APP.
  • the loaded dynamic link library may be different, or after the APP is updated, the loaded dynamic link library will be different from the old version of the dynamic link library. It is not caused by the risk dynamic link library, but if the version number of the electronic device or the version number of the APP is wrong, misjudgment may occur. Therefore, before comparing the first dynamic link library list with the standard dynamic link library list, it is necessary to obtain the version numbers of the two and determine that they are the same.
  • the method of obtaining the version number can be generated based on the APP version number or the device version number alone, or it can be generated by combining the two version numbers.
  • the method before matching the first dynamic link library list with the standard dynamic link library list, the method further includes generating a standard dynamic link library list, which specifically includes: obtaining a dynamic link library name loaded by an APP of multiple electronic devices; The dynamic link library names loaded by the APPs of each electronic device form multiple sample dynamic link library lists; determine the list coverage of each dynamic link library name in the multiple sample dynamic link library lists, and obtain the list coverage greater than the second pre-defined Set a threshold dynamic link library name; generate a standard dynamic link library based on the obtained dynamic link library name.
  • a standard dynamic link library list specifically includes: obtaining a dynamic link library name loaded by an APP of multiple electronic devices; The dynamic link library names loaded by the APPs of each electronic device form multiple sample dynamic link library lists; determine the list coverage of each dynamic link library name in the multiple sample dynamic link library lists, and obtain the list coverage greater than the second pre-defined Set a threshold dynamic link library name; generate a standard dynamic link library based on the obtained dynamic link library name.
  • the developer can record the dynamic link library names that need to be loaded during the APP running process to form a standard dynamic link library list.
  • the APP does not record the dynamic link library name, or for some apps
  • a third-party APP that adds auxiliary functions can obtain a standard dynamic link library list according to the APP running process.
  • FIG. 1C is a schematic diagram of generating a standard dynamic link library according to an embodiment of the present invention. As shown in FIG. 1C, a list of four sample dynamic link libraries formed by loading the dynamic link library names by four electronic devices is obtained. , List 1, List 2, List 3, and List 4, respectively. The coverage of each dynamic link library name can be obtained according to the four sample dynamic link library lists.
  • the method of obtaining the coverage includes: obtaining a dynamic link library name from multiple sample dynamic link library lists, and then determining that the dynamic link library is included. The number of sample dynamic link library lists for the library name. Finally, the list coverage of the dynamic link library is determined based on the number of sample dynamic link library lists containing the dynamic link library name and the number of multiple sample dynamic link library lists.
  • the coverage rate corresponding to the dynamic link library name in the obtained sample dynamic link library list is shown in Listing 5.
  • the second preset threshold is a percentage or a decimal value less than 1. If the second preset threshold is 60%, according to the list 5, a standard dynamic link library list as shown in FIG. 1C can be obtained.
  • the dynamic link library name ordering in the standard dynamic link library list can be obtained according to the maximum possible order of the dynamic link library name in the sample dynamic link library list, that is, the maximum possible order of dynamic link library A in the sample dynamic link library list. Is the first sequence, so it is also the first sequence in the standard dynamic link library list.
  • the standard dynamic link library can also be updated.
  • the update method includes: obtaining the names of the dynamic link libraries in multiple sample dynamic link library lists whose coverage is not greater than a second preset threshold. And store it in the pending list; obtain the new dynamic link library name loaded by the APP of the new electronic device; check whether the pending list contains the new dynamic link library name, and if so, update the coverage of the dynamic link library, if not To store the new dynamic link library name in the pending list; when the coverage of the dynamic link library name in the pending list is greater than the second preset threshold, obtain the dynamic link library name and update the dynamic link library name to the standard dynamic Link library.
  • the dynamic link library D in FIG. 1C has a coverage rate of only 50%. It is stored in the pending list, and then the new dynamic link library name loaded by the APP of the electronic device is continued to be collected.
  • the APP includes a hook operation, but not all of the hook operations will bring risks to the electronic device, so the risk of the device needs to be further judged.
  • the dynamic link library name corresponding to the hook operation is matched with the dynamic link library name loaded by the risk device APP. If the match is successful, it indicates that the hook operation is likely to be a risk operation, and the electronic device is judged to be at risk.
  • matching the dynamic link library name corresponding to the hook operation with the dynamic link library name in the preset dynamic link library list, and determining whether the electronic device corresponding to the APP is at risk according to the matching result including: obtaining the first dynamic link library The dynamic link library name that fails to match the standard dynamic link library in the dynamic link library name corresponding to the hook operation; and match the dynamic link library name corresponding to the hook operation with the dynamic link library name in the preset dynamic link library list ; If the matching success rate is greater than the third preset threshold, it is determined that the electronic device corresponding to the APP is at risk.
  • the name of the dynamic link library corresponding to the hook operation is to match the dynamic link library name in the dynamic link library with the preset dynamic link library list.
  • the preset dynamic link library list is the dynamic link library loaded when the APP is run on the risk device. The list of names is because the dynamic link library name loaded by the APP of the risk device has been marked as a risk dynamic link library. If the dynamic link library corresponding to the hook operation matches the risk dynamic link library with a success rate greater than a third preset threshold , It means that the dynamic link library corresponding to the hook operation is also a risk dynamic link library, and it can be determined that the electronic device corresponding to the APP is at risk.
  • the electronic device it is determined whether the electronic device includes a hook operation through the matching result of the first dynamic link library list and the standard dynamic link library list.
  • This method is convenient and fast, and improves the reliability of the standard dynamic link library, which improves It improves the efficiency and accuracy of hook operation detection.
  • it is necessary to obtain the dynamic link library name corresponding to the hook operation, and then match the dynamic link library name loaded by the risk device to finally determine the risk of the electronic device corresponding to the APP. Improved the accuracy of equipment risk judgment.
  • FIG. 2 is a schematic flowchart of a method for matching a first dynamic link library list with a standard dynamic link library list according to an embodiment of the present invention.
  • the first dynamic link library list and The methods of standard dynamic link library list matching include:
  • the comparison of the dynamic link library names can be set with different comparison rules according to requirements, and different matching success rates can be obtained, thereby obtaining different matching results of the first dynamic link library list and the standard dynamic link library list. , Improves the pertinence and accuracy of the matching process, and further improves the effectiveness of the obtained matching results for equipment safety determination.
  • FIG. 3 is a schematic flowchart of a method for generating a standard dynamic link library list according to an embodiment of the present invention. As shown in the figure, the method for generating a standard dynamic link library list in this embodiment includes:
  • S305 Determine the coverage rate of the dynamic link library list according to the number of the sample dynamic link library list including the dynamic link library name and the number of the multiple sample dynamic link library lists. If the coverage rate is greater than the second preset threshold, execute S306; otherwise, execute S308;
  • S308 Obtain the names of the dynamic link libraries in the multiple sample dynamic link library lists whose coverage is not greater than a second preset threshold, and store the names in the pending list;
  • S312 Obtain a dynamic link library name in the pending list whose list coverage is greater than a second preset threshold; execute S307.
  • the present invention by generating a standard dynamic link library list, it is possible to determine whether the first dynamic link library list contains an unsafe dynamic link library by the degree of matching between the first dynamic link library list and the standard dynamic link library list. , And then determine whether the APP contains a hook operation. In addition, through the real-time update of the standard dynamic link library list, the accuracy of judging whether the APP contains a hook operation is improved.
  • FIG. 4 is a schematic flowchart of another risk detection method according to an embodiment of the present invention. As shown in FIG. 4, the risk detection method includes:
  • the electronic device it is determined whether the electronic device includes a hook operation through the matching result of the first dynamic link library list and the standard dynamic link library list.
  • This method is convenient and fast, and improves the reliability of the standard dynamic link library, which improves It improves the efficiency and accuracy of hook operation detection.
  • it is necessary to obtain the dynamic link library name corresponding to the hook operation, and then match the dynamic link library name loaded by the risk device to finally determine the risk of the electronic device corresponding to the APP. Improved the accuracy of equipment risk judgment.
  • FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • the electronic device includes a processor, a memory, a communication interface, and one or more programs.
  • the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for performing the following steps:
  • the dynamic link library name corresponding to the hook operation is matched with the dynamic link library name loaded by the risk device APP, and whether the electronic device corresponding to the APP is at risk is determined according to the matching result.
  • whether the electronic device includes a hook operation is determined by the matching result between the first dynamic link library list and the standard dynamic link library list.
  • This method is convenient and fast, and because of the reliability of the standard dynamic link library It improves the efficiency and accuracy of hook operation detection.
  • FIG. 6 is a block diagram of the functional units of the risk detection device 600 according to the embodiment of the present invention.
  • the risk detection device 600 is applied to an electronic device.
  • the risk detection device 600 includes:
  • the list generating unit 601 is configured to obtain a dynamic link library name loaded by an application APP to form a first dynamic link library list, where the first dynamic link library list includes multiple dynamic link library names;
  • a matching unit 602 configured to match the first dynamic link library list with a standard dynamic link library list, and determine whether the APP includes a hook operation according to the matching result;
  • a determining unit 603 is configured to match a dynamic link library name corresponding to the hook operation with a dynamic link library name in a preset dynamic link library list if the APP includes a hook operation, the preset dynamic link library
  • the list is a list composed of the dynamic link library names loaded by the APP running on the risk device, and it is determined whether the electronic device corresponding to the APP is at risk according to the matching result.
  • An embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to perform a part or all of the steps of any method described in the foregoing method embodiments
  • the computer includes a mobile terminal.
  • An embodiment of the present application further provides a computer program product.
  • the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute any one of the methods described in the foregoing method embodiments. Part or all of the steps of a method.
  • the computer program product may be a software installation package, and the computer includes a mobile terminal.
  • the program may be stored in a computer-readable memory, and the memory may include a flash disk. , ROM, RAM, disk or disc, etc.

Landscapes

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

Abstract

一种风险检测方法和装置,其中风险检测方法包括:获取应用程序APP加载的动态链接库名称,形成第一动态链接库列表(101);将第一动态链接库列表与标准动态链接库列表进行匹配,根据匹配结果确定APP是否包含钩子hook操作(102);若确定APP包含hook操作,则将hook操作对应的动态链接库名称与预设动态链接库列表中的动态链接库名称进行匹配,根据匹配结果确定APP对应的电子设备是否存在风险(103)。该方法能够通过检测APP加载的动态链接库,识别电子设备安全的APP是否包含hook操作,进而对电子设备的安全性进行监控,并提升设备风险检测的效率。

Description

一种风险检测方法和装置
本申请要求于2018年7月27日提交中国专利局、申请号为2018108410642、申请名称为“一种风险检测方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及网络安全领域,具体涉及一种风险检测方法和装置。
背景技术
在很多金融活动中,需要确定APP的安全性,识别是否有非法的hook插件将APP链接到风险链接库中。传统的安全软件对病毒文件进行防护的技术方案不能识别和防止非法的动态链接库文件被加载,例如同盾、邦盛等,针对电子设备风险的识别能力普遍不足,识别电子设备中的APP是否包含hook插件方面的应用几乎处于空白状态。从而无法发现hook插件并有效保护设备,这将导致服务器端对电子设备APP的风险度判断不足,可能导致做出错误决定,以至于造成巨大的经济损失。
发明内容
本发明实施例提供一种风险检测方法和装置,能够通过检测APP加载的动态链接库,识别电子设备安全的APP是否包含hook操作,进而对电子设备的安全性进行监控,并提升设备风险检测的效率。
本发明实施例的第一方面提供了一种风险检测方法,所述风险检测方法包括:
获取应用程序APP加载的动态链接库名称,形成第一动态链接库列表,所述第一动态链接库列表包含多个动态链接库名称;
将所述第一动态链接库列表与标准动态链接库列表进行匹配,根据匹配结果确定所述APP是否包含钩子hook操作;
若确定所述APP包含hook操作,则将所述hook操作对应的动态链接库名称与预设动态链接库列表中的动态链接库名称进行匹配,所述预设动态链接库列表是运行在风险设备上的所述APP加载的动态链接库名称组成的列表,根据匹配结果确定所述APP对应的电子设备是否存在风险。
本发明实施例的第二方面提供了一种风险检测装置,所述风险检测装置包括:
列表生成单元,用于获取应用程序APP加载的动态链接库名称,形成第一动态链接库列表,所述第一动态链接库列表包含多个动态链接库名称;
匹配单元,用于将所述第一动态链接库列表与标准动态链接库列表进行匹配,根据匹配结果确定所述APP是否包含钩子hook插件;
确定单元,用于若确定所述APP包含hook操作,则将所述hook操作对应的动态链接库名称与预设动态链接库列表中的动态链接库名称进行匹配,所述预设动态链接库列表是运行在风险设备上的所述APP加载的动态链接库名称组成的列表,根据匹配结果确定所述APP对应的电子设备是否存在风险。
本发明实施例第三方面提供了一种电子装置,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行第一方面任一方法中的步骤的指令。
本发明实施例第四方面提供了一种计算机可读存储介质,存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行第一方面任一方法所述的步骤的指令。
在本发明实施例中,通过形成的第一动态链接库列表与标准动态链接库列表的匹配结果确定电子设备是否包含hook操作,这种方法方便快捷,并且由于标准动态链接库的可靠性,提升了hook操作检测的效率和准确性。另外,对于包含hook操作的APP,需要再获取其hook操作对应的动态链接库名称,然后与风险设备加载的动态链接库名称进行匹配,最终确定APP对应的电子设备的风险性。提升了设备风险判断的准确性。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1A是本发明实施例提供的一种风险检测方法流程示意图;
图1B是本发明实施例提供的一种第一动态链接库列表与标准动态链接库列表的匹配示意图;
图1C是本发明实施例提供的一种生成标准动态链接库的示意图;
图2是本发明实施例提供的一种第一动态链接库列表与标准动态链接库列表的匹配方法流程示意图;
图3是本发明实施例提供的一种生成标准动态链接库列表的方法流程示意图;
图4是本发明实施例提供的另一种风险检测方法流程示意图;
图5是本发明实施例提供的一种电子装置的结构示意图;
图6是本发明实施例提供的一种风险检测装置结构框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
下面对本申请实施例进行详细介绍。
请参阅图1A,图1A为本发明实施例中一种风险检测方法流程示意图,如图1A所示,所述风险检测方法包括:
S101、获取应用程序APP加载的动态链接库名称,形成第一动态链接库列表,所述第一动态链接库列表包含多个动态链接库名称。
应用程序(Application,APP)是指安装在电子设备上的第三方应用程序,根据其应用范围可分类为购物类APP,地图类APP,游戏类APP,学***台的不同,可分为iOS***APP,Android***APP,和微软***APP等。同样的,APP对应的电子设备也可以是iOS设备,Android设备或者Windows设备等。
动态链接库(Dynamic Link Library或者Dynamic-link Library,DLL)是实现共享函数库概念的一种方式。在运行APP时,需要加载大量的函数库,如果为每一个APP都准备一份单独的函数库,数据量将非常惊人,并且很多APP运行时加载的函数库内容是相同的,因此,为了减少内存开销,采用动态链接库用于APP之间的共享。动态链接库中库函数的扩展名是”.dll″、″.ocx″(包含ActiveX控制的库)或者″.drv″(旧式的***驱动程序),动态链接库的名称可以是一些特定的函数名称,例如mapi32.dll是电子邮件的专用函数,netapi32.dll是访问和控制网络的函数,odbc32.dll是开放数据库连接功能的DLL;也可以是程序员自定义的用于一定功能的链接库名称。将获取到的动态链接库名称全部收集起来,形成一个第一动态链接库列表。
S102、将所述第一动态链接库列表与标准动态链接库列表进行匹配,若匹配失败,则确定所述APP被钩子hook,APP对应的电子设备存在风险。
钩子(hook),是消息处理机制的一个平台,应用程序可以在上面设置子程以监视指定窗口的某种消息,而且所监视的窗口可以是其他进程所创建的。当消息到达后,在目标窗口处理函数之前处理它。非法者可以通过hook操作截获APP的消息,并使APP链接到非法的动态链接库,执行不安全的操作。因此,需要通过检测APP加载的动态链接库是否与标准动态链接库相匹配,来判定APP是否包含hook操作,进而判定APP对应的电子设备是否存在风险。
可选的,将第一动态链接库列表与标准动态链接库列表进行匹配包括:确定所述第一动态链接库列表中的动态链接库名称个数与所述标准动态链接库列表中的动态链接库名称个数的比值处于预设范围内;将第一动态链接库列表中的动态链接库名称与标准动态链接库列表中的动态链接库名称进行比对,若两个动态链接库名称完全相同,则确定第一动态链接库列表中的动态链接库名称与标准动态链接库列表中的动态链接库名称匹配成功;根据第一动态链接库列表中与标准动态链接库列表匹配成功的动态链接库名称个数占标准动态链接库中的动态链接库名称总数的比值,获得匹配成功率;当匹配成功率大于第一预设阈值时,确定第一动态链接库列表与标准动态链接库列表匹配成功,否则确定第一动态链接库列表与标准动态链接库列表匹配失败。
请参阅图1B,图1B为本申请实施例提供的一种第一动态链接库列表与标准动态链接库列表的匹配示意图,如图1B所示,列表1为第一动态链接库列表,列表2为标准动态链接库列表,列表中包含多个动态链接库名称,也可以包含这些动态链接库名称的排序。将两个列表进行匹配,首先要确定两者的动态链接库数量比值是否处于预设范围内,预设范围可以是[99%,101%],或者0.8~1.2等,如果第一动态链接库列表中的动态链接库名称个数大于标准动态链接库列表中的动态链接库个数,则比值大于100%或1,否则两者的比值小于100%或1。由于列表1和列表2中的动态链接库名称个数都为5,两者比值为1,处于预设范围内,可以进行下一步的比对。列表1中的5个动态链接库名称与列表2中进行比对,比对的顺序可以是依次比对,例如列表1中序列1对应的动态链接库A,依次与列表2中序列1-5的动态链接库名称进行比对,若比对成功,则停止比对,而不需要再与列表2中剩余序列号对应的动态链接库名称进行比对。列表1中的动态链接库A与列表2中序列3的动态链接库A完全相同,则确定动态链接库A匹配成功,列表1中的动态链接库A停止比对。根据匹配成功的动态链接库名称建立已匹配第一动态链接库列表,即为列表0,而原本的动态链接库和标准动态链接库都进行更新,去除已匹配成功的动态链接库名称, 生成表3和表4,继续进行下一轮动态链接库名称的比对,直到第一动态链接库列表中的所有动态链接库名称都与标准动态链接库完成了比对,或者标准动态链接库中不再剩余未匹配成功的动态链接库为止。
在第一动态链接库列表中的动态链接库名称与标准动态链接库列表中的动态链接库进行比对时,比对顺序可以是按照动态链接库排序进行依次比对,也可以从上一次匹配成功的位置开始下一次比对,例如图1B中第一动态链接库列表中的动态链接库A与标准动态链接库中的动态链接库A匹配成功,则下一个比对对象可以从标准动态链接库列表中上次匹配成功的位置,排序3的位置,反序比对或顺序比对,即第一动态链接库列表中的动态链接库B可以与标准动态链接库列表中排序2或排序4的动态链接库名称进行比对。
可选的,动态链接库名称的比对也可以结合排序,例如,在列表1中排序1的动态链接库A与标准动态链接库排序1的动态链接库C进行比对,匹配失败。可选的,因为某些动态链接库在APP的加载过程中用于结合完成一个功能,于是动态链接库名称的比对还可以是多个动态链接库名称结合比对,例如列表1中的动态链接库A和动态链接库B可以结合一起与列表2进行比对,而标准动态链接库中不存在前后相邻的动态链接库A和动态链接库B,因此匹配失败。
根据第一动态链接库列表中与标准动态链接库列表匹配成功的动态链接库名称个数占标准动态链接库中的动态链接库名称总数的比值,获得匹配成功率,例如图1B中的列表1中有4个动态链接库名称与标准动态链接库列表2中的动态链接库名匹配成功,则列表1与列表2的匹配成功率为:4÷5×100%=80%,第一预设阈值为75%,匹配成功率大于第一预设阈值,确定第一动态链接库列表与标准动态链接库列表匹配成功。
可见,在本发明实施例中,通过第一动态链接库列表与标准动态链接库列表中的多个动态链接库名称进行比对,获取第一动态链接库列表与所述标准动态链接库列表中的动态链接库名称的匹配成功率,然后根据匹配成功率确定第一动态链接库列表与标准动态链接库列表是否匹配成功。在这个过程中,动态链接库名称的比对可以根据需求设置不同的比对规则,获得不同的匹配成功率,进而得到不同的第一动态链接库列表与标准动态链接库列表的匹配结果,提升了匹配过程的针对性和准确度,进而提升了获得的匹配结果对于设备安全性判定的有效性。
可选的,在将第一动态链接库列表中的动态链接库名称与标准动态链接库列表中的动态链接库名称进行比对之前,方法还包括:确定所述第一动态链接库列表的版本号与所述 标准动态链接库的版本号相同,所述版本号根据电子设备的版本号和/或APP的版本号获得。
APP在不同的电子设备上进行安装时,加载的动态链接库可能会有所区别,或者APP升级更新后,加载的动态链接库与旧版本的动态链接库也会有所区别,这种区别并不是风险动态链接库造成的,但是如果电子设备的版本号或APP版本号对应错误,则有可能会发生误判。因此,在将第一动态链接库列表与标准动态链接库列表进行比对前,需要获取两者的版本号,并确定两者的版本号相同。获取版本号的方式可以单独根据APP版本号或设备版本号生成,也可以结合两种版本号生成。
可选的,在将第一动态链接库列表与标准动态链接库列表进行匹配之前,还包括生成标准动态链接库列表,具体包括:获取多个电子设备的APP加载的动态链接库名称;根据多个电子设备的APP加载的动态链接库名称形成多个样例动态链接库列表;确定多个样例动态链接库列表中每一个动态链接库名称的列表覆盖率,获取列表覆盖率大于第二预设阈值的动态链接库名称;根据获取到的动态链接库名称,生成标准动态链接库。
在APP的开发过程中,可以由开发者记录APP运行过程需要加载的动态链接库名称,形成标准动态链接库列表,但是对于某些开发者没有记录动态链接库名称的APP,或者对于某些由第三方添加了辅助功能的APP,可以根据APP运行过程获得标准动态链接库列表。
首先需要获取多个电子设备的APP加载的动态链接库名称,多个电子设备的数量越多,得到的标准动态链接库列表越具有权威性。每一个电子设备的APP加载的动态链接库名称形成一个样例动态链接库列表。请参阅图1C,图1C是本发明实施例提供的一种生成标准动态链接库的示意图,如图1C所示,获得4个电子设备加载动态链接库名称形成的4个样例动态链接库列表,分别为列表1,列表2,列表3和列表4。根据4个样例动态链接库列表可以获得每一个动态链接库名称的覆盖率,覆盖率的获取方法包括:从多个样例动态链接库列表中获取一个动态链接库名称,然后确定包含动态链接库名称的样例动态链接库列表个数,最后根据包含动态链接库名称的样例动态链接库列表个数和多个样例动态链接库列表的个数,确定动态链接库的列表覆盖率。
获得的样例动态链接库列表中动态链接库名称对应的覆盖率如列表5所示,第二预设阈值是一个百分比或小于1的小数值。若第二预设阈值为60%,那么根据列表5,可获得如图1C中的标准动态链接库列表。标准动态链接库列表中的动态链接库名称排序可根据样例动态链接库列表中的该动态链接库名称的最大可能排序获得,即动态链接库A在样例动 态链接库列表中排序的最大可能为第一序列,所以其在标准动态链接库列表中也为第一序列。
可选的,因为APP会更新升级,所以标准动态链接库也可以进行更新,更新方法包括:获取多个样例动态链接库列表中覆盖率不大于第二预设阈值的动态链接库的名称,并存储在待定列表中;获取新的电子设备的APP加载的新的动态链接库名称;检测待定列表中是否包含新的动态链接库名称,若是,则更新该动态链接库的覆盖率,若否,将新的动态链接库名称存储到待定列表中;当待定列表中的动态链接库名称的覆盖率大于第二预设阈值时,获取动态链接库名称,并将动态链接库名称更新到标准动态链接库中。
例如图1C中的动态链接库D,覆盖率只有50%,将其存储在待定列表中,然后继续收集电子设备的APP加载的新的动态链接库名称,如果又收集到两个APP加载的动态链接库中都包含动态链接库D,那么动态链接库D的覆盖率可更新为(2+2)/(4+2)*100%=66.6%,更新的覆盖率大于第二预设阈值60%,那么可将动态链接库D更新到所述标准动态链接库中。
可见,在本发明实施例中,通过生成标准动态链接库列表,使得能够通过第一动态链接库列表与标准动态链接库列表的匹配程度,判断第一动态链接库列表中是否包含不安全的动态链接库,进而判断APP是否包含hook操作。另外,通过对标准动态链接库列表的实时更新,提升了判断APP是否包含hook操作的准确率。
S103、若确定所述APP包含hook操作,则将所述hook操作对应的动态链接库名称与预设动态链接库列表中的动态链接库名称进行匹配,所述预设动态链接库列表是运行在风险设备上的所述APP加载的动态链接库名称组成的列表,根据匹配结果确定所述APP对应的电子设备是否存在风险。
具体地,已经确定了APP包含hook操作,但是并非所有的hook操作都会给电子设备带来风险,因此需要对设备的风险性进行进一步判断。将hook操作对应的动态链接库名称与风险设备APP加载的动态链接库名称进行匹配,如果匹配成功,则说明该hook操作为风险操作的可能性大,判断电子设备存在风险。
可选的,将hook操作对应的动态链接库名称与预设动态链接库列表中的动态链接库名称进行匹配,根据匹配结果确定APP对应的电子设备是否存在风险,包括:获取第一动态链接库中与标准动态链接库匹配失败的动态链接库名称,作为hook操作对应的动态链接库名称;将hook操作对应的动态链接库名称与所述预设动态链接库列表中的动态链接库名称 进行匹配;若匹配成功率大于第三预设阈值,则确定APP对应的电子设备存在风险。
hook操作对应的动态链接库名称即为动态链接库中与预设动态链接库列表中的动态链接库名称进行匹配,预设动态链接库列表即为风险设备上运行该APP时加载的动态链接库名称组成的列表,因为风险设备的APP加载的动态链接库名称已经被标记为风险动态链接库,那么如果hook操作对应的动态链接库与这些风险动态链接库的匹配成功率大于第三预设阈值,则说明hook操作对应的动态链接库也为风险动态链接库,则可确定APP对应的电子设备存在风险。
在本发明实施例中,通过形成的第一动态链接库列表与标准动态链接库列表的匹配结果确定电子设备是否包含hook操作,这种方法方便快捷,并且由于标准动态链接库的可靠性,提升了hook操作检测的效率和准确性。另外,对于包含hook操作的APP,需要再获取其hook操作对应的动态链接库名称,然后与风险设备加载的动态链接库名称进行匹配,最终确定APP对应的电子设备的风险性。提升了设备风险判断的准确性。
请参阅图2,图2是本发明实施例中一种第一动态链接库列表与标准动态链接库列表的匹配方法流程示意图,如图所示,本实施例中的第一动态链接库列表与标准动态链接库列表进行匹配的方法包括:
S201、确定所述第一动态链接库列表的版本号与所述标准动态链接库的版本号相同,所述版本号根据电子设备的版本号和/或APP的版本号获得;
S202、根据第一动态链接库列表和标准动态链接库列表获取各自列表中的动态链接库名称个数,并确定所述第一动态链接库列表中的动态链接库名称个数与所述标准动态链接库列表中的动态链接库名称个数的比值处于预设范围内;
S203、将所述第一动态链接库列表中的动态链接库名称与所述标准动态链接库列表中的动态链接库名称进行比对;
S204、若两个所述动态链接库名称完全相同,则确定所述第一动态链接库列表中的动态链接库名称与所述标准动态链接库列表中的动态链接库名称匹配成功;
S205、根据所述第一动态链接库列表中与所述标准动态链接库列表匹配成功的动态链接库名称个数占所述标准动态链接库中的动态链接库名称总数的比值,获得匹配成功率;
S206、确定所述匹配成功率是否大于第一预设阈值;
S207、若是,则确定所述第一动态链接库列表与标准动态链接库列表匹配成功;
S208、否则确定所述第一动态链接库列表与标准动态链接库列表匹配失败。
在本发明实施例中,动态链接库名称的比对可以根据需求设置不同的比对规则,获得不同的匹配成功率,进而得到不同的第一动态链接库列表与标准动态链接库列表的匹配结果,提升了匹配过程的针对性和准确度,进而提升了获得的匹配结果对于设备安全性判定的有效性。
请参阅图3,图3是本发明实施例提供的一种生成标准动态链接库列表的方法流程示意图,如图所示,本实施例中生成标准动态链接库列表的方法包括:
S301、获取多个电子设备的APP加载的动态链接库名称;
S302、根据所述多个电子设备的APP加载的动态链接库名称形成多个样例动态链接库列表;
S303、从所述多个样例动态链接库列表中获取一个动态链接库名称;
S304、确定包含所述动态链接库名称的样例动态链接库列表个数;
S305、根据所述包含所述动态链接库名称的样例动态链接库列表个数和所述多个样例动态链接库列表的个数,确定所述动态链接库的列表覆盖率,若所述覆盖率大于第二预设阈值,执行S306,否则执行S308;
S306、获取所述列表覆盖率大于第二预设阈值的动态链接库名称;
S307、根据获取到的所述动态链接库名称,生成标准动态链接库;
S308、获取所述多个样例动态链接库列表中覆盖率不大于第二预设阈值的动态链接库的名称,并存储在待定列表中;
S309、获取电子设备的APP加载的新的动态链接库名称,并检测所述待定列表中是否包含所述新的动态链接库名称;
S310、若是,则更新该动态链接库的覆盖率;
S311、若否,将所述新的动态链接库名称存储到所述待定列表中;
S312、获取所述待定列表中列表覆盖率大于第二预设阈值的动态链接库名称;执行S307。
在本发明实施例中,通过生成标准动态链接库列表,使得能够通过第一动态链接库列表与标准动态链接库列表的匹配程度,判断第一动态链接库列表中是否包含不安全的动态链接库,进而判断APP是否包含hook操作。另外,通过对标准动态链接库列表的实时更 新,提升了判断APP是否包含hook操作的准确率。
请参阅图4,图4是本发明实施例提供的另一种风险检测方法流程示意图,如图4所示,所述风险检测方法包括:
S401、获取应用程序APP加载的动态链接库名称,形成第一动态链接库列表;
S402、将所述第一动态链接库列表与标准动态链接库列表进行匹配,根据匹配结果确定所述APP是否包含钩子hook操作;
S403、获取所述动态链接库中与所述标准动态链接库匹配失败的动态链接库名称,作为所述hook操作对应的动态链接库名称;
S404、将所述hook操作对应的动态链接库名称与预设动态链接库列表中的动态链接库名称进行匹配;
S405、若匹配成功率大于第三预设阈值,则确定所述APP对应的电子设备存在风险。
在本发明实施例中,通过形成的第一动态链接库列表与标准动态链接库列表的匹配结果确定电子设备是否包含hook操作,这种方法方便快捷,并且由于标准动态链接库的可靠性,提升了hook操作检测的效率和准确性。另外,对于包含hook操作的APP,需要再获取其hook操作对应的动态链接库名称,然后与风险设备加载的动态链接库名称进行匹配,最终确定APP对应的电子设备的风险性。提升了设备风险判断的准确性。
如上述一致地,请参阅图5,图5是本发明实施例提供的一种电子装置的结构示意图,如图5所示,该电子装置包括处理器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行以下步骤的指令:
获取应用程序APP加载的动态链接库名称,形成第一动态链接库列表;
将所述第一动态链接库列表与标准动态链接库列表进行匹配,根据匹配结果确定所述APP是否包含钩子hook操作;
若确定所述APP包含hook操作,则将所述hook操作对应的动态链接库名称与风险设备APP加载的动态链接库名称进行匹配,根据匹配结果确定所述APP对应的电子设备是否存在风险。
可以看出,本发明实施例中,通过形成的第一动态链接库列表与标准动态链接库列表 的匹配结果确定电子设备是否包含hook操作,这种方法方便快捷,并且由于标准动态链接库的可靠性,提升了hook操作检测的效率和准确性。另外,对于包含hook操作的APP,需要再获取其hook操作对应的动态链接库名称,然后与风险设备加载的动态链接库名称进行匹配,最终确定APP对应的电子设备的风险性。提升了设备风险判断的准确性。
图6是本发明实施例中所涉及的风险检测装置600的功能单元组成框图。该风险检测装置600应用于电子装置,该风险检测装置600包括:
列表生成单元601,用于获取应用程序APP加载的动态链接库名称,形成第一动态链接库列表,所述第一动态链接库列表包含多个动态链接库名称;
匹配单元602,用于将所述第一动态链接库列表与标准动态链接库列表进行匹配,根据匹配结果确定所述APP是否包含钩子hook操作;
确定单元603,用于若确定所述APP包含hook操作,则将所述hook操作对应的动态链接库名称与预设动态链接库列表中的动态链接库名称进行匹配,所述预设动态链接库列表是运行在风险设备上的所述APP加载的动态链接库名称组成的列表,根据匹配结果确定所述APP对应的电子设备是否存在风险。
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤,上述计算机包括移动终端。
本申请实施例还提供一种计算机程序产品,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包,上述计算机包括移动终端。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、ROM、RAM、磁盘或光盘等。
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (20)

  1. 一种风险检测方法,其特征在于,所述方法包括:
    获取应用程序APP加载的动态链接库名称,形成第一动态链接库列表,所述第一动态链接库列表包含多个动态链接库名称;
    将所述第一动态链接库列表与标准动态链接库列表进行匹配,根据匹配结果确定所述APP是否包含钩子hook操作;
    若确定所述APP包含hook操作,则将所述hook操作对应的动态链接库名称与预设动态链接库列表中的动态链接库名称进行匹配,所述预设动态链接库列表是运行在风险设备上的所述APP加载的动态链接库名称组成的列表,根据匹配结果确定所述APP对应的电子设备是否存在风险。
  2. 根据权利要求1所述的方法,其特征在于,所述将所述第一动态链接库列表与标准动态链接库列表进行匹配,包括:
    根据所述第一动态链接库列表和所述标准动态链接库列表获取各自列表中的动态链接库名称个数,并确定所述第一动态链接库列表中的动态链接库名称个数与所述标准动态链接库列表中的动态链接库名称个数的比值处于预设范围内;
    将所述第一动态链接库列表中的动态链接库名称与所述标准动态链接库列表中的动态链接库名称进行比对,若两个所述动态链接库名称完全相同,则确定所述第一动态链接库列表中的动态链接库名称与所述标准动态链接库列表中的动态链接库名称匹配成功;
    根据所述第一动态链接库列表中与所述标准动态链接库列表匹配成功的动态链接库名称个数占所述标准动态链接库中的动态链接库名称总数的比值,获得匹配成功率;
    当所述匹配成功率大于第一预设阈值时,确定所述第一动态链接库列表与标准动态链接库列表匹配成功,否则确定所述第一动态链接库列表与标准动态链接库列表匹配失败。
  3. 根据权利要求2所述的方法,其特征在于,在将所述第一动态链接库列表中的动态链接库名称与所述标准动态链接库列表中的动态链接库名称进行比对之前,所述方法还包括:
    确定所述第一动态链接库列表的版本号与所述标准动态链接库的版本号相同,所述版本号根据电子设备的版本号和/或APP的版本号获得。
  4. 根据权利要求2或3所述的方法,其特征在于,在将所述第一动态链接库列表与标 准动态链接库列表进行匹配之前,所述方法还包括生成标准动态链接库列表,具体包括:
    获取多个电子设备的APP加载的动态链接库名称;
    根据所述多个电子设备的APP加载的动态链接库名称形成多个样例动态链接库列表;
    确定所述多个样例动态链接库列表中每一个动态链接库名称的列表覆盖率,获取所述列表覆盖率大于第二预设阈值的动态链接库名称;
    根据获取到的所述动态链接库名称,生成标准动态链接库。
  5. 根据权利要求4所述的方法,其特征在于,所述确定所述多个样例动态链接库列表中每一个动态链接库名称的列表覆盖率,包括:
    从所述多个样例动态链接库列表中获取一个动态链接库名称;
    确定包含所述动态链接库名称的样例动态链接库列表个数;
    根据所述包含所述动态链接库名称的样例动态链接库列表个数和所述多个样例动态链接库列表的个数,确定所述动态链接库的列表覆盖率。
  6. 根据权利要求4所述的方法,其特征在于,在确定所述多个样例动态链接库列表中每一个动态链接库名称的列表覆盖率后,所述方法还包括:
    获取所述多个样例动态链接库列表中覆盖率不大于第二预设阈值的动态链接库的名称,并存储在待定列表中;
    获取电子设备的APP加载的新的动态链接库名称;
    检测所述待定列表中是否包含所述新的动态链接库名称,若是,则更新该动态链接库的覆盖率,若否,将所述新的动态链接库名称存储到所述待定列表中;
    当所述待定列表中的动态链接库名称的覆盖率大于第二预设阈值时,获取所述动态链接库名称,并将所述动态链接库名称更新到所述标准动态链接库中。
  7. 根据权利要求6所述的方法,其特征在于,所述将所述hook操作对应的动态链接库名称与预设动态链接库列表中的动态链接库名称进行匹配,根据匹配结果确定所述APP对应的电子设备是否存在风险,包括:
    获取所述第一动态链接库中与所述标准动态链接库匹配失败的动态链接库名称,作为所述hook操作对应的动态链接库名称;
    将所述hook操作对应的动态链接库名称与所述预设动态链接库列表中的动态链接库名称进行匹配;
    若匹配成功率大于第三预设阈值,则确定所述APP对应的电子设备存在风险。
  8. 一种风险检测装置,其特征在于,所述风险检测装置包括:
    列表生成单元,用于获取应用程序APP加载的动态链接库名称,形成第一动态链接库列表,所述第一动态链接库列表包含多个动态链接库名称;
    匹配单元,用于将所述第一动态链接库列表与标准动态链接库列表进行匹配,根据匹配结果确定所述APP是否包含钩子hook操作;
    确定单元,用于若确定所述APP包含hook操作,则将所述hook操作对应的动态链接库名称与预设动态链接库列表中的动态链接库名称进行匹配,所述预设动态链接库列表是运行在风险设备上的所述APP加载的动态链接库名称组成的列表,根据匹配结果确定所述APP对应的电子设备是否存在风险。
  9. 根据权利要求8所述的装置,其特征在于,在将所述第一动态链接库列表与标准动态链接库列表进行匹配方面,所述匹配单元具体用于:
    根据所述第一动态链接库列表和所述标准动态链接库列表获取各自列表中的动态链接库名称个数,并确定所述第一动态链接库列表中的动态链接库名称个数与所述标准动态链接库列表中的动态链接库名称个数的比值处于预设范围内;
    将所述第一动态链接库列表中的动态链接库名称与所述标准动态链接库列表中的动态链接库名称进行比对,若两个所述动态链接库名称完全相同,则确定所述第一动态链接库列表中的动态链接库名称与所述标准动态链接库列表中的动态链接库名称匹配成功;
    根据所述第一动态链接库列表中与所述标准动态链接库列表匹配成功的动态链接库名称个数占所述标准动态链接库中的动态链接库名称总数的比值,获得匹配成功率;
    当所述匹配成功率大于第一预设阈值时,确定所述第一动态链接库列表与标准动态链接库列表匹配成功,否则确定所述第一动态链接库列表与标准动态链接库列表匹配失败。
  10. 根据权利要求9所述的装置,其特征在于,在将所述第一动态链接库列表中的动态链接库名称与所述标准动态链接库列表中的动态链接库名称进行比对之前,所述匹配单元还具体用于:
    确定所述第一动态链接库列表的版本号与所述标准动态链接库的版本号相同,所述版本号根据电子设备的版本号和/或APP的版本号获得。
  11. 根据权利要求8或9所述的装置,其特征在于,所述风险检测装置还包括标准列表生成单元,具体用于:
    获取多个电子设备的APP加载的动态链接库名称;
    根据所述多个电子设备的APP加载的动态链接库名称形成多个样例动态链接库列表;
    确定所述多个样例动态链接库列表中每一个动态链接库名称的列表覆盖率,获取所述列表覆盖率大于第二预设阈值的动态链接库名称;
    根据获取到的所述动态链接库名称,生成标准动态链接库。
  12. 根据权利要求11所述的装置,其特征在于,在在确定所述多个样例动态链接库列表中每一个动态链接库的列表覆盖率方面,所述标准列表生成单元还具体用于:
    从所述多个样例动态链接库列表中获取一个动态链接库名称;
    确定包含所述动态链接库名称的样例动态链接库列表个数;
    根据所述包含所述动态链接库名称的样例动态链接库列表个数和所述多个样例动态链接库列表的个数,确定所述动态链接库的列表覆盖率。
  13. 根据权利要求11或12所述的装置,其特征在于,在确定所述多个样例动态链接库列表中每一个动态链接库名称的列表覆盖率后,所述标准列表生成单元还具体用于:
    获取所述多个样例动态链接库列表中覆盖率不大于第二预设阈值的动态链接库的名称,并存储在待定列表中;
    获取电子设备的APP加载的新的动态链接库名称;
    检测所述待定列表中是否包含所述新的动态链接库名称,若是,则更新该动态链接库的覆盖率,若否,将所述新的动态链接库名称存储到所述待定列表中;
    当所述待定列表中的动态链接库名称的覆盖率大于第二预设阈值时,获取所述动态链接库名称,并将所述动态链接库名称更新到所述标准动态链接库中。
  14. 根据权利要求13所述的装置,其特征在于,所述确定单元具体用于:
    获取所述第一动态链接库中与所述标准动态链接库匹配失败的动态链接库名称,作为所述hook操作对应的动态链接库名称;
    将所述hook操作对应的动态链接库名称与所述预设动态链接库列表中的动态链接库名称进行匹配;
    若匹配成功率大于第三预设阈值,则确定所述APP对应的电子设备存在风险。
  15. 一种终端,其特征在于,包括处理器、输入设备、输出设备和存储器,所述处理器、输入设备、输出设备和存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行;
    获取应用程序APP加载的动态链接库名称,形成第一动态链接库列表,所述第一动态 链接库列表包含多个动态链接库名称;
    将所述第一动态链接库列表与标准动态链接库列表进行匹配,根据匹配结果确定所述APP是否包含钩子hook操作;
    若确定所述APP包含hook操作,则将所述hook操作对应的动态链接库名称与预设动态链接库列表中的动态链接库名称进行匹配,所述预设动态链接库列表是运行在风险设备上的所述APP加载的动态链接库名称组成的列表,根据匹配结果确定所述APP对应的电子设备是否存在风险。
  16. 根据权利要求15所述的终端,其特征在于,在将所述第一动态链接库列表与标准动态链接库列表进行匹配方面,所述处理器具体用于:
    根据所述第一动态链接库列表和所述标准动态链接库列表获取各自列表中的动态链接库名称个数,并确定所述第一动态链接库列表中的动态链接库名称个数与所述标准动态链接库列表中的动态链接库名称个数的比值处于预设范围内;
    将所述第一动态链接库列表中的动态链接库名称与所述标准动态链接库列表中的动态链接库名称进行比对,若两个所述动态链接库名称完全相同,则确定所述第一动态链接库列表中的动态链接库名称与所述标准动态链接库列表中的动态链接库名称匹配成功;
    根据所述第一动态链接库列表中与所述标准动态链接库列表匹配成功的动态链接库名称个数占所述标准动态链接库中的动态链接库名称总数的比值,获得匹配成功率;
    当所述匹配成功率大于第一预设阈值时,确定所述第一动态链接库列表与标准动态链接库列表匹配成功,否则确定所述第一动态链接库列表与标准动态链接库列表匹配失败。
  17. 根据权利要求16所述的终端,其特征在于,在将所述第一动态链接库列表中的动态链接库名称与所述标准动态链接库列表中的动态链接库名称进行比对之前,所述处理器还用于:
    确定所述第一动态链接库列表的版本号与所述标准动态链接库的版本号相同,所述版本号根据电子设备的版本号和/或APP的版本号获得。
  18. 根据权利要求16或17所述的终端,其特征在于,在将所述第一动态链接库列表与标准动态链接库列表进行匹配之前,所述处理器还用于生成标准动态链接库列表,具体用于:
    获取多个电子设备的APP加载的动态链接库名称;
    根据所述多个电子设备的APP加载的动态链接库名称形成多个样例动态链接库列表;
    确定所述多个样例动态链接库列表中每一个动态链接库名称的列表覆盖率,获取所述列表覆盖率大于第二预设阈值的动态链接库名称;
    根据获取到的所述动态链接库名称,生成标准动态链接库。
  19. 根据权利要求18所述的终端,其特征在于,在确定所述多个样例动态链接库列表中每一个动态链接库名称的列表覆盖率方面,所述处理器用于:
    从所述多个样例动态链接库列表中获取一个动态链接库名称;
    确定包含所述动态链接库名称的样例动态链接库列表个数;
    根据所述包含所述动态链接库名称的样例动态链接库列表个数和所述多个样例动态链接库列表的个数,确定所述动态链接库的列表覆盖率。
  20. 一种计算机可读存储介质,存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行权利要求1-7中任一方法所述的步骤的指令。
PCT/CN2018/108888 2018-07-27 2018-09-29 一种风险检测方法和装置 WO2020019521A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810841064.2 2018-07-27
CN201810841064.2A CN109063481B (zh) 2018-07-27 2018-07-27 一种风险检测方法和装置

Publications (1)

Publication Number Publication Date
WO2020019521A1 true WO2020019521A1 (zh) 2020-01-30

Family

ID=64836641

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/108888 WO2020019521A1 (zh) 2018-07-27 2018-09-29 一种风险检测方法和装置

Country Status (2)

Country Link
CN (1) CN109063481B (zh)
WO (1) WO2020019521A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111783039A (zh) * 2020-06-30 2020-10-16 北京百度网讯科技有限公司 风险确定方法、装置、计算机***和存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112149113B (zh) * 2020-11-26 2021-06-08 飞天诚信科技股份有限公司 一种iOS应用反钩子的方法及装置
CN113672914A (zh) * 2021-08-23 2021-11-19 郑州云智信安安全技术有限公司 一种用于app个人数据安全的风险评估方法及装置
CN114518996A (zh) * 2022-02-22 2022-05-20 平安科技(深圳)有限公司 移动设备的异常检测方法、***、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117644A (zh) * 2015-08-26 2015-12-02 福建天晴数码有限公司 采集Android外挂程序方法及***
CN106326735A (zh) * 2015-07-02 2017-01-11 腾讯科技(深圳)有限公司 防注入的方法和装置
CN106778234A (zh) * 2015-11-19 2017-05-31 珠海市君天电子科技有限公司 应用程序的防护方法及装置
CN106970871A (zh) * 2016-01-14 2017-07-21 阿里巴巴集团控股有限公司 一种外挂程序检测的方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5835749A (en) * 1995-05-05 1998-11-10 Apple Computer, Inc. Method and apparatus for providing dynamically linked libraries
TW201423470A (zh) * 2012-12-03 2014-06-16 Inst Information Industry 安全防護方法及安全防護裝置
CN104156329B (zh) * 2014-08-01 2017-02-15 无锡中微爱芯电子有限公司 在动态链接库中实现usb设备插拔识别的方法
CN106446671A (zh) * 2016-08-30 2017-02-22 上海二三四五网络科技有限公司 一种拦截动态库注入的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106326735A (zh) * 2015-07-02 2017-01-11 腾讯科技(深圳)有限公司 防注入的方法和装置
CN105117644A (zh) * 2015-08-26 2015-12-02 福建天晴数码有限公司 采集Android外挂程序方法及***
CN106778234A (zh) * 2015-11-19 2017-05-31 珠海市君天电子科技有限公司 应用程序的防护方法及装置
CN106970871A (zh) * 2016-01-14 2017-07-21 阿里巴巴集团控股有限公司 一种外挂程序检测的方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111783039A (zh) * 2020-06-30 2020-10-16 北京百度网讯科技有限公司 风险确定方法、装置、计算机***和存储介质
CN111783039B (zh) * 2020-06-30 2023-08-18 北京百度网讯科技有限公司 风险确定方法、装置、计算机***和存储介质

Also Published As

Publication number Publication date
CN109063481A (zh) 2018-12-21
CN109063481B (zh) 2023-04-07

Similar Documents

Publication Publication Date Title
WO2020019521A1 (zh) 一种风险检测方法和装置
CN106156619B (zh) 应用安全防护方法及装置
US9614867B2 (en) System and method for detection of malware on a user device using corrected antivirus records
CN111552973B (zh) 对设备进行风险评估的方法、装置、电子设备及介质
CN109918285B (zh) 一种开源软件的安全识别方法及装置
CN110474903B (zh) 可信数据获取方法、装置及区块链节点
US11120124B2 (en) Method for detecting a deviation of a security state of a computing device from a desired security state
CN109815697B (zh) 误报行为处理方法及装置
US8370941B1 (en) Rootkit scanning system, method, and computer program product
US10528744B2 (en) Detecting security vulnerabilities on computing devices
CN113779562A (zh) 基于零信任的计算机病毒防护方法、装置、设备及介质
CN113495825A (zh) 线路告警的处理方法、装置、电子设备及可读存储介质
WO2020000753A1 (zh) 一种设备安全监控方法和装置
CN106407016B (zh) 一种多线程争抢资源的模拟方法及装置
WO2022116587A1 (zh) Web端数据签名方法、装置及计算机设备
CN110674491B (zh) 用于安卓应用的实时取证的方法、装置和电子设备
WO2018049977A1 (zh) 保障***安全的方法及装置
CN109241742B (zh) 一种恶意程序的识别方法及电子设备
CN109800580B (zh) ***进程的权限控制方法及装置、存储介质、计算机设备
CN112464176A (zh) 一种权限管理方法、装置、电子设备及存储介质
CN114327602B (zh) 信息处理方法、装置、电子设备及存储介质
CN116781389B (zh) 一种异常数据列表的确定方法、电子设备及存储介质
CN116595529B (zh) 一种信息安全检测方法、电子设备及存储介质
EP3889814B1 (en) Update device and update method
US11922233B2 (en) Information creation device, information creation method, and information creation program

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: 18927309

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: OTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 11/05/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18927309

Country of ref document: EP

Kind code of ref document: A1