WO2022126616A1 - Malicious application detection method and apparatus, and storage medium - Google Patents

Malicious application detection method and apparatus, and storage medium Download PDF

Info

Publication number
WO2022126616A1
WO2022126616A1 PCT/CN2020/137660 CN2020137660W WO2022126616A1 WO 2022126616 A1 WO2022126616 A1 WO 2022126616A1 CN 2020137660 W CN2020137660 W CN 2020137660W WO 2022126616 A1 WO2022126616 A1 WO 2022126616A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
configuration information
information
operating system
malicious
Prior art date
Application number
PCT/CN2020/137660
Other languages
French (fr)
Chinese (zh)
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 华为技术有限公司
Priority to CN202080004482.1A priority Critical patent/CN112689835A/en
Priority to PCT/CN2020/137660 priority patent/WO2022126616A1/en
Publication of WO2022126616A1 publication Critical patent/WO2022126616A1/en

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

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a method, device and storage medium for detecting malicious applications.
  • Application is a computer program for completing one or more specific tasks.
  • An operating system based on a Linux kernel such as an Android (Android) system, is mainly used in mobile terminal devices. Due to the open source and rich extensibility of the operating system code based on the Linux kernel, the functions of the apps developed by the operating system based on the Linux kernel are more and more diverse, which greatly meets the various needs of people's daily life.
  • the black industry that conducts fraud, deduction, and mining through malicious apps is also developing rapidly.
  • the black industry has a major impact on the data security of users.
  • the car-machine equipped with the Android system and the mobile terminal device that communicates with the car-machine are attacked by malicious apps, resulting in the leakage of the car owner's private data, and even a serious threat to the driving safety of the vehicle. Therefore, the detection of the application security of the operating system based on the Linux kernel has always been the focus of the research of information security personnel.
  • the currently used application detection method is to detect the source code of the App, but it requires a lot of computing and storage resources, and the detection efficiency is low; and when the malicious App code changes or uses techniques such as code obfuscation and packing, it can be easily bypass detection. Therefore, the current detection methods for malicious apps consume a lot of resources, and the accuracy of detection results is low.
  • the embodiments of the present application provide a malicious application detection method, device, and storage medium.
  • text comparison technology the configuration information of the operating system in the initial state and the configuration information in the running state are compared, and the operating system is compared.
  • the legitimate application information and the application information to be detected are compared, so as to detect the security of the application to be detected, and evaluate the malicious level of the application to be detected, which can save a lot of computing and storage resources, improve the detection efficiency, and prevent the code occurrence.
  • Malicious application detection that changes or adopts technologies such as code obfuscation and packing is still effective, which improves the accuracy of detection results.
  • an embodiment of the present application provides a detection method for a malicious application, the detection method includes:
  • initial information of the operating system wherein the initial information includes legal application information of the operating system or configuration information of the operating system in an initial state, and the initial state is the state before the operating system runs for the first time;
  • the configuration information of the operating system and the application information of the application are regarded as two comparison contents, and a detection method for malicious applications is provided, which is different from the many currently used "detection applications”.
  • the detection method in this embodiment combined with the system content detection and application content detection under the operating mechanism of the operating system, can save a lot of computing and storage resources, improve the detection efficiency, and change the code. Or the detection of malicious applications by techniques such as code obfuscation and packing is still effective, which improves the accuracy of detection results.
  • the comparing the configuration information in the initial state with the configuration information in the running state specifically includes:
  • the hash value of the configuration information of the operating system in the initial state is compared with the hash value of the configuration information of the operating system in the running state.
  • a method of comparing hash values is used to compare whether the configuration information in the initial state and the configuration information in the running state are the same. Compare the hash value of the configuration information of the operating system in the initial state with the hash value of the configuration information of the operating system in the running state. The hash value of the configuration information and the configuration information are obtained together. The hash value of the two configuration information can enable the receiver of the configuration information to confirm the authenticity of the content of the configuration information, thereby confirming whether the content of the above two configuration information is the same, and the comparison method effectively improves the efficiency of configuration information comparison. .
  • the comparing the configuration information in the initial state with the configuration information in the running state specifically includes:
  • the first configuration information is the configuration information of the system startup process of the operating system in the initial state
  • the second configuration information is the Configuration information of the system startup process of the operating system in the running state
  • the third configuration information is the configuration information of the user logging in to the operating system process in the initial state of the operating system
  • the fourth configuration information The information is configuration information of a user logging in to the operating system process when the operating system is in the running state.
  • the configuration information of the system startup process of the operating system in the initial state and in the running state is compared, or the user of the operating system in the initial state and in the running state is logged into the operating system process configuration information for comparison.
  • the configuration information under the operating mechanism of the operating system can be detected from the perspective of the operating system level, and the detection of high-threat malicious applications processed by the hidden camouflage technology is still effective, and the improvement is improved. Detection efficiency and accuracy of detection results.
  • the comparing the legal application information with the application information to be detected specifically includes:
  • the fifth configuration information includes configuration information of an application startup process of the application to be detected in an initial state
  • the sixth configuration information includes the application startup process of the application to be detected. Detects the configuration information of the application startup process when the application is running.
  • the application name in the legal application information and the application name in the application information to be detected are compared, or the configuration information of the application startup process of the application to be detected in the initial state and the running state is compared. Comparison.
  • the configuration information of the application startup process in the initial state and the configuration information of the application startup process in the running state from the perspective of the application level and the operating mechanism of the operating system.
  • the configuration information is still effective for the detection of high-threat malicious applications processed by the hidden camouflage technology, and a lot of computing and storage resources are saved, and the detection efficiency and the accuracy of the detection results are improved.
  • the detection method further includes:
  • the malicious level of the application to be detected is determined.
  • the initial information and the running information are different, and it is determined that the application to be detected is a malicious application.
  • the malicious level of the application to be detected is further determined according to the specific difference between the initial information and the running information. .
  • the malicious level of the application to be detected can be determined, and the degree of threat of the application to be detected to the terminal device can be evaluated, thereby providing a theory for the subsequent reduction or resolution of possible threats to the malicious application in different degrees. Based on this, the security and overall stability of the application operating environment are improved.
  • the determining the malicious level of the application to be detected according to the initial information and the running information specifically includes:
  • the application to be detected is a first-level malicious application
  • the application to be detected is a second-level malicious application, wherein, The malicious level of the second-level malicious application is lower than the malicious level of the first-level malicious application.
  • an implementation manner of determining the malicious level of the application to be detected under different information at the operating system level is provided.
  • the first configuration information and the second configuration information are different, it is determined that the application to be detected is a first-level malicious application, and the first-level malicious application represents the application to be detected with the highest degree of maliciousness; the first configuration information and the second configuration information are the same , and when the third configuration information and the fourth configuration information are different, it is determined that the application to be detected is a second-level malicious application, because the configuration information of the system startup process of the operating system in the initial state and the system startup process in the running state
  • the configuration information of the second-level malicious application is the same, so the malicious level expressed by the second-level malicious application is lower than the malicious level expressed by the first-level malicious application.
  • the determining the malicious level of the application to be detected according to the initial information and the running information specifically includes:
  • the first configuration information is the same as the second configuration information
  • the third configuration information is the same as the fourth configuration information
  • the application name in the legal application information is the same as the application name in the application information to be detected.
  • it is determined that the application to be detected is a third-level malicious application, wherein the malicious level of the third-level malicious application is lower than the malicious level of the second-level malicious application.
  • an implementation manner of determining the malicious level of the application to be detected when the information at the application level is different is provided.
  • the third-level malicious application is because the configuration information of the system startup process in the initial state of the operating system is the same as the configuration information of the system startup process in the running state, and the configuration information of the user logging in to the operating system process in the initial state of the operating system.
  • the configuration information of the user logging in to the operating system process when the operating system is running is the same, so the malicious level represented by the third-level malicious application is lower than the malicious level represented by the second-level malicious application and the first-level malicious application.
  • the determining the malicious level of the application to be detected according to the initial information and the running information specifically includes:
  • the third configuration information is the same as the fourth configuration information, the application name in the legal application information and the application to be detected information In the case where the names are the same and the fifth configuration information and the sixth configuration information are different, determine that the application to be detected is a fourth-level malicious application, where the malicious level of the fourth-level malicious application is lower than the The malicious level of the third-level malicious application.
  • the above-mentioned first configuration information is the same as the second configuration information
  • the above-mentioned third configuration information is the same as the fourth configuration information
  • the application name in the legal application information is the same as the application name in the application information to be detected
  • the above-mentioned fifth configuration information and the third configuration information are the same.
  • the configuration information of the user logging in to the operating system process in the state is the same as the configuration information of the user logging in to the operating system process in the running state of the operating system, and the application name in the legal application information and the application name in the application information to be detected are the same.
  • the malicious level represented by the fourth-level malicious application is lower than the malicious level represented by the third-level malicious application, the second-level malicious application, and the first-level malicious application.
  • the operating system includes a system using the Linux kernel.
  • the operating system includes a system using the Linux kernel.
  • the first process started by the system using the Linux kernel is generally the init process, and the configuration information of the process is usually stored in the init.rc file. Therefore, using Linux
  • the kernel systems are all applicable to the malicious application detection method described in the embodiments of this application.
  • the detection method further includes:
  • the storage path of the application to be detected is determined.
  • the initial information and the running information are different, and it is determined that the application to be detected is a malicious application.
  • the storage path of the application to be detected is further determined according to the specific difference between the initial information and the running information. .
  • the label of the first configuration information and the label of the second configuration information are parsed to obtain the label content of the first configuration information and the label content of the second configuration information, and the The content of the tag of the first configuration information is compared with the content of the tag of the second configuration information, and the storage path of the application to be detected is determined according to the difference in content between the two.
  • the label of the third configuration information and the label of the fourth configuration information are parsed to obtain the content of the label of the third configuration information and the label of the fourth configuration information.
  • the content of the tag of the third configuration information is compared with the content of the tag of the fourth configuration information, and the storage path of the application to be detected is determined according to the difference in the content of the two.
  • the label of the fifth configuration information and the label of the sixth configuration information are analyzed to obtain the label content of the fifth configuration information and the label content of the sixth configuration information, and the The content of the tag of the fifth configuration information is compared with the content of the tag of the sixth configuration information, and the storage path of the application to be detected is determined according to the difference in content between the two.
  • the storage path of the malicious application can be quickly determined, and the malicious application can be processed accordingly according to the storage path, such as uninstalling the malicious application according to the storage path, restricting the acquisition of corresponding permissions, etc. processing to improve the security of the operating system operating environment.
  • an embodiment of the present application provides a detection device for malicious applications, the detection device includes:
  • an acquisition unit configured to acquire initial information of the operating system, wherein the initial information includes legal application information of the operating system or configuration information of the operating system in an initial state, where the initial state is the first time the operating system state before operation;
  • the obtaining unit is further configured to obtain operation information of the operating system, where the operation information includes application information to be detected of the operating system or configuration information of the operating system in a running state;
  • a comparison unit configured to compare the legal application information with the application information to be detected, or compare the configuration information in the initial state with the configuration information in the running state to obtain a comparison result ;
  • a determining unit configured to determine that the application to be detected on the operating system is a malicious application if the comparison results are different.
  • the comparison unit is specifically configured to compare the hash value of the configuration information of the operating system in the initial state with the configuration information of the operating system in the running state Hash values are compared.
  • the comparison unit is further configured to compare the first configuration information with the second configuration information, wherein the first configuration information is the operating system in the initial state configuration information of the system startup process under the operating system, the second configuration information is the configuration information of the system startup process of the operating system in the running state;
  • the comparison unit is further configured to compare the third configuration information with the fourth configuration information, wherein the third configuration information is that the user of the operating system in the initial state logs in to the operating system configuration information of a process, and the fourth configuration information is configuration information of a user logging in to the operating system process when the operating system is in the running state.
  • the comparison unit is further configured to compare the application name in the legal application information with the application name in the application information to be detected;
  • the comparison unit is further configured to compare the fifth configuration information with the sixth configuration information, wherein the fifth configuration information includes the configuration information of the application startup process of the application to be detected in the initial state,
  • the sixth configuration information includes configuration information of an application startup process of the application to be detected in a running state.
  • the determining unit is further configured to determine the malicious level of the application to be detected according to the initial information and the running information.
  • the determining unit is specifically configured to determine that the application to be detected is a first-level malicious application when the first configuration information and the second configuration information are different;
  • the determining unit is further configured to determine the application to be detected when the first configuration information and the second configuration information are the same and the third configuration information and the fourth configuration information are different is a second-level malicious application, wherein the malicious level of the second-level malicious application is lower than the malicious level of the first-level malicious application.
  • the determining unit is specifically further configured to: when the first configuration information and the second configuration information are the same, the third configuration information and the fourth configuration information are the same, and all the In the case where the application name in the legal application information and the application name in the application information to be detected are different, determine that the application to be detected is a third-level malicious application, wherein the malicious level of the third-level malicious application is low the malicious level of the second-level malicious application.
  • the determining unit is specifically further configured to: when the first configuration information and the second configuration information are the same, the third configuration information and the fourth configuration information are the same, the In the case where the application name in the legitimate application information and the application name in the application information to be detected are the same, and the fifth configuration information and the sixth configuration information are different, it is determined that the application to be detected is the fourth-level malicious application, wherein the malicious level of the fourth-level malicious application is lower than the malicious level of the third-level malicious application.
  • the operating system includes a system using the Linux kernel.
  • the determining unit is further configured to determine the storage path of the application to be detected according to the initial information and the running information.
  • an embodiment of the present application provides an apparatus for detecting malicious applications, where the detection apparatus includes a processor and a memory; the memory is used for storing computer execution instructions; the processor is used for executing a computer stored in the memory The instructions are executed to cause the detection apparatus to execute the method according to the above-mentioned first aspect and any possible implementation manner.
  • the detection apparatus further includes a transceiver, where the transceiver is used to receive a signal or send a signal.
  • embodiments of the present application provide a computer-readable storage medium, where the computer-readable storage medium is used to store instructions or computer programs; when the instructions or the computer programs are executed, the first aspect is The described method is implemented.
  • an embodiment of the present application provides a computer program product, where the computer program product includes an instruction or a computer program; when the instruction or the computer program is executed, the method described in the first aspect is implemented.
  • the configuration information of the operating system in the initial state is compared with the configuration information in the running state, and the legal application information of the operating system and the application information to be detected are compared. , so as to detect the security of the application to be detected, and evaluate the malicious level of the application to be detected, which can save a lot of computing and storage resources, improve the detection efficiency, and prevent malicious applications with code changes or code obfuscation, packing and other technologies.
  • the detection is still valid, improving the accuracy of the detection results.
  • FIG. 1 is a schematic diagram of a scenario of malicious application detection provided by an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of a malicious application detection provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a method for detecting a malicious application provided by an embodiment of the present application
  • FIG. 4 is a schematic flowchart of another malicious application detection method provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of another malicious application detection method provided by an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of another malicious application detection method provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an apparatus for detecting malicious applications provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
  • At least one (item) refers to one or more
  • multiple refers to two or more
  • at least two (item) refers to two or three And three or more
  • "and/or” is used to describe the association relationship of related objects, indicating that three kinds of relationships can exist, for example, “A and/or B” can mean: only A exists, only B exists, and A exists at the same time and B three cases, where A, B can be singular or plural.
  • the character “/” generally indicates that the associated objects are an "or” relationship.
  • At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
  • At least one (a) of a, b or c can mean: a, b, c, "a and b", “a and c", “b and c", or "a and b and c" ", where a, b, c can be single or multiple.
  • the present application provides a method for detecting malicious applications.
  • some knowledge related to application detection is introduced below.
  • APKTool is an Android application package (Android application package, APK) compilation tool, which can decompile and recompile apk, install the framework-res framework required by the decompilation system apk, and clean up the last decompiled folder and other functions . If the apk code wants to run on an Android device, it must be compiled first, and then packaged into a file recognized by the Android system before it can be run, and the file format that can be recognized and run by the Android system is " apk”.
  • An apk file contains compiled code files (.dex files), file resources (resources), native resource files (assets), certificates (certificates), and manifest files (manifest file).
  • Sandbox A virtual execution environment for network programming, a virtual system program that allows testers to run browsers or other programs in a sandbox environment, so changes resulting from running can be deleted later. It creates an independent operating environment similar to a sandbox, and the programs running inside it cannot have a permanent impact on the hard disk.
  • a sandbox refers to a tool used to test the behavior of untrusted files or applications in an isolated environment.
  • Hook technology also known as hook function.
  • the hook program Before the system does not call the function, the hook program first captures the message, and the hook function first obtains control. At this time, the hook function can process (change) the execution behavior of the function, and can also Forcibly end the delivery of the message. To put it simply, it is to pull out the program of the system and turn it into a snippet of our own execution code.
  • FIG. 1 is a schematic diagram of a malicious application detection scenario provided by an embodiment of the present application.
  • the 101 installed in the center console of the car is a car machine equipped with an Android system.
  • the car machine is the abbreviation of the in-vehicle infotainment products installed in the car.
  • it also has a telematics function, which can realize information communication between people and vehicles, vehicles and the outside world (vehicle-to-vehicle).
  • the "I-Call" and "E-Call" functions are the most typical representatives of Telematics functions.
  • the "I-Call” function is to connect the background call center through the built-in communication module of the car, providing one-key navigation and corresponding location and remote services;
  • the "E-Call” function is that when a serious accident occurs in the car, the The local area network (controller area network, CAN) bus reads the information of the airbag and automatically dials the emergency call.
  • the Telematics function also has a positioning function and anti-theft monitoring function. When the vehicle is stolen, the call center will cooperate with the law enforcement department to locate and track the vehicle. In this scenario, if the vehicle is attacked by malicious apps, it will affect the realization of some functions of the vehicle.
  • 102 is a mobile phone equipped with an Android system, and the mobile phone 102 can communicate with the vehicle machine 101 through a Bluetooth connection or a data cable connection or other means.
  • 102 (mobile phone) and 101 (car machine) are connected via Bluetooth, and the user can control the behavior of the car machine by operating the mobile phone: open the music player application on the mobile phone, and communicate with the car machine to make the car audio connected to the car machine play.
  • Songs in the mobile phone when answering a call from the mobile phone, you can make a call without holding the mobile phone, but use the audio and microphone connected with the car machine to make a call.
  • the mobile phone that communicates with the car and the machine is attacked by malicious apps, which leads to the leakage of the car owner's privacy, and even the incidents that affect the safety of vehicle driving are increasing day by day.
  • malicious apps For example, a certain map app on the mobile phone has been maliciously tampered with due to the cyber attack code, and the driver will go astray under the navigation of the app, and even seriously threaten the driving safety.
  • FIG. 2 is a schematic structural diagram of a malicious application detection according to an embodiment of the present application. As shown in Figure 2, this architecture mainly includes three modules: the original information database module, the file analysis module, and the application detection result module.
  • the original information database module is used to establish the original information database, and the original information database mainly includes two contents: the configuration information of the operating system in the initial state, and the legal application information of the operating system.
  • the above initial state refers to the state before the operating system runs for the first time, including the state that has not been used after leaving the factory, the state before the first run, or the state that has not been used after the official subsequent release of the updated version of the operating system, The state before the first run.
  • the configuration information of the operating system in the initial state mainly includes the configuration information of the system startup process of the operating system and the configuration information of the user logging in to the operating system process.
  • the legal application information of the above operating system mainly includes relevant information of some legal applications, such as application name of the legal application, configuration information of the legal application, and the configuration information of the legal application may specifically be the configuration information of the application startup process.
  • the information contained in the original information database can be obtained without accessing the operating system.
  • the original information database module can obtain the configuration information of the operating system in the initial state by downloading it from the official website of the operating system.
  • the original information database module can also obtain the legal application information of the operating system through different channels, and adopt different channels to obtain the application information for different types of legal applications.
  • the legal applications contained in the legal application information of the operating system mainly fall into two categories. One is the applications that are pre-installed by the operating system in the initial state.
  • the original information database module can be downloaded from platforms such as the official website that publishes such applications.
  • the application-related information such as the application name and configuration information of this type of application
  • another type of legitimate application is the application developed based on the above-mentioned operating system published by the third-party application platform, and the original information database module can be downloaded from the corresponding third-party platform.
  • Related content of the application such as the application name and configuration information of the class application. Therefore, the information obtained from the original information database does not need to depend on the operation of the operating system, and the information can be determined after the operating system leaves the factory or is updated.
  • the above configuration information of the system startup process is the information of the first process started by the operating system. After the system startup process works, other important system processes will be derived to perform corresponding functions.
  • the above-mentioned operating systems include systems using the Linux kernel, such as Android, Ubuntu, and the like.
  • the first process started by the system is generally the init process, which is used to instruct the operating system to perform a series of corresponding processes at startup, such as starting user login, implementing run levels, and processing Orphaned processes, etc. Therefore, the configuration information of the above system startup process is usually stored in the init.rc file and the rc.local file. Both the init.rc file and the rc.local file are scripts that are started with the system startup.
  • the init.rc file precedes rc. local file starts.
  • the init.rc file is a configuration file that specifies the behavior and actions of the init process.
  • the rc.local file is used to record the execution commands for system startup, which are executed after the system is started and before the user logs in.
  • the configuration information of the above-mentioned user login operating system process is usually stored in a profile file.
  • the profile file is a script that is started when the user logs in to the operating system.
  • the profile file is used to record some user logins.
  • the execution command when the system is started.
  • the above command is executed when the user logs in to the system after the system is started.
  • the path of the init.rc file in the system is "/system/core/rootdir/init.rc”
  • the path of the rc.local file in the system is "/etc/init.rc”
  • the path of the profile file in the system is " /etc/profile”.
  • the configuration information of the above application startup process is usually stored in the AndroidManifest.xml file.
  • the AndroidManifest.xml file is an application manifest file located in the root directory of the application, and contains the configuration information of the application. The operating system needs to run the application according to the content in it. code, display the interface, and execute the corresponding function.
  • the file analysis module is used to compare and analyze the operation information of the operating system with the information in the original information database.
  • the operating information of the operating system is different from the information in the original information database. It needs to be obtained by the operating system in the operating state.
  • the operating state is the state in which the operating system is in use after the operating system leaves the factory or is updated. Therefore, the file analysis module needs to be connected to the operation. system, obtain the relevant permissions of the operating system, and then obtain the operating information of the operating system.
  • the operating information of the operating system mainly includes two aspects: configuration information of the operating system in a running state, and application information of the operating system to be detected.
  • the configuration information of the operating system in the running state mainly includes the configuration information of the system startup process of the operating system and the configuration information of the user logging in to the operating system process.
  • the application information to be detected of the operating system mainly includes application-related information such as the application name of the application to be detected, configuration information of the application to be detected, etc.
  • the configuration information of the application to be detected may specifically be configuration information of the application startup process.
  • the configuration information of the system startup process when the operating system is running is usually stored in the init.rc file and the rc.local file.
  • the configuration information of the user logging in to the operating system process in the running state is usually stored in the profile file, and the configuration information of the application startup process of the application to be detected is usually stored in the AndroidManifest.xml file of the application to be detected.
  • the file analysis module compares and analyzes the operating information of the operating system with the information in the original information database. Because the configuration information of the above two is usually stored in the corresponding configuration file, it can be achieved by comparing the hash value of the configuration file. For the purpose of comparing configuration information, the specific comparison content can be compared from the following aspects:
  • the file analysis module compares the configuration information of the system startup process in the initial state of the operating system with the configuration information of the system startup process in the running state;
  • the file analysis module compares the configuration information of the user logging in to the operating system process in the initial state of the operating system with the configuration information of the user logging in the operating system process in the running state;
  • the file analysis module compares the application name in the legal application information of the operating system with the application name in the application information to be detected;
  • the file analysis module compares the configuration information of the application startup process in the initial state of the application to be detected of the operating system with the configuration information of the application startup process in the running state.
  • the above four comparison contents can be the comparison contents of the four parallel comparison schemes, or the comparison contents of the progressive comparison schemes in order.
  • the file analysis module can be used according to different application scenarios. It is required to select at least one of the above aspects for comparative analysis.
  • the application detection result module is used to obtain the application detection result according to the comparative analysis result of the above-mentioned document analysis module. That is, as long as the comparison result of any one of the four aspects of the file analysis module is different, the application detection result module will determine the application to be detected as a malicious application.
  • the application detection result module can further distinguish the malicious degree of the application to be detected according to the comparison content in different aspects, so as to provide a theoretical basis for the subsequent reduction or resolution of possible threats to the malicious application in different degrees. , to improve the security and overall stability of the application operating environment.
  • the application detection result module determines the application to be detected in this case as the malicious application with the greatest degree of maliciousness (may be referred to as the first-level malicious application); If the comparison content of the first aspect is the same and the comparison content of the second aspect above is different, the application detection result module will determine that the application to be detected in this case is the second-level malicious application, and the second-level malicious application The degree of maliciousness expressed by the application is lower than the degree of maliciousness expressed by the above-mentioned first-level malicious application; similarly, the comparison content in the first aspect above is the same, the comparison content in the second aspect above is the same, and the content in the third aspect above is the same If the comparison contents are not the same, the application detection result module will determine that the application to be detected in this case is a third-level malicious application, and the maliciousness expressed by the third-level malicious application is lower than the maliciousness expressed by the above-mentioned second-level malicious application.
  • the application detection result module will determine that the application to be detected in this case is a fourth-level malicious application, and the malicious degree expressed by the fourth-level malicious application is lower than the malicious degree expressed by the third-level malicious application.
  • the detection technology combines the content detection under the operating system operating mechanism. Even if the application code to be detected changes or uses technologies such as code obfuscation and packing, the above detection technology is still effective. The accuracy of the detection result is greatly improved, and the detection process does not require a large amount of feature storage or occupies a large amount of computing resources, which can save a large amount of computing and storage resources and improve the detection efficiency.
  • FIG. 3 is a schematic flowchart of a method for detecting a malicious application according to an embodiment of the present application.
  • the detection method includes but is not limited to the following steps:
  • Step 301 The terminal device obtains initial information of the operating system, and obtains operating information of the operating system.
  • the terminal device in the embodiment of the present application is an electronic device equipped with an operating system of the Linux kernel, such as a mobile phone, a computer, a car machine, and a smart wearable device equipped with an Android system.
  • an operating system of the Linux kernel such as a mobile phone, a computer, a car machine, and a smart wearable device equipped with an Android system.
  • the terminal device obtains the initial information and running information of the operating system.
  • the initial information mainly includes legal application information of the operating system and configuration information of the operating system in an initial state
  • the running information mainly includes application information of the operating system to be detected and configuration information of the operating system in a running state.
  • the initial state refers to the state before the operating system runs for the first time, including the state that has not been used after leaving the factory and before the first run, or the state that has not been used after the official subsequent release of the updated version of the operating system, and the first time
  • the state before running, the running state is the state in use after the operating system leaves the factory or is updated.
  • the legal application information of the operating system mainly includes relevant information of some legal applications, such as the application name of the legal application and the configuration information of the legal application.
  • the configuration information of the legal application may specifically be the configuration information of the application startup process in the initial state.
  • the configuration information of the operating system in the initial state may include configuration information (first configuration information) of the system startup process of the operating system in the initial state, and configuration information (third configuration information) of a user logging into the operating system process.
  • the above initial information can be obtained without accessing the operating system.
  • the terminal device can obtain the configuration information of the operating system in its initial state by downloading it from the official website where the operating system is released, and obtain the configuration information on the official website where the legal application is released. App-related information for legitimate apps.
  • the terminal device will take different ways to obtain its application information for different types of legitimate applications.
  • the terminal device can download the application name and configuration information and other related information of the application on the platform that publishes the application, such as the official website.
  • application the terminal device can download the relevant content of the application, such as the application name and configuration information of this type of application, from the corresponding third-party platform.
  • the terminal device does not need to rely on the operation of the operating system to obtain the initial information of the operating system, nor does it need to obtain the relevant permissions of the operating system in advance, and the initial information is information that can be determined after the operating system leaves the factory or is updated.
  • the application information to be detected of the operating system mainly includes some relevant information of the application to be detected, such as the application name of the application to be detected, and the configuration information of the application to be detected. configuration information.
  • the configuration information of the operating system in the running state may include the configuration information (second configuration information) of the system startup process of the operating system in the running state, and the configuration information (fourth configuration information) of the user logging into the operating system process.
  • the operating information of the operating system is different from the initial information of the above-mentioned operating system, and needs to be obtained by relying on the operating system in the running state. Therefore, the terminal device needs to access the operating system, obtain the root authority of the operating system, and then obtain the operating system's root authority. Running information.
  • the configuration information (first configuration information) of the system startup process in the above-mentioned initial state and the configuration information (second configuration information) of the system startup process in the running state are both information of the first process started by the operating system.
  • the information indicates the information that the first process is not started
  • the second configuration information indicates the information after the first process is started
  • other important system processes will be derived after the system startup process works to perform corresponding functions.
  • the first process started by the system is generally the init process, which is used to instruct the operating system to perform a series of corresponding processes at startup, such as starting user login, implementing run levels, and processing
  • the process information of the init process is usually stored in the init.rc file and the rc.local file.
  • Both the init.rc file and the rc.local file are scripts that are started with the system startup.
  • the init.rc file first Start in the rc.local file.
  • the init.rc file is a configuration file that specifies the behavior and actions of the init process.
  • the rc.local file is used to record the execution commands for system startup, which are executed after the system is started and before the user logs in. Therefore, the above-mentioned first configuration information and second configuration information are usually also stored in the init.rc file and the rc.local file of the operating system.
  • the above-mentioned third configuration information and fourth configuration information indicating that the user logs in to the operating system process in different states are usually stored in the profile file of the operating system.
  • the script is started by the operating system, and the profile file is used to record the execution commands of some users when they log in to the system. After the system is started, the above commands are executed when the user logs in to the system.
  • the path of the init.rc file in the system is "/system/core/rootdir/init.rc”
  • the path of the rc.local file in the system is "/etc/init.rc”
  • the path of the profile file in the system is " /etc/profile”.
  • the configuration information (fifth configuration information) of the application startup process of the above-mentioned legal application in the initial state is usually stored in the AndroidManifest.xml file corresponding to the legal application, and the above-mentioned application to be detected is running
  • the configuration information (the sixth configuration information) of the application startup process in the state is usually stored in the AndroidManifest.xml file corresponding to the application to be detected, and the AndroidManifest.xml file is an application manifest file located in the root directory of the application, which contains the application configuration information, the operating system needs to run the code of the application according to the content inside, display the interface, and perform the corresponding functions.
  • Step 302 Compare the legal application information with the application information to be detected, or compare the configuration information in the initial state with the configuration information in the running state.
  • the terminal device After the terminal device obtains the initial information and running information of the operating system, it will use the text comparison technology to compare and analyze the initial information and running information, specifically, compare the legal application information of the operating system with the application information to be detected. , and compare the configuration information of the operating system in the initial state with the configuration information in the running state.
  • the hash value is usually represented by a short string of random letters and numbers.
  • the hash value of the configuration file is calculated by a hashing algorithm, which is a method of creating a small digital "fingerprint" from any kind of data. " method is used to compress the message or data into a digest, so that the amount of data becomes smaller and the format of the data is fixed.
  • the hash value of the configuration file and the configuration information stored in the configuration file are obtained together.
  • the application name in the above-mentioned legal application information and the application name in the application information to be detected can be used as the unique identifiers of the legal application and the application to be detected, respectively. Therefore, the application names of the two applications can be used to distinguish. Whether the two applications are the same application. Further, the name of the application can be named by a computer programming language (such as a Java package), and its function can describe the program components of the application, publish corresponding component functions, declare the necessary permissions of the application, and the like.
  • a computer programming language such as a Java package
  • the above four comparison contents can be the comparison contents of the four parallel comparison schemes, or the comparison contents of the progressive comparison schemes in sequence, and the terminal device can meet the needs of different application scenarios.
  • the terminal device may perform comparison and analysis according to any one of the above-mentioned four comparison methods to obtain the detection result.
  • the terminal device can also perform a comparison and analysis according to the first comparison method above. If the application to be detected can be confirmed as a malicious application through the first comparison method, the detection result of the application to be detected as a malicious application is obtained.
  • the second comparison method above can confirm that the application to be detected is a malicious application, then the detection result that the application to be detected is a malicious application is obtained, and the remaining two comparison methods are not executed; If it is still impossible to confirm that the application to be detected is a malicious application, continue to carry out the comparison and analysis according to the third comparison method above. If the detection result of the detected application is a malicious application, the remaining fourth comparison method is not performed; if the application to be detected cannot be confirmed as a malicious application through the third comparison method above, continue to follow the fourth comparison method above. A comparative analysis was carried out to obtain the final test results.
  • Step 303 In the case that the above comparison results are not the same, determine that the application to be detected on the operating system is a malicious application.
  • a corresponding comparison result can be obtained, and according to the comparison result, it can be determined whether the application to be detected on the operating system is a malicious application.
  • the comparison result of any one of the above four comparison methods is different, it can be determined that the application to be detected on the operating system is a malicious application. That is, if the initial information and running information of the above operating system are different, it can be determined that the application to be detected is a malicious application.
  • the terminal device can also determine the malicious level of the application to be detected according to the specific difference between the initial information and the running information. make further determinations.
  • the application to be detected is a first-level malicious application
  • the first-level malicious application represents an application to be detected with the highest degree of maliciousness.
  • the malicious application in this case is an application that starts automatically when the system startup process is started, which will pose a great threat to the privacy information and security of the device.
  • the application to be detected is a second-level malicious application, because the first configuration information and the second configuration information are different.
  • the information is the same, that is, the configuration information of the system startup process of the operating system in the initial state is the same as the configuration information of the system startup process in the running state, so the malicious level represented by the second-level malicious application is lower than the first-level malicious application. Indicates the level of maliciousness.
  • the malicious application in this case is an application that starts automatically when the user logs into the operating system process, which will pose a great threat to the privacy information and security of the device.
  • the third configuration information and the fourth configuration information are the same, and the application name in the legal application information and the application name in the application information to be detected are different, determine the application to be detected It is a third-level malicious application, because the first configuration information is the same as the second configuration information, and the third configuration information is the same as the fourth configuration information, that is, the configuration information of the system startup process of the operating system in the initial state is the same as that in the running state.
  • the configuration information of the system startup process is the same, and the configuration information of the user logging in to the operating system process in the initial state of the operating system is the same as the configuration information of the user logging in to the operating system process in the running state of the operating system, so the third-level malicious application
  • the malicious level indicated is lower than the malicious level indicated by the second-level malicious application and the first-level malicious application.
  • the malicious application in this case is not a legitimate application, neither an application pre-installed by the operating system in the initial state, nor an application developed based on the above-mentioned operating system disclosed by a third-party application platform.
  • the security of downloaded applications released on unofficial platforms (informal application markets) cannot be guaranteed accordingly, and they are likely to be malicious applications packaged with technologies such as code obfuscation and packing.
  • the first configuration information is the same as the second configuration information
  • the third configuration information is the same as the fourth configuration information
  • the application name in the legal application information is the same as the application name in the application information to be detected
  • the fifth configuration information If it is different from the sixth configuration information, it is determined that the application to be detected is a fourth-level malicious application, because the first configuration information is the same as the second configuration information, and the third configuration information is the same as the fourth configuration information, that is, the operating system is initially
  • the configuration information of the system startup process in the state is the same as the configuration information of the system startup process in the running state.
  • the configuration information of the user logging in to the operating system process in the initial state of the operating system is the same as that of the user logging in to the operating system in the operating state.
  • the configuration information of the process is the same, and the application name in the legitimate application information and the application name in the application information to be detected are the same, so the malicious level of the fourth-level malicious application is lower than that of the third-level malicious application and the second-level malicious application. , the malicious level represented by the first-level malicious application. It should be noted that, in the case of this comparison result, the application name in the application information to be detected is the same as the application name in the legal application information, which means that the source of the application to be detected is legal.
  • the pre-installed application in the state may also be the application developed by the user on the third-party application platform based on the above operating system, but this does not mean that the detection application is not malicious, because the configuration of the application startup process of the application to be detected
  • the information may not be the same.
  • the application to be detected is also malicious, and its malicious behavior is manifested as automatically acquiring illegal permissions when the application startup process is started. For example, when a user downloads a "weather" app, when the user clicks to start, the app's application startup process starts and enters the running state. According to the configuration information of the application startup process, the geographical location permission, calendar permission, and photo album of the terminal device are obtained in turn.
  • the application behavior recorded by the configuration information of the application startup process of the "Weather” App in the initial state is to sequentially obtain the geographical location permission and calendar permission of the terminal device. Automatically obtained illegal permissions, the configuration information of the application startup process in the initial state of the "Weather” App is different from the configuration information of the application startup process in the running state, and it can be determined that the "Weather” App is a fourth-level malicious application.
  • the application name in the above-mentioned legal application information and the application information to be detected are the same. If the names of the applications are the same and the fifth configuration information and the sixth configuration information are different), the malicious level of the application to be detected may be further refined.
  • the first configuration information is the same as the second configuration information
  • the third configuration information is the same as the fourth configuration information
  • the application name in the legal application information is the same as the application name in the application information to be detected
  • the fifth configuration If the information is different from the sixth configuration information, if the application to be detected is an application preinstalled by the operating system in the initial state, it is determined that the application to be detected is a fourth-level malicious application; if the application to be detected is published by a third-party application platform Based on the application developed by the above operating system, it is determined that the application to be detected is a fifth-level malicious application.
  • the malicious level expressed by the fifth-level malicious application is lower.
  • the malicious level represented by the fourth-level malicious application is lower.
  • the application to be detected on the operating system is a malicious application and the malicious level of the application to be detected is determined
  • the label of the first configuration information and the label of the second configuration information are parsed to obtain the content of the label of the first configuration information and the content of the label of the second configuration information , compare the label content of the first configuration information with the label content of the second configuration information, and determine the storage path of the application to be detected according to the difference in content between the two.
  • the label of the third configuration information and the label of the fourth configuration information are parsed to obtain the content of the label of the third configuration information and the label of the fourth configuration information.
  • the content of the tag of the third configuration information is compared with the content of the tag of the fourth configuration information, and the storage path of the application to be detected is determined according to the difference in the content of the two.
  • the label of the fifth configuration information and the label of the sixth configuration information are analyzed to obtain the label content of the fifth configuration information and the label content of the sixth configuration information, and the The content of the tag of the fifth configuration information is compared with the content of the tag of the sixth configuration information, and the storage path of the application to be detected is determined according to the difference in content between the two.
  • the configuration information of the operating system in the initial state is compared with the configuration information in the running state, and the legal application information of the operating system and the application information to be detected are compared, so as to ensure the security of the application to be detected. It can save a lot of computing and storage resources, improve the detection efficiency, and it is still effective for the detection of malicious applications with code changes or code obfuscation, packing and other technologies, improving the detection results. accuracy.
  • FIG. 4 is a schematic flowchart of another malicious application detection method provided by an embodiment of the present application, which can also be understood as a supplement to the flowchart of the malicious application detection method in FIG. 3 .
  • the terminal device first establishes an initial database, which mainly includes legal application information of the operating system and configuration information of the operating system in an initial state (see step 401 ).
  • the terminal device is an electronic device equipped with a Linux kernel operating system, such as a mobile phone, a computer, a car machine, and a smart wearable device equipped with an Android system.
  • the initial state refers to the state before the operating system runs for the first time, including the state that has not been used after leaving the factory, before the first run, or the state that has not been used after the official subsequent release of the updated version of the operating system, before the first run.
  • the configuration information of the operating system in the initial state mainly includes the configuration information of the system startup process of the operating system in the initial state (the above-mentioned first configuration information), the configuration information of the user logging into the operating system process (the above-mentioned third configuration information) ), the first configuration information is usually stored in the init.rc and rc.local files of the operating system, and the third configuration information is usually stored in the profile file of the operating system.
  • the legal application information of the operating system mainly includes the relevant information of some legal applications, such as the application name of the legal application and the configuration information of the legal application.
  • the configuration information of the legal application may specifically be the configuration information of the application startup process in the initial state (the fifth configuration information).
  • the information in the above-mentioned initial database can be obtained without accessing the operating system, and the terminal device can obtain the configuration information of the operating system in its initial state by downloading it from the official website where the operating system is released, and on the official website where legal applications are released. Download the application-related information of the legitimate application.
  • the terminal device will access the Android system to obtain application information of the operating system to be detected and configuration information of the operating system in a running state (see step 402).
  • the operating state is the state in which the operating system is in use after leaving the factory or after being updated, and the configuration information of the operating system in the operating state mainly includes the configuration information of the system startup process of the operating system in the operating state (the above-mentioned second configuration information),
  • the configuration information (the above-mentioned fourth configuration information) that the user logs into the operating system process, the above-mentioned second configuration information is usually stored in the init.rc and rc.local files of the operating system, and the above-mentioned fourth configuration information is usually stored in the profile of the operating system in the file.
  • the path of the init.rc file in the operating system is "/system/core/rootdir/init.rc”
  • the path of the rc.local file in the operating system is "/etc/init.rc”
  • the profile file in the operating system is "/etc/profile”.
  • the application information to be detected of the operating system mainly includes some relevant information of the application to be detected, such as the application name of the application to be detected, and the configuration information of the application to be detected. Configuration information (sixth configuration information).
  • the terminal device compares the configuration information of the operating system in the initial state with the configuration information of the operating system in the running state, and determines whether the configuration information of the operating system in the above two states is the same (see step 403).
  • the configuration information of the system startup process of the operating system in the initial state is compared with the configuration information of the system startup process of the operating system in the running state, or the user of the operating system in the initial state logs in to the operating system process.
  • the configuration information of the operating system is compared with the configuration information of the user logging in to the operating system process in the running state of the operating system, and it is judged whether the configuration information of the two is the same.
  • step 403 If the comparison result in the above step 403 is not the same, it can be determined that the application to be detected is a malicious application, and the init.rc and rc.local files, or the profile file, are parsed to determine the malicious application path (see step 404). Specifically, if the comparison result between the first configuration information and the second configuration information is different, the application to be detected is determined to be a first-level malicious application, and the label and running state of the init.rc file in the initial state are analyzed.
  • the label of the init.rc file in the following state is analyzed, the label of the rc.local file in the initial state and the label of the rc.local file in the running state are parsed, and the path of the malicious application is determined according to the difference in the content of the labels in the two states; if If the comparison result between the third configuration information and the fourth configuration information is not the same, it is determined that the application to be detected is a second-level malicious application, and the second-level malicious application represents a lower degree of maliciousness than the first-level malicious application. Indicates the degree of maliciousness, and parses the label of the profile file in the initial state and the label of the profile file in the running state, and determines the path of the malicious application according to the difference in the content of the label in the two states.
  • the terminal device will compare the legal application information in the initial database with the application information to be detected in the running state of the operating system (see step 405). Specifically, the application name in the legal application information of the operating system is compared with the application name in the application information to be detected, or the configuration information of the application startup process of the application to be detected in the running state is compared with the application startup of the legal application of the same name. The configuration information of the process is compared, and whether the information of the two is the same.
  • step 406 If the comparison result in the above step 406 is not the same, it is determined that the application to be detected is a third-level malicious application, and the malicious level represented by the third-level malicious application is lower than the above-mentioned first-level malicious application and second-level malicious application. Malicious level (see step 407).
  • step 406 the configuration information of the application startup process of the application to be detected in the running state is compared with the configuration information of the application startup process of the legal application with the same name (see step 408), and Determine whether the configuration information of the two is the same.
  • step 408 it is determined that the application to be detected is a fourth-level malicious application, and the configuration information in the two states is parsed to determine possible malicious behaviors (see step 409).
  • the malicious level of the application to be detected may be further refined, that is, if the first configuration information and the second configuration information are the same, the third configuration information and the fourth configuration information are the same, and the application to be detected is the same.
  • the application name is the same as the application name of the legitimate application, and the fifth configuration information and the sixth configuration information above are different
  • the application to be detected is an application preinstalled by the operating system in the initial state, it is determined that the application to be detected is the fourth
  • the application to be detected is an application developed based on the above operating system and disclosed by a third-party application platform, it is determined that the application to be detected is a fifth-level malicious application.
  • the malicious level expressed by the fifth-level malicious application is lower.
  • the malicious level represented by the fourth-level malicious application is lower.
  • the application to be detected may be scored by formulating a scoring rule to distinguish the malicious grades of the malicious application in different degrees.
  • the scoring rules for malicious apps are as follows:
  • the determined application to be detected is a first-level malicious application, and the first-level malicious application starts automatically when the system startup process is started, and is rated as 5 points;
  • the determined application to be detected is the second-level malicious application, and the second-level malicious application starts automatically when the user logs into the operating system process, and is rated as 4 points;
  • the application to be detected is determined as a third-level malicious application, and the source of the third-level malicious application is illegal, and is rated as 3 points;
  • the application to be detected is determined when the fifth configuration information and the sixth configuration information are different, if the application to be detected is an application preinstalled by the operating system in the initial state, it is determined that the application to be detected is a fourth-level malicious application , rated as 2 points;
  • the application to be detected is determined under the condition that the fifth configuration information and the sixth configuration information are different, if the application to be detected is an application developed based on the above operating system disclosed by a third-party application platform, the application to be detected is determined to be the fifth application to be detected. level malicious application, rated 1 point.
  • the above scoring adopts the principle of “highest”, that is, when the application to be detected satisfies many of the above five scoring rules, it will be scored according to the highest score. From this, it can also be concluded that the malicious degree of the first-level malicious application is the largest, and the subsequent malicious degrees are in order. decrease.
  • the above scoring can also adopt the accumulation principle, that is, when the application to be detected satisfies more than one of the above five scoring rules, the scores of the rules that satisfy the conditions are accumulated to obtain the final scoring result of the application to be detected.
  • FIG. 5 is a schematic flowchart of another malicious application detection method provided by an embodiment of the present application, which can also be understood as a supplement to the flowcharts of the malicious application detection method in FIGS.
  • This embodiment provides a specific process for the comparison of the configuration information of the system startup process of the operating system. As shown in FIG. 5 , first obtain the latest updated init.rc/rc.local file (refer to step 501), the init.rc/rc.local file is obtained.
  • the rc/rc.local file contains the configuration information of the system startup process in the initial state of the operating system, which can be downloaded from the official website where the operating system is released; secondly, access the target Android system with root privileges and obtain the target Android system
  • the init.rc/rc.local file in the running state (see step 502)
  • the init.rc/rc.local file contains the configuration information of the system startup process in the running state of the operating system
  • the init.rc file is in the operating system
  • the path of the rc.local file is "/system/core/rootdir/init.rc", and the path of the rc.local file in the operating system is "/etc/init.rc"; then, compare the above two init.rc/rc.local files Yes, parse the file tags (refer to step 503), and specifically compare the init.rc/rc.local files in the initial state and the running state according to the tag content, and compare the text content corresponding to
  • the tags of the file include actions (Actions), commands (Commands), services (Services), options (Options), etc.; finally, determine the malicious level and path of the application to be detected (see step 504), in the above initial state and If the init.rc/rc.local files in the running state are not the same, it can be rated as 5 points according to the scoring rule in Figure 4 above to determine that the application to be detected is the first-level malicious application, and parse the content according to the text level by level. Trace, determine the path of malicious applications.
  • a corresponding specific process can also be provided for the comparison of the configuration information of the operating system user login operating system process.
  • obtain the latest updated profile file which contains the user login in the initial state of the operating system.
  • the configuration information of the operating system process can be downloaded from the official website of the operating system and other platforms; secondly, access the target Android system with root privileges, and obtain the profile file under the running state of the target Android system.
  • the labels of the file include Actions, Commands, Services, and Options.
  • the application is a second-level malicious application, and is tracked step by step according to the text parsing content to determine the path of the malicious application.
  • FIG. 6 is a schematic flowchart of another malicious application detection method provided by an embodiment of the present application, which can also be understood as a supplement to the flowcharts of the malicious application detection method in FIGS. 3 and 4.
  • This embodiment provides a specific process for the comparison of the configuration information of the application to be detected in the operating system.
  • the Androidmanifest.xml file of the application preinstalled by the operating system see step 601
  • the Androidmanifest.xml file contains the configuration information of the application startup process of the application pre-installed by the operating system in the initial state, which can be downloaded from the official website where the application is released.
  • the Androidmanifest.xml file of the application to be detected in the state (refer to step 602), the Androidmanifest.xml file contains the configuration information of the application startup process of the application to be detected in the running state; then, compare the above two Androidmanifest.xml files.
  • Step 603 parsing the file tags (see step 603), specifically comparing the Androidmanifest.xml files in the initial state and the running state according to the tag content, and parsing the text content corresponding to the tags with different tag content, Labels include actions (Actions), commands (Commands), services (Services), options (Options), etc.; finally, determine the malicious level and path of the application to be detected (see step 604), in the above initial state and running state If the Androidmanifest.xml files are not the same, it can be rated as 2 points according to the scoring rule in Figure 4 above, and the application to be detected is determined to be the fourth-level malicious application, the user has no uninstall permission, and the content is parsed according to the text. Path to malicious application.
  • the xml file contains the configuration information of the application startup process in the initial state of the application developed based on the above operating system disclosed by the third-party application platform, which can be downloaded from the corresponding third-party application platform; secondly, access the target Android system with root privileges , and obtain the Androidmanifest.xml file of the application to be detected in the running state of the target Android system, the Androidmanifest.xml file contains the configuration information of the application startup process of the application to be detected in the running state; then, the above two Androidmanifest.xml File comparison, parsing file tags, specifically comparing the Androidmanifest.xml files in the initial state and the running state according to the tag content, parsing the text content corresponding to the tags with different tag content, and the tags of the file have behaviors (Actions), Commands (Commands), Services (Services), Options (Options), etc.; finally, determine the malicious level and path of the application to be detected, in the case that the Androidmanifest.xml file in
  • FIG. 7 is a schematic structural diagram of an apparatus for detecting malicious applications according to an embodiment of the present application.
  • the apparatus for detecting malicious applications 70 may include an acquiring unit 701 , a comparing unit 702 and a determining unit 703 , wherein each The description of the unit is as follows:
  • Obtaining unit 701 configured to obtain initial information of an operating system, wherein the initial information includes legal application information of the operating system or configuration information of the operating system in an initial state, where the initial state is the operating system the state before the first run;
  • the obtaining unit 701 is further configured to obtain the operation information of the operating system, the operation information including the application information to be detected of the operating system or the configuration information of the operating system in the running state;
  • a comparison unit 702 configured to compare the legal application information with the application information to be detected, or compare the configuration information in the initial state with the configuration information in the running state to obtain a comparison result;
  • the determining unit 703 is configured to determine that the application to be detected on the operating system is a malicious application if the comparison results are different.
  • the configuration information of the operating system and the application information of the application are regarded as two comparison contents, and a method for detecting malicious applications is provided.
  • the malicious application detection method provided by the embodiments of the present application can save a large amount of computing and storage resources, improve the detection efficiency, and has no effect on code changes or Malicious application detection using techniques such as code obfuscation and packing is still effective, improving the accuracy of detection results.
  • the comparison unit 702 is specifically configured to compare the hash value of the configuration information of the operating system in the initial state with the configuration of the operating system in the running state The hash value of the information is compared.
  • a method of comparing hash values is used to compare whether the configuration information in the initial state and the configuration information in the running state are the same. Compare the hash value of the configuration information of the operating system in the initial state with the hash value of the configuration information of the operating system in the running state. The hash value of the configuration information and the configuration information are obtained together. The hash value of the two configuration information can enable the receiver of the configuration information to confirm the authenticity of the content of the configuration information, thereby confirming whether the content of the above two configuration information is the same, and the comparison method effectively improves the efficiency of configuration information comparison. .
  • the comparing unit 702 is further configured to compare the first configuration information with the second configuration information, wherein the first configuration information is the operating system in the The configuration information of the system startup process in the initial state, and the second configuration information is the configuration information of the system startup process of the operating system in the running state;
  • the comparison unit 702 is further configured to compare the third configuration information with the fourth configuration information, wherein the third configuration information is the operation of logging in the user in the initial state of the operating system Configuration information of a system process, and the fourth configuration information is configuration information of a user logging in to the operating system process when the operating system is in the running state.
  • the configuration information of the system startup process of the operating system in the initial state and in the running state is compared, or the user of the operating system in the initial state and in the running state is logged into the operating system process configuration information for comparison.
  • the configuration information under the operating mechanism of the operating system can be detected from the perspective of the operating system level, and the detection of high-threat malicious applications processed by the hidden camouflage technology is still effective, and the improvement is improved. Detection efficiency and accuracy of detection results.
  • the comparing unit 702 is further configured to compare the application name in the legal application information with the application name in the application information to be detected;
  • the comparing unit 702 is further configured to compare the fifth configuration information with the sixth configuration information, wherein the fifth configuration information includes the configuration information of the application startup process of the application to be detected in the initial state , the sixth configuration information includes configuration information of an application startup process of the application to be detected in a running state.
  • the application name in the legal application information and the application name in the application information to be detected are compared, or the configuration information of the application startup process of the application to be detected in the initial state and the running state is compared. Comparison.
  • the configuration information of the application startup process in the initial state and the configuration information of the application startup process in the running state from the perspective of the application level and the operating mechanism of the operating system.
  • the configuration information is still effective for the detection of high-threat malicious applications processed by the hidden camouflage technology, and a lot of computing and storage resources are saved, and the detection efficiency and the accuracy of the detection results are improved.
  • the determining unit 703 is further configured to determine the malicious level of the application to be detected according to the initial information and the running information.
  • the initial information and the running information are different, and it is determined that the application to be detected is a malicious application.
  • the malicious level of the application to be detected is further determined according to the specific difference between the initial information and the running information.
  • the malicious level of the application to be detected can be determined, and the degree of threat of the application to be detected to the terminal device can be evaluated, thereby providing a theory for the subsequent reduction or resolution of possible threats to the malicious application in different degrees. Based on this, the security and overall stability of the application operating environment are improved.
  • the determining unit 703 is specifically configured to determine that the application to be detected is a first-level malicious application when the first configuration information and the second configuration information are different;
  • the determining unit 703 is specifically further configured to determine the to-be-detected when the first configuration information and the second configuration information are the same, and the third configuration information and the fourth configuration information are different
  • the application is a second-level malicious application, wherein the malicious level of the second-level malicious application is lower than the malicious level of the first-level malicious application.
  • an implementation manner of determining the malicious level of the application to be detected under the condition that the information at the operating system level is different is provided.
  • the first configuration information and the second configuration information are different, it is determined that the application to be detected is a first-level malicious application, and the first-level malicious application represents the application to be detected with the highest degree of maliciousness; the first configuration information and the second configuration information are the same , and when the third configuration information and the fourth configuration information are different, it is determined that the application to be detected is a second-level malicious application, because the configuration information of the system startup process of the operating system in the initial state and the system startup process in the running state
  • the configuration information of the second-level malicious application is the same, so the malicious level expressed by the second-level malicious application is lower than the malicious level expressed by the first-level malicious application.
  • the determining unit 703 is further configured to, specifically, when the first configuration information and the second configuration information are the same, the third configuration information and the fourth configuration information are the same, And when the application name in the legitimate application information and the application name in the application information to be detected are different, it is determined that the application to be detected is a third-level malicious application, wherein the malicious application of the third-level malicious application is The level is lower than the malicious level of the second-level malicious application.
  • an implementation manner of determining the malicious level of the application to be detected under the condition of different application-level information is provided.
  • the third configuration information and the fourth configuration information are the same, and the application name in the legal application information and the application name in the application information to be detected are different, it is determined that the application to be detected is
  • the third-level malicious application is because the configuration information of the system startup process in the initial state of the operating system is the same as the configuration information of the system startup process in the running state, and the configuration information of the user logging in to the operating system process in the initial state of the operating system
  • the configuration information of the user logging in to the operating system process when the operating system is running is the same, so the malicious level represented by the third-level malicious application is lower than the malicious level represented by the second-level malicious application and the first-level malicious application.
  • the determining unit 703 is further configured to, specifically, when the first configuration information and the second configuration information are the same, the third configuration information and the fourth configuration information are the same, In the case where the application name in the legal application information and the application name in the application information to be detected are the same, and the fifth configuration information and the sixth configuration information are different, it is determined that the application to be detected is the fourth configuration information. level malicious application, wherein the malicious level of the fourth level malicious application is lower than the malicious level of the third level malicious application.
  • the above-mentioned first configuration information is the same as the second configuration information
  • the above-mentioned third configuration information is the same as the fourth configuration information
  • the application name in the legal application information is the same as the application name in the application information to be detected
  • the above-mentioned fifth configuration information and the third configuration information are the same.
  • the configuration information of the user logging in to the operating system process in the state is the same as the configuration information of the user logging in to the operating system process in the running state of the operating system, and the application name in the legal application information and the application name in the application information to be detected are the same.
  • the malicious level represented by the fourth-level malicious application is lower than the malicious level represented by the third-level malicious application, the second-level malicious application, and the first-level malicious application.
  • the operating system includes a system using the Linux kernel.
  • the operating system includes a system using the Linux kernel
  • the first process started by the system using the Linux kernel is generally the init process
  • the configuration information of the process is usually stored in the init.rc file. Therefore, using The Linux kernel systems are all applicable to the malicious application detection methods described in the embodiments of this application.
  • the determining unit 703 is further configured to determine the storage path of the application to be detected according to the initial information and the running information.
  • the initial information and the running information are different, and it is determined that the application to be detected is a malicious application.
  • the storage path of the application to be detected is further analyzed.
  • the label of the first configuration information and the label of the second configuration information are parsed to obtain the label content of the first configuration information and the label content of the second configuration information, and the The content of the tag of the first configuration information is compared with the content of the tag of the second configuration information, and the storage path of the application to be detected is determined according to the difference in content between the two.
  • the label of the third configuration information and the label of the fourth configuration information are parsed to obtain the content of the label of the third configuration information and the label of the fourth configuration information.
  • the content of the tag of the third configuration information is compared with the content of the tag of the fourth configuration information, and the storage path of the application to be detected is determined according to the difference in the content of the two.
  • the label of the fifth configuration information and the label of the sixth configuration information are analyzed to obtain the label content of the fifth configuration information and the label content of the sixth configuration information, and the The content of the tag of the fifth configuration information is compared with the content of the tag of the sixth configuration information, and the storage path of the application to be detected is determined according to the difference in content between the two.
  • the storage path of the malicious application can be quickly determined, and the malicious application can be processed accordingly according to the storage path, such as uninstalling the malicious application according to the storage path, restricting the acquisition of corresponding permissions, etc. processing to improve the security of the operating system operating environment.
  • each unit in the apparatus shown in FIG. 7 may be combined into one or several other units, respectively or all, to form, or some unit(s) may be further split into functionally more
  • the same operation can be achieved without affecting the realization of the technical effects of the embodiments of the present application.
  • the above units are divided based on logical functions.
  • the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit.
  • the network-based device may also include other units, and in practical applications, these functions may also be implemented with the assistance of other units, and may be implemented by cooperation of multiple units.
  • each unit may also correspond to the corresponding descriptions of the method embodiments shown in FIG. 3 , FIG. 4 , FIG. 5 , and FIG. 6 .
  • the configuration information of the operating system in the initial state and the configuration information in the running state are compared through the text comparison technology, and the legitimate application information of the operating system is compared. Compare with the information of the application to be detected, so as to detect the security of the application to be detected, and evaluate the malicious level of the application to be detected, which can save a lot of computing and storage resources, improve the detection efficiency, and change the code or use code obfuscation. , Packing and other malicious application detection techniques are still effective, improving the accuracy of detection results.
  • FIG. 8 is a schematic structural diagram of a terminal device 80 according to an embodiment of the present application.
  • the terminal device 80 may include a memory 801 and a processor 802 . Further optionally, a communication interface 803 and a bus 804 may also be included, wherein the memory 801 , the processor 802 and the communication interface 803 are communicated with each other through the bus 804 .
  • the communication interface 803 is used for data interaction with the above-mentioned malicious application detection device 70 .
  • the memory 801 is used to provide a storage space, and data such as an operating system and a computer program can be stored in the storage space.
  • the memory 801 includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM), or Portable read-only memory (compact disc read-only memory, CD-ROM).
  • the processor 802 is a module that performs arithmetic operations and logical operations, and can be a processing module such as a central processing unit (CPU), a graphics processing unit (GPU), or a microprocessor (microprocessor unit, MPU). of one or more combinations.
  • a processing module such as a central processing unit (CPU), a graphics processing unit (GPU), or a microprocessor (microprocessor unit, MPU). of one or more combinations.
  • a computer program is stored in the memory 801, and the processor 802 calls the computer program stored in the memory 801 to execute the malicious application detection method shown in the above-mentioned FIG. 3, FIG. 4, FIG. 5, and FIG. 6:
  • initial information of the operating system wherein the initial information includes legal application information of the operating system or configuration information of the operating system in an initial state, and the initial state is the state before the operating system runs for the first time;
  • FIG. 3 The specific content of the method executed by the processor 802 can be referred to FIG. 3 , FIG. 4 , FIG. 5 , and FIG. 6 , and details are not repeated here.
  • the processor 802 calls the computer program stored in the memory 801, and can also be used to execute the method executed by the obtaining unit 701, the comparing unit 702 and the determining unit 703 in the malicious application detection device 70 shown in FIG.
  • the specific content of the steps can be found in FIG. 7 , which will not be repeated here.
  • the configuration information of the operating system in the initial state and the configuration information in the running state are compared through the text comparison technology, and the legal application information of the operating system is compared with the information to be detected.
  • the application information is compared, so as to detect the security of the application to be detected, and evaluate the malicious level of the application to be detected, which can save a lot of computing and storage resources, improve the detection efficiency, and the code changes or code obfuscation, packing
  • the malicious application detection of other technologies is still effective, and the accuracy of the detection results is improved.
  • Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium.
  • a computer program is stored in the computer-readable storage medium.
  • An embodiment of the present application further provides a computer program product, which can implement the methods shown in FIG. 3 , FIG. 4 , FIG. 5 , and FIG. 6 when the computer program product is executed on the processor.
  • the configuration information of the operating system in the initial state is compared with the configuration information in the running state, and the legal application information of the operating system and the application information to be detected are compared, so as to Detecting the security of the application to be detected and evaluating the malicious level of the application to be detected can save a lot of computing and storage resources and improve the detection efficiency. Effective and improve the accuracy of detection results.
  • the aforementioned storage medium includes: read-only memory ROM or random-access storage memory RAM, magnetic disk or optical disk and other media that can store computer program codes.

Abstract

A malicious application detection method and apparatus, and a storage medium. The application detection method comprises: acquiring initial information of an operating system, and acquiring running information of the operating system (301); comparing information on a legitimate application with information on an application to be detected, or comparing configuration information in an initial state with configuration information in a running state, to obtain a comparison result (302); and if the comparison result indicates that said information is different, determining that the application to be detected on the operating system is a malicious application (303). According to the method, configuration information of an operating system in an initial state is compared with configuration information of the operating system in a running state, or information on a legitimate application of the operating system is compared with information on an application to be detected, so as to detect the security of the application to be detected and evaluate the malicious level of the application to be detected, such that a large number of computation and storage resources can be saved, the detection efficiency is improved, the present invention is still effective for detection of malicious applications having code changed or using techniques such code obfuscation and packing, and the accuracy of the detection result is improved.

Description

一种恶意应用的检测方法、装置及存储介质A detection method, device and storage medium for malicious application 技术领域technical field
本申请涉及计算机技术领域,尤其涉及一种恶意应用的检测方法、装置及存储介质。The present application relates to the field of computer technologies, and in particular, to a method, device and storage medium for detecting malicious applications.
背景技术Background technique
应用(Application,App),是为完成某一项或多项特定工作的计算机程序。基于Linux内核的操作系统,例如安卓(Android)系统,主要应用于移动终端设备。由于基于Linux内核的操作系统代码的开源以及丰富的扩展性,基于Linux内核的操作系统开发的App功能越来越多样,极大的满足了人们日常生活中的各种需求。Application (Application, App) is a computer program for completing one or more specific tasks. An operating system based on a Linux kernel, such as an Android (Android) system, is mainly used in mobile terminal devices. Due to the open source and rich extensibility of the operating system code based on the Linux kernel, the functions of the apps developed by the operating system based on the Linux kernel are more and more diverse, which greatly meets the various needs of people's daily life.
但是,依附于拥有庞大用户量的终端系统,通过恶意App进行欺诈、扣费、挖矿等行为的黑色产业也在快速发展。黑色产业对用户的数据安全造成重大影响。例如,搭载Android系统的车机,与车机进行通信的移动终端设备因受到恶意App攻击,导致车主隐私数据泄露,甚至严重威胁车辆的驾驶安全。因此,对基于Linux内核的操作系统的应用安全性的检测,一直以来都是信息安全人员研究的重点课题。However, depending on the terminal system with a large number of users, the black industry that conducts fraud, deduction, and mining through malicious apps is also developing rapidly. The black industry has a major impact on the data security of users. For example, the car-machine equipped with the Android system and the mobile terminal device that communicates with the car-machine are attacked by malicious apps, resulting in the leakage of the car owner's private data, and even a serious threat to the driving safety of the vehicle. Therefore, the detection of the application security of the operating system based on the Linux kernel has always been the focus of the research of information security personnel.
目前所采用的应用检测方法是对App的源代码进行检测,但是需要耗费大量的计算和存储资源,检测效率低;而且当恶意App代码发生变化或采用代码混淆、加壳等技术后,可以轻易的绕过检测。因此,目前的恶意App的检测方法资源消耗大,且检测结果准确性低。The currently used application detection method is to detect the source code of the App, but it requires a lot of computing and storage resources, and the detection efficiency is low; and when the malicious App code changes or uses techniques such as code obfuscation and packing, it can be easily bypass detection. Therefore, the current detection methods for malicious apps consume a lot of resources, and the accuracy of detection results is low.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种恶意应用的检测方法、装置及存储介质,通过文本比对技术,将操作系统在初始状态下的配置信息和在运行状态下的配置信息进行比对,将操作系统的合法应用信息和待检测应用信息进行比对,从而对待检测应用的安全性进行检测,并评估待检测应用的恶意等级,能够节省大量的计算和存储资源,提高了检测效率,且对代码发生变化或采用代码混淆、加壳等技术的恶意应用检测仍然有效,提高了检测结果的准确性。The embodiments of the present application provide a malicious application detection method, device, and storage medium. Through text comparison technology, the configuration information of the operating system in the initial state and the configuration information in the running state are compared, and the operating system is compared. The legitimate application information and the application information to be detected are compared, so as to detect the security of the application to be detected, and evaluate the malicious level of the application to be detected, which can save a lot of computing and storage resources, improve the detection efficiency, and prevent the code occurrence. Malicious application detection that changes or adopts technologies such as code obfuscation and packing is still effective, which improves the accuracy of detection results.
第一方面,本申请实施例提供了一种恶意应用的检测方法,该检测方法包括:In a first aspect, an embodiment of the present application provides a detection method for a malicious application, the detection method includes:
获取操作系统的初始信息,其中,所述初始信息包括所述操作系统的合法应用信息或所述操作系统在初始状态下的配置信息,所述初始状态为所述操作系统首次运行前的状态;Obtain initial information of the operating system, wherein the initial information includes legal application information of the operating system or configuration information of the operating system in an initial state, and the initial state is the state before the operating system runs for the first time;
获取所述操作系统的运行信息,所述运行信息包括所述操作系统的待检测应用信息或所述操作系统在运行状态下的配置信息;Acquire operating information of the operating system, where the operating information includes application information to be detected of the operating system or configuration information of the operating system in a running state;
将所述合法应用信息与所述待检测应用信息进行比对,或者将所述初始状态下的配置信息与所述运行状态下的配置信息进行比对,得到比对结果;Comparing the legal application information with the application information to be detected, or comparing the configuration information in the initial state with the configuration information in the running state, to obtain a comparison result;
在所述比对结果不相同的情况下,确定所述操作系统上的待检测应用为恶意应用。In the case that the comparison results are not the same, it is determined that the application to be detected on the operating system is a malicious application.
本申请实施例中,基于文本比对技术,将操作系统的配置信息、应用的应用信息作为两项比对内容,给出了一种恶意应用的检测方法,与目前采用的众多的“检测应用本身” 的检测方法相比,本实施例中的检测方法,结合操作系统运行机制下的系统内容检测和应用内容检测,能够节省大量的计算和存储资源,提高了检测效率,且对代码发生变化或采用代码混淆、加壳等技术的恶意应用检测仍然有效,提高了检测结果的准确性。In the embodiment of the present application, based on the text comparison technology, the configuration information of the operating system and the application information of the application are regarded as two comparison contents, and a detection method for malicious applications is provided, which is different from the many currently used "detection applications". Compared with the detection method of "self", the detection method in this embodiment, combined with the system content detection and application content detection under the operating mechanism of the operating system, can save a lot of computing and storage resources, improve the detection efficiency, and change the code. Or the detection of malicious applications by techniques such as code obfuscation and packing is still effective, which improves the accuracy of detection results.
在一个可能的实现方式中,所述将所述初始状态下的配置信息与所述运行状态下的配置信息进行比对,具体包括:In a possible implementation manner, the comparing the configuration information in the initial state with the configuration information in the running state specifically includes:
将所述操作系统在所述初始状态下的配置信息的散列值和所述操作系统在所述运行状态下的配置信息的散列值进行比对。The hash value of the configuration information of the operating system in the initial state is compared with the hash value of the configuration information of the operating system in the running state.
在该实现方式中,采用比对散列值的方法去比对初始状态下的配置信息和运行状态下的配置信息是否相同。将操作系统在初始状态下的配置信息的散列值和操作系统在运行状态下的配置信息的散列值进行比对,配置信息的散列值和该配置信息是一起获取得到的,通过比对两个配置信息的散列值可以使配置信息的接收者确认该配置信息内容的真实性,从而确认上述两个配置信息的内容是否相同,该比对方法有效提高了配置信息比对的效率。In this implementation manner, a method of comparing hash values is used to compare whether the configuration information in the initial state and the configuration information in the running state are the same. Compare the hash value of the configuration information of the operating system in the initial state with the hash value of the configuration information of the operating system in the running state. The hash value of the configuration information and the configuration information are obtained together. The hash value of the two configuration information can enable the receiver of the configuration information to confirm the authenticity of the content of the configuration information, thereby confirming whether the content of the above two configuration information is the same, and the comparison method effectively improves the efficiency of configuration information comparison. .
在一个可能的实现方式中,所述将所述初始状态下的配置信息与所述运行状态下的配置信息进行比对,具体包括:In a possible implementation manner, the comparing the configuration information in the initial state with the configuration information in the running state specifically includes:
将第一配置信息与第二配置信息进行比对,其中,所述第一配置信息为所述操作系统在所述初始状态下的系统启动进程的配置信息,所述第二配置信息为所述操作系统在所述运行状态下的系统启动进程的配置信息;Compare the first configuration information with the second configuration information, where the first configuration information is the configuration information of the system startup process of the operating system in the initial state, and the second configuration information is the Configuration information of the system startup process of the operating system in the running state;
或者,or,
将第三配置信息与第四配置信息进行比对,其中,所述第三配置信息为所述操作系统在所述初始状态下的用户登录所述操作系统进程的配置信息,所述第四配置信息为所述操作系统在所述运行状态下的用户登录所述操作系统进程的配置信息。Comparing the third configuration information with the fourth configuration information, wherein the third configuration information is the configuration information of the user logging in to the operating system process in the initial state of the operating system, and the fourth configuration information The information is configuration information of a user logging in to the operating system process when the operating system is in the running state.
在该实现方式中,将初始状态下、以及运行状态下的操作系统的系统启动进程的配置信息进行比对,或者,将初始状态下、以及运行状态下的操作系统的用户登录该操作系统进程的配置信息进行比对。通过本实现方式中所描述的内容比对,可以以操作系统的层级为角度,检测操作系统运行机制下的配置信息,对采用隐藏伪装技术处理的高威胁恶意应用的检测依然有效,且提高了检测效率以及检测结果的准确性。In this implementation manner, the configuration information of the system startup process of the operating system in the initial state and in the running state is compared, or the user of the operating system in the initial state and in the running state is logged into the operating system process configuration information for comparison. Through the content comparison described in this implementation method, the configuration information under the operating mechanism of the operating system can be detected from the perspective of the operating system level, and the detection of high-threat malicious applications processed by the hidden camouflage technology is still effective, and the improvement is improved. Detection efficiency and accuracy of detection results.
在一个可能的实现方式中,所述将所述合法应用信息与所述待检测应用信息进行比对,具体包括:In a possible implementation manner, the comparing the legal application information with the application information to be detected specifically includes:
将所述合法应用信息中的应用名称和所述待检测应用信息中的应用名称进行比对;Compare the application name in the legal application information with the application name in the application information to be detected;
或者,or,
将第五配置信息与第六配置信息进行比对,其中,所述第五配置信息包括所述待检测应用在初始状态下的应用启动进程的配置信息,所述第六配置信息包括所述待检测应用在运行状态下的应用启动进程的配置信息。Compare the fifth configuration information with the sixth configuration information, where the fifth configuration information includes configuration information of an application startup process of the application to be detected in an initial state, and the sixth configuration information includes the application startup process of the application to be detected. Detects the configuration information of the application startup process when the application is running.
在该实现方式中,将合法应用信息中的应用名称和待检测应用信息中的应用名称进行比对,或者,将初始状态下、以及运行状态下的待检测应用的应用启动进程的配置信息进行比对。通过本实现方式中所描述的内容比对,可以以应用的层级为角度,结合操作系统的运行机制,检测应用在初始状态下的应用启动进程的配置信息和在运行状态下的应用启动进程的配置信息,对采用隐藏伪装技术处理的高威胁恶意应用的检测依然有效,且节省 了大量的计算和存储资源,提高了检测效率以及检测结果的准确性。In this implementation manner, the application name in the legal application information and the application name in the application information to be detected are compared, or the configuration information of the application startup process of the application to be detected in the initial state and the running state is compared. Comparison. Through the content comparison described in this implementation, it is possible to detect the configuration information of the application startup process in the initial state and the configuration information of the application startup process in the running state from the perspective of the application level and the operating mechanism of the operating system. The configuration information is still effective for the detection of high-threat malicious applications processed by the hidden camouflage technology, and a lot of computing and storage resources are saved, and the detection efficiency and the accuracy of the detection results are improved.
在一个可能的实现方式中,所述检测方法还包括:In a possible implementation, the detection method further includes:
根据所述初始信息和所述运行信息,确定所述待检测应用的恶意等级。According to the initial information and the running information, the malicious level of the application to be detected is determined.
在该实现方式中,初始信息和运行信息不同,确定待检测应用为恶意应用,以此为前提,依据初始信息和运行信息之间的具体差异,对该待检测应用的恶意等级进行了进一步确定。通过本实现方式,确定待检测应用的恶意等级,可评估该待检测应用对终端设备的威胁程度的高低,进而为后续对该恶意应用采取不同程度的方式降低或解决可能存在的威胁提供了理论依据,提高了应用运行环境的安全性和整体稳定性。In this implementation manner, the initial information and the running information are different, and it is determined that the application to be detected is a malicious application. Based on this premise, the malicious level of the application to be detected is further determined according to the specific difference between the initial information and the running information. . Through this implementation, the malicious level of the application to be detected can be determined, and the degree of threat of the application to be detected to the terminal device can be evaluated, thereby providing a theory for the subsequent reduction or resolution of possible threats to the malicious application in different degrees. Based on this, the security and overall stability of the application operating environment are improved.
在一个可能的实现方式中,所述根据所述初始信息和所述运行信息,确定所述待检测应用的恶意等级,具体包括:In a possible implementation manner, the determining the malicious level of the application to be detected according to the initial information and the running information specifically includes:
在所述第一配置信息和所述第二配置信息不同的情况下,确定所述待检测应用为第一级恶意应用;In the case that the first configuration information and the second configuration information are different, determine that the application to be detected is a first-level malicious application;
在所述第一配置信息和所述第二配置信息相同、且所述第三配置信息和所述第四配置信息不同的情况下,确定所述待检测应用为第二级恶意应用,其中,所述第二级恶意应用的恶意等级低于所述第一级恶意应用的恶意等级。In the case that the first configuration information and the second configuration information are the same, and the third configuration information and the fourth configuration information are different, it is determined that the application to be detected is a second-level malicious application, wherein, The malicious level of the second-level malicious application is lower than the malicious level of the first-level malicious application.
在该实现方式中,提供了在操作系统层级的信息不同的情况下,确定待检测应用的恶意等级的实现方式。上述第一配置信息和第二配置信息不同时,确定待检测应用为第一级恶意应用,该第一级恶意应用表示恶意程度最高的待检测应用;上述第一配置信息和第二配置信息相同、且上述第三配置信息和第四配置信息不同时,确定该待检测应用为第二级恶意应用,因为操作系统在初始状态下的系统启动进程的配置信息和在运行状态下的系统启动进程的配置信息相同,故该第二级恶意应用表示的恶意等级要低于第一级恶意应用表示的恶意等级。In this implementation manner, an implementation manner of determining the malicious level of the application to be detected under different information at the operating system level is provided. When the first configuration information and the second configuration information are different, it is determined that the application to be detected is a first-level malicious application, and the first-level malicious application represents the application to be detected with the highest degree of maliciousness; the first configuration information and the second configuration information are the same , and when the third configuration information and the fourth configuration information are different, it is determined that the application to be detected is a second-level malicious application, because the configuration information of the system startup process of the operating system in the initial state and the system startup process in the running state The configuration information of the second-level malicious application is the same, so the malicious level expressed by the second-level malicious application is lower than the malicious level expressed by the first-level malicious application.
在一个可能的实现方式中,所述根据所述初始信息和所述运行信息,确定所述待检测应用的恶意等级,具体包括:In a possible implementation manner, the determining the malicious level of the application to be detected according to the initial information and the running information specifically includes:
在所述第一配置信息和所述第二配置信息相同、所述第三配置信息和所述第四配置信息相同、且所述合法应用信息中的应用名称和所述待检测应用信息中的应用名称不同的情况下,确定所述待检测应用为第三级恶意应用,其中,所述第三级恶意应用的恶意等级低于所述第二级恶意应用的恶意等级。The first configuration information is the same as the second configuration information, the third configuration information is the same as the fourth configuration information, and the application name in the legal application information is the same as the application name in the application information to be detected. In the case of different application names, it is determined that the application to be detected is a third-level malicious application, wherein the malicious level of the third-level malicious application is lower than the malicious level of the second-level malicious application.
在该实现方式中,提供了在应用层级的信息不同的情况下,确定待检测应用的恶意等级的实现方式。上述第一配置信息和第二配置信息相同、上述第三配置信息和第四配置信息相同、且合法应用信息中的应用名称和待检测应用信息中的应用名称不同时,确定该待检测应用为第三级恶意应用,因为操作系统在初始状态下的系统启动进程的配置信息和在运行状态下的系统启动进程的配置信息相同、且操作系统在初始状态下的用户登录操作系统进程的配置信息和操作系统在运行状态下的用户登录操作系统进程的配置信息相同,故该第三级恶意应用表示的恶意等级要低于第二级恶意应用、第一级恶意应用表示的恶意等级。In this implementation manner, an implementation manner of determining the malicious level of the application to be detected when the information at the application level is different is provided. When the first configuration information and the second configuration information are the same, the third configuration information and the fourth configuration information are the same, and the application name in the legal application information and the application name in the application information to be detected are different, it is determined that the application to be detected is The third-level malicious application is because the configuration information of the system startup process in the initial state of the operating system is the same as the configuration information of the system startup process in the running state, and the configuration information of the user logging in to the operating system process in the initial state of the operating system The configuration information of the user logging in to the operating system process when the operating system is running is the same, so the malicious level represented by the third-level malicious application is lower than the malicious level represented by the second-level malicious application and the first-level malicious application.
在一个可能的实现方式中,所述根据所述初始信息和所述运行信息,确定所述待检测应用的恶意等级,具体包括:In a possible implementation manner, the determining the malicious level of the application to be detected according to the initial information and the running information specifically includes:
在所述第一配置信息和所述第二配置信息相同、所述第三配置信息和所述第四配置信息相同、所述合法应用信息中的应用名称和所述待检测应用信息中的应用名称相同、且所述第五配置信息和所述第六配置信息不同的情况下,确定所述待检测应用为第四级恶意应用,其中,所述第四级恶意应用的恶意等级低于所述第三级恶意应用的恶意等级。When the first configuration information is the same as the second configuration information, the third configuration information is the same as the fourth configuration information, the application name in the legal application information and the application to be detected information In the case where the names are the same and the fifth configuration information and the sixth configuration information are different, determine that the application to be detected is a fourth-level malicious application, where the malicious level of the fourth-level malicious application is lower than the The malicious level of the third-level malicious application.
在该实现方式中,提供了在应用层级的信息不同的情况下,确定待检测应用的恶意等级的另一种实现方式。上述第一配置信息和第二配置信息相同、上述第三配置信息和第四配置信息相同,合法应用信息中的应用名称和待检测应用信息中的应用名称相同、且上述第五配置信息和第六配置信息不同时,确定该待检测应用为第四级恶意应用,因为操作系统在初始状态下的系统启动进程的配置信息和在运行状态下的系统启动进程的配置信息相同、操作系统在初始状态下的用户登录操作系统进程的配置信息和操作系统在运行状态下的用户登录操作系统进程的配置信息相同、且合法应用信息中的应用名称和待检测应用信息中的应用名称相同,故该第四级恶意应用表示的恶意等级要低于第三级恶意应用、第二级恶意应用、第一级恶意应用表示的恶意等级。In this implementation manner, another implementation manner of determining the malicious level of the application to be detected under the condition that the information at the application level is different is provided. The above-mentioned first configuration information is the same as the second configuration information, the above-mentioned third configuration information is the same as the fourth configuration information, the application name in the legal application information is the same as the application name in the application information to be detected, and the above-mentioned fifth configuration information and the third configuration information are the same. Sixth, when the configuration information is different, it is determined that the application to be detected is a fourth-level malicious application, because the configuration information of the system startup process of the operating system in the initial state is the same as that of the system startup process in the running state, and the operating system is in the initial state. The configuration information of the user logging in to the operating system process in the state is the same as the configuration information of the user logging in to the operating system process in the running state of the operating system, and the application name in the legal application information and the application name in the application information to be detected are the same. The malicious level represented by the fourth-level malicious application is lower than the malicious level represented by the third-level malicious application, the second-level malicious application, and the first-level malicious application.
在一个可能的实现方式中,所述操作系统包括采用Linux内核的系统。In a possible implementation manner, the operating system includes a system using the Linux kernel.
在该实现方式中,操作系统包括了采用Linux内核的系统,采用Linux内核的系统启动的第一个进程一般是init进程,其进程的配置信息通常存储在init.rc文件中,因此,采用Linux内核的系统都适用于本申请实施例所描述的恶意应用的检测方法。In this implementation, the operating system includes a system using the Linux kernel. The first process started by the system using the Linux kernel is generally the init process, and the configuration information of the process is usually stored in the init.rc file. Therefore, using Linux The kernel systems are all applicable to the malicious application detection method described in the embodiments of this application.
在一个可能的实现方式中,所述检测方法还包括:In a possible implementation, the detection method further includes:
根据所述初始信息和所述运行信息,确定所述待检测应用的存储路径。According to the initial information and the running information, the storage path of the application to be detected is determined.
在该实现方式中,初始信息和运行信息不同,确定待检测应用为恶意应用,以此为前提,依据初始信息和运行信息之间的具体差异,对该待检测应用的存储路径进行了进一步确定。在上述第一配置信息和上述第二配置信息不同的情况下,解析第一配置信息的标签和第二配置信息的标签,得到第一配置信息的标签内容和第二配置信息的标签内容,将第一配置信息的标签内容和第二配置信息的标签内容比对,依据二者内容上的差异确定待检测应用的存储路径。同理,在上述第三配置信息和上述第四配置信息不同的情况下,解析第三配置信息的标签和第四配置信息的标签,得到第三配置信息的标签内容和第四配置信息的标签内容,将第三配置信息的标签内容和第四配置信息的标签内容比对,依据二者内容上的差异确定待检测应用的存储路径。在上述第五配置信息和上述第六配置信息不同的情况下,解析第五配置信息的标签和第六配置信息的标签,得到第五配置信息的标签内容和第六配置信息的标签内容,将第五配置信息的标签内容和第六配置信息的标签内容比对,依据二者内容上的差异确定待检测应用的存储路径。通过本实现方式中的确定存储路径的方法,可以快速确定恶意应用的存储路径,后续可根据存储路径对恶意应用进行相应的处理,如根据存储路径对恶意应用进行卸载、限制相应的权限获取等处理,提高操作系统运行环境的安全性。In this implementation manner, the initial information and the running information are different, and it is determined that the application to be detected is a malicious application. Based on this premise, the storage path of the application to be detected is further determined according to the specific difference between the initial information and the running information. . In the case where the first configuration information and the second configuration information are different, the label of the first configuration information and the label of the second configuration information are parsed to obtain the label content of the first configuration information and the label content of the second configuration information, and the The content of the tag of the first configuration information is compared with the content of the tag of the second configuration information, and the storage path of the application to be detected is determined according to the difference in content between the two. Similarly, in the case where the third configuration information and the fourth configuration information are different, the label of the third configuration information and the label of the fourth configuration information are parsed to obtain the content of the label of the third configuration information and the label of the fourth configuration information. content, the content of the tag of the third configuration information is compared with the content of the tag of the fourth configuration information, and the storage path of the application to be detected is determined according to the difference in the content of the two. In the case where the fifth configuration information and the sixth configuration information are different, the label of the fifth configuration information and the label of the sixth configuration information are analyzed to obtain the label content of the fifth configuration information and the label content of the sixth configuration information, and the The content of the tag of the fifth configuration information is compared with the content of the tag of the sixth configuration information, and the storage path of the application to be detected is determined according to the difference in content between the two. Through the method of determining the storage path in this implementation, the storage path of the malicious application can be quickly determined, and the malicious application can be processed accordingly according to the storage path, such as uninstalling the malicious application according to the storage path, restricting the acquisition of corresponding permissions, etc. processing to improve the security of the operating system operating environment.
第二方面,本申请实施例提供了一种恶意应用的检测装置,该检测装置包括:In a second aspect, an embodiment of the present application provides a detection device for malicious applications, the detection device includes:
获取单元,用于获取操作系统的初始信息,其中,所述初始信息包括所述操作系统的合法应用信息或所述操作系统在初始状态下的配置信息,所述初始状态为所述操作系统首次运行前的状态;an acquisition unit, configured to acquire initial information of the operating system, wherein the initial information includes legal application information of the operating system or configuration information of the operating system in an initial state, where the initial state is the first time the operating system state before operation;
所述获取单元,还用于获取所述操作系统的运行信息,所述运行信息包括所述操作系统的待检测应用信息或所述操作系统在运行状态下的配置信息;The obtaining unit is further configured to obtain operation information of the operating system, where the operation information includes application information to be detected of the operating system or configuration information of the operating system in a running state;
比对单元,用于将所述合法应用信息与所述待检测应用信息进行比对,或者将所述初始状态下的配置信息与所述运行状态下的配置信息进行比对,得到比对结果;A comparison unit, configured to compare the legal application information with the application information to be detected, or compare the configuration information in the initial state with the configuration information in the running state to obtain a comparison result ;
确定单元,用于在所述比对结果不相同的情况下,确定所述操作系统上的待检测应用为恶意应用。A determining unit, configured to determine that the application to be detected on the operating system is a malicious application if the comparison results are different.
在一个可能的实现方式中,所述比对单元,具体用于将所述操作系统在所述初始状态下的配置信息的散列值和所述操作系统在所述运行状态下的配置信息的散列值进行比对。In a possible implementation manner, the comparison unit is specifically configured to compare the hash value of the configuration information of the operating system in the initial state with the configuration information of the operating system in the running state Hash values are compared.
在一个可能的实现方式中,所述比对单元,具体还用于将第一配置信息与第二配置信息进行比对,其中,所述第一配置信息为所述操作系统在所述初始状态下的系统启动进程的配置信息,所述第二配置信息为所述操作系统在所述运行状态下的系统启动进程的配置信息;In a possible implementation manner, the comparison unit is further configured to compare the first configuration information with the second configuration information, wherein the first configuration information is the operating system in the initial state configuration information of the system startup process under the operating system, the second configuration information is the configuration information of the system startup process of the operating system in the running state;
或者,or,
所述比对单元,具体还用于将第三配置信息与第四配置信息进行比对,其中,所述第三配置信息为所述操作系统在所述初始状态下的用户登录所述操作系统进程的配置信息,所述第四配置信息为所述操作系统在所述运行状态下的用户登录所述操作系统进程的配置信息。The comparison unit is further configured to compare the third configuration information with the fourth configuration information, wherein the third configuration information is that the user of the operating system in the initial state logs in to the operating system configuration information of a process, and the fourth configuration information is configuration information of a user logging in to the operating system process when the operating system is in the running state.
在一个可能的实现方式中,所述比对单元,具体还用于将所述合法应用信息中的应用名称和所述待检测应用信息中的应用名称进行比对;In a possible implementation manner, the comparison unit is further configured to compare the application name in the legal application information with the application name in the application information to be detected;
或者,or,
所述比对单元,具体还用于将第五配置信息与第六配置信息进行比对,其中,所述第五配置信息包括所述待检测应用在初始状态下的应用启动进程的配置信息,所述第六配置信息包括所述待检测应用在运行状态下的应用启动进程的配置信息。The comparison unit is further configured to compare the fifth configuration information with the sixth configuration information, wherein the fifth configuration information includes the configuration information of the application startup process of the application to be detected in the initial state, The sixth configuration information includes configuration information of an application startup process of the application to be detected in a running state.
在一个可能的实现方式中,所述确定单元,还用于根据所述初始信息和所述运行信息,确定所述待检测应用的恶意等级。In a possible implementation manner, the determining unit is further configured to determine the malicious level of the application to be detected according to the initial information and the running information.
在一个可能的实现方式中,所述确定单元,具体用于在所述第一配置信息和所述第二配置信息不同的情况下,确定所述待检测应用为第一级恶意应用;In a possible implementation manner, the determining unit is specifically configured to determine that the application to be detected is a first-level malicious application when the first configuration information and the second configuration information are different;
所述确定单元,具体还用于在所述第一配置信息和所述第二配置信息相同、且所述第三配置信息和所述第四配置信息不同的情况下,确定所述待检测应用为第二级恶意应用,其中,所述第二级恶意应用的恶意等级低于所述第一级恶意应用的恶意等级。The determining unit is further configured to determine the application to be detected when the first configuration information and the second configuration information are the same and the third configuration information and the fourth configuration information are different is a second-level malicious application, wherein the malicious level of the second-level malicious application is lower than the malicious level of the first-level malicious application.
在一个可能的实现方式中,所述确定单元,具体还用于在所述第一配置信息和所述第二配置信息相同、所述第三配置信息和所述第四配置信息相同、且所述合法应用信息中的应用名称和所述待检测应用信息中的应用名称不同的情况下,确定所述待检测应用为第三级恶意应用,其中,所述第三级恶意应用的恶意等级低于所述第二级恶意应用的恶意等级。In a possible implementation manner, the determining unit is specifically further configured to: when the first configuration information and the second configuration information are the same, the third configuration information and the fourth configuration information are the same, and all the In the case where the application name in the legal application information and the application name in the application information to be detected are different, determine that the application to be detected is a third-level malicious application, wherein the malicious level of the third-level malicious application is low the malicious level of the second-level malicious application.
在一个可能的实现方式中,所述确定单元,具体还用于在所述第一配置信息和所述第二配置信息相同、所述第三配置信息和所述第四配置信息相同、所述合法应用信息中的应用名称和所述待检测应用信息中的应用名称相同、且所述第五配置信息和所述第六配置信息不同的情况下,确定所述待检测应用为第四级恶意应用,其中,所述第四级恶意应用的 恶意等级低于所述第三级恶意应用的恶意等级。In a possible implementation manner, the determining unit is specifically further configured to: when the first configuration information and the second configuration information are the same, the third configuration information and the fourth configuration information are the same, the In the case where the application name in the legitimate application information and the application name in the application information to be detected are the same, and the fifth configuration information and the sixth configuration information are different, it is determined that the application to be detected is the fourth-level malicious application, wherein the malicious level of the fourth-level malicious application is lower than the malicious level of the third-level malicious application.
在一个可能的实现方式中,所述操作系统包括采用Linux内核的系统。In a possible implementation manner, the operating system includes a system using the Linux kernel.
在一个可能的实现方式中,所述确定单元,还用于根据所述初始信息和所述运行信息,确定所述待检测应用的存储路径。In a possible implementation manner, the determining unit is further configured to determine the storage path of the application to be detected according to the initial information and the running information.
关于第二方面或各种可能的实现方式所带来的技术效果,可参考对应于第一方面或相应的实现方式的技术效果的介绍。Regarding the technical effects brought about by the second aspect or various possible implementation manners, reference may be made to the introduction of the technical effects corresponding to the first aspect or corresponding implementation manners.
第三方面,本申请实施例提供一种恶意应用的检测装置,所述检测装置包括处理器和存储器;所述存储器用于存储计算机执行指令;所述处理器用于执行所述存储器所存储的计算机执行指令,以使所述检测装置执行如上述第一方面以及任一项可能的实现方式的方法。可选的,所述检测装置还包括收发器,所述收发器,用于接收信号或者发送信号。In a third aspect, an embodiment of the present application provides an apparatus for detecting malicious applications, where the detection apparatus includes a processor and a memory; the memory is used for storing computer execution instructions; the processor is used for executing a computer stored in the memory The instructions are executed to cause the detection apparatus to execute the method according to the above-mentioned first aspect and any possible implementation manner. Optionally, the detection apparatus further includes a transceiver, where the transceiver is used to receive a signal or send a signal.
第四方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质用于存储指令或计算机程序;当所述指令或所述计算机程序被执行时,使得第一方面所述的方法被实现。In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, where the computer-readable storage medium is used to store instructions or computer programs; when the instructions or the computer programs are executed, the first aspect is The described method is implemented.
第五方面,本申请实施例提供一种计算机程序产品,所述计算机程序产品包括指令或计算机程序;当所述指令或所述计算机程序被执行时,使得第一方面所述的方法被实现。In a fifth aspect, an embodiment of the present application provides a computer program product, where the computer program product includes an instruction or a computer program; when the instruction or the computer program is executed, the method described in the first aspect is implemented.
本申请实施例中,通过文本比对技术,将操作系统在初始状态下的配置信息和在运行状态下的配置信息进行比对,以及将操作系统的合法应用信息和待检测应用信息进行比对,从而对待检测应用的安全性进行检测,并评估待检测应用的恶意等级,能够节省大量的计算和存储资源,提高检测效率,且对代码发生变化或采用代码混淆、加壳等技术的恶意应用检测仍有效,提高检测结果的准确性。In the embodiment of the present application, through the text comparison technology, the configuration information of the operating system in the initial state is compared with the configuration information in the running state, and the legal application information of the operating system and the application information to be detected are compared. , so as to detect the security of the application to be detected, and evaluate the malicious level of the application to be detected, which can save a lot of computing and storage resources, improve the detection efficiency, and prevent malicious applications with code changes or code obfuscation, packing and other technologies. The detection is still valid, improving the accuracy of the detection results.
附图说明Description of drawings
图1为本申请实施例提供的一种恶意应用检测的场景示意图;FIG. 1 is a schematic diagram of a scenario of malicious application detection provided by an embodiment of the present application;
图2为本申请实施例提供的一种恶意应用检测的架构示意图;FIG. 2 is a schematic structural diagram of a malicious application detection provided by an embodiment of the present application;
图3为本申请实施例提供的一种恶意应用的检测方法的流程示意图;3 is a schematic flowchart of a method for detecting a malicious application provided by an embodiment of the present application;
图4为本申请实施例提供的另一种恶意应用的检测方法的流程示意图;FIG. 4 is a schematic flowchart of another malicious application detection method provided by an embodiment of the present application;
图5为本申请实施例提供的又一种恶意应用的检测方法的流程示意图;FIG. 5 is a schematic flowchart of another malicious application detection method provided by an embodiment of the present application;
图6为本申请实施例提供的又一种恶意应用的检测方法的流程示意图;FIG. 6 is a schematic flowchart of another malicious application detection method provided by an embodiment of the present application;
图7为本申请实施例提供的一种恶意应用的检测装置的结构示意图;7 is a schematic structural diagram of an apparatus for detecting malicious applications provided by an embodiment of the present application;
图8为本申请实施例提供的一种终端设备的结构示意图。FIG. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图对本申请实施例进行描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
本申请的说明书、权利要求书及附图中的术语“第一”和“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备等,没 有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元等,或可选地还包括对于这些过程、方法、产品或设备等固有的其它步骤或单元。The terms "first" and "second" in the description, claims and drawings of the present application are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "comprising" and "having", and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device, etc. that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, etc., or optional It also includes other steps or units inherent to these processes, methods, products or devices, etc.
在本文中提及的“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员可以显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. Those skilled in the art will understand, both explicitly and implicitly, that the embodiments described herein may be combined with other embodiments.
应当理解,在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上,“至少两个(项)”是指两个或三个及三个以上,“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。It should be understood that in this application, "at least one (item)" refers to one or more, "multiple" refers to two or more, and "at least two (item)" refers to two or three And three or more, "and/or" is used to describe the association relationship of related objects, indicating that three kinds of relationships can exist, for example, "A and/or B" can mean: only A exists, only B exists, and A exists at the same time and B three cases, where A, B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship. "At least one item(s) below" or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (a) of a, b or c, can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c" ", where a, b, c can be single or multiple.
本申请提供了一种恶意应用的检测方法,为了更清楚地描述本申请的方案,下面先介绍一些与应用检测相关的知识。The present application provides a method for detecting malicious applications. In order to describe the solution of the present application more clearly, some knowledge related to application detection is introduced below.
APKTool:是一种Android应用程序包(Android application package,APK)编译工具,能够反编译及回编译apk,同时安装反编译系统apk所需要的framework-res框架,清理上次反编译文件夹等功能。apk的代码想要在Android设备上运行,必须先进行编译,然后被打包成为一个被Android系统所能识别的文件才可以被运行,而这种能被Android系统识别并运行的文件格式便是“apk”。一个apk文件内包含被编译的代码文件(.dex文件),文件资源(resources),原生资源文件(assets),证书(certificates),和清单文件(manifest file)。APKTool: is an Android application package (Android application package, APK) compilation tool, which can decompile and recompile apk, install the framework-res framework required by the decompilation system apk, and clean up the last decompiled folder and other functions . If the apk code wants to run on an Android device, it must be compiled first, and then packaged into a file recognized by the Android system before it can be run, and the file format that can be recognized and run by the Android system is " apk". An apk file contains compiled code files (.dex files), file resources (resources), native resource files (assets), certificates (certificates), and manifest files (manifest file).
沙箱:网络编程虚拟执行环境,是一个虚拟系统程序,允许测试者在沙盘环境中运行浏览器或其他程序,因此运行所产生的变化可以随后删除。它创造了一个类似沙盒的独立作业环境,在其内部运行的程序并不能对硬盘产生永久性的影响。在网络安全中,沙箱指在隔离环境中,用以测试不受信任的文件或应用程序等行为的工具。Sandbox: A virtual execution environment for network programming, a virtual system program that allows testers to run browsers or other programs in a sandbox environment, so changes resulting from running can be deleted later. It creates an independent operating environment similar to a sandbox, and the programs running inside it cannot have a permanent impact on the hard disk. In cybersecurity, a sandbox refers to a tool used to test the behavior of untrusted files or applications in an isolated environment.
Hook技术:又叫做钩子函数,在系统没有调用该函数之前,钩子程序就先捕获该消息,钩子函数先得到控制权,这时钩子函数既可以加工处理(改变)该函数的执行行为,还可以强制结束消息的传递。简单来说,就是把系统的程序拉出来变成我们自己执行代码片段。Hook technology: also known as hook function. Before the system does not call the function, the hook program first captures the message, and the hook function first obtains control. At this time, the hook function can process (change) the execution behavior of the function, and can also Forcibly end the delivery of the message. To put it simply, it is to pull out the program of the system and turn it into a snippet of our own execution code.
下面结合本申请实施例中的附图对本申请实施例进行描述。The embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
请参阅图1,图1为本申请实施例提供的一种恶意应用检测的场景示意图。如图1所示,安装在汽车中控台的101为搭载了Android系统的车机,车机是安装在汽车里面的车载信息娱乐产品的简称,其除了传统的收音机、音视频播放、导航功能以外,还具有车载信息服务(Telematics)功能,能够实现人与车、车与外界(车与车)的信息通讯。其中,“I-Call”和“E-Call”功能是Telematics功能中最典型的代表。“I-Call”功能是可以通过车机内置的通讯模块连接后台呼叫中心,提供一键导航及相应的位置及远程服务;“E-Call”功能是当汽车出现严重事故时,可以通过控制器局域网络(controller area network,CAN)总线读取安全气囊的信息,自动拔打紧急救援电话。除此之外,Telematics功能还带有定位 功能、防盗监控功能,当车辆被盗后,呼叫中心将联合执法部门对车辆进行定位追踪。在此场景中,如果车机受到恶意App的攻击,将影响车辆的某些功能实现。Please refer to FIG. 1. FIG. 1 is a schematic diagram of a malicious application detection scenario provided by an embodiment of the present application. As shown in Figure 1, the 101 installed in the center console of the car is a car machine equipped with an Android system. The car machine is the abbreviation of the in-vehicle infotainment products installed in the car. In addition to the traditional radio, audio and video playback, and navigation functions In addition, it also has a telematics function, which can realize information communication between people and vehicles, vehicles and the outside world (vehicle-to-vehicle). Among them, the "I-Call" and "E-Call" functions are the most typical representatives of Telematics functions. The "I-Call" function is to connect the background call center through the built-in communication module of the car, providing one-key navigation and corresponding location and remote services; the "E-Call" function is that when a serious accident occurs in the car, the The local area network (controller area network, CAN) bus reads the information of the airbag and automatically dials the emergency call. In addition, the Telematics function also has a positioning function and anti-theft monitoring function. When the vehicle is stolen, the call center will cooperate with the law enforcement department to locate and track the vehicle. In this scenario, if the vehicle is attacked by malicious apps, it will affect the realization of some functions of the vehicle.
102为搭载了Android系统的手机,且手机102可与车机101通过蓝牙连接或数据线连接或其他方式进行通信。例如,102(手机)与101(车机)蓝牙连接,用户便可通过操作手机来控制车机行为:在手机上打开音乐播放应用,通过与车机通信,使与车机联通的车载音响播放手机里的歌曲;当接听手机来电时,可以无需手持手机进行通话,而是利用与车机联通的音响和麦克风进行通话。但在上述场景中,与车机进行通联的手机因受到恶意App攻击,导致车主隐私泄露,甚至影响车辆驾驶安全的事件也日渐增加。比如,手机上的某款地图App因受到网络攻击代码遭到恶意篡改,在该App的导航下驾驶员将误入歧途,甚至严重威胁驾驶安全。102 is a mobile phone equipped with an Android system, and the mobile phone 102 can communicate with the vehicle machine 101 through a Bluetooth connection or a data cable connection or other means. For example, 102 (mobile phone) and 101 (car machine) are connected via Bluetooth, and the user can control the behavior of the car machine by operating the mobile phone: open the music player application on the mobile phone, and communicate with the car machine to make the car audio connected to the car machine play. Songs in the mobile phone; when answering a call from the mobile phone, you can make a call without holding the mobile phone, but use the audio and microphone connected with the car machine to make a call. However, in the above scenario, the mobile phone that communicates with the car and the machine is attacked by malicious apps, which leads to the leakage of the car owner's privacy, and even the incidents that affect the safety of vehicle driving are increasing day by day. For example, a certain map app on the mobile phone has been maliciously tampered with due to the cyber attack code, and the driver will go astray under the navigation of the app, and even seriously threaten the driving safety.
因此,在上述应用场景中,应用高效的恶意应用的检测方法,对于保障用户信息安全、车辆驾驶安全具有十分重要的意义。Therefore, in the above application scenarios, applying an efficient malicious application detection method is of great significance for ensuring user information security and vehicle driving safety.
针对上述应用场景中存在的问题,本申请实施例提供了一种新的恶意应用检测架构。请参阅图2,图2为本申请实施例提供的一种恶意应用检测的架构示意图。如图2所示,本架构主要包括三个模块:原始信息数据库模块、文件分析模块、以及应用检测结果模块。In view of the problems existing in the above application scenarios, the embodiments of the present application provide a new malicious application detection architecture. Please refer to FIG. 2. FIG. 2 is a schematic structural diagram of a malicious application detection according to an embodiment of the present application. As shown in Figure 2, this architecture mainly includes three modules: the original information database module, the file analysis module, and the application detection result module.
原始信息数据库模块用于建立原始信息数据库,该原始信息数据库主要包含两方面内容:操作系统在初始状态下的配置信息,以及操作系统的合法应用信息。其中,上述初始状态指的是操作系统首次运行前的状态,包括了出厂后未被使用过的、首次运行前的状态,或者是官方后续发布该操作系统的更新版本后未被使用过的、首次运行前的状态。操作系统在初始状态下的配置信息主要包括操作系统的系统启动进程的配置信息、用户登录该操作系统进程的配置信息。上述操作系统的合法应用信息主要包括一些合法应用的相关信息,如合法应用的应用名称、合法应用的配置信息,该合法应用的配置信息具体可以是应用启动进程的配置信息。The original information database module is used to establish the original information database, and the original information database mainly includes two contents: the configuration information of the operating system in the initial state, and the legal application information of the operating system. Among them, the above initial state refers to the state before the operating system runs for the first time, including the state that has not been used after leaving the factory, the state before the first run, or the state that has not been used after the official subsequent release of the updated version of the operating system, The state before the first run. The configuration information of the operating system in the initial state mainly includes the configuration information of the system startup process of the operating system and the configuration information of the user logging in to the operating system process. The legal application information of the above operating system mainly includes relevant information of some legal applications, such as application name of the legal application, configuration information of the legal application, and the configuration information of the legal application may specifically be the configuration information of the application startup process.
原始信息数据库中包含的信息无需接入操作系统就可以获取到,原始信息数据库模块可以通过在发布操作系统的官网等平台下载得到该操作系统在初始状态下的配置信息。同样的,原始信息数据库模块也可以通过不同的途径获取操作系统的合法应用信息,对不同类别的合法应用采取不同的途径获取其应用信息。进一步的,操作系统的合法应用信息中包含的合法应用主要有两大类,一类是该操作系统在初始状态下预装的应用,原始信息数据库模块可以在发布该类应用的官网等平台下载得到该类应用的应用名称和配置信息等应用的相关信息;另一类合法应用是第三方应用平台公开的基于上述操作系统开发的应用,原始信息数据库模块可以在相应的第三方平台下载得到该类应用的应用名称和配置信息等应用的相关内容。因此,原始信息数据库获取信息无需依赖于操作系统的运行,且该信息是在操作系统出厂后或者更新后就可确定的信息。The information contained in the original information database can be obtained without accessing the operating system. The original information database module can obtain the configuration information of the operating system in the initial state by downloading it from the official website of the operating system. Similarly, the original information database module can also obtain the legal application information of the operating system through different channels, and adopt different channels to obtain the application information for different types of legal applications. Further, the legal applications contained in the legal application information of the operating system mainly fall into two categories. One is the applications that are pre-installed by the operating system in the initial state. The original information database module can be downloaded from platforms such as the official website that publishes such applications. Obtain the application-related information such as the application name and configuration information of this type of application; another type of legitimate application is the application developed based on the above-mentioned operating system published by the third-party application platform, and the original information database module can be downloaded from the corresponding third-party platform. Related content of the application, such as the application name and configuration information of the class application. Therefore, the information obtained from the original information database does not need to depend on the operation of the operating system, and the information can be determined after the operating system leaves the factory or is updated.
上述系统启动进程的配置信息为操作系统启动的第一个进程的信息,该系统启动进程工作后会派生出其他重要的系统进程,以执行相应的功能。上述操作系统包括采用Linux内核的系统,如Android、乌班图(ubuntu)等。在以Linux为内核的操作系统中,系统启动的第一个进程一般是init进程,该进程用于指示操作系统在启动时进行一系列相应的处理,比如启动用户登录、实现运行级别、以及处理孤立进程等处理。因此,上述系统启动 进程的配置信息通常存储在init.rc文件和rc.local文件中,init.rc文件和rc.local文件均为随系统启动而启动的脚本,init.rc文件先于rc.local文件启动。init.rc文件是一个规定init进程行为和动作的配置文件,rc.local文件用于记录系统启动的执行命令,在系统启动后、用户登录前执行。同样的,在以Linux为内核的操作系统中,上述用户登录操作系统进程的配置信息通常存储在profile文件中,profile文件为随用户登录操作系统而启动的脚本,profile文件用于记录一些用户登录系统时的执行命令,在系统启动后、用户登录该系统时执行上述命令。此外,init.rc文件在系统的路径为“/system/core/rootdir/init.rc”,rc.local文件在系统的路径为“/etc/init.rc”,profile文件在系统的路径为“/etc/profile”。上述应用启动进程的配置信息通常存储在AndroidManifest.xml文件中,AndroidManifest.xml文件是一个位于应用的根目录的应用清单文件,包含了该应用的配置信息,操作系统需要根据里面的内容运行应用的代码,显示界面,执行相应功能。The above configuration information of the system startup process is the information of the first process started by the operating system. After the system startup process works, other important system processes will be derived to perform corresponding functions. The above-mentioned operating systems include systems using the Linux kernel, such as Android, Ubuntu, and the like. In an operating system with Linux as the kernel, the first process started by the system is generally the init process, which is used to instruct the operating system to perform a series of corresponding processes at startup, such as starting user login, implementing run levels, and processing Orphaned processes, etc. Therefore, the configuration information of the above system startup process is usually stored in the init.rc file and the rc.local file. Both the init.rc file and the rc.local file are scripts that are started with the system startup. The init.rc file precedes rc. local file starts. The init.rc file is a configuration file that specifies the behavior and actions of the init process. The rc.local file is used to record the execution commands for system startup, which are executed after the system is started and before the user logs in. Similarly, in an operating system with Linux as the kernel, the configuration information of the above-mentioned user login operating system process is usually stored in a profile file. The profile file is a script that is started when the user logs in to the operating system. The profile file is used to record some user logins. The execution command when the system is started. The above command is executed when the user logs in to the system after the system is started. In addition, the path of the init.rc file in the system is "/system/core/rootdir/init.rc", the path of the rc.local file in the system is "/etc/init.rc", and the path of the profile file in the system is " /etc/profile". The configuration information of the above application startup process is usually stored in the AndroidManifest.xml file. The AndroidManifest.xml file is an application manifest file located in the root directory of the application, and contains the configuration information of the application. The operating system needs to run the application according to the content in it. code, display the interface, and execute the corresponding function.
文件分析模块用于将操作系统的运行信息与原始信息数据库中的信息进行比对分析。操作系统的运行信息与原始信息数据库中的信息不同,需要依赖于操作系统在运行状态下获取得到,运行状态为操作系统出厂后或更新后正在使用中的状态,故文件分析模块需接入操作系统,获取操作系统的相关权限,进而获取操作系统的运行信息。操作系统的运行信息主要包含两方面内容:操作系统在运行状态下的配置信息,以及操作系统的待检测应用信息。操作系统在运行状态下的配置信息主要包括操作系统的系统启动进程的配置信息、用户登录该操作系统进程的配置信息。操作系统的待检测应用信息主要包括待检测应用的应用名称、待检测应用的配置信息等应用的相关信息,该待检测应用的配置信息具体可以是应用启动进程的配置信息。The file analysis module is used to compare and analyze the operation information of the operating system with the information in the original information database. The operating information of the operating system is different from the information in the original information database. It needs to be obtained by the operating system in the operating state. The operating state is the state in which the operating system is in use after the operating system leaves the factory or is updated. Therefore, the file analysis module needs to be connected to the operation. system, obtain the relevant permissions of the operating system, and then obtain the operating information of the operating system. The operating information of the operating system mainly includes two aspects: configuration information of the operating system in a running state, and application information of the operating system to be detected. The configuration information of the operating system in the running state mainly includes the configuration information of the system startup process of the operating system and the configuration information of the user logging in to the operating system process. The application information to be detected of the operating system mainly includes application-related information such as the application name of the application to be detected, configuration information of the application to be detected, etc. The configuration information of the application to be detected may specifically be configuration information of the application startup process.
与上述原始信息数据库中的信息类似,在以Linux为内核的操作系统中,操作系统在运行状态下的系统启动进程的配置信息通常存储在init.rc文件和rc.local文件中,操作系统在运行状态下的用户登录该操作系统进程的配置信息通常存储在profile文件中,待检测应用的应用启动进程的配置信息通常存储在待检测应用的AndroidManifest.xml文件中。Similar to the information in the original information database above, in an operating system with Linux as the kernel, the configuration information of the system startup process when the operating system is running is usually stored in the init.rc file and the rc.local file. The configuration information of the user logging in to the operating system process in the running state is usually stored in the profile file, and the configuration information of the application startup process of the application to be detected is usually stored in the AndroidManifest.xml file of the application to be detected.
文件分析模块将操作系统的运行信息与原始信息数据库中的信息进行比对分析,因为上述二者的配置信息通常存储于相应的配置文件中,故可以通过比对配置文件的散列值来达到比对配置信息的目的,具体的比对内容可以从以下几个方面进行比对:The file analysis module compares and analyzes the operating information of the operating system with the information in the original information database. Because the configuration information of the above two is usually stored in the corresponding configuration file, it can be achieved by comparing the hash value of the configuration file. For the purpose of comparing configuration information, the specific comparison content can be compared from the following aspects:
第一,文件分析模块将操作系统在初始状态下的系统启动进程的配置信息和在运行状态下的系统启动进程的配置信息进行比对;First, the file analysis module compares the configuration information of the system startup process in the initial state of the operating system with the configuration information of the system startup process in the running state;
第二,文件分析模块将操作系统在初始状态下的用户登录该操作系统进程的配置信息和在运行状态下的用户登录该操作系统进程的配置信息进行比对;Second, the file analysis module compares the configuration information of the user logging in to the operating system process in the initial state of the operating system with the configuration information of the user logging in the operating system process in the running state;
第三,文件分析模块将操作系统的合法应用信息中的应用名称和待检测应用信息中的应用名称进行比对;Third, the file analysis module compares the application name in the legal application information of the operating system with the application name in the application information to be detected;
第四,文件分析模块将操作系统的待检测应用在初始状态下的应用启动进程的配置信息和在运行状态下的应用启动进程的配置信息进行比对。Fourth, the file analysis module compares the configuration information of the application startup process in the initial state of the application to be detected of the operating system with the configuration information of the application startup process in the running state.
需要注意的是,上述四种比对内容可以是四种并行比对方案的比对内容,也可以是按先后顺序依次递进比对方案的比对内容,文件分析模块可根据不同的应用场景需求选择以上至少一个方面的内容进行比对分析。It should be noted that the above four comparison contents can be the comparison contents of the four parallel comparison schemes, or the comparison contents of the progressive comparison schemes in order. The file analysis module can be used according to different application scenarios. It is required to select at least one of the above aspects for comparative analysis.
应用检测结果模块用于根据上述文件分析模块的比对分析结果,得出应用检测结果。即只要上述文件分析模块的四种方面中的任一方面的比对结果为不相同,则应用检测结果模块将确定待检测应用为恶意应用。The application detection result module is used to obtain the application detection result according to the comparative analysis result of the above-mentioned document analysis module. That is, as long as the comparison result of any one of the four aspects of the file analysis module is different, the application detection result module will determine the application to be detected as a malicious application.
进一步的,应用检测结果模块还可以根据不同方面的比对内容去对待检测应用的恶意程度进行进一步区分,使得为后续对该恶意应用采取不同程度的方式降低或解决可能存在的威胁提供了理论依据,提高应用运行环境的安全性和整体稳定性。在上述第一种方面的比对内容不相同的情况下,应用检测结果模块将此种情况下的待检测应用确定为恶意程度最大的恶意应用(可称为第一级恶意应用);在上述第一种方面的比对内容相同、上述第二种方面的比对内容不相同的情况下,应用检测结果模块将确定此种情况下的待检测应用为第二级恶意应用,第二级恶意应用表示的恶意程度低于上述第一级恶意应用表示的恶意程度;同理,在上述第一种方面的比对内容相同、上述第二种方面的比对内容相同、上述第三种方面的比对内容不相同的情况下,应用检测结果模块将确定此种情况下的待检测应用为第三级恶意应用,第三级恶意应用表示的恶意程度低于上述第二级恶意应用表示的恶意程度;在上述第一种方面的比对内容相同、上述第二种方面的比对内容相同、上述第三种方面的比对内容相同、上述第四种方面的比对内容不相同的情况下,应用检测结果模块将确定此种情况下的待检测应用为第四级恶意应用,第四级恶意应用表示的恶意程度低于上述第三级恶意应用表示的恶意程度。Further, the application detection result module can further distinguish the malicious degree of the application to be detected according to the comparison content in different aspects, so as to provide a theoretical basis for the subsequent reduction or resolution of possible threats to the malicious application in different degrees. , to improve the security and overall stability of the application operating environment. In the case where the comparison contents of the first aspect above are different, the application detection result module determines the application to be detected in this case as the malicious application with the greatest degree of maliciousness (may be referred to as the first-level malicious application); If the comparison content of the first aspect is the same and the comparison content of the second aspect above is different, the application detection result module will determine that the application to be detected in this case is the second-level malicious application, and the second-level malicious application The degree of maliciousness expressed by the application is lower than the degree of maliciousness expressed by the above-mentioned first-level malicious application; similarly, the comparison content in the first aspect above is the same, the comparison content in the second aspect above is the same, and the content in the third aspect above is the same If the comparison contents are not the same, the application detection result module will determine that the application to be detected in this case is a third-level malicious application, and the maliciousness expressed by the third-level malicious application is lower than the maliciousness expressed by the above-mentioned second-level malicious application. degree; when the comparison content of the above-mentioned first aspect is the same, the comparison content of the above-mentioned second aspect is the same, the comparison content of the above-mentioned third aspect is the same, and the comparison content of the above-mentioned fourth aspect is different , the application detection result module will determine that the application to be detected in this case is a fourth-level malicious application, and the malicious degree expressed by the fourth-level malicious application is lower than the malicious degree expressed by the third-level malicious application.
综上,本申请实施例的恶意应用检测架构,其检测技术结合了操作系统运行机制下的内容检测,即使待检测应用代码发生变化或采用代码混淆、加壳等技术,上述检测技术依然有效,大大提高了检测结果的准确性,且检测过程中不需要大量的特征存储量或者占用大量的计算资源,能够节省大量的计算和存储资源,提高了检测效率。To sum up, in the malicious application detection architecture of the embodiments of the present application, the detection technology combines the content detection under the operating system operating mechanism. Even if the application code to be detected changes or uses technologies such as code obfuscation and packing, the above detection technology is still effective. The accuracy of the detection result is greatly improved, and the detection process does not require a large amount of feature storage or occupies a large amount of computing resources, which can save a large amount of computing and storage resources and improve the detection efficiency.
基于上述图2所示的恶意应用检测架构,本申请实施例还提供了一种恶意应用的检测方法。请参阅图3,图3为本申请实施例提供的一种恶意应用的检测方法的流程示意图,该检测方法包括但不限于如下步骤:Based on the malicious application detection architecture shown in FIG. 2, an embodiment of the present application further provides a malicious application detection method. Please refer to FIG. 3, which is a schematic flowchart of a method for detecting a malicious application according to an embodiment of the present application. The detection method includes but is not limited to the following steps:
步骤301:终端设备获取操作系统的初始信息,获取操作系统的运行信息。Step 301: The terminal device obtains initial information of the operating system, and obtains operating information of the operating system.
本申请实施例中的终端设备为搭载了Linux内核的操作系统的电子设备,比如搭载了Android系统的手机、电脑、车机、智能穿戴设备等。The terminal device in the embodiment of the present application is an electronic device equipped with an operating system of the Linux kernel, such as a mobile phone, a computer, a car machine, and a smart wearable device equipped with an Android system.
终端设备获取操作系统的初始信息以及运行信息。该初始信息主要包括操作系统的合法应用信息、操作系统在初始状态下的配置信息,该运行信息主要包括操作系统的待检测应用信息、操作系统在运行状态下的配置信息。其中,初始状态指的是操作系统首次运行前的状态,包括了出厂后未被使用过的、首次运行前的状态,或者是官方后续发布该操作系统的更新版本后未被使用过的、首次运行前的状态,运行状态为操作系统出厂后或更新后正在使用中的状态。The terminal device obtains the initial information and running information of the operating system. The initial information mainly includes legal application information of the operating system and configuration information of the operating system in an initial state, and the running information mainly includes application information of the operating system to be detected and configuration information of the operating system in a running state. Among them, the initial state refers to the state before the operating system runs for the first time, including the state that has not been used after leaving the factory and before the first run, or the state that has not been used after the official subsequent release of the updated version of the operating system, and the first time The state before running, the running state is the state in use after the operating system leaves the factory or is updated.
操作系统的合法应用信息主要包括一些合法应用的相关信息,如合法应用的应用名称、合法应用的配置信息,该合法应用的配置信息具体可以是初始状态下的应用启动进程的配置信息。操作系统在初始状态下的配置信息可以包括操作系统在初始状态下的系统启动进程的配置信息(第一配置信息)、用户登录该操作系统进程的配置信息(第三配置信息)。上述初始信息无需接入操作系统就可以获取得到,终端设备可以通过在发布操作系统的官 网等平台下载得到该操作系统在初始状态下的配置信息,以及在发布合法应用的官网等平台下载得到该合法应用的应用相关信息。进一步的,终端设备会对不同类别的合法应用采取不同的途径获取其应用信息,操作系统的合法应用信息中包含的合法应用主要有两大类,一类是该操作系统在初始状态下预装的应用,终端设备可以在发布该类应用的官网等平台下载得到该类应用的应用名称和配置信息等应用的相关信息;另一类合法应用是第三方应用平台公开的基于上述操作系统开发的应用,终端设备可以在相应的第三方平台下载得到该类应用的应用名称和配置信息等应用的相关内容。因此,终端设备获取操作系统的初始信息无需依赖于操作系统的运行,也无需提前获取操作系统的相关权限,并且该初始信息是在操作系统出厂后或更新后就可确定的信息。The legal application information of the operating system mainly includes relevant information of some legal applications, such as the application name of the legal application and the configuration information of the legal application. The configuration information of the legal application may specifically be the configuration information of the application startup process in the initial state. The configuration information of the operating system in the initial state may include configuration information (first configuration information) of the system startup process of the operating system in the initial state, and configuration information (third configuration information) of a user logging into the operating system process. The above initial information can be obtained without accessing the operating system. The terminal device can obtain the configuration information of the operating system in its initial state by downloading it from the official website where the operating system is released, and obtain the configuration information on the official website where the legal application is released. App-related information for legitimate apps. Further, the terminal device will take different ways to obtain its application information for different types of legitimate applications. There are two main types of legitimate applications included in the legitimate application information of the operating system. One is that the operating system is pre-installed in the initial state. The terminal device can download the application name and configuration information and other related information of the application on the platform that publishes the application, such as the official website. application, the terminal device can download the relevant content of the application, such as the application name and configuration information of this type of application, from the corresponding third-party platform. Therefore, the terminal device does not need to rely on the operation of the operating system to obtain the initial information of the operating system, nor does it need to obtain the relevant permissions of the operating system in advance, and the initial information is information that can be determined after the operating system leaves the factory or is updated.
操作系统的待检测应用信息主要包括一些待检测应用的相关信息,如待检测应用的应用名称、待检测应用的配置信息,该待检测应用的配置信息具体可以是运行状态下的应用启动进程的配置信息。操作系统在运行状态下的配置信息可以包括操作系统在运行状态下的系统启动进程的配置信息(第二配置信息)、用户登录该操作系统进程的配置信息(第四配置信息)。操作系统的运行信息与上述操作系统的初始信息不同,需要依赖于操作系统在运行状态下获取得到,故终端设备需接入操作系统,获取操作系统的根(root)权限,进而获取操作系统的运行信息。The application information to be detected of the operating system mainly includes some relevant information of the application to be detected, such as the application name of the application to be detected, and the configuration information of the application to be detected. configuration information. The configuration information of the operating system in the running state may include the configuration information (second configuration information) of the system startup process of the operating system in the running state, and the configuration information (fourth configuration information) of the user logging into the operating system process. The operating information of the operating system is different from the initial information of the above-mentioned operating system, and needs to be obtained by relying on the operating system in the running state. Therefore, the terminal device needs to access the operating system, obtain the root authority of the operating system, and then obtain the operating system's root authority. Running information.
上述初始状态下的系统启动进程的配置信息(第一配置信息)和运行状态下的系统启动进程的配置信息(第二配置信息)均为操作系统启动的第一个进程的信息,第一配置信息表示该第一个进程未启动的信息,第二配置信息表示该第一个进程启动后的信息,且该系统启动进程工作后会派生出其他重要的系统进程,以执行相应的功能。在以Linux为内核的操作系统中,系统启动的第一个进程一般是init进程,该进程用于指示操作系统在启动时进行一系列相应的处理,比如启动用户登录、实现运行级别、以及处理孤立进程等处理,且该init进程的进程信息通常存储在init.rc文件和rc.local文件中,init.rc文件和rc.local文件均为随系统启动而启动的脚本,init.rc文件先于rc.local文件启动。init.rc文件是一个规定init进程行为和动作的配置文件,rc.local文件用于记录系统启动的执行命令,在系统启动后、用户登录前执行。因此,上述第一配置信息和第二配置信息通常也存储在操作系统的init.rc文件和rc.local文件中。同样的,在以Linux为内核的操作系统中,上述表示不同状态下的用户登录操作系统进程的第三配置信息和第四配置信息通常存储在操作系统的profile文件中,profile文件为随用户登录操作系统而启动的脚本,profile文件用于记录一些用户登录系统时的执行命令,在系统启动后、用户登录该系统时执行上述命令。此外,init.rc文件在系统的路径为“/system/core/rootdir/init.rc”,rc.local文件在系统的路径为“/etc/init.rc”,profile文件在系统的路径为“/etc/profile”。在以Linux为内核的操作系统中,上述合法应用在初始状态下的应用启动进程的配置信息(第五配置信息)通常存储在该合法应用对应的AndroidManifest.xml文件中,上述待检测应用在运行状态下的应用启动进程的配置信息(第六配置信息)通常存储在该待检测应用对应的AndroidManifest.xml文件中,AndroidManifest.xml文件是一个位于应用的根目录的应用清单文件,包含了该应用的配置信息,操作系统需要根据里面的内容运行应用的代码,显示界面,执行相应功能。The configuration information (first configuration information) of the system startup process in the above-mentioned initial state and the configuration information (second configuration information) of the system startup process in the running state are both information of the first process started by the operating system. The information indicates the information that the first process is not started, the second configuration information indicates the information after the first process is started, and other important system processes will be derived after the system startup process works to perform corresponding functions. In an operating system with Linux as the kernel, the first process started by the system is generally the init process, which is used to instruct the operating system to perform a series of corresponding processes at startup, such as starting user login, implementing run levels, and processing The process information of the init process is usually stored in the init.rc file and the rc.local file. Both the init.rc file and the rc.local file are scripts that are started with the system startup. The init.rc file first Start in the rc.local file. The init.rc file is a configuration file that specifies the behavior and actions of the init process. The rc.local file is used to record the execution commands for system startup, which are executed after the system is started and before the user logs in. Therefore, the above-mentioned first configuration information and second configuration information are usually also stored in the init.rc file and the rc.local file of the operating system. Similarly, in an operating system with Linux as the kernel, the above-mentioned third configuration information and fourth configuration information indicating that the user logs in to the operating system process in different states are usually stored in the profile file of the operating system. The script is started by the operating system, and the profile file is used to record the execution commands of some users when they log in to the system. After the system is started, the above commands are executed when the user logs in to the system. In addition, the path of the init.rc file in the system is "/system/core/rootdir/init.rc", the path of the rc.local file in the system is "/etc/init.rc", and the path of the profile file in the system is " /etc/profile". In an operating system with Linux as the kernel, the configuration information (fifth configuration information) of the application startup process of the above-mentioned legal application in the initial state is usually stored in the AndroidManifest.xml file corresponding to the legal application, and the above-mentioned application to be detected is running The configuration information (the sixth configuration information) of the application startup process in the state is usually stored in the AndroidManifest.xml file corresponding to the application to be detected, and the AndroidManifest.xml file is an application manifest file located in the root directory of the application, which contains the application configuration information, the operating system needs to run the code of the application according to the content inside, display the interface, and perform the corresponding functions.
步骤302:将合法应用信息与待检测应用信息进行比对,或者将初始状态下的配置信 息与运行状态下的配置信息进行比对。Step 302: Compare the legal application information with the application information to be detected, or compare the configuration information in the initial state with the configuration information in the running state.
终端设备获取了操作系统的初始信息以及运行信息后,将利用文本比对技术对该初始信息和运行信息进行比对分析,具体为,将操作系统的合法应用信息与待检测应用信息进行比对,将操作系统在初始状态下的配置信息与在运行状态下的配置信息进行比对。After the terminal device obtains the initial information and running information of the operating system, it will use the text comparison technology to compare and analyze the initial information and running information, specifically, compare the legal application information of the operating system with the application information to be detected. , and compare the configuration information of the operating system in the initial state with the configuration information in the running state.
进一步的,可以进行以下比对:Further, the following comparisons can be made:
第一:将上述第一配置信息和第二配置信息进行比对;First: compare the above-mentioned first configuration information with the second configuration information;
第二:将上述第三配置信息和第四配置信息进行比对;Second: compare the above-mentioned third configuration information with the fourth configuration information;
第三:将上述操作系统的合法应用信息中的应用名称和待检测应用信息中的应用名称进行比对;Third: compare the application name in the legal application information of the above operating system with the application name in the application information to be detected;
第四:将上述第五配置信息和第六配置信息进行比对。Fourth: Compare the fifth configuration information with the sixth configuration information.
因为上述配置信息以及应用名称都存储于相应的配置文件中(第一配置信息存储于初始状态下的init.rc和rc.local配置文件中,第二配置信息存储于运行状态下的init.rc和rc.local配置文件中,第三配置信息存储于初始状态下的profile配置文件中,第四配置信息存储于运行状态下的profile配置文件中,合法应用的应用名称以及第五配置信息存储于该合法应用在初始状态下的AndroidManifest.xml配置文件中,待检测应用的应用名称以及第六配置信息存储于该待检测应用在运行状态下的AndroidManifest.xml配置文件中),故终端设备可采用比对配置文件的散列值的方法去比对初始状态下的配置信息和运行状态下的配置信息是否相同,以及合法应用信息中的应用名称和待检测应用信息中的应用名称是否相同。散列值通常用一个短的随机字母和数字组成的字符串来代表,配置文件的散列值通过散列算法计算得到,散列算法是一种从任何一种数据中创建小的数字“指纹”的方法,用于把消息或数据压缩成摘要,使得数据量变小,将数据的格式固定下来。配置文件的散列值和该配置文件中存储的配置信息是一起获取得到的,通过比对两个配置文件的散列值可以使配置信息的接收者确认该配置信息内容的真实性,从而确认上述两个配置信息的内容是否相同,该比对方法有效提高了配置信息比对的效率。Because the above configuration information and application names are stored in the corresponding configuration files (the first configuration information is stored in the init.rc and rc.local configuration files in the initial state, and the second configuration information is stored in the init.rc in the running state and rc.local configuration file, the third configuration information is stored in the profile configuration file in the initial state, the fourth configuration information is stored in the profile configuration file in the running state, the application name of the legal application and the fifth configuration information are stored in the The legal application is in the AndroidManifest.xml configuration file in the initial state, the application name and sixth configuration information of the application to be detected are stored in the AndroidManifest.xml configuration file in the running state of the application to be detected), so the terminal device can use The method of comparing the hash value of the configuration file is to compare whether the configuration information in the initial state is the same as the configuration information in the running state, and whether the application name in the legal application information and the application name in the application information to be detected are the same. The hash value is usually represented by a short string of random letters and numbers. The hash value of the configuration file is calculated by a hashing algorithm, which is a method of creating a small digital "fingerprint" from any kind of data. " method is used to compress the message or data into a digest, so that the amount of data becomes smaller and the format of the data is fixed. The hash value of the configuration file and the configuration information stored in the configuration file are obtained together. By comparing the hash values of the two configuration files, the receiver of the configuration information can confirm the authenticity of the content of the configuration information, thereby confirming the authenticity of the content of the configuration information. Whether the content of the above two configuration information is the same, the comparison method effectively improves the efficiency of configuration information comparison.
进一步的,上述合法应用信息中的应用名称和待检测应用信息中的应用名称可分别作为该合法应用和待检测应用的唯一标识符,因此,可通过比对两个应用的应用名称用于区分两个应用是否为同一个应用。进一步的,应用的名称可通过计算机编程语言命名(如Java包),其作用可描述应用的程序组件,并向外发布对应组件功能,声明应用程序所必须的权限等。Further, the application name in the above-mentioned legal application information and the application name in the application information to be detected can be used as the unique identifiers of the legal application and the application to be detected, respectively. Therefore, the application names of the two applications can be used to distinguish. Whether the two applications are the same application. Further, the name of the application can be named by a computer programming language (such as a Java package), and its function can describe the program components of the application, publish corresponding component functions, declare the necessary permissions of the application, and the like.
需要注意的是,上述四种比对内容可以是四种并行比对方案的比对内容,也可以是按先后顺序依次递进比对方案的比对内容,终端设备可根据不同的应用场景需求选择以上至少一个方面的内容进行比对分析。比如,终端设备可按照上述四种比对方式中的任意一种比对方式进行比对分析,得到检测结果。终端设备也可以先按照上述第一种比对方式进行比对分析,若通过上述第一种比对方式即可确认待检测应用为恶意应用,则就此得出待检测应用为恶意应用的检测结果,不执行其他三种比对方式;若通过上述第一种比对方式还无法确认待检测应用为恶意应用,则继续按照上述第二种比对方式进行比对分析,同理的,若通过上述第二种比对方式即可确认待检测应用为恶意应用,则就此得出待检测应用为恶意应用的检测结果,不执行剩下的两种比对方式;若通过上述第二种比对方式还无法确认 待检测应用为恶意应用,则继续按照上述第三种比对方式进行比对分析,若通过上述第三种比对方式即可确认待检测应用为恶意应用,则就此得出待检测应用为恶意应用的检测结果,不执行剩下的第四种比对方式;若通过上述第三种比对方式还无法确认待检测应用为恶意应用,则继续按照上述第四种比对方式进行比对分析,得出最后的检测结果。It should be noted that the above four comparison contents can be the comparison contents of the four parallel comparison schemes, or the comparison contents of the progressive comparison schemes in sequence, and the terminal device can meet the needs of different application scenarios. Select at least one of the above aspects for comparative analysis. For example, the terminal device may perform comparison and analysis according to any one of the above-mentioned four comparison methods to obtain the detection result. The terminal device can also perform a comparison and analysis according to the first comparison method above. If the application to be detected can be confirmed as a malicious application through the first comparison method, the detection result of the application to be detected as a malicious application is obtained. , do not perform the other three comparison methods; if the application to be detected cannot be confirmed as a malicious application through the first comparison method above, continue to carry out the comparison and analysis according to the second comparison method above. The second comparison method above can confirm that the application to be detected is a malicious application, then the detection result that the application to be detected is a malicious application is obtained, and the remaining two comparison methods are not executed; If it is still impossible to confirm that the application to be detected is a malicious application, continue to carry out the comparison and analysis according to the third comparison method above. If the detection result of the detected application is a malicious application, the remaining fourth comparison method is not performed; if the application to be detected cannot be confirmed as a malicious application through the third comparison method above, continue to follow the fourth comparison method above. A comparative analysis was carried out to obtain the final test results.
步骤303:在上述比对结果不相同的情况下,确定操作系统上的待检测应用为恶意应用。Step 303: In the case that the above comparison results are not the same, determine that the application to be detected on the operating system is a malicious application.
通过上述步骤302中的四种比对方式,可得出相应的比对结果,根据该比对结果可确定操作系统上的待检测应用是否为恶意应用。只要上述四种比对方式中的任一种比对方式的比对结果为不相同,则可确定操作系统上的待检测应用为恶意应用。即上述操作系统的初始信息和运行信息不同,可确定待检测应用为恶意应用,以此为前提,终端设备还可依据初始信息和运行信息之间的具体差异,对该待检测应用的恶意等级进行进一步确定。Through the four comparison methods in the above step 302, a corresponding comparison result can be obtained, and according to the comparison result, it can be determined whether the application to be detected on the operating system is a malicious application. As long as the comparison result of any one of the above four comparison methods is different, it can be determined that the application to be detected on the operating system is a malicious application. That is, if the initial information and running information of the above operating system are different, it can be determined that the application to be detected is a malicious application. On this premise, the terminal device can also determine the malicious level of the application to be detected according to the specific difference between the initial information and the running information. make further determinations.
进一步的,在上述第一配置信息和第二配置信息不同的情况下,确定待检测应用为第一级恶意应用,该第一级恶意应用表示恶意程度最高的待检测应用。此种情况下的恶意应用为随着系统启动进程启动而自启动的应用,会对设备的隐私信息及安全性构成较大威胁。Further, when the first configuration information and the second configuration information are different, it is determined that the application to be detected is a first-level malicious application, and the first-level malicious application represents an application to be detected with the highest degree of maliciousness. The malicious application in this case is an application that starts automatically when the system startup process is started, which will pose a great threat to the privacy information and security of the device.
在上述第一配置信息和第二配置信息相同、且上述第三配置信息和第四配置信息不同的情况下,确定该待检测应用为第二级恶意应用,因为第一配置信息和第二配置信息相同,即操作系统在初始状态下的系统启动进程的配置信息和在运行状态下的系统启动进程的配置信息相同,故该第二级恶意应用表示的恶意等级要低于第一级恶意应用表示的恶意等级。此种情况下的恶意应用为随着用户登录操作系统进程启动而自启动的应用,会对设备的隐私信息及安全性构成较大威胁。In the case where the first configuration information and the second configuration information are the same, and the third configuration information and the fourth configuration information are different, it is determined that the application to be detected is a second-level malicious application, because the first configuration information and the second configuration information are different The information is the same, that is, the configuration information of the system startup process of the operating system in the initial state is the same as the configuration information of the system startup process in the running state, so the malicious level represented by the second-level malicious application is lower than the first-level malicious application. Indicates the level of maliciousness. The malicious application in this case is an application that starts automatically when the user logs into the operating system process, which will pose a great threat to the privacy information and security of the device.
在上述第一配置信息和第二配置信息相同、上述第三配置信息和第四配置信息相同、且合法应用信息中的应用名称和待检测应用信息中的应用名称不同时,确定该待检测应用为第三级恶意应用,因为第一配置信息和第二配置信息相同、且第三配置信息和第四配置信息相同,即操作系统在初始状态下的系统启动进程的配置信息和在运行状态下的系统启动进程的配置信息相同、且操作系统在初始状态下的用户登录操作系统进程的配置信息和操作系统在运行状态下的用户登录操作系统进程的配置信息相同,故该第三级恶意应用表示的恶意等级要低于第二级恶意应用、第一级恶意应用表示的恶意等级。此种情况下的恶意应用不为合法应用,既不属于操作系统在初始状态下预装的应用,也不属于第三方应用平台公开的基于上述操作系统开发的应用,有可能是用户通过不明链接下载的、非官方平台(非正规应用市场)发布的应用,其安全性不能得到相应保障,很有可能是采用代码混淆、加壳等技术包装的恶意应用。When the first configuration information and the second configuration information are the same, the third configuration information and the fourth configuration information are the same, and the application name in the legal application information and the application name in the application information to be detected are different, determine the application to be detected It is a third-level malicious application, because the first configuration information is the same as the second configuration information, and the third configuration information is the same as the fourth configuration information, that is, the configuration information of the system startup process of the operating system in the initial state is the same as that in the running state. The configuration information of the system startup process is the same, and the configuration information of the user logging in to the operating system process in the initial state of the operating system is the same as the configuration information of the user logging in to the operating system process in the running state of the operating system, so the third-level malicious application The malicious level indicated is lower than the malicious level indicated by the second-level malicious application and the first-level malicious application. The malicious application in this case is not a legitimate application, neither an application pre-installed by the operating system in the initial state, nor an application developed based on the above-mentioned operating system disclosed by a third-party application platform. The security of downloaded applications released on unofficial platforms (informal application markets) cannot be guaranteed accordingly, and they are likely to be malicious applications packaged with technologies such as code obfuscation and packing.
在上述第一配置信息和第二配置信息相同、上述第三配置信息和第四配置信息相同、上述合法应用信息中的应用名称和待检测应用信息中的应用名称相同、且上述第五配置信息和第六配置信息不同的情况下,确定该待检测应用为第四级恶意应用,因为第一配置信息和第二配置信息相同、第三配置信息和第四配置信息相同,即操作系统在初始状态下的系统启动进程的配置信息和在运行状态下的系统启动进程的配置信息相同、操作系统在初始状态下的用户登录操作系统进程的配置信息和操作系统在运行状态下的用户登录操作系统进程的配置信息相同、且合法应用信息中的应用名称和待检测应用信息中的应用名称相 同,故该第四级恶意应用表示的恶意等级要低于第三级恶意应用、第二级恶意应用、第一级恶意应用表示的恶意等级。需要注意的是,在本次比对结果的情况下,待检测应用信息中的应用名称和合法应用信息中的应用名称相同,表示该待检测应用来源是合法的,可能是该操作系统在初始状态下预装的应用,也可能是用户在第三方应用平台下载的基于上述操作系统开发的应用,但这并不意味着该检测应用不具恶意性,因为该待检测应用的应用启动进程的配置信息可能不相同,此种情况下该待检测应用也是具有恶意性的,其恶意行为表现为随着应用启动进程启动而自动获取非法权限。比如,某个用户下载的“天气”App,当用户点击启动后,该App的应用启动进程启动,进入运行状态,依据应用启动进程的配置信息依次获取终端设备的地理位置权限、日历权限、相册权限,但该“天气”App在初始状态下的应用启动进程的配置信息记录的应用行为为依次获取终端设备的地理位置权限、日历权限,因此,相册权限为该App随着应用启动进程启动后自动获取的非法权限,该“天气”App的初始状态下的应用启动进程的配置信息与运行状态下的应用启动进程的配置信息不相同,可确定该“天气”App为第四级恶意应用。The first configuration information is the same as the second configuration information, the third configuration information is the same as the fourth configuration information, the application name in the legal application information is the same as the application name in the application information to be detected, and the fifth configuration information If it is different from the sixth configuration information, it is determined that the application to be detected is a fourth-level malicious application, because the first configuration information is the same as the second configuration information, and the third configuration information is the same as the fourth configuration information, that is, the operating system is initially The configuration information of the system startup process in the state is the same as the configuration information of the system startup process in the running state. The configuration information of the user logging in to the operating system process in the initial state of the operating system is the same as that of the user logging in to the operating system in the operating state. The configuration information of the process is the same, and the application name in the legitimate application information and the application name in the application information to be detected are the same, so the malicious level of the fourth-level malicious application is lower than that of the third-level malicious application and the second-level malicious application. , the malicious level represented by the first-level malicious application. It should be noted that, in the case of this comparison result, the application name in the application information to be detected is the same as the application name in the legal application information, which means that the source of the application to be detected is legal. The pre-installed application in the state may also be the application developed by the user on the third-party application platform based on the above operating system, but this does not mean that the detection application is not malicious, because the configuration of the application startup process of the application to be detected The information may not be the same. In this case, the application to be detected is also malicious, and its malicious behavior is manifested as automatically acquiring illegal permissions when the application startup process is started. For example, when a user downloads a "weather" app, when the user clicks to start, the app's application startup process starts and enters the running state. According to the configuration information of the application startup process, the geographical location permission, calendar permission, and photo album of the terminal device are obtained in turn. However, the application behavior recorded by the configuration information of the application startup process of the "Weather" App in the initial state is to sequentially obtain the geographical location permission and calendar permission of the terminal device. Automatically obtained illegal permissions, the configuration information of the application startup process in the initial state of the "Weather" App is different from the configuration information of the application startup process in the running state, and it can be determined that the "Weather" App is a fourth-level malicious application.
进一步的,在上述比对结果的情况下(上述第一配置信息和第二配置信息相同、上述第三配置信息和第四配置信息相同、上述合法应用信息中的应用名称和待检测应用信息中的应用名称相同、且上述第五配置信息和第六配置信息不同的情况),还可以对待检测应用的恶意等级进一步细化。即在上述第一配置信息和第二配置信息相同、上述第三配置信息和第四配置信息相同、上述合法应用信息中的应用名称和待检测应用信息中的应用名称相同、且上述第五配置信息和第六配置信息不同的情况下,若待检测应用为操作系统在初始状态下预装的应用,确定该待检测应用为第四级恶意应用;若待检测应用为第三方应用平台公开的基于上述操作系统开发的应用,确定该待检测应用为第五级恶意应用。因为操作系统在初始状态下预装的应用,用户没有卸载权限,而对于第三方应用平台公开的基于上述操作系统开发的应用,用户具有卸载权限,故第五级恶意应用表示的恶意等级要低于第四级恶意应用表示的恶意等级。Further, in the case of the above-mentioned comparison results (the above-mentioned first configuration information and the second configuration information are the same, the above-mentioned third configuration information and the fourth configuration information are the same, the application name in the above-mentioned legal application information and the application information to be detected are the same. If the names of the applications are the same and the fifth configuration information and the sixth configuration information are different), the malicious level of the application to be detected may be further refined. That is, the first configuration information is the same as the second configuration information, the third configuration information is the same as the fourth configuration information, the application name in the legal application information is the same as the application name in the application information to be detected, and the fifth configuration If the information is different from the sixth configuration information, if the application to be detected is an application preinstalled by the operating system in the initial state, it is determined that the application to be detected is a fourth-level malicious application; if the application to be detected is published by a third-party application platform Based on the application developed by the above operating system, it is determined that the application to be detected is a fifth-level malicious application. Because the user does not have the permission to uninstall the applications pre-installed by the operating system in the initial state, and the user has the permission to uninstall the applications developed on the basis of the above-mentioned operating system disclosed by the third-party application platform, so the malicious level expressed by the fifth-level malicious application is lower. The malicious level represented by the fourth-level malicious application.
进一步的,本申请实施例在确定了操作系统上的待检测应用为恶意应用,以及确定了待检测应用的恶意等级之后,还可以根据操作系统的初始信息和运行信息之间的具体差异,进一步确定该待检测应用的存储路径。比如,在上述第一配置信息和上述第二配置信息不同的情况下,解析第一配置信息的标签和第二配置信息的标签,得到第一配置信息的标签内容和第二配置信息的标签内容,将第一配置信息的标签内容和第二配置信息的标签内容比对,依据二者内容上的差异确定待检测应用的存储路径。同理,在上述第三配置信息和上述第四配置信息不同的情况下,解析第三配置信息的标签和第四配置信息的标签,得到第三配置信息的标签内容和第四配置信息的标签内容,将第三配置信息的标签内容和第四配置信息的标签内容比对,依据二者内容上的差异确定待检测应用的存储路径。在上述第五配置信息和上述第六配置信息不同的情况下,解析第五配置信息的标签和第六配置信息的标签,得到第五配置信息的标签内容和第六配置信息的标签内容,将第五配置信息的标签内容和第六配置信息的标签内容比对,依据二者内容上的差异确定待检测应用的存储路径。Further, in this embodiment of the present application, after it is determined that the application to be detected on the operating system is a malicious application and the malicious level of the application to be detected is determined, it is also possible to further Determine the storage path of the application to be detected. For example, when the first configuration information and the second configuration information are different, the label of the first configuration information and the label of the second configuration information are parsed to obtain the content of the label of the first configuration information and the content of the label of the second configuration information , compare the label content of the first configuration information with the label content of the second configuration information, and determine the storage path of the application to be detected according to the difference in content between the two. Similarly, in the case where the third configuration information and the fourth configuration information are different, the label of the third configuration information and the label of the fourth configuration information are parsed to obtain the content of the label of the third configuration information and the label of the fourth configuration information. content, the content of the tag of the third configuration information is compared with the content of the tag of the fourth configuration information, and the storage path of the application to be detected is determined according to the difference in the content of the two. In the case where the fifth configuration information and the sixth configuration information are different, the label of the fifth configuration information and the label of the sixth configuration information are analyzed to obtain the label content of the fifth configuration information and the label content of the sixth configuration information, and the The content of the tag of the fifth configuration information is compared with the content of the tag of the sixth configuration information, and the storage path of the application to be detected is determined according to the difference in content between the two.
本申请实施例,将操作系统在初始状态下的配置信息和在运行状态下的配置信息进行 比对,以及将操作系统的合法应用信息和待检测应用信息进行比对,从而对待检测应用的安全性进行检测,并评估待检测应用的恶意等级,能够节省大量的计算和存储资源,提高检测效率,且对代码发生变化或采用代码混淆、加壳等技术的恶意应用检测仍有效,提高检测结果的准确性。In this embodiment of the present application, the configuration information of the operating system in the initial state is compared with the configuration information in the running state, and the legal application information of the operating system and the application information to be detected are compared, so as to ensure the security of the application to be detected. It can save a lot of computing and storage resources, improve the detection efficiency, and it is still effective for the detection of malicious applications with code changes or code obfuscation, packing and other technologies, improving the detection results. accuracy.
请参阅图4,图4为本申请实施例提供的另一种恶意应用的检测方法的流程示意图,也可以理解为是图3中的恶意应用检测方法流程图的补充。Please refer to FIG. 4 , which is a schematic flowchart of another malicious application detection method provided by an embodiment of the present application, which can also be understood as a supplement to the flowchart of the malicious application detection method in FIG. 3 .
如图4所示,终端设备首先建立初始数据库,该初始数据库主要包括操作系统的合法应用信息以及操作系统在初始状态下的配置信息(参见步骤401)。其中,终端设备为搭载了Linux内核的操作系统的电子设备,比如搭载了Android系统的手机、电脑、车机、智能穿戴设备等。初始状态指的是操作系统首次运行前的状态,包括了出厂后未被使用过的、首次运行前的状态,或者是官方后续发布该操作系统的更新版本后未被使用过的、首次运行前的状态,操作系统在初始状态下的配置信息主要包括操作系统在初始状态下的系统启动进程的配置信息(上述第一配置信息)、用户登录该操作系统进程的配置信息(上述第三配置信息),上述第一配置信息通常存储于操作系统的init.rc和rc.local文件中,上述第三配置信息通常存储于操作系统的profile文件中。操作系统的合法应用信息主要包括一些合法应用的相关信息,如合法应用的应用名称、合法应用的配置信息,该合法应用的配置信息具体可以是初始状态下的应用启动进程的配置信息(第五配置信息)。上述初始数据库中的信息无需接入操作系统就可以获取得到,终端设备可以通过在发布操作系统的官网等平台下载得到该操作系统在初始状态下的配置信息,以及在发布合法应用的官网等平台下载得到该合法应用的应用相关信息。As shown in FIG. 4 , the terminal device first establishes an initial database, which mainly includes legal application information of the operating system and configuration information of the operating system in an initial state (see step 401 ). The terminal device is an electronic device equipped with a Linux kernel operating system, such as a mobile phone, a computer, a car machine, and a smart wearable device equipped with an Android system. The initial state refers to the state before the operating system runs for the first time, including the state that has not been used after leaving the factory, before the first run, or the state that has not been used after the official subsequent release of the updated version of the operating system, before the first run. The configuration information of the operating system in the initial state mainly includes the configuration information of the system startup process of the operating system in the initial state (the above-mentioned first configuration information), the configuration information of the user logging into the operating system process (the above-mentioned third configuration information) ), the first configuration information is usually stored in the init.rc and rc.local files of the operating system, and the third configuration information is usually stored in the profile file of the operating system. The legal application information of the operating system mainly includes the relevant information of some legal applications, such as the application name of the legal application and the configuration information of the legal application. The configuration information of the legal application may specifically be the configuration information of the application startup process in the initial state (the fifth configuration information). The information in the above-mentioned initial database can be obtained without accessing the operating system, and the terminal device can obtain the configuration information of the operating system in its initial state by downloading it from the official website where the operating system is released, and on the official website where legal applications are released. Download the application-related information of the legitimate application.
其次,终端设备将接入Android系统,获取操作系统的待检测应用信息以及操作系统在运行状态下的配置信息(参见步骤402)。其中,运行状态为操作系统出厂后或更新后正在使用中的状态,操作系统在运行状态下的配置信息主要包括操作系统在运行状态下的系统启动进程的配置信息(上述第二配置信息)、用户登录该操作系统进程的配置信息(上述第四配置信息),上述第二配置信息通常存储于操作系统的init.rc和rc.local文件中,上述第四配置信息通常存储于操作系统的profile文件中。此外,init.rc文件在操作系统的路径为“/system/core/rootdir/init.rc”,rc.local文件在操作系统的路径为“/etc/init.rc”,profile文件在操作系统的路径为“/etc/profile”。操作系统的待检测应用信息主要包括一些待检测应用的相关信息,如待检测应用的应用名称、待检测应用的配置信息,该待检测应用的配置信息具体可以是运行状态下的应用启动进程的配置信息(第六配置信息)。Next, the terminal device will access the Android system to obtain application information of the operating system to be detected and configuration information of the operating system in a running state (see step 402). The operating state is the state in which the operating system is in use after leaving the factory or after being updated, and the configuration information of the operating system in the operating state mainly includes the configuration information of the system startup process of the operating system in the operating state (the above-mentioned second configuration information), The configuration information (the above-mentioned fourth configuration information) that the user logs into the operating system process, the above-mentioned second configuration information is usually stored in the init.rc and rc.local files of the operating system, and the above-mentioned fourth configuration information is usually stored in the profile of the operating system in the file. In addition, the path of the init.rc file in the operating system is "/system/core/rootdir/init.rc", the path of the rc.local file in the operating system is "/etc/init.rc", and the profile file in the operating system The path is "/etc/profile". The application information to be detected of the operating system mainly includes some relevant information of the application to be detected, such as the application name of the application to be detected, and the configuration information of the application to be detected. Configuration information (sixth configuration information).
接着,终端设备将对操作系统在初始状态下的配置信息和操作系统在运行状态下的配置信息进行比对,并判断操作系统在上述两个状态下的配置信息是否相同(参见步骤403)。具体为对操作系统在初始状态下的系统启动进程的配置信息和操作系统在运行状态下的系统启动进程的配置信息进行比对,或者,对操作系统在初始状态下的用户登录该操作系统进程的配置信息和操作系统在运行状态下的用户登录该操作系统进程的配置信息进行比对,并分别判断二者的配置信息是否相同。Next, the terminal device compares the configuration information of the operating system in the initial state with the configuration information of the operating system in the running state, and determines whether the configuration information of the operating system in the above two states is the same (see step 403). Specifically, the configuration information of the system startup process of the operating system in the initial state is compared with the configuration information of the system startup process of the operating system in the running state, or the user of the operating system in the initial state logs in to the operating system process. The configuration information of the operating system is compared with the configuration information of the user logging in to the operating system process in the running state of the operating system, and it is judged whether the configuration information of the two is the same.
如果上述步骤403的比对结果为不相同,则可确定待检测应用为恶意应用,并解析init.rc和rc.local文件,或profile文件,确定恶意应用路径(参见步骤404)。具体为如果是 上述第一配置信息和上述第二配置信息的比对结果为不相同,则确定待检测应用为第一级恶意应用,并解析初始状态下的init.rc文件的标签以及运行状态下的init.rc文件的标签,解析初始状态下的rc.local文件的标签以及运行状态下的rc.local文件的标签,根据两个状态下的标签内容的差异确定该恶意应用的路径;如果是上述第三配置信息和上述第四配置信息的比对结果为不相同,则确定待检测应用为第二级恶意应用,该第二级恶意应用表示的恶意程度低于上述第一级恶意应用表示的恶意程度,并解析初始状态下的profile文件的标签以及运行状态下的profile文件的标签,根据两个状态下的标签内容的差异确定该恶意应用的路径。If the comparison result in the above step 403 is not the same, it can be determined that the application to be detected is a malicious application, and the init.rc and rc.local files, or the profile file, are parsed to determine the malicious application path (see step 404). Specifically, if the comparison result between the first configuration information and the second configuration information is different, the application to be detected is determined to be a first-level malicious application, and the label and running state of the init.rc file in the initial state are analyzed. The label of the init.rc file in the following state is analyzed, the label of the rc.local file in the initial state and the label of the rc.local file in the running state are parsed, and the path of the malicious application is determined according to the difference in the content of the labels in the two states; if If the comparison result between the third configuration information and the fourth configuration information is not the same, it is determined that the application to be detected is a second-level malicious application, and the second-level malicious application represents a lower degree of maliciousness than the first-level malicious application. Indicates the degree of maliciousness, and parses the label of the profile file in the initial state and the label of the profile file in the running state, and determines the path of the malicious application according to the difference in the content of the label in the two states.
反之,如果上述步骤403的比对结果为相同,终端设备将对初始数据库中的合法应用信息与操作系统在运行状态下的待检测应用信息进行比对(参见步骤405)。具体为将操作系统的合法应用信息中的应用名称和待检测应用信息中的应用名称进行比对,或者,将运行状态下的待检测应用的应用启动进程的配置信息与同名合法应用的应用启动进程的配置信息进行比对,并分别判断二者的信息是否相同。On the contrary, if the comparison result in the above step 403 is the same, the terminal device will compare the legal application information in the initial database with the application information to be detected in the running state of the operating system (see step 405). Specifically, the application name in the legal application information of the operating system is compared with the application name in the application information to be detected, or the configuration information of the application startup process of the application to be detected in the running state is compared with the application startup of the legal application of the same name. The configuration information of the process is compared, and whether the information of the two is the same.
先将操作系统的合法应用信息中的应用名称和待检测应用信息中的应用名称进行比对,并判断二者的应用名称是否相同(参见步骤406)。First, compare the application name in the legal application information of the operating system with the application name in the application information to be detected, and determine whether the two application names are the same (refer to step 406 ).
如果上述步骤406的比对结果为不相同,则确定待检测应用为第三级恶意应用,该第三级恶意应用表示的恶意等级低于上述第一级恶意应用、第二级恶意应用表示的恶意等级(参见步骤407)。If the comparison result in the above step 406 is not the same, it is determined that the application to be detected is a third-level malicious application, and the malicious level represented by the third-level malicious application is lower than the above-mentioned first-level malicious application and second-level malicious application. Malicious level (see step 407).
反之,如果上述步骤406的比对结果为相同,则将运行状态下的待检测应用的应用启动进程的配置信息与同名合法应用的应用启动进程的配置信息进行比对(参见步骤408),并判断二者的配置信息是否相同。On the contrary, if the comparison result in the above step 406 is the same, then the configuration information of the application startup process of the application to be detected in the running state is compared with the configuration information of the application startup process of the legal application with the same name (see step 408), and Determine whether the configuration information of the two is the same.
在上述步骤408中的配置信息不相同的情况下,确定待检测应用为第四级恶意应用,并解析两种状态下的配置信息,确定可能执行的恶意行为(参见步骤409)。In the case where the configuration information in the above step 408 is not the same, it is determined that the application to be detected is a fourth-level malicious application, and the configuration information in the two states is parsed to determine possible malicious behaviors (see step 409).
进一步的,在上述步骤409中,还可以对待检测应用的恶意等级进一步细化,即在上述第一配置信息和第二配置信息相同、上述第三配置信息和第四配置信息相同、待检测应用的应用名称和合法应用的应用名称相同、上述第五配置信息和第六配置信息不同的情况下,若待检测应用为操作系统在初始状态下预装的应用,确定该待检测应用为第四级恶意应用;若待检测应用为第三方应用平台公开的基于上述操作系统开发的应用,确定该待检测应用为第五级恶意应用。因为操作系统在初始状态下预装的应用,用户没有卸载权限,而对于第三方应用平台公开的基于上述操作系统开发的应用,用户具有卸载权限,故第五级恶意应用表示的恶意等级要低于第四级恶意应用表示的恶意等级。Further, in the above step 409, the malicious level of the application to be detected may be further refined, that is, if the first configuration information and the second configuration information are the same, the third configuration information and the fourth configuration information are the same, and the application to be detected is the same. In the case where the application name is the same as the application name of the legitimate application, and the fifth configuration information and the sixth configuration information above are different, if the application to be detected is an application preinstalled by the operating system in the initial state, it is determined that the application to be detected is the fourth If the application to be detected is an application developed based on the above operating system and disclosed by a third-party application platform, it is determined that the application to be detected is a fifth-level malicious application. Because the user does not have the permission to uninstall the applications pre-installed by the operating system in the initial state, and the user has the permission to uninstall the applications developed on the basis of the above-mentioned operating system disclosed by the third-party application platform, so the malicious level expressed by the fifth-level malicious application is lower. The malicious level represented by the fourth-level malicious application.
可选的,在确定待检测应用为恶意应用的前提下,还可以通过制定评分规则对待检测应用打分来区别恶意应用不同程度的恶意等级。例如,恶意应用的评分规则如下:Optionally, on the premise that the application to be detected is determined to be a malicious application, the application to be detected may be scored by formulating a scoring rule to distinguish the malicious grades of the malicious application in different degrees. For example, the scoring rules for malicious apps are as follows:
在上述第一配置信息和第二配置信息不相同的情况下确定的待检测应用为第一级恶意应用,该第一级恶意应用随系统启动进程启动而自启动,评为5分;In the case where the above-mentioned first configuration information and the second configuration information are different, the determined application to be detected is a first-level malicious application, and the first-level malicious application starts automatically when the system startup process is started, and is rated as 5 points;
在上述第三配置信息和第四配置信息不相同的情况下确定的待检测应用为第二级恶意应用,该第二级恶意应用随用户登录操作系统进程启动而自启动,评为4分;In the case where the third configuration information and the fourth configuration information are different, the determined application to be detected is the second-level malicious application, and the second-level malicious application starts automatically when the user logs into the operating system process, and is rated as 4 points;
在上述待检测应用的应用名称和合法应用的应用名称不相同的情况下确定的待检测应 用为第三级恶意应用,该第三级恶意应用来源非法,评为3分;When the application name of the above-mentioned application to be detected is different from the application name of the legitimate application, the application to be detected is determined as a third-level malicious application, and the source of the third-level malicious application is illegal, and is rated as 3 points;
在上述第五配置信息和第六配置信息不相同的情况下确定的待检测应用,若该待检测应用为操作系统在初始状态下预装的应用,确定该待检测应用为第四级恶意应用,评为2分;If the application to be detected is determined when the fifth configuration information and the sixth configuration information are different, if the application to be detected is an application preinstalled by the operating system in the initial state, it is determined that the application to be detected is a fourth-level malicious application , rated as 2 points;
在上述第五配置信息和第六配置信息不相同的情况下确定的待检测应用,若该待检测应用为第三方应用平台公开的基于上述操作系统开发的应用,确定该待检测应用为第五级恶意应用,评为1分。If the application to be detected is determined under the condition that the fifth configuration information and the sixth configuration information are different, if the application to be detected is an application developed based on the above operating system disclosed by a third-party application platform, the application to be detected is determined to be the fifth application to be detected. level malicious application, rated 1 point.
上述评分越高表示的恶意等级越高,恶意程度越大。上述评分采用就高原则,即当待检测应用满足上述五条评分规则中的多条时,按照最高分数评分,由此也可得出第一级恶意应用的恶意程度最大,其后的恶意程度依次减小。上述评分也可采用累积原则,即当待检测应用满足上述五条评分规则中的多条时,对满足条件的规则的评分累加,得出该待检测应用的最终评分结果。The higher the above score, the higher the level of maliciousness and the greater the degree of maliciousness. The above scoring adopts the principle of “highest”, that is, when the application to be detected satisfies many of the above five scoring rules, it will be scored according to the highest score. From this, it can also be concluded that the malicious degree of the first-level malicious application is the largest, and the subsequent malicious degrees are in order. decrease. The above scoring can also adopt the accumulation principle, that is, when the application to be detected satisfies more than one of the above five scoring rules, the scores of the rules that satisfy the conditions are accumulated to obtain the final scoring result of the application to be detected.
请参阅图5,图5为本申请实施例提供的又一种恶意应用的检测方法的流程示意图,也可以理解为是上述图3和图4中的恶意应用检测方法流程图的补充。Please refer to FIG. 5. FIG. 5 is a schematic flowchart of another malicious application detection method provided by an embodiment of the present application, which can also be understood as a supplement to the flowcharts of the malicious application detection method in FIGS.
本实施例针对操作系统的系统启动进程的配置信息的比对提供了具体流程,如图5所示,首先获取最近一次更新的init.rc/rc.local文件(参见步骤501),该init.rc/rc.local文件包含了操作系统在初始状态下的系统启动进程的配置信息,可在发布操作系统的官网等平台下载得到;其次,以root权限接入目标Android系统,并获取目标Android系统运行状态下的init.rc/rc.local文件(参见步骤502),该init.rc/rc.local文件包含了操作系统在运行状态下的系统启动进程的配置信息,init.rc文件在操作系统的路径为“/system/core/rootdir/init.rc”,rc.local文件在操作系统的路径为“/etc/init.rc”;接着,将上述两个init.rc/rc.local文件比对,解析文件标签(参见步骤503),具体为将上述初始状态下和运行状态下的init.rc/rc.local文件按标签内容进行比对,对标签内容不同的标签下对应的文本内容进行解析,文件的标签有行为(Actions)、命令(Commands)、服务(Services)、选项(Options)等;最后,确定待检测应用的恶意等级以及路径(参见步骤504),在上述初始状态下和运行状态下的init.rc/rc.local文件不相同的情况下,可按照上述图4中的评分规则评为5分,确定待检测应用为第一级恶意应用,并根据文本解析内容逐级跟踪,确定恶意应用的路径。This embodiment provides a specific process for the comparison of the configuration information of the system startup process of the operating system. As shown in FIG. 5 , first obtain the latest updated init.rc/rc.local file (refer to step 501), the init.rc/rc.local file is obtained. The rc/rc.local file contains the configuration information of the system startup process in the initial state of the operating system, which can be downloaded from the official website where the operating system is released; secondly, access the target Android system with root privileges and obtain the target Android system The init.rc/rc.local file in the running state (see step 502), the init.rc/rc.local file contains the configuration information of the system startup process in the running state of the operating system, and the init.rc file is in the operating system The path of the rc.local file is "/system/core/rootdir/init.rc", and the path of the rc.local file in the operating system is "/etc/init.rc"; then, compare the above two init.rc/rc.local files Yes, parse the file tags (refer to step 503), and specifically compare the init.rc/rc.local files in the initial state and the running state according to the tag content, and compare the text content corresponding to the tags with different tag contents. Parsing, the tags of the file include actions (Actions), commands (Commands), services (Services), options (Options), etc.; finally, determine the malicious level and path of the application to be detected (see step 504), in the above initial state and If the init.rc/rc.local files in the running state are not the same, it can be rated as 5 points according to the scoring rule in Figure 4 above to determine that the application to be detected is the first-level malicious application, and parse the content according to the text level by level. Trace, determine the path of malicious applications.
同理的,还可以针对操作系统的用户登录操作系统进程的配置信息的比对提供相应的具体流程,首先获取最近一次更新的profile文件,该profile文件包含了操作系统在初始状态下的用户登录操作系统进程的配置信息,可在发布操作系统的官网等平台下载得到;其次,以root权限接入目标Android系统,并获取目标Android系统运行状态下的profile文件,该profile文件包含了操作系统在运行状态下的用户登录操作系统进程的配置信息,profile文件在操作系统的路径为“/etc/profile”;接着,将上述两个profile文件比对,解析文件标签,具体为将上述初始状态下和运行状态下的profile文件按标签内容进行比对,对标签内容不同的标签下对应的文本内容进行解析,文件的标签有行为(Actions)、命令(Commands)、服务(Services)、选项(Options)等;最后,确定待检测应用的恶意等级以及路径,在上述初始状态下和运行状态下的profile文件不相同的情况下,可按照上述图4中的评分规则评为4分,确定待检测应用为第二级恶意应用,并根据文本解析内容逐级 跟踪,确定恶意应用的路径。Similarly, a corresponding specific process can also be provided for the comparison of the configuration information of the operating system user login operating system process. First, obtain the latest updated profile file, which contains the user login in the initial state of the operating system. The configuration information of the operating system process can be downloaded from the official website of the operating system and other platforms; secondly, access the target Android system with root privileges, and obtain the profile file under the running state of the target Android system. The configuration information of the user logging in to the operating system process in the running state, the path of the profile file in the operating system is "/etc/profile"; then, compare the above two profile files, and parse the file tags, specifically, the above initial state Compare with the profile file in the running state according to the content of the label, and parse the corresponding text content under the label with different label content. The labels of the file include Actions, Commands, Services, and Options. ) and so on; finally, determine the malicious level and path of the application to be detected, under the condition that the profile file under the above-mentioned initial state and the running state are different, it can be rated as 4 points according to the scoring rule in the above-mentioned Figure 4, and it is determined that the to-be-detected The application is a second-level malicious application, and is tracked step by step according to the text parsing content to determine the path of the malicious application.
请参阅图6,图6为本申请实施例提供的又一种恶意应用的检测方法的流程示意图,也可以理解为是上述图3和图4中的恶意应用检测方法流程图的补充。Please refer to FIG. 6. FIG. 6 is a schematic flowchart of another malicious application detection method provided by an embodiment of the present application, which can also be understood as a supplement to the flowcharts of the malicious application detection method in FIGS. 3 and 4.
本实施例针对操作系统的待检测应用的配置信息的比对提供了具体流程,如图6所示,首先获取操作系统预装的应用的Androidmanifest.xml文件(参见步骤601),该Androidmanifest.xml文件包含了操作系统预装的应用在初始状态下的应用启动进程的配置信息,可在发布该应用的官网等平台下载得到;其次,以root权限接入目标Android系统,并获取目标Android系统运行状态下的待检测应用的Androidmanifest.xml文件(参见步骤602),该Androidmanifest.xml文件包含了待检测应用在运行状态下的应用启动进程的配置信息;接着,将上述两个Androidmanifest.xml文件比对,解析文件标签(参见步骤603),具体为将上述初始状态下和运行状态下的Androidmanifest.xml文件按标签内容进行比对,对标签内容不同的标签下对应的文本内容进行解析,文件的标签有行为(Actions)、命令(Commands)、服务(Services)、选项(Options)等;最后,确定待检测应用的恶意等级以及路径(参见步骤604),在上述初始状态下和运行状态下的Androidmanifest.xml文件不相同的情况下,可按照上述图4中的评分规则评为2分,确定待检测应用为第四级恶意应用,用户无卸载权限,并根据文本解析内容逐级跟踪,确定恶意应用的路径。This embodiment provides a specific process for the comparison of the configuration information of the application to be detected in the operating system. As shown in FIG. 6 , first obtain the Androidmanifest.xml file of the application preinstalled by the operating system (see step 601), the Androidmanifest.xml file The file contains the configuration information of the application startup process of the application pre-installed by the operating system in the initial state, which can be downloaded from the official website where the application is released. The Androidmanifest.xml file of the application to be detected in the state (refer to step 602), the Androidmanifest.xml file contains the configuration information of the application startup process of the application to be detected in the running state; then, compare the above two Androidmanifest.xml files. Yes, parsing the file tags (see step 603), specifically comparing the Androidmanifest.xml files in the initial state and the running state according to the tag content, and parsing the text content corresponding to the tags with different tag content, Labels include actions (Actions), commands (Commands), services (Services), options (Options), etc.; finally, determine the malicious level and path of the application to be detected (see step 604), in the above initial state and running state If the Androidmanifest.xml files are not the same, it can be rated as 2 points according to the scoring rule in Figure 4 above, and the application to be detected is determined to be the fourth-level malicious application, the user has no uninstall permission, and the content is parsed according to the text. Path to malicious application.
同理的,还可以针对操作系统的待检测应用的配置信息的比对提供另一种具体流程,首先获取第三方应用平台公开的基于上述操作系统开发的应用的Androidmanifest.xml文件,该Androidmanifest.xml文件包含了第三方应用平台公开的基于上述操作系统开发的应用在初始状态下的应用启动进程的配置信息,可在相应的第三方应用平台下载得到;其次,以root权限接入目标Android系统,并获取目标Android系统运行状态下的待检测应用的Androidmanifest.xml文件,该Androidmanifest.xml文件包含了待检测应用在运行状态下的应用启动进程的配置信息;接着,将上述两个Androidmanifest.xml文件比对,解析文件标签,具体为将上述初始状态下和运行状态下的Androidmanifest.xml文件按标签内容进行比对,对标签内容不同的标签下对应的文本内容进行解析,文件的标签有行为(Actions)、命令(Commands)、服务(Services)、选项(Options)等;最后,确定待检测应用的恶意等级以及路径,在上述初始状态下和运行状态下的Androidmanifest.xml文件不相同的情况下,可按照上述图4中的评分规则评为1分,确定待检测应用为第五级恶意应用,用户有卸载权限,并根据文本解析内容逐级跟踪,确定恶意应用的路径。Similarly, another specific process can also be provided for the comparison of the configuration information of the application to be detected in the operating system. First, obtain the Androidmanifest.xml file of the application developed based on the above operating system disclosed by the third-party application platform, the Androidmanifest.xml file. The xml file contains the configuration information of the application startup process in the initial state of the application developed based on the above operating system disclosed by the third-party application platform, which can be downloaded from the corresponding third-party application platform; secondly, access the target Android system with root privileges , and obtain the Androidmanifest.xml file of the application to be detected in the running state of the target Android system, the Androidmanifest.xml file contains the configuration information of the application startup process of the application to be detected in the running state; then, the above two Androidmanifest.xml File comparison, parsing file tags, specifically comparing the Androidmanifest.xml files in the initial state and the running state according to the tag content, parsing the text content corresponding to the tags with different tag content, and the tags of the file have behaviors (Actions), Commands (Commands), Services (Services), Options (Options), etc.; finally, determine the malicious level and path of the application to be detected, in the case that the Androidmanifest.xml file in the above initial state and the running state are different 4, the application to be detected is determined to be a fifth-level malicious application, the user has the permission to uninstall, and the path of the malicious application is determined according to the text analysis content.
上述详细阐述了本申请实施例的方法,下面提供本申请实施例的装置。The methods of the embodiments of the present application are described in detail above, and the apparatuses of the embodiments of the present application are provided below.
请参阅图7,图7为本申请实施例提供的一种恶意应用的检测装置的结构示意图,该恶意应用的检测装置70可以包括获取单元701、比对单元702以及确定单元703,其中,各个单元的描述如下:Please refer to FIG. 7 . FIG. 7 is a schematic structural diagram of an apparatus for detecting malicious applications according to an embodiment of the present application. The apparatus for detecting malicious applications 70 may include an acquiring unit 701 , a comparing unit 702 and a determining unit 703 , wherein each The description of the unit is as follows:
获取单元701,用于获取操作系统的初始信息,其中,所述初始信息包括所述操作系统的合法应用信息或所述操作系统在初始状态下的配置信息,所述初始状态为所述操作系统首次运行前的状态;Obtaining unit 701, configured to obtain initial information of an operating system, wherein the initial information includes legal application information of the operating system or configuration information of the operating system in an initial state, where the initial state is the operating system the state before the first run;
所述获取单元701,还用于获取所述操作系统的运行信息,所述运行信息包括所述操 作系统的待检测应用信息或所述操作系统在运行状态下的配置信息;The obtaining unit 701 is further configured to obtain the operation information of the operating system, the operation information including the application information to be detected of the operating system or the configuration information of the operating system in the running state;
比对单元702,用于将所述合法应用信息与所述待检测应用信息进行比对,或者将所述初始状态下的配置信息与所述运行状态下的配置信息进行比对,得到比对结果;A comparison unit 702, configured to compare the legal application information with the application information to be detected, or compare the configuration information in the initial state with the configuration information in the running state to obtain a comparison result;
确定单元703,用于在所述比对结果不相同的情况下,确定所述操作系统上的待检测应用为恶意应用。The determining unit 703 is configured to determine that the application to be detected on the operating system is a malicious application if the comparison results are different.
在本申请实施例中,基于文本比对技术,将操作系统的配置信息、应用的应用信息作为两项比对内容,给出了一种恶意应用的检测方法。In the embodiment of the present application, based on the text comparison technology, the configuration information of the operating system and the application information of the application are regarded as two comparison contents, and a method for detecting malicious applications is provided.
本申请实施例所提供的恶意应用的检测方法,与目前采用的众多的“检测应用本身”的检测方法相比,能够节省大量的计算和存储资源,提高了检测效率,且对代码发生变化或采用代码混淆、加壳等技术的恶意应用检测仍然有效,提高了检测结果的准确性。The malicious application detection method provided by the embodiments of the present application can save a large amount of computing and storage resources, improve the detection efficiency, and has no effect on code changes or Malicious application detection using techniques such as code obfuscation and packing is still effective, improving the accuracy of detection results.
在一种可能的实施方式中,所述比对单元702,具体用于将所述操作系统在所述初始状态下的配置信息的散列值和所述操作系统在所述运行状态下的配置信息的散列值进行比对。In a possible implementation manner, the comparison unit 702 is specifically configured to compare the hash value of the configuration information of the operating system in the initial state with the configuration of the operating system in the running state The hash value of the information is compared.
在本申请实施例中,采用比对散列值的方法去比对初始状态下的配置信息和运行状态下的配置信息是否相同。将操作系统在初始状态下的配置信息的散列值和操作系统在运行状态下的配置信息的散列值进行比对,配置信息的散列值和该配置信息是一起获取得到的,通过比对两个配置信息的散列值可以使配置信息的接收者确认该配置信息内容的真实性,从而确认上述两个配置信息的内容是否相同,该比对方法有效提高了配置信息比对的效率。In the embodiment of the present application, a method of comparing hash values is used to compare whether the configuration information in the initial state and the configuration information in the running state are the same. Compare the hash value of the configuration information of the operating system in the initial state with the hash value of the configuration information of the operating system in the running state. The hash value of the configuration information and the configuration information are obtained together. The hash value of the two configuration information can enable the receiver of the configuration information to confirm the authenticity of the content of the configuration information, thereby confirming whether the content of the above two configuration information is the same, and the comparison method effectively improves the efficiency of configuration information comparison. .
在一种可能的实施方式中,所述比对单元702,具体还用于将第一配置信息与第二配置信息进行比对,其中,所述第一配置信息为所述操作系统在所述初始状态下的系统启动进程的配置信息,所述第二配置信息为所述操作系统在所述运行状态下的系统启动进程的配置信息;In a possible implementation manner, the comparing unit 702 is further configured to compare the first configuration information with the second configuration information, wherein the first configuration information is the operating system in the The configuration information of the system startup process in the initial state, and the second configuration information is the configuration information of the system startup process of the operating system in the running state;
或者,or,
所述比对单元702,具体还用于将第三配置信息与第四配置信息进行比对,其中,所述第三配置信息为所述操作系统在所述初始状态下的用户登录所述操作系统进程的配置信息,所述第四配置信息为所述操作系统在所述运行状态下的用户登录所述操作系统进程的配置信息。The comparison unit 702 is further configured to compare the third configuration information with the fourth configuration information, wherein the third configuration information is the operation of logging in the user in the initial state of the operating system Configuration information of a system process, and the fourth configuration information is configuration information of a user logging in to the operating system process when the operating system is in the running state.
在该实现方式中,将初始状态下、以及运行状态下的操作系统的系统启动进程的配置信息进行比对,或者,将初始状态下、以及运行状态下的操作系统的用户登录该操作系统进程的配置信息进行比对。通过本实现方式中所描述的内容比对,可以以操作系统的层级为角度,检测操作系统运行机制下的配置信息,对采用隐藏伪装技术处理的高威胁恶意应用的检测依然有效,且提高了检测效率以及检测结果的准确性。In this implementation manner, the configuration information of the system startup process of the operating system in the initial state and in the running state is compared, or the user of the operating system in the initial state and in the running state is logged into the operating system process configuration information for comparison. Through the content comparison described in this implementation, the configuration information under the operating mechanism of the operating system can be detected from the perspective of the operating system level, and the detection of high-threat malicious applications processed by the hidden camouflage technology is still effective, and the improvement is improved. Detection efficiency and accuracy of detection results.
在一种可能的实施方式中,所述比对单元702,具体还用于将所述合法应用信息中的应用名称和所述待检测应用信息中的应用名称进行比对;In a possible implementation manner, the comparing unit 702 is further configured to compare the application name in the legal application information with the application name in the application information to be detected;
或者,or,
所述比对单元702,具体还用于将第五配置信息与第六配置信息进行比对,其中,所述第五配置信息包括所述待检测应用在初始状态下的应用启动进程的配置信息,所述第六配置信息包括所述待检测应用在运行状态下的应用启动进程的配置信息。The comparing unit 702 is further configured to compare the fifth configuration information with the sixth configuration information, wherein the fifth configuration information includes the configuration information of the application startup process of the application to be detected in the initial state , the sixth configuration information includes configuration information of an application startup process of the application to be detected in a running state.
在该实现方式中,将合法应用信息中的应用名称和待检测应用信息中的应用名称进行比对,或者,将初始状态下、以及运行状态下的待检测应用的应用启动进程的配置信息进行比对。通过本实现方式中所描述的内容比对,可以以应用的层级为角度,结合操作系统的运行机制,检测应用在初始状态下的应用启动进程的配置信息和在运行状态下的应用启动进程的配置信息,对采用隐藏伪装技术处理的高威胁恶意应用的检测依然有效,且节省了大量的计算和存储资源,提高了检测效率以及检测结果的准确性。In this implementation manner, the application name in the legal application information and the application name in the application information to be detected are compared, or the configuration information of the application startup process of the application to be detected in the initial state and the running state is compared. Comparison. Through the content comparison described in this implementation, it is possible to detect the configuration information of the application startup process in the initial state and the configuration information of the application startup process in the running state from the perspective of the application level and the operating mechanism of the operating system. The configuration information is still effective for the detection of high-threat malicious applications processed by the hidden camouflage technology, and a lot of computing and storage resources are saved, and the detection efficiency and the accuracy of the detection results are improved.
在一种可能的实施方式中,所述确定单元703,还用于根据所述初始信息和所述运行信息,确定所述待检测应用的恶意等级。In a possible implementation manner, the determining unit 703 is further configured to determine the malicious level of the application to be detected according to the initial information and the running information.
在本申请实施例中,初始信息和运行信息不同,确定待检测应用为恶意应用,以此为前提,依据初始信息和运行信息之间的具体差异,对该待检测应用的恶意等级进行了进一步确定。通过本实现方式,确定待检测应用的恶意等级,可评估该待检测应用对终端设备的威胁程度的高低,进而为后续对该恶意应用采取不同程度的方式降低或解决可能存在的威胁提供了理论依据,提高了应用运行环境的安全性和整体稳定性。In the embodiment of the present application, the initial information and the running information are different, and it is determined that the application to be detected is a malicious application. Based on this premise, the malicious level of the application to be detected is further determined according to the specific difference between the initial information and the running information. Sure. Through this implementation, the malicious level of the application to be detected can be determined, and the degree of threat of the application to be detected to the terminal device can be evaluated, thereby providing a theory for the subsequent reduction or resolution of possible threats to the malicious application in different degrees. Based on this, the security and overall stability of the application operating environment are improved.
在一种可能的实施方式中,所述确定单元703,具体用于在所述第一配置信息和所述第二配置信息不同的情况下,确定所述待检测应用为第一级恶意应用;In a possible implementation manner, the determining unit 703 is specifically configured to determine that the application to be detected is a first-level malicious application when the first configuration information and the second configuration information are different;
所述确定单元703,具体还用于在所述第一配置信息和所述第二配置信息相同、且所述第三配置信息和所述第四配置信息不同的情况下,确定所述待检测应用为第二级恶意应用,其中,所述第二级恶意应用的恶意等级低于所述第一级恶意应用的恶意等级。The determining unit 703 is specifically further configured to determine the to-be-detected when the first configuration information and the second configuration information are the same, and the third configuration information and the fourth configuration information are different The application is a second-level malicious application, wherein the malicious level of the second-level malicious application is lower than the malicious level of the first-level malicious application.
在本申请实施例中,提供了在操作系统层级的信息不同的情况下,确定待检测应用的恶意等级的实现方式。上述第一配置信息和第二配置信息不同时,确定待检测应用为第一级恶意应用,该第一级恶意应用表示恶意程度最高的待检测应用;上述第一配置信息和第二配置信息相同、且上述第三配置信息和第四配置信息不同时,确定该待检测应用为第二级恶意应用,因为操作系统在初始状态下的系统启动进程的配置信息和在运行状态下的系统启动进程的配置信息相同,故该第二级恶意应用表示的恶意等级要低于第一级恶意应用表示的恶意等级。In the embodiment of the present application, an implementation manner of determining the malicious level of the application to be detected under the condition that the information at the operating system level is different is provided. When the first configuration information and the second configuration information are different, it is determined that the application to be detected is a first-level malicious application, and the first-level malicious application represents the application to be detected with the highest degree of maliciousness; the first configuration information and the second configuration information are the same , and when the third configuration information and the fourth configuration information are different, it is determined that the application to be detected is a second-level malicious application, because the configuration information of the system startup process of the operating system in the initial state and the system startup process in the running state The configuration information of the second-level malicious application is the same, so the malicious level expressed by the second-level malicious application is lower than the malicious level expressed by the first-level malicious application.
在一种可能的实施方式中,所述确定单元703,具体还用于在所述第一配置信息和所述第二配置信息相同、所述第三配置信息和所述第四配置信息相同、且所述合法应用信息中的应用名称和所述待检测应用信息中的应用名称不同的情况下,确定所述待检测应用为第三级恶意应用,其中,所述第三级恶意应用的恶意等级低于所述第二级恶意应用的恶意等级。In a possible implementation manner, the determining unit 703 is further configured to, specifically, when the first configuration information and the second configuration information are the same, the third configuration information and the fourth configuration information are the same, And when the application name in the legitimate application information and the application name in the application information to be detected are different, it is determined that the application to be detected is a third-level malicious application, wherein the malicious application of the third-level malicious application is The level is lower than the malicious level of the second-level malicious application.
在本申请实施例中,提供了在应用层级的信息不同的情况下,确定待检测应用的恶意等级的实现方式。上述第一配置信息和第二配置信息相同、上述第三配置信息和第四配置信息相同、且合法应用信息中的应用名称和待检测应用信息中的应用名称不同时,确定该待检测应用为第三级恶意应用,因为操作系统在初始状态下的系统启动进程的配置信息和在运行状态下的系统启动进程的配置信息相同、且操作系统在初始状态下的用户登录操作系统进程的配置信息和操作系统在运行状态下的用户登录操作系统进程的配置信息相同,故该第三级恶意应用表示的恶意等级要低于第二级恶意应用、第一级恶意应用表示的恶意等级。In the embodiment of the present application, an implementation manner of determining the malicious level of the application to be detected under the condition of different application-level information is provided. When the first configuration information and the second configuration information are the same, the third configuration information and the fourth configuration information are the same, and the application name in the legal application information and the application name in the application information to be detected are different, it is determined that the application to be detected is The third-level malicious application is because the configuration information of the system startup process in the initial state of the operating system is the same as the configuration information of the system startup process in the running state, and the configuration information of the user logging in to the operating system process in the initial state of the operating system The configuration information of the user logging in to the operating system process when the operating system is running is the same, so the malicious level represented by the third-level malicious application is lower than the malicious level represented by the second-level malicious application and the first-level malicious application.
在一种可能的实施方式中,所述确定单元703,具体还用于在所述第一配置信息和所述第二配置信息相同、所述第三配置信息和所述第四配置信息相同、所述合法应用信息中的应用名称和所述待检测应用信息中的应用名称相同、且所述第五配置信息和所述第六配置信息不同的情况下,确定所述待检测应用为第四级恶意应用,其中,所述第四级恶意应用的恶意等级低于所述第三级恶意应用的恶意等级。In a possible implementation manner, the determining unit 703 is further configured to, specifically, when the first configuration information and the second configuration information are the same, the third configuration information and the fourth configuration information are the same, In the case where the application name in the legal application information and the application name in the application information to be detected are the same, and the fifth configuration information and the sixth configuration information are different, it is determined that the application to be detected is the fourth configuration information. level malicious application, wherein the malicious level of the fourth level malicious application is lower than the malicious level of the third level malicious application.
在本申请实施例中,提供了在应用层级的信息不同的情况下,确定待检测应用的恶意等级的另一种实现方式。上述第一配置信息和第二配置信息相同、上述第三配置信息和第四配置信息相同,合法应用信息中的应用名称和待检测应用信息中的应用名称相同、且上述第五配置信息和第六配置信息不同时,确定该待检测应用为第四级恶意应用,因为操作系统在初始状态下的系统启动进程的配置信息和在运行状态下的系统启动进程的配置信息相同、操作系统在初始状态下的用户登录操作系统进程的配置信息和操作系统在运行状态下的用户登录操作系统进程的配置信息相同、且合法应用信息中的应用名称和待检测应用信息中的应用名称相同,故该第四级恶意应用表示的恶意等级要低于第三级恶意应用、第二级恶意应用、第一级恶意应用表示的恶意等级。In the embodiment of the present application, another implementation manner of determining the malicious level of the application to be detected under the condition of different application-level information is provided. The above-mentioned first configuration information is the same as the second configuration information, the above-mentioned third configuration information is the same as the fourth configuration information, the application name in the legal application information is the same as the application name in the application information to be detected, and the above-mentioned fifth configuration information and the third configuration information are the same. Sixth, when the configuration information is different, it is determined that the application to be detected is a fourth-level malicious application, because the configuration information of the system startup process of the operating system in the initial state is the same as that of the system startup process in the running state, and the operating system is in the initial state. The configuration information of the user logging in to the operating system process in the state is the same as the configuration information of the user logging in to the operating system process in the running state of the operating system, and the application name in the legal application information and the application name in the application information to be detected are the same. The malicious level represented by the fourth-level malicious application is lower than the malicious level represented by the third-level malicious application, the second-level malicious application, and the first-level malicious application.
在一种可能的实施方式中,所述操作系统包括采用Linux内核的系统。In a possible implementation, the operating system includes a system using the Linux kernel.
在本申请实施例中,操作系统包括了采用Linux内核的系统,采用Linux内核的系统启动的第一个进程一般是init进程,其进程的配置信息通常存储在init.rc文件中,因此,采用Linux内核的系统都适用于本申请实施例所描述的恶意应用的检测方法。In the embodiment of the present application, the operating system includes a system using the Linux kernel, the first process started by the system using the Linux kernel is generally the init process, and the configuration information of the process is usually stored in the init.rc file. Therefore, using The Linux kernel systems are all applicable to the malicious application detection methods described in the embodiments of this application.
在一种可能的实施方式中,所述确定单元703,还用于根据所述初始信息和所述运行信息,确定所述待检测应用的存储路径。In a possible implementation manner, the determining unit 703 is further configured to determine the storage path of the application to be detected according to the initial information and the running information.
在本申请实施例中,初始信息和运行信息不同,确定待检测应用为恶意应用,以此为前提,依据初始信息和运行信息之间的具体差异,对该待检测应用的存储路径进行了进一步确定。在上述第一配置信息和上述第二配置信息不同的情况下,解析第一配置信息的标签和第二配置信息的标签,得到第一配置信息的标签内容和第二配置信息的标签内容,将第一配置信息的标签内容和第二配置信息的标签内容比对,依据二者内容上的差异确定待检测应用的存储路径。同理,在上述第三配置信息和上述第四配置信息不同的情况下,解析第三配置信息的标签和第四配置信息的标签,得到第三配置信息的标签内容和第四配置信息的标签内容,将第三配置信息的标签内容和第四配置信息的标签内容比对,依据二者内容上的差异确定待检测应用的存储路径。在上述第五配置信息和上述第六配置信息不同的情况下,解析第五配置信息的标签和第六配置信息的标签,得到第五配置信息的标签内容和第六配置信息的标签内容,将第五配置信息的标签内容和第六配置信息的标签内容比对,依据二者内容上的差异确定待检测应用的存储路径。通过本实现方式中的确定存储路径的方法,可以快速确定恶意应用的存储路径,后续可根据存储路径对恶意应用进行相应的处理,如根据存储路径对恶意应用进行卸载、限制相应的权限获取等处理,提高操作系统运行环境的安全性。In the embodiment of the present application, the initial information and the running information are different, and it is determined that the application to be detected is a malicious application. On this premise, according to the specific difference between the initial information and the running information, the storage path of the application to be detected is further analyzed. Sure. In the case where the first configuration information and the second configuration information are different, the label of the first configuration information and the label of the second configuration information are parsed to obtain the label content of the first configuration information and the label content of the second configuration information, and the The content of the tag of the first configuration information is compared with the content of the tag of the second configuration information, and the storage path of the application to be detected is determined according to the difference in content between the two. Similarly, in the case where the third configuration information and the fourth configuration information are different, the label of the third configuration information and the label of the fourth configuration information are parsed to obtain the content of the label of the third configuration information and the label of the fourth configuration information. content, the content of the tag of the third configuration information is compared with the content of the tag of the fourth configuration information, and the storage path of the application to be detected is determined according to the difference in the content of the two. In the case where the fifth configuration information and the sixth configuration information are different, the label of the fifth configuration information and the label of the sixth configuration information are analyzed to obtain the label content of the fifth configuration information and the label content of the sixth configuration information, and the The content of the tag of the fifth configuration information is compared with the content of the tag of the sixth configuration information, and the storage path of the application to be detected is determined according to the difference in content between the two. Through the method of determining the storage path in this implementation, the storage path of the malicious application can be quickly determined, and the malicious application can be processed accordingly according to the storage path, such as uninstalling the malicious application according to the storage path, restricting the acquisition of corresponding permissions, etc. processing to improve the security of the operating system operating environment.
根据本申请实施例,图7所示的装置中的各个单元可以分别或全部合并为一个或若干个另外的单元来构成,或者其中的某个(些)单元还可以再拆分为功能上更小的多个单元来构成,这可以实现同样的操作,而不影响本申请的实施例的技术效果的实现。上述单元 是基于逻辑功能划分的,在实际应用中,一个单元的功能也可以由多个单元来实现,或者多个单元的功能由一个单元实现。在本申请的其它实施例中,基于网络设备也可以包括其它单元,在实际应用中,这些功能也可以由其它单元协助实现,并且可以由多个单元协作实现。According to the embodiment of the present application, each unit in the apparatus shown in FIG. 7 may be combined into one or several other units, respectively or all, to form, or some unit(s) may be further split into functionally more The same operation can be achieved without affecting the realization of the technical effects of the embodiments of the present application. The above units are divided based on logical functions. In practical applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the network-based device may also include other units, and in practical applications, these functions may also be implemented with the assistance of other units, and may be implemented by cooperation of multiple units.
需要说明的是,各个单元的实现还可以对应参照图3、图4、图5、图6所示的方法实施例的相应描述。It should be noted that, the implementation of each unit may also correspond to the corresponding descriptions of the method embodiments shown in FIG. 3 , FIG. 4 , FIG. 5 , and FIG. 6 .
在图7所描述的恶意应用的检测装置70中,通过文本比对技术,将操作系统在初始状态下的配置信息和在运行状态下的配置信息进行比对,以及将操作系统的合法应用信息和待检测应用信息进行比对,从而对待检测应用的安全性进行检测,并评估待检测应用的恶意等级,能够节省大量的计算和存储资源,提高检测效率,且对代码发生变化或采用代码混淆、加壳等技术的恶意应用检测仍有效,提高检测结果的准确性。In the malicious application detection device 70 described in FIG. 7 , the configuration information of the operating system in the initial state and the configuration information in the running state are compared through the text comparison technology, and the legitimate application information of the operating system is compared. Compare with the information of the application to be detected, so as to detect the security of the application to be detected, and evaluate the malicious level of the application to be detected, which can save a lot of computing and storage resources, improve the detection efficiency, and change the code or use code obfuscation. , Packing and other malicious application detection techniques are still effective, improving the accuracy of detection results.
请参阅图8,图8为本申请实施例提供的一种终端设备80的结构示意图。该终端设备80可以包括存储器801、处理器802。进一步可选的,还可以包含通信接口803以及总线804,其中,存储器801、处理器802以及通信接口803通过总线804实现彼此之间的通信连接。通信接口803用于与上述恶意应用的检测装置70进行数据交互。Please refer to FIG. 8 , which is a schematic structural diagram of a terminal device 80 according to an embodiment of the present application. The terminal device 80 may include a memory 801 and a processor 802 . Further optionally, a communication interface 803 and a bus 804 may also be included, wherein the memory 801 , the processor 802 and the communication interface 803 are communicated with each other through the bus 804 . The communication interface 803 is used for data interaction with the above-mentioned malicious application detection device 70 .
其中,存储器801用于提供存储空间,存储空间中可以存储操作系统和计算机程序等数据。存储器801包括但不限于是随机存储记忆体(random access memory,RAM)、只读存储器(read-only memory,ROM)、可擦除可编程只读存储器(erasable programmable read only memory,EPROM)、或便携式只读存储器(compact disc read-only memory,CD-ROM)。Among them, the memory 801 is used to provide a storage space, and data such as an operating system and a computer program can be stored in the storage space. The memory 801 includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM), or Portable read-only memory (compact disc read-only memory, CD-ROM).
处理器802是进行算术运算和逻辑运算的模块,可以是中央处理器(central processing unit,CPU)、显卡处理器(graphics processing unit,GPU)或微处理器(microprocessor unit,MPU)等处理模块中的一种或者多种的组合。The processor 802 is a module that performs arithmetic operations and logical operations, and can be a processing module such as a central processing unit (CPU), a graphics processing unit (GPU), or a microprocessor (microprocessor unit, MPU). of one or more combinations.
存储器801中存储有计算机程序,处理器802调用存储器801中存储的计算机程序,以执行上述图3、图4、图5、图6所示的恶意应用的检测方法:A computer program is stored in the memory 801, and the processor 802 calls the computer program stored in the memory 801 to execute the malicious application detection method shown in the above-mentioned FIG. 3, FIG. 4, FIG. 5, and FIG. 6:
获取操作系统的初始信息,其中,所述初始信息包括所述操作系统的合法应用信息或所述操作系统在初始状态下的配置信息,所述初始状态为所述操作系统首次运行前的状态;Obtain initial information of the operating system, wherein the initial information includes legal application information of the operating system or configuration information of the operating system in an initial state, and the initial state is the state before the operating system runs for the first time;
获取所述操作系统的运行信息,所述运行信息包括所述操作系统的待检测应用信息或所述操作系统在运行状态下的配置信息;Acquire operating information of the operating system, where the operating information includes application information to be detected of the operating system or configuration information of the operating system in a running state;
将所述合法应用信息与所述待检测应用信息进行比对,或者将所述初始状态下的配置信息与所述运行状态下的配置信息进行比对,得到比对结果;Comparing the legal application information with the application information to be detected, or comparing the configuration information in the initial state with the configuration information in the running state, to obtain a comparison result;
在所述比对结果不相同的情况下,确定所述操作系统上的待检测应用为恶意应用。In the case that the comparison results are not the same, it is determined that the application to be detected on the operating system is a malicious application.
上述处理器802执行方法的具体内容可参阅图3、图4、图5、图6,此处不再赘述。The specific content of the method executed by the processor 802 can be referred to FIG. 3 , FIG. 4 , FIG. 5 , and FIG. 6 , and details are not repeated here.
相应的,处理器802调用存储器801中存储的计算机程序,还可以用于执行上述图7所示的恶意应用的检测装置70中的获取单元701、比对单元702以及确定单元703所执行的方法步骤,其具体内容可参阅图7,此处不再赘述。Correspondingly, the processor 802 calls the computer program stored in the memory 801, and can also be used to execute the method executed by the obtaining unit 701, the comparing unit 702 and the determining unit 703 in the malicious application detection device 70 shown in FIG. The specific content of the steps can be found in FIG. 7 , which will not be repeated here.
在图8所描述的终端设备80中,通过文本比对技术,将操作系统在初始状态下的配置信息和在运行状态下的配置信息进行比对,以及将操作系统的合法应用信息和待检测应用 信息进行比对,从而对待检测应用的安全性进行检测,并评估待检测应用的恶意等级,能够节省大量的计算和存储资源,提高检测效率,且对代码发生变化或采用代码混淆、加壳等技术的恶意应用检测仍有效,提高检测结果的准确性。In the terminal device 80 described in FIG. 8 , the configuration information of the operating system in the initial state and the configuration information in the running state are compared through the text comparison technology, and the legal application information of the operating system is compared with the information to be detected. The application information is compared, so as to detect the security of the application to be detected, and evaluate the malicious level of the application to be detected, which can save a lot of computing and storage resources, improve the detection efficiency, and the code changes or code obfuscation, packing The malicious application detection of other technologies is still effective, and the accuracy of the detection results is improved.
本申请实施例还提供一种计算机可读存储介质,上述计算机可读存储介质中存储有计算机程序,当上述计算机程序在一个或多个处理器上运行时,可以实现图3、图4、图5以及图6所示的方法。Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium. When the computer program is executed on one or more processors, the computer program shown in FIG. 3 , FIG. 4 , and FIG. 5 and the method shown in Figure 6.
本申请实施例还提供一种计算机程序产品,当上述计算机程序产品在处理器上运行时,可以实现图3、图4、图5以及图6所示的方法。An embodiment of the present application further provides a computer program product, which can implement the methods shown in FIG. 3 , FIG. 4 , FIG. 5 , and FIG. 6 when the computer program product is executed on the processor.
综上上述,通过文本比对技术,将操作系统在初始状态下的配置信息和在运行状态下的配置信息进行比对,以及将操作系统的合法应用信息和待检测应用信息进行比对,从而对待检测应用的安全性进行检测,并评估待检测应用的恶意等级,能够节省大量的计算和存储资源,提高检测效率,且对代码发生变化或采用代码混淆、加壳等技术的恶意应用检测仍有效,提高检测结果的准确性。In summary, through the text comparison technology, the configuration information of the operating system in the initial state is compared with the configuration information in the running state, and the legal application information of the operating system and the application information to be detected are compared, so as to Detecting the security of the application to be detected and evaluating the malicious level of the application to be detected can save a lot of computing and storage resources and improve the detection efficiency. Effective and improve the accuracy of detection results.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序相关的硬件完成,该计算机程序可存储于计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:只读存储器ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储计算机程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented, and the processes can be completed by hardware related to a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed , which may include the processes of the foregoing method embodiments. The aforementioned storage medium includes: read-only memory ROM or random-access storage memory RAM, magnetic disk or optical disk and other media that can store computer program codes.

Claims (19)

  1. 一种恶意应用的检测方法,其特征在于,包括:A method for detecting malicious applications, comprising:
    获取操作系统的初始信息,其中,所述初始信息包括所述操作系统的合法应用信息或所述操作系统在初始状态下的配置信息,所述初始状态为所述操作系统首次运行前的状态;Obtain initial information of the operating system, wherein the initial information includes legal application information of the operating system or configuration information of the operating system in an initial state, and the initial state is the state before the operating system runs for the first time;
    获取所述操作系统的运行信息,所述运行信息包括所述操作系统的待检测应用信息或所述操作系统在运行状态下的配置信息;Acquire operating information of the operating system, where the operating information includes application information to be detected of the operating system or configuration information of the operating system in a running state;
    将所述合法应用信息与所述待检测应用信息进行比对,或者将所述初始状态下的配置信息与所述运行状态下的配置信息进行比对,得到比对结果;Comparing the legal application information with the application information to be detected, or comparing the configuration information in the initial state with the configuration information in the running state, to obtain a comparison result;
    在所述比对结果不相同的情况下,确定所述操作系统上的待检测应用为恶意应用。In the case that the comparison results are not the same, it is determined that the application to be detected on the operating system is a malicious application.
  2. 根据权利要求1所述的检测方法,其特征在于,所述将所述初始状态下的配置信息与所述运行状态下的配置信息进行比对,具体包括:The detection method according to claim 1, wherein the comparing the configuration information in the initial state with the configuration information in the running state specifically includes:
    将所述操作系统在所述初始状态下的配置信息的散列值和所述操作系统在所述运行状态下的配置信息的散列值进行比对。The hash value of the configuration information of the operating system in the initial state is compared with the hash value of the configuration information of the operating system in the running state.
  3. 根据权利要求1或2所述的检测方法,其特征在于,所述将所述初始状态下的配置信息与所述运行状态下的配置信息进行比对,具体包括:The detection method according to claim 1 or 2, wherein the comparing the configuration information in the initial state with the configuration information in the running state specifically includes:
    将第一配置信息与第二配置信息进行比对,其中,所述第一配置信息为所述操作系统在所述初始状态下的系统启动进程的配置信息,所述第二配置信息为所述操作系统在所述运行状态下的系统启动进程的配置信息;Compare the first configuration information with the second configuration information, where the first configuration information is the configuration information of the system startup process of the operating system in the initial state, and the second configuration information is the Configuration information of the system startup process of the operating system in the running state;
    或者,or,
    将第三配置信息与第四配置信息进行比对,其中,所述第三配置信息为所述操作系统在所述初始状态下的用户登录所述操作系统进程的配置信息,所述第四配置信息为所述操作系统在所述运行状态下的用户登录所述操作系统进程的配置信息。Comparing the third configuration information with the fourth configuration information, wherein the third configuration information is the configuration information of the user logging in to the operating system process in the initial state of the operating system, and the fourth configuration information The information is configuration information of a user logging in to the operating system process when the operating system is in the running state.
  4. 根据权利要求1-3中任一项所述的检测方法,其特征在于,所述将所述合法应用信息与所述待检测应用信息进行比对,具体包括:The detection method according to any one of claims 1-3, wherein the comparing the legal application information with the application information to be detected specifically includes:
    将所述合法应用信息中的应用名称和所述待检测应用信息中的应用名称进行比对;Compare the application name in the legal application information with the application name in the application information to be detected;
    或者,or,
    将第五配置信息与第六配置信息进行比对,其中,所述第五配置信息包括所述待检测应用在初始状态下的应用启动进程的配置信息,所述第六配置信息包括所述待检测应用在运行状态下的应用启动进程的配置信息。Compare the fifth configuration information with the sixth configuration information, where the fifth configuration information includes configuration information of an application startup process of the application to be detected in an initial state, and the sixth configuration information includes the application startup process of the application to be detected. Detects the configuration information of the application startup process when the application is running.
  5. 根据权利要求1-4中任一项所述的检测方法,其特征在于,所述检测方法还包括:The detection method according to any one of claims 1-4, wherein the detection method further comprises:
    根据所述初始信息和所述运行信息,确定所述待检测应用的恶意等级。According to the initial information and the running information, the malicious level of the application to be detected is determined.
  6. 根据权利要求5所述的检测方法,其特征在于,所述根据所述初始信息和所述运行信息,确定所述待检测应用的恶意等级,具体包括:The detection method according to claim 5, wherein the determining the malicious level of the application to be detected according to the initial information and the running information specifically includes:
    在所述第一配置信息和所述第二配置信息不同的情况下,确定所述待检测应用为第一级恶意应用;In the case that the first configuration information and the second configuration information are different, determine that the application to be detected is a first-level malicious application;
    在所述第一配置信息和所述第二配置信息相同、且所述第三配置信息和所述第四配置信息不同的情况下,确定所述待检测应用为第二级恶意应用,其中,所述第二级恶意应用的恶意等级低于所述第一级恶意应用的恶意等级。In the case that the first configuration information and the second configuration information are the same, and the third configuration information and the fourth configuration information are different, it is determined that the application to be detected is a second-level malicious application, wherein, The malicious level of the second-level malicious application is lower than the malicious level of the first-level malicious application.
  7. 根据权利要求6所述的检测方法,其特征在于,所述根据所述初始信息和所述运行信息,确定所述待检测应用的恶意等级,具体包括:The detection method according to claim 6, wherein the determining the malicious level of the application to be detected according to the initial information and the running information specifically includes:
    在所述第一配置信息和所述第二配置信息相同、所述第三配置信息和所述第四配置信息相同、且所述合法应用信息中的应用名称和所述待检测应用信息中的应用名称不同的情况下,确定所述待检测应用为第三级恶意应用,其中,所述第三级恶意应用的恶意等级低于所述第二级恶意应用的恶意等级。The first configuration information is the same as the second configuration information, the third configuration information is the same as the fourth configuration information, and the application name in the legal application information is the same as the application name in the application information to be detected. In the case of different application names, it is determined that the application to be detected is a third-level malicious application, wherein the malicious level of the third-level malicious application is lower than the malicious level of the second-level malicious application.
  8. 根据权利要求7所述的检测方法,其特征在于,所述根据所述初始信息和所述运行信息,确定所述待检测应用的恶意等级,具体包括:The detection method according to claim 7, wherein the determining the malicious level of the application to be detected according to the initial information and the running information specifically includes:
    在所述第一配置信息和所述第二配置信息相同、所述第三配置信息和所述第四配置信息相同、所述合法应用信息中的应用名称和所述待检测应用信息中的应用名称相同、且所述第五配置信息和所述第六配置信息不同的情况下,确定所述待检测应用为第四级恶意应用,其中,所述第四级恶意应用的恶意等级低于所述第三级恶意应用的恶意等级。When the first configuration information is the same as the second configuration information, the third configuration information is the same as the fourth configuration information, the application name in the legal application information and the application to be detected information In the case where the names are the same and the fifth configuration information and the sixth configuration information are different, determine that the application to be detected is a fourth-level malicious application, where the malicious level of the fourth-level malicious application is lower than the The malicious level of the third-level malicious application.
  9. 一种恶意应用的检测装置,其特征在于,包括:A detection device for malicious applications, comprising:
    获取单元,用于获取操作系统的初始信息,其中,所述初始信息包括所述操作系统的合法应用信息或所述操作系统在初始状态下的配置信息,所述初始状态为所述操作系统首次运行前的状态;an acquisition unit, configured to acquire initial information of the operating system, wherein the initial information includes legal application information of the operating system or configuration information of the operating system in an initial state, where the initial state is the first time the operating system state before operation;
    所述获取单元,还用于获取所述操作系统的运行信息,所述运行信息包括所述操作系统的待检测应用信息或所述操作系统在运行状态下的配置信息;The obtaining unit is further configured to obtain operation information of the operating system, where the operation information includes application information to be detected of the operating system or configuration information of the operating system in a running state;
    比对单元,用于将所述合法应用信息与所述待检测应用信息进行比对,或者将所述初始状态下的配置信息与所述运行状态下的配置信息进行比对,得到比对结果;A comparison unit, configured to compare the legal application information with the application information to be detected, or compare the configuration information in the initial state with the configuration information in the running state to obtain a comparison result ;
    确定单元,用于在所述比对结果不相同的情况下,确定所述操作系统上的待检测应用为恶意应用。A determining unit, configured to determine that the application to be detected on the operating system is a malicious application if the comparison results are different.
  10. 根据权利要求9所述的检测装置,其特征在于,所述比对单元,具体用于将所述操作系统在所述初始状态下的配置信息的散列值和所述操作系统在所述运行状态下的配置信息的散列值进行比对。The detection device according to claim 9, wherein the comparison unit is specifically configured to compare the hash value of the configuration information of the operating system in the initial state with the operating system in the running The hash value of the configuration information in the state is compared.
  11. 根据权利要求9或10所述的检测装置,其特征在于,所述比对单元,具体还用于将第一配置信息与第二配置信息进行比对,其中,所述第一配置信息为所述操作系统在所述初始状态下的系统启动进程的配置信息,所述第二配置信息为所述操作系统在所述运行 状态下的系统启动进程的配置信息;The detection device according to claim 9 or 10, wherein the comparison unit is further configured to compare the first configuration information with the second configuration information, wherein the first configuration information is the the configuration information of the system startup process of the operating system in the initial state, and the second configuration information is the configuration information of the system startup process of the operating system in the running state;
    或者,or,
    所述比对单元,具体还用于将第三配置信息与第四配置信息进行比对,其中,所述第三配置信息为所述操作系统在所述初始状态下的用户登录所述操作系统进程的配置信息,所述第四配置信息为所述操作系统在所述运行状态下的用户登录所述操作系统进程的配置信息。The comparison unit is further configured to compare the third configuration information with the fourth configuration information, wherein the third configuration information is that the user of the operating system in the initial state logs in to the operating system configuration information of a process, and the fourth configuration information is configuration information of a user logging in to the operating system process when the operating system is in the running state.
  12. 根据权利要求9-11中任一项所述的检测装置,其特征在于,所述比对单元,具体还用于将所述合法应用信息中的应用名称和所述待检测应用信息中的应用名称进行比对;The detection device according to any one of claims 9-11, wherein the comparison unit is further configured to compare the application name in the legal application information with the application in the application information to be detected name comparison;
    或者,or,
    所述比对单元,具体还用于将第五配置信息与第六配置信息进行比对,其中,所述第五配置信息包括所述待检测应用在初始状态下的应用启动进程的配置信息,所述第六配置信息包括所述待检测应用在运行状态下的应用启动进程的配置信息。The comparison unit is further configured to compare the fifth configuration information with the sixth configuration information, wherein the fifth configuration information includes the configuration information of the application startup process of the application to be detected in the initial state, The sixth configuration information includes configuration information of an application startup process of the application to be detected in a running state.
  13. 根据权利要求9-12中任一项所述的检测装置,其特征在于,所述确定单元,还用于根据所述初始信息和所述运行信息,确定所述待检测应用的恶意等级。The detection device according to any one of claims 9-12, wherein the determining unit is further configured to determine the malicious level of the application to be detected according to the initial information and the running information.
  14. 根据权利要求13所述的检测装置,其特征在于,所述确定单元,具体用于在所述第一配置信息和所述第二配置信息不同的情况下,确定所述待检测应用为第一级恶意应用;The detection device according to claim 13, wherein the determining unit is specifically configured to determine that the application to be detected is the first application when the first configuration information and the second configuration information are different malicious applications;
    所述确定单元,具体还用于在所述第一配置信息和所述第二配置信息相同、且所述第三配置信息和所述第四配置信息不同的情况下,确定所述待检测应用为第二级恶意应用,其中,所述第二级恶意应用的恶意等级低于所述第一级恶意应用的恶意等级。The determining unit is further configured to determine the application to be detected when the first configuration information and the second configuration information are the same and the third configuration information and the fourth configuration information are different is a second-level malicious application, wherein the malicious level of the second-level malicious application is lower than the malicious level of the first-level malicious application.
  15. 根据权利要求14所述的检测装置,其特征在于,所述确定单元,具体还用于在所述第一配置信息和所述第二配置信息相同、所述第三配置信息和所述第四配置信息相同、且所述合法应用信息中的应用名称和所述待检测应用信息中的应用名称不同的情况下,确定所述待检测应用为第三级恶意应用,其中,所述第三级恶意应用的恶意等级低于所述第二级恶意应用的恶意等级。The detection device according to claim 14, wherein the determining unit is further configured to determine when the first configuration information and the second configuration information are the same, and the third configuration information and the fourth configuration information are the same. When the configuration information is the same and the application name in the legal application information and the application name in the application information to be detected are different, it is determined that the application to be detected is a third-level malicious application, wherein the third-level malicious application The malicious level of the malicious application is lower than the malicious level of the second-level malicious application.
  16. 根据权利要求15所述的检测装置,其特征在于,所述确定单元,具体还用于在所述第一配置信息和所述第二配置信息相同、所述第三配置信息和所述第四配置信息相同、所述合法应用信息中的应用名称和所述待检测应用信息中的应用名称相同、且所述第五配置信息和所述第六配置信息不同的情况下,确定所述待检测应用为第四级恶意应用,其中,所述第四级恶意应用的恶意等级低于所述第三级恶意应用的恶意等级。The detection device according to claim 15, wherein the determining unit is further configured to determine when the first configuration information and the second configuration information are the same, and the third configuration information and the fourth configuration information are the same. When the configuration information is the same, the application name in the legal application information and the application name in the application information to be detected are the same, and the fifth configuration information and the sixth configuration information are different, determine the to-be-detected The application is a fourth-level malicious application, wherein the malicious level of the fourth-level malicious application is lower than the malicious level of the third-level malicious application.
  17. 一种恶意应用的检测装置,其特征在于,包括:处理器和存储器;A device for detecting malicious applications, comprising: a processor and a memory;
    所述存储器用于存储计算机执行指令;the memory is used to store computer-executable instructions;
    所述处理器用于执行所述存储器所存储的计算机执行指令,以使所述应用检测装置执 行如权利要求1-8中任一项所述的方法。The processor is configured to execute computer-implemented instructions stored in the memory to cause the application detection apparatus to perform the method of any one of claims 1-8.
  18. 一种计算机可读存储介质,其特征在于,包括:A computer-readable storage medium, comprising:
    所述计算机可读存储介质用于存储指令或计算机程序;当所述指令或所述计算机程序被执行时,使如权利要求1-8中任一项所述的方法被实现。The computer-readable storage medium is used to store instructions or a computer program; when the instructions or the computer program are executed, the method according to any one of claims 1-8 is implemented.
  19. 一种计算机程序产品,其特征在于,包括:指令或计算机程序;A computer program product, characterized in that it includes: an instruction or a computer program;
    所述指令或所述计算机程序被执行时,使如权利要求1-8中任一项所述的方法被实现。The instructions or the computer program, when executed, cause the method of any of claims 1-8 to be implemented.
PCT/CN2020/137660 2020-12-18 2020-12-18 Malicious application detection method and apparatus, and storage medium WO2022126616A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080004482.1A CN112689835A (en) 2020-12-18 2020-12-18 Malicious application detection method and device and storage medium
PCT/CN2020/137660 WO2022126616A1 (en) 2020-12-18 2020-12-18 Malicious application detection method and apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/137660 WO2022126616A1 (en) 2020-12-18 2020-12-18 Malicious application detection method and apparatus, and storage medium

Publications (1)

Publication Number Publication Date
WO2022126616A1 true WO2022126616A1 (en) 2022-06-23

Family

ID=75457656

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/137660 WO2022126616A1 (en) 2020-12-18 2020-12-18 Malicious application detection method and apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN112689835A (en)
WO (1) WO2022126616A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080016339A1 (en) * 2006-06-29 2008-01-17 Jayant Shukla Application Sandbox to Detect, Remove, and Prevent Malware
WO2013166126A1 (en) * 2012-05-01 2013-11-07 Taasera, Inc. Systems and methods for providing mobile security based on dynamic attestation
US20150256552A1 (en) * 2014-03-04 2015-09-10 Electronics And Telecommunications Research Institute Imalicious code detection apparatus and method
CN110737887A (en) * 2019-10-22 2020-01-31 厦门美图之家科技有限公司 Malicious code detection method and device, electronic equipment and storage medium
CN111027070A (en) * 2019-12-02 2020-04-17 厦门大学 Malicious application detection method, medium, device and apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503555A (en) * 2016-10-21 2017-03-15 维沃移动通信有限公司 A kind of method for ensureing safety of payment and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080016339A1 (en) * 2006-06-29 2008-01-17 Jayant Shukla Application Sandbox to Detect, Remove, and Prevent Malware
WO2013166126A1 (en) * 2012-05-01 2013-11-07 Taasera, Inc. Systems and methods for providing mobile security based on dynamic attestation
US20150256552A1 (en) * 2014-03-04 2015-09-10 Electronics And Telecommunications Research Institute Imalicious code detection apparatus and method
CN110737887A (en) * 2019-10-22 2020-01-31 厦门美图之家科技有限公司 Malicious code detection method and device, electronic equipment and storage medium
CN111027070A (en) * 2019-12-02 2020-04-17 厦门大学 Malicious application detection method, medium, device and apparatus

Also Published As

Publication number Publication date
CN112689835A (en) 2021-04-20

Similar Documents

Publication Publication Date Title
US11687653B2 (en) Methods and apparatus for identifying and removing malicious applications
KR101238572B1 (en) Automatic update of computer-readable components to support a trusted environment
US8191147B1 (en) Method for malware removal based on network signatures and file system artifacts
US20100037317A1 (en) Mehtod and system for security monitoring of the interface between a browser and an external browser module
US20100306851A1 (en) Method and apparatus for preventing a vulnerability of a web browser from being exploited
Jo et al. Vulnerabilities of android OS-based telematics system
WO2010053739A2 (en) Method and system for restricting file access in a computer system
US9747449B2 (en) Method and device for preventing application in an operating system from being uninstalled
EP3583536B1 (en) Securely defining operating system composition without multiple authoring
Mandal et al. Vulnerability analysis of android auto infotainment apps
CA2674327C (en) Exploit nonspecific host intrusion prevention/detection methods and systems and smart filters therefor
CN111177665B (en) Safety tracing method for newly generated executable file
CN108028843B (en) Method, system and computing device for securing delivery of computer-implemented functionality
CN114282212A (en) Rogue software identification method and device, electronic equipment and storage medium
US9507621B1 (en) Signature-based detection of kernel data structure modification
WO2022126616A1 (en) Malicious application detection method and apparatus, and storage medium
CN116595523A (en) Multi-engine file detection method, system, equipment and medium based on dynamic arrangement
CN113779576A (en) Identification method and device for executable file infected virus and electronic equipment
CN112905534B (en) Sample analysis method and device based on sandbox environment
Eriksson et al. On the road with third-party apps-Security, safety and privacy aspects of in-vehicle apps
CN107346389B (en) Method and system for detecting abnormal behavior of mobile terminal
CN113901483A (en) Application detection method and device, computer storage medium and electronic equipment
CN115712876A (en) Installation package intercepting method and device, electronic equipment and computer readable storage medium
Zhan et al. DroidExaminer: An Android Malware Hybrid Detection System Based on Ensemble Learning
CN117633789A (en) Security detection method, device, equipment and storage medium for application 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: 20965631

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

Country of ref document: EP

Kind code of ref document: A1