WO2017114341A1 - 一种root病毒清理方法、装置及电子设备 - Google Patents

一种root病毒清理方法、装置及电子设备 Download PDF

Info

Publication number
WO2017114341A1
WO2017114341A1 PCT/CN2016/112036 CN2016112036W WO2017114341A1 WO 2017114341 A1 WO2017114341 A1 WO 2017114341A1 CN 2016112036 W CN2016112036 W CN 2016112036W WO 2017114341 A1 WO2017114341 A1 WO 2017114341A1
Authority
WO
WIPO (PCT)
Prior art keywords
root
file
virus
feature
intrusion
Prior art date
Application number
PCT/CN2016/112036
Other languages
English (en)
French (fr)
Inventor
袁国庆
Original Assignee
北京金山安全软件有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京金山安全软件有限公司 filed Critical 北京金山安全软件有限公司
Priority to US16/066,040 priority Critical patent/US10878094B2/en
Publication of WO2017114341A1 publication Critical patent/WO2017114341A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/562Static detection
    • G06F21/563Static detection by source code analysis
    • 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/554Detecting local intrusion or implementing counter-measures involving event detection and direct action
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/562Static detection
    • G06F21/564Static detection by virus signature recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/568Computer malware detection or handling, e.g. anti-virus arrangements eliminating virus, restoring damaged files
    • 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/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/577Assessing vulnerabilities and evaluating computer system security
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/545Interprogram communication where tasks reside in different layers, e.g. user- and kernel-space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2113Multi-level security, e.g. mandatory access control

Definitions

  • the present application relates to the field of system security, and in particular, to a root virus cleaning method, device, and electronic device.
  • the anti-virus software needs to obtain the root privilege first, and then the installation file with the root privilege virus existing in the system is checked and killed.
  • the virus will prevent the removal of viruses by releasing anti-virus software by releasing specific processes, and will also modify the system's self-starting items to make the virus itself. It has the ability to self-start, so that the prior art cannot completely kill the virus with root privileges.
  • the embodiment of the present application discloses a method, a device, and an electronic device for cleaning a root virus, so that the cleaning of a virus with a super user authority is more thorough.
  • the embodiment of the present application discloses a root virus cleaning method, which is applied to a smart device, and the method includes the following steps:
  • the obtaining system root authority includes:
  • the obtaining system root authority includes:
  • the obtaining the process with the root privilege of the system according to the found intrusion feature file includes:
  • the intrusion feature file is a program executable file for obtaining the root authority
  • the intrusion feature file is executed, and a scheme for obtaining the root authority is obtained, and the process with the root authority is obtained according to the scheme for obtaining the root authority;
  • the intrusion feature file is a switch super user file
  • the switch super user file is executed to obtain a process with root authority.
  • the performing the intrusion feature file obtaining a scheme for obtaining root authority, obtaining a cleanup process with root authority according to the scheme for obtaining the root authority, including:
  • the performing the switching super user file to obtain a cleanup process with root privileges including:
  • the process of closing all detected files corresponding to the root-right virus feature includes:
  • the process close instruction is invoked, and the process corresponding to each of the process identifiers is closed.
  • the recovering the system startup item to a state before the root permission virus intrusion includes:
  • the deleting all the detected files with root permission virus characteristics including:
  • the embodiment of the present application further discloses a root virus cleaning device, which is applied to a smart device, and the device includes:
  • a file judging module configured to detect, according to the preset virus database, whether the smart device has a file with a root permission virus feature
  • a permission obtaining module configured to acquire a system root authority when the file determining module detects a file having a root permission virus feature
  • the process shutdown module is used to close all processes corresponding to all detected files with root permission virus characteristics
  • Start the recovery module which is used to restore the system startup items to the state before the root permission virus intrusion
  • the delete module is used to delete all the detected files with root permission virus characteristics.
  • the permission obtaining module is specifically configured to:
  • the permission obtaining module includes:
  • a path obtaining submodule configured to obtain, by using a preset virus database, storage path information of the intrusion feature file having a root authority virus;
  • a locating sub-module configured to find the intrusion feature file in the smart device according to the obtained storage path information of the intrusion feature file
  • the obtaining submodule is specifically configured to:
  • the intrusion feature file is an executable file that records the scenario that the root authority virus obtains the root privilege
  • the intrusion feature file is executed, and the solution for obtaining the root privilege is obtained, according to the scheme for obtaining the root privilege.
  • a process with root authority if the intrusion feature file is a switch super user file, execute the switch super user file to obtain a process with root authority.
  • the obtaining submodule is specifically configured to:
  • the process shuts down the module, including:
  • the identifier determining submodule is configured to determine, according to the file name of the file with the feature quantity of the root authority virus, a process identifier corresponding to each file of the feature quantity having the root authority virus;
  • the instruction invokes a submodule for invoking a process shutdown instruction to close the process corresponding to each of the process identifiers.
  • the startup recovery module includes:
  • a path deletion sub-module configured to determine a storage path of the file of all the feature quantities of the root-rights virus, and find, in the recovery installation list file in the system, whether the file storage of the feature quantity with the root authority virus exists.
  • the path information if yes, the preset path deletion instruction is invoked, and the storage path information of the file with the feature quantity of the root authority virus is deleted from the recovery installation list;
  • the startup item deletion sub-module is used to determine whether there is a file with the feature quantity of the root authority virus in the executable file executed by default when each system in the system is started, and if so, delete the file, and restore and delete the file.
  • the deleting module includes:
  • An attribute deletion submodule configured to search for attribute information that is refused to be deleted in the attribute information table of the file with the feature quantity of the root authority virus, and delete the attribute information;
  • the file deletion submodule is configured to invoke a file deletion instruction to delete the file with the feature quantity of the root authority virus.
  • the embodiment of the present application further discloses an electronic device, where the electronic device includes:
  • processor a memory, a communication interface, and a bus
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
  • the preset virus database detecting whether there is a file with a root permission virus feature in the smart device
  • an embodiment of the present application further discloses an application program for executing the root virus cleaning method described above at runtime.
  • the embodiment of the present application further discloses a storage medium, where the storage medium is used to store an application, and the application is configured to execute the root virus cleaning method described above at runtime.
  • the embodiment of the present application provides a method for cleaning a root virus.
  • the method includes: detecting, according to a preset virus database, whether a file with a root permission virus feature is detected in the smart device; when detecting root permissions When the virus signature file is obtained, the system root authority is obtained; all processes corresponding to the detected file with the root permission virus feature are closed; the system startup item is restored to the state before the root permission virus intrusion; and the detected All files with root privileges virus characteristics.
  • the smart device closes the process of starting the file with the feature quantity of the root-rights virus, and removes the self-starting capability of the file with the feature quantity of the root-privileged virus. Therefore, compared with the prior art, In the embodiment of the present application, the killing of the virus with the root authority is more thorough.
  • FIG. 1 is a schematic flowchart of a method for cleaning a root virus according to Embodiment 1 of the present application;
  • FIG. 2 is a schematic flowchart of a root virus cleaning method according to Embodiment 2 of the present application.
  • FIG. 3 is a schematic flowchart of a method for cleaning a root virus according to Embodiment 3 of the present application.
  • FIG. 4 is a schematic structural diagram of a root virus cleaning device according to Embodiment 1 of the present application.
  • FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a root virus cleaning method according to Embodiment 1 of the present application. The method is applied to a smart device, and the method may include the following steps:
  • S101 Detect, according to the preset virus database, whether the smart device has a file with a root permission virus feature.
  • the feature quantity of the feature with the root authority virus may be a string in a specific file name or a string in a file code, and the smart device may traverse all files in all local or key locations, the file includes The executable file with a root privilege virus. Then, the found file having the character string is determined as the file with the root authority virus.
  • the heuristic virus detection method can be used to traverse all the files in all local locations or key positions according to the character string, and find the file with the character string. The heuristic virus detection method is prior art, and the description is not repeated herein.
  • S102 Obtain system root permission when detecting a file with root permission virus characteristics.
  • the smart device firstly detects whether the root privilege of the system can be directly obtained, and if so, directly requests the root privilege of the system to the system, and the specific obtained manner is completely the same as the prior art, and details are not described herein again. If you can't get it, you can run the default program for obtaining root privileges, get the root privileges of the system, or download and run the default program for obtaining root privileges to obtain the root privileges of the system.
  • a process initiated by a file having a feature amount of a feature of a root-privileged virus has the effect of protecting the virus, so the process should also be closed.
  • the process identifier corresponding to the file of each feature quantity of the feature with the root authority virus may be determined according to the file name of the file with the feature quantity of the feature of the root authority virus.
  • the process identifier corresponding to the file with the feature quantity of the feature of the root authority virus is obtained.
  • the process close instruction is invoked, and the process corresponding to each of the process identifiers is closed.
  • command kill-9pid is invoked to close the process corresponding to each of the process identifiers, where pid is the process identifier.
  • S104 Restore the system startup item to a state before the root permission virus intrusion.
  • the file with the feature quantity of the feature of the root privilege virus may have the ability to be powered on and restarted by modifying the system startup item, and the booting ability of the file with the feature amount of the feature of the root privileged virus should be removed to prevent the virus file. resurrection.
  • the storage path of the file with the feature quantity of all the features of the root authority virus may be determined, and the file of the feature quantity of the feature with the root authority virus is found in the recovery installation list file in the system.
  • the path information is stored, and if so, the preset path deletion command is invoked, and the storage path information of the file having the feature quantity of the feature of the root authority virus is deleted from the recovery installation list.
  • the recovery installation list is a list of boot startup items recorded in the prior art. Generally, the files under the address recorded in the recovery installation list are automatically started when the system is restarted, so the description is deleted in the table. The address of the file with the feature quantity of the feature of the root privilege virus can prevent the file from being booted.
  • the system will start some executable files by default each time it starts, and the virus will disguise the files of the feature quantity of the root-privileged virus released by itself as the executable file started by the system, such as the path /system/bin/
  • the file debuggerd is the executable file that the system will start by default every time it starts.
  • the virus will also name the file of the feature quantity of the root-privileged virus that is released by itself, also named debuggerd, and also stored in the path / Under system/bin/, the virus renames the original file debuggerd in the path to debuggerd_xxx.
  • the system will still start the file named debuggerd under the path /system/bin/ by default.
  • the rules for changing the executable file name by default are specific, for example, adding the suffix "_xxx" after the default executable executable file name.
  • the smart device closes a file startup process with a feature quantity of a feature of a root authority virus, and removes the self-starting capability of the file with the feature quantity of the feature of the root authority virus. Killing and killing viruses with root privileges is more thorough.
  • step S105 may include:
  • the file deletion instruction is called to delete the file of the feature quantity of the feature with the root authority virus.
  • FIG. 2 is a schematic flowchart of a root virus cleaning method according to Embodiment 2 of the present application.
  • the method is applied to a smart device, and the method may include the following steps:
  • S201 Detect, according to the preset virus database, whether the smart device has a file with a root permission virus feature.
  • S205 Find attribute information that is rejected for deletion in the attribute information table of the file with the feature quantity of the feature of the root authority virus, and delete the attribute information.
  • the file attribute information table is obtained by using the command lsattr filename for the obtained feature quantity of the feature with the root authority virus, and it is checked whether each attribute information in the attribute information table includes the “-ia” field. If it is included, it indicates that the executable file cannot be deleted, and the attribute information of the feature with the feature of the root authority virus can be deleted by using the chattr–ia filename command to delete the attribute information.
  • S206 Call a file deletion instruction to delete the file of the feature quantity of the feature with the root authority virus.
  • the attribute deletion file is deleted, and the file deletion instruction may be used to delete the file, or the file may be located.
  • the directory is deleted. For example, use rm filename [file name] to delete the file, and use rm–rf dir [directory of the file] to delete the directory where the file is located.
  • the smart device searches for the attribute information that is refused to be deleted in the attribute information table of the file with the feature quantity of the feature of the root authority virus, and deletes the attribute information, so that the smart device can be invoked.
  • File deletion instruction delete the special virus with root authority A document of the characteristic quantity of the sign.
  • the root privilege of the system may be obtained by using the root privilege to obtain the root privilege of the system.
  • step S102 may include:
  • the storage path information of the intrusion feature file with the root authority virus is obtained from the preset virus database;
  • FIG. 3 is a schematic flowchart of a method for cleaning a root virus according to Embodiment 3 of the present application. The method is applied to a smart device, and the method may include the following steps:
  • S301 Detect, according to the preset virus database, whether the smart device has a file with a root permission virus feature.
  • S302 When detecting a file with a root permission virus feature, obtain the storage path information of the intrusion feature file with the root authority virus from the preset virus database.
  • S303 Search for the intrusion feature file in the smart device according to the obtained storage path information of the intrusion feature file.
  • the intrusion feature file There may be two types of the intrusion feature file.
  • the first type is an executable file that saves the super user right virus to obtain the root permission scheme of the current smart device super user, and records how the virus obtains the current smart device super user root.
  • the permission scheme is the Switch User (SU) file generated by the virus with root authority.
  • SU Switch User
  • this step can be implemented in two ways:
  • the intrusion feature file is an executable file that saves the super user right virus to obtain the current smart device super user permission scheme
  • the file is executed, which is equivalent to executing a pre-edited script file, which can be repeated before
  • the intrusion process may automatically trigger a system vulnerability corresponding to the root permission virus according to the method that the root authority virus obtains the root authority, and use the system vulnerability to identify the process user identity of the intrusion process in the system kernel.
  • the process of identifying the GIU and UID for zeroing, the GIU and UID being zeroed is a process with root privileges in the computer operating system.
  • the intrusion feature file is the SU file generated by the root authority virus
  • the SU file is executed to obtain a cleanup process with root authority.
  • the function of the SU file is: any user who executes the SU file can have the authority of the user who generated the SU file, because when the SU file is executed, the authority of the user who generated the SU file is generated.
  • the process of executing the SU file by the user executing the SU file can execute a command that the user who generates the SU file has permission to execute, that is, the user who executes the SU file can be considered to have the authority of the user who generated the SU file.
  • the generation of the SU file and the implementation of the function of the SU file are all prior art, and the details are not described herein again.
  • S306 Restore the system startup item to a state before the root permission virus intrusion.
  • the root permission is obtained by using the root permission virus to obtain the root authority of the system, and the speed and success rate of obtaining the root authority are improved.
  • the embodiment of the present invention provides a method for cleaning a root virus, which is applied to a smart device, and the smart device detects, according to a preset virus database, whether the smart device has a file with a root permission virus feature; When the file of the privilege virus signature is obtained, the system root authority is obtained; all processes corresponding to the detected file with the root privilege virus feature are closed; the system startup item is restored to the state before the virus with the root privilege; the detection is deleted. All files with root privileges virus characteristics.
  • the smart device closes the process initiated by the file with the feature quantity of the feature of the root authority virus, and removes the self-starting capability of the file with the feature quantity of the feature of the root authority virus. Compared with the prior art, the embodiment of the present application performs a more thorough killing of a virus with a root authority.
  • the device can include:
  • the file judging module 401 is configured to detect, according to the preset virus database, whether the smart device has a file with a root permission virus feature;
  • the privilege obtaining module 402 is configured to acquire a system root privilege when the file determining module 401 detects a file having a root privilege virus feature;
  • the process shutdown module 403 is configured to close all processes corresponding to all detected files with root permission virus characteristics
  • the recovery module 404 is configured to restore the system startup item to a state before the root permission virus intrusion
  • the deleting module 405 is configured to delete all the detected files with root permission virus characteristics.
  • rights obtaining module 402 is specifically configured to:
  • rights obtaining module 402 may include:
  • a path obtaining sub-module (not shown), configured to obtain, by using a preset virus database, storage path information of the intrusion feature file with a root authority virus;
  • a sub-module (not shown) for searching for the intrusion feature file in the smart device according to the obtained storage path information of the intrusion feature file;
  • the obtaining submodule is specifically configured to:
  • the intrusion feature file is an executable file that records the scenario that the root authority virus obtains the root privilege
  • the intrusion feature file is executed, and the solution for obtaining the root privilege is obtained, according to the scheme for obtaining the root privilege. a process with root privileges; if the intrusion feature If the file is a super user file, the switch super user file is executed to obtain a process with root authority.
  • the obtaining submodule is specifically configured to:
  • process closing module 403 may include:
  • An identifier determining submodule (not shown) for determining, according to the file name of the file having the feature quantity of the feature of the root authority virus, a file corresponding to the feature quantity of each feature having the root authority virus Process ID of the process;
  • the instruction calls a sub-module (not shown) for calling a process shutdown instruction to close the process corresponding to each of the process identifiers.
  • startup recovery module 404 includes:
  • a path deletion submodule (not shown) for determining a storage path of the file of all feature quantities of the feature having the root authority virus, and searching for a presence of the root in the recovery installation list file in the system
  • the startup item deletion sub-module (not shown) is used to determine whether there is a file with the feature quantity of the feature of the root authority virus in the executable file executed by default when each system in the system is started, if any, Delete the file and restore the original file corresponding to the deleted file.
  • the deleting module 405 may include:
  • An attribute deletion sub-module (not shown in the figure), configured to find attribute information of the file that is rejected for deletion in the attribute information table of the feature quantity of the feature with the root authority virus, and delete the attribute information;
  • the file deletion sub-module (not shown) is used to invoke a file deletion instruction to delete the file of the feature quantity of the feature with the root authority virus.
  • FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, where the electronic device may include:
  • a processor 501 a memory 502, a communication interface 503, and a bus;
  • the processor 501, the memory 502, and the communication interface 503 are connected by the bus and complete communication with each other;
  • the memory 502 stores executable program code
  • the processor 501 runs a program corresponding to the executable program code by reading executable program code stored in the memory 502 for:
  • the preset virus database detecting whether there is a file with a root permission virus feature in the smart device
  • the embodiment of the present application provides a root virus cleaning method, device, and electronic device.
  • the method includes: the smart device detects, according to a preset virus database, whether the smart device has a file with a root permission virus feature; When the root privilege virus signature file is obtained, the system root privilege is obtained; all processes corresponding to the detected file with the root privilege virus feature are closed; the system startup item is restored to the state before the root privileged virus intrusion; the detection is deleted. All files with root privileges virus characteristics.
  • the smart device closes the process of starting the file with the feature quantity of the feature of the root authority virus, and removes the self-starting capability of the file with the feature quantity of the feature of the root authority virus.
  • the embodiment of the present application performs a more thorough killing of a virus with a root authority.
  • An embodiment of the present application further provides an application for executing at a runtime
  • the root virus cleaning method includes:
  • the preset virus database detecting whether there is a file with a root permission virus feature in the smart device
  • the smart device closes the process of starting the file with the feature quantity of the feature of the root authority virus, and removes the self-starting capability of the file with the feature quantity of the feature of the root authority virus.
  • the embodiment of the present application performs a more thorough killing of a virus with a root authority.
  • the embodiment of the present application further provides a storage medium, where the storage medium is used to store an application, and the application is configured to execute the root virus cleaning method at runtime, where the method includes:
  • the preset virus database detecting whether there is a file with a root permission virus feature in the smart device
  • the smart device closes the process of starting the file with the feature quantity of the feature of the root authority virus, and removes the self-starting capability of the file with the feature quantity of the feature of the root authority virus.
  • the embodiment of the present application performs a more thorough killing of a virus with a root authority.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Virology (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请实施例公开了一种root病毒清理方法、装置及电子设备,方法包括:根据预设的病毒库,检测智能设备中是否有具有root权限病毒特征的文件;当检测到具有root权限病毒特征的文件时,获取系统root权限;关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程;将系统启动项恢复为具有root权限病毒入侵前的状态;删除所述检测到的所有具有root权限病毒特征的文件。相对现有技术,本申请实施例对具有root权限病毒进行的查杀更彻底。

Description

一种root病毒清理方法、装置及电子设备
本申请要求于2015年12月31日提交中国专利局、申请号为201511031245.1、发明名称为“一种root病毒清理方法、装置及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及系统安全领域,特别涉及一种root病毒清理方法、装置及电子设备。
背景技术
随着计算机病毒的不断升级换代,出现了具有系统超级用户root权限的病毒,此类病毒会使用系统的root权限,更改系统设置和自身的属性,使得病毒自身很难被彻底清除。
现有技术中,若要对具有root权限病毒进行查杀,需要杀毒软件先获取所述root权限,再对系统中存在的具有root权限病毒的安装文件进行查杀。但对于并没有对第三方软件开放root权限的智能设备,对其root权限的获取比较困难;病毒会通过释放特定的进程阻止杀毒软件对病毒的删除,还会修改系统的自启动项使病毒自身具有自启动能力,以至于现有技术无法彻底对具有root权限病毒进行彻底的查杀。
发明内容
本申请实施例公开了一种root病毒清理方法、装置及电子设备,使得对具有超级用户权限病毒进行的清理更彻底。
为达到上述目的,本申请实施例公开了一种root病毒清理方法,应用于智能设备,所述方法包括步骤:
根据预设的病毒库,检测所述智能设备中是否有具有root权限病毒特征的文件;
当检测到具有root权限病毒特征的文件时,获取系统root权限;
关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程;
将系统启动项恢复为具有root权限病毒入侵前的状态;
删除所述检测到的所有具有root权限病毒特征的文件。
较佳的,所述获取系统root权限,包括:
向系统请求所述系统root权限,或者
运行预设的用于获取root权限的程序,获取系统root权限,或者
下载并运行预设的用于获取root权限的程序,获取系统root权限。
较佳的,所述获取系统root权限,包括:
从预设病毒库中获得所述具有root权限病毒的入侵特征文件的存储路径信息;
根据获得的所述入侵特征文件的存储路径信息,查找到智能设备中的所述入侵特征文件;
根据查找到的入侵特征文件,获得具有系统root权限的进程。
较佳的,所述根据查找到的入侵特征文件,获得具有系统root权限的进程,包括:
若所述入侵特征文件为记录有获取root权限的方案可执行文件,则执行所述入侵特征文件,得到获取root权限的方案,根据所述获取root权限的方案,获得具有root权限的进程;若所述入侵特征文件为切换超级用户文件,则执行所述切换超级用户文件,获得具有root权限的进程。
较佳的,所述执行所述入侵特征文件,得到获取root权限的方案,根据所述获取root权限的方案,获得具有root权限的清理进程,包括:
执行所述入侵特征文件,得到入侵进程,以使所述入侵进程自动触发与所述具有root权限病毒对应的系统漏洞,利用所述系统漏洞将所述入侵进程在系统内核中的进程用户身份标识位置零,得到具有root权限的进程;
所述执行所述切换超级用户文件,获得具有root权限的清理进程,包括:
执行所述入侵特征文件,生成具有root权限的切换超级用户进程,以使 使用当前智能设备的用户具有与所述具有root权限病毒相同的root权限。
较佳的,所述关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程,包括:
根据所述检测到的具有root权限病毒特征的文件的文件名,确定每个所述具有root权限病毒特征的文件所对应的进程标识;
调用进程关闭指令,关闭每个所述进程标识所对应的进程。
较佳的,所述将系统启动项恢复为具有root权限病毒入侵前的状态,包括:
确定所述所有具有root权限病毒特征的文件的存储路径,并在系统中的恢复安装列表文件中查找是否存在所述具有root权限病毒特征的文件的存储路径信息,若是,则调用预设的路径删除指令,将所述具有root权限病毒特征的文件的存储路径信息从所述恢复安装列表中删除,或者
判断系统中的每个系统启动时默认执行的可执行文件中,是否有具有root权限病毒特征的文件,若有,则删除该文件,并恢复与被删除文件对应的原始文件。
较佳的,所述删除所述检测到的所有具有root权限病毒特征的文件,包括:
在所述具有root权限病毒特征的文件的属性信息表中查找到拒绝删除的属性信息,并删除所述属性信息;
调用文件删除指令,删除所述具有root权限病毒特征的文件。
本申请实施例还公开了一种root病毒清理装置,应用于智能设备,所述装置包括:
文件判断模块,用于根据预设的病毒库,检测所述智能设备中是否有具有root权限病毒特征的文件;
权限获取模块,用于当所述文件判断模块检测到具有root权限病毒特征的文件时,获取系统root权限;
进程关闭模块,用于关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程;
启动恢复模块,用于将系统启动项恢复为具有root权限病毒入侵前的状态;
删除模块,用于删除所述检测到的所有具有root权限病毒特征的文件。
较佳的,所述权限获取模块,具体用于:
向系统请求所述系统root权限,或者
运行预设的用于获取root权限的程序,获取系统root权限,或者
下载并运行预设的用于获取root权限的程序,获取系统root权限。
较佳的,所述权限获取模块,包括:
路径获取子模块,用于从预设病毒库中获得所述具有root权限病毒的入侵特征文件的存储路径信息;
查找子模块,用于根据获得的所述入侵特征文件的存储路径信息,查找到智能设备中的所述入侵特征文件;
获取子模块,用于根据查找到的入侵特征文件,获得具有系统root权限的进程。
较佳的,所述获取子模块,具体用于:
若所述入侵特征文件为记录有所述具有root权限病毒获取root权限的方案的可执行文件,则执行所述入侵特征文件,得到获取root权限的方案,根据所述获取root权限的方案,获得具有root权限的进程;若所述入侵特征文件为切换超级用户文件,则执行所述切换超级用户文件,获得具有root权限的进程。
较佳的,所述获取子模块,具体用于:
执行所述入侵特征文件,得到入侵进程,以使所述入侵进程自动触发与所述具有root权限病毒对应的系统漏洞,利用所述系统漏洞将所述入侵进程在系统内核中的进程用户身份标识位置零,得到具有root权限的进程;或者
执行所述入侵特征文件,生成具有root权限的切换超级用户进程,以使使用当前智能设备的用户具有与所述具有root权限病毒相同的root权限。
较佳的,所述进程关闭模块,包括:
标识确定子模块,用于根据所述具有root权限病毒的特征量的文件的文件名,确定每个所述具有root权限病毒的特征量的文件所对应的进程标识;
指令调用子模块,用于调用进程关闭指令,关闭每个所述进程标识所对应的进程。
较佳的,所述启动恢复模块,包括:
路径删除子模块,用于确定所述所有具有root权限病毒的特征量的文件的存储路径,并在系统中的恢复安装列表文件中查找是否存在所述具有root权限病毒的特征量的文件的存储路径信息,若是,则调用预设的路径删除指令,将所述具有root权限病毒的特征量的文件的存储路径信息从所述恢复安装列表中删除;
启动项删除子模块,用于判断系统中的每个系统启动时默认执行的可执行文件中,是否有具有root权限病毒的特征量的文件,若有,则删除该文件,并恢复与被删除文件对应的原始文件。
较佳的,所述删除模块,包括:
属性删除子模块,用于在所述具有root权限病毒的特征量的文件的属性信息表中查找到拒绝删除的属性信息,并删除所述属性信息;
文件删除子模块,用于调用文件删除指令,删除所述具有root权限病毒的特征量的文件。
本申请实施例还公开了一种电子设备,所述电子设备包括:
处理器、存储器、通信接口和总线;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
所述存储器存储可执行程序代码;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于:
根据预设的病毒库,检测智能设备中是否有具有root权限病毒特征的文件;
当检测到具有root权限病毒特征的文件时,获取系统root权限;
关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程;
将系统启动项恢复为具有root权限病毒入侵前的状态;
删除所述检测到的所有具有root权限病毒特征的文件。
为达到上述目的,本申请实施例还公开了一种应用程序,所述应用程序用于在运行时执行上述的root病毒清理方法。
为达到上述目的,本申请实施例还公开了一种存储介质,所述存储介质用于存储应用程序,所述应用程序用于在运行时执行上述的root病毒清理方法。
由上述的技术方案可见,本申请实施例提供了一种root病毒清理方法,方法包括:根据预设的病毒库,检测智能设备中是否有具有root权限病毒特征的文件;当检测到具有root权限病毒特征的文件时,获取系统root权限;关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程;将系统启动项恢复为具有root权限病毒入侵前的状态;删除所述检测到的所有具有root权限病毒特征的文件。由于本申请实施例中,智能设备对具有root权限病毒的特征量的文件启动的进程进行关闭,去除了所述具有root权限病毒的特征量的文件的自启动能力,因此,相对现有技术,本申请实施例对具有root权限病毒进行的查杀更彻底。
附图说明
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例一提供的一种root病毒清理方法的流程示意图;
图2为本申请实施例二提供的一种root病毒清理方法的流程示意图;
图3为本申请实施例三提供的一种root病毒清理方法的流程示意图;
图4为本申请实施例一提供的一种root病毒清理装置的结构示意图;
图5为本申请实施例提供的一种电子设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
下面通过具体实施例,对本申请进行详细说明。
图1为本申请实施例一提供的一种root病毒清理方法的流程示意图,所述方法应用于智能设备,该方法可以包括步骤:
S101:根据预设的病毒库,检测所述智能设备中是否有具有root权限病毒特征的文件。
根据在预设的病毒库中保存的具有root权限病毒的特征的特征量,遍历所述智能设备所有文件,确定所有所述具有root权限病毒的特征的特征量的文件,所述文件包含所述具有root权限病毒的可执行文件。
所述具有root权限病毒的特征的特征量可以是一段特定的文件名中的字符串或文件代码中的字符串,所述智能设备可以遍历本地所有位置或关键位置的所有文件,所述文件包含所述具有root权限病毒的可执行文件。则将所查找到的具有所述字符串的文件确定为所述具有root权限病毒的文件。可以通过启发式病毒检测方法,根据所述字符串遍历本地所有位置或关键位置的所有文件,查找到具有所述字符串的文件。启发式病毒检测方法为现有技术,本申请不再赘述。
S102:当检测到具有root权限病毒特征的文件时,获取系统root权限。
所述智能设备首先检测是否能够直接获取系统root权限,若能,则直接向系统请求所述系统root权限,具体获得的方式可以与现有技术完全相同,这里不再赘述。若不能获取,则可以运行预设的用于获取root权限的程序,获取系统root权限,或者下载并运行预设的用于获取root权限的程序,获取系统root权限。
S103:关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程。
具有root权限病毒的特征的特征量的文件所启动的进程具有保护该病毒的作用,所以还应该将该进程关闭。具体的,可以根据所述具有root权限病毒的特征的特征量的文件的文件名,确定每个所述具有root权限病毒的特征的特征量的文件所对应的进程标识。
例如,根据指令ps|grep filename,获得所述具有root权限病毒的特征的特征量的文件所对应的进程标识。
调用进程关闭指令,关闭每个所述进程标识所对应的进程。
例如,调用指令kill-9pid,关闭每个所述进程标识所对应的进程,其中pid为所述进程标识。
S104:将系统启动项恢复为具有root权限病毒入侵前的状态。
具有root权限病毒的特征的特征量的文件可能通过修改系统启动项而具有开机重启的能力,所述应该将该具有root权限病毒的特征的特征量的文件的开机重启能力去除,以防止病毒文件复活。具体的,可以确定所述所有具有root权限病毒的特征的特征量的文件的存储路径,并在系统中的恢复安装列表文件中查找是否存在所述具有root权限病毒的特征的特征量的文件的存储路径信息,若是,则调用预设的路径删除指令,将所述具有root权限病毒的特征的特征量的文件的存储路径信息从所述恢复安装列表中删除。
所述恢复安装列表是现有技术中记载有开机启动项的列表,一般在所述恢复安装列表中记录的地址下的文件,都会在系统重启时自启动,所以在该表中删除了所述具有root权限病毒的特征的特征量的文件的地址,就能够阻止该文件的开机自启动。
之后,还应判断系统中的每个系统启动时默认执行的可执行文件中,是否有具有所述具有root权限病毒的特征的特征量的文件,若有,则删除该文件,并恢复与被删除文件对应的原始文件。
系统在每次启动时会默认启动一些可执行文件,病毒会将自身释放的具有root权限病毒的特征的特征量的文件伪装成所述系统默认启动的可执行文件,如路径/system/bin/下的文件debuggerd是系统在每次启动时会默认启动的可执行文件,则病毒会将自身释放的某具有root权限病毒的特征的特征量的文件的也命名为debuggerd,并也存储在路径/system/bin/下,而该病毒将所述路径下的原始的文件debuggerd更名为debuggerd_xxx,当系统启动时,系统仍然会默认启动路径/system/bin/下名称为debuggerd的文件,即默认启动了该具有root权限病毒的特征的特征量的文件。对于相同的病毒,其更改默认执行的可执行文件文件名的规则是特定的,例如,在默认执行的可执行文件文件名后添加后缀“_xxx”。
为了应对具有root权限病毒的特征的特征量的文件的这个自启策略,可以判断系统中的每个系统启动时默认执行的文件中是否有具有所述具有root权限病毒的特征的特征量的文件,若有,则将该文件删除,并根据病毒更改默认执行文件的文件名规则,恢复与被删除文件对应的原始文件,进而排除了病毒开机启动的一种途径。
S105:删除所述检测到的所有具有root权限病毒特征的文件。
由于本申请实施例中,所述智能设备对具有root权限病毒的特征的特征量的文件启动的进程进行关闭,并且去除了所述具有root权限病毒的特征的特征量的文件的自启动能力,对具有root权限病毒进行的查杀更彻底。
所述具有root权限病毒的特征的特征量的文件中可能有拒绝自身文件被删除的属性,针对这种情况,可以调用预设的获取文件属性表的指令,获得该文件的文件属性表,并检查该文件属性表中是否存在拒绝自身文件被删除的属性信息,若存在,则调用预设的属性删除指令删除该属性信息。基于图1所示的方法,步骤S105可以包括:
在所述具有root权限病毒的特征的特征量的文件的属性信息表中查找到 拒绝删除的属性信息,并删除所述属性信息;
调用文件删除指令,删除所述具有root权限病毒的特征的特征量的文件。
图2为本申请实施例二提供的一种root病毒清理方法的流程示意图,所述方法应用于智能设备,该方法可以包括步骤:
S201:根据预设的病毒库,检测所述智能设备中是否有具有root权限病毒特征的文件。
S202:当检测到具有root权限病毒特征的文件时,获取系统root权限。
S203:关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程。
S204:将系统启动项恢复为具有root权限病毒入侵前的状态。
S205:在所述具有root权限病毒的特征的特征量的文件的属性信息表中查找到拒绝删除的属性信息,并删除所述属性信息。
例如:对得到的具有root权限病毒的特征的特征量的文件使用指令lsattr filename获得该文件属性信息表,检查所述属性信息表中的每条所述属性信息中是否包含“-ia”字段,若包含,则说明该可执行文件不可以被删除,则可以使用chattr–ia filename指令删除该条属性信息,进而使得所述具有root权限病毒的特征的特征量的文件能够被删除。
S206:调用文件删除指令,删除所述具有root权限病毒的特征的特征量的文件。
当所述具有root权限病毒的特征的特征量的文件中的拒绝自身文件被删除的属性被删除之后,就可以使用现有技术的文件删除指令,对该文件进行删除,也可以对该文件所在的目录进行删除。例如使用rm filename[文件名]对该文件进行删除,使用rm–rf dir[文件所在的目录]对该文件所在的目录进行删除。
本申请实施例中,所述智能设备在所述具有root权限病毒的特征的特征量的文件的属性信息表中查找到拒绝删除的属性信息,并删除该属性信息,使得所述智能设备可以调用文件删除指令,删除所述具有root权限病毒的特 征的特征量的文件。
在本申请提供的另一种实施例中,可以利用所述具有root权限病毒获取系统root权限的方法,获取系统root权限,基于图1所示的方法,步骤S102可以包括:
当检测到具有root权限病毒特征的文件时,从预设病毒库中获得所述具有root权限病毒的入侵特征文件的存储路径信息;
根据获得的所述入侵特征文件的存储路径信息,查找到智能设备中的所述入侵特征文件;
根据查找到的入侵特征文件,获得具有系统root权限的进程。
图3为本申请实施例三提供的一种root病毒清理方法的流程示意图,所述方法应用于智能设备,该方法可以包括步骤:
S301:根据预设的病毒库,检测所述智能设备中是否有具有root权限病毒特征的文件。
S302:当检测到具有root权限病毒特征的文件时,从预设病毒库中获得所述具有root权限病毒的入侵特征文件的存储路径信息。
S303:根据获得的所述入侵特征文件的存储路径信息,查找到智能设备中的所述入侵特征文件。
S304:根据查找到的入侵特征文件,获得具有系统root权限的进程。
所述入侵特征文件可能有两种,第一种为保存了所述超级用户权限病毒获取当前智能设备超级用户root权限方案的可执行文件,其中记载着该病毒是如何获取当前智能设备超级用户root权限方案;第二种为所述具有root权限病毒生成的切换用户(Switch User,SU)文件。
因此,本步骤可以有两种实现方式:
若所述入侵特征文件为保存了所述超级用户权限病毒获取当前智能设备超级用户权限方案的可执行文件,则执行该文件,这相当于执行了一个预先编辑好的脚本文件,能够重复之前该病毒获取root权限的步骤,得到入侵进 程,所述入侵进程可以按照所述具有root权限病毒获取root权限的方法,自动触发该具有root权限病毒对应的系统漏洞,利用所述系统漏洞将所述入侵进程在系统内核中的进程用户身份标识GIU和UID进行置零,GIU和UID被置零的进程在计算机操作系统中就是具有了root权限的进程。
若所述入侵特征文件为所述具有root权限病毒生成的SU文件,则执行所述SU文件,得到具有root权限的清理进程。
在现有技术中,SU文件的作用为:任何执行SU文件的用户都可以拥有生成该SU文件的用户的权限,这是因为执行SU文件时,会生成具有生成所述SU文件的用户的权限的进程,执行所述SU文件的用户可通过该进程执行生成所述SU文件的用户才有权限执行的命令,即可以认为执行所述SU文件的用户拥有了生成该SU文件的用户的权限。SU文件的生成和SU文件作用的实施都为现有技术,本申请不再赘述。
S305:关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程。
S306:将系统启动项恢复为具有root权限病毒入侵前的状态。
S307:删除所述检测到的所有具有root权限病毒特征的文件。
在本申请实施例利用所述具有root权限病毒获取系统root权限的方法,获取系统root权限,提高了获取root权限的速度和成功率。
本申请实施例提供了一种root病毒清理方法,应用于智能设备,所述智能设备根据预设的病毒库,检测所述智能设备中是否有具有root权限病毒特征的文件;当检测到具有root权限病毒特征的文件时,获取系统root权限;关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程;将系统启动项恢复为具有root权限病毒入侵前的状态;删除所述检测到的所有具有root权限病毒特征的文件。由于本申请实施例中,所述智能设备对具有root权限病毒的特征的特征量的文件启动的进程进行关闭,去除了所述具有root权限病毒的特征的特征量的文件的自启动能力,因此,相对现有技术,本申请实施例对具有root权限病毒进行的查杀更彻底。
图4为本申请实施例一提供的一种root病毒清理装置的结构示意图,应 用于智能设备,该装置可以包括:
文件判断模块401,用于根据预设的病毒库,检测所述智能设备中是否有具有root权限病毒特征的文件;
权限获取模块402,用于当所述文件判断模块401检测到具有root权限病毒特征的文件时,获取系统root权限;
进程关闭模块403,用于关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程;
启动恢复模块404,用于将系统启动项恢复为具有root权限病毒入侵前的状态;
删除模块405,用于删除所述检测到的所有具有root权限病毒特征的文件。
进一步地,所述权限获取模块402,具体用于:
向系统请求所述系统root权限,或者
运行预设的用于获取root权限的程序,获取系统root权限,或者
下载并运行预设的用于获取root权限的程序,获取系统root权限。
进一步地,所述权限获取模块402,可以包括:
路径获取子模块(图中未示出),用于从预设病毒库中获得所述具有root权限病毒的入侵特征文件的存储路径信息;
查找子模块(图中未示出),用于根据获得的所述入侵特征文件的存储路径信息,查找到智能设备中的所述入侵特征文件;
获取子模块(图中未示出),用于根据查找到的入侵特征文件,获得具有系统root权限的进程。
进一步地,所述获取子模块,具体用于:
若所述入侵特征文件为记录有所述具有root权限病毒获取root权限的方案的可执行文件,则执行所述入侵特征文件,得到获取root权限的方案,根据所述获取root权限的方案,获得具有root权限的进程;若所述入侵特征文 件为切换超级用户文件,则执行所述切换超级用户文件,获得具有root权限的进程。
进一步地,所述获取子模块,具体用于:
执行所述入侵特征文件,得到入侵进程,以使所述入侵进程自动触发与所述具有root权限病毒对应的系统漏洞,利用所述系统漏洞将所述入侵进程在系统内核中的进程用户身份标识位置零,得到具有root权限的进程;或者
执行所述入侵特征文件,生成具有root权限的切换超级用户进程,以使使用当前智能设备的用户具有与所述具有root权限病毒相同的root权限。
进一步地,所述进程关闭模块403,可以包括:
标识确定子模块(图中未示出),用于根据所述具有root权限病毒的特征的特征量的文件的文件名,确定每个所述具有root权限病毒的特征的特征量的文件所对应的进程的进程标识;
指令调用子模块(图中未示出),用于调用进程关闭指令,关闭每个所述进程标识所对应的进程。
进一步地,所述启动恢复模块404,包括:
路径删除子模块(图中未示出),用于确定所述所有具有root权限病毒的特征的特征量的文件的存储路径,并在系统中的恢复安装列表文件中查找是否存在所述具有root权限病毒的特征的特征量的文件的存储路径信息,若是,则调用预设的路径删除指令,将所述具有root权限病毒的特征的特征量的文件的存储路径信息从所述恢复安装列表中删除;
启动项删除子模块(图中未示出),用于判断系统中的每个系统启动时默认执行的可执行文件中,是否有具有root权限病毒的特征的特征量的文件,若有,则删除该文件,并恢复与被删除文件对应的原始文件。
进一步地,所述删除模块405,可以包括:
属性删除子模块(图中未示出),用于在所述具有root权限病毒的特征的特征量的文件的属性信息表中查找到拒绝删除的属性信息,并删除所述属性信息;
文件删除子模块(图中未示出),用于调用文件删除指令,删除所述具有root权限病毒的特征的特征量的文件。
图5为本申请实施例提供的一种电子设备的结构示意图,所述电子设备可以包括:
处理器501、存储器502、通信接口503和总线;
所述处理器501、所述存储器502和所述通信接口503通过所述总线连接并完成相互间的通信;
所述存储器502存储可执行程序代码;
所述处理器501通过读取所述存储器502中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于:
根据预设的病毒库,检测智能设备中是否有具有root权限病毒特征的文件;
当检测到具有root权限病毒特征的文件时,获取系统root权限;
关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程;
将系统启动项恢复为具有root权限病毒入侵前的状态;
删除所述检测到的所有具有root权限病毒特征的文件。
本申请实施例提供了一种root病毒清理方法、装置及电子设备,方法包括:智能设备根据预设的病毒库,检测所述智能设备中是否有具有root权限病毒特征的文件;当检测到具有root权限病毒特征的文件时,获取系统root权限;关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程;将系统启动项恢复为具有root权限病毒入侵前的状态;删除所述检测到的所有具有root权限病毒特征的文件。由于本申请实施例中,智能设备对具有root权限病毒的特征的特征量的文件启动的进程进行关闭,去除了所述具有root权限病毒的特征的特征量的文件的自启动能力,因此,相对现有技术,本申请实施例对具有root权限病毒进行的查杀更彻底。
本申请实施例还提供了一种应用程序,所述应用程序用于在运行时执行所 述root病毒清理方法,方法包括:
根据预设的病毒库,检测智能设备中是否有具有root权限病毒特征的文件;
当检测到具有root权限病毒特征的文件时,获取系统root权限;
关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程;
将系统启动项恢复为具有root权限病毒入侵前的状态;
删除所述检测到的所有具有root权限病毒特征的文件。
由于本申请实施例中,智能设备对具有root权限病毒的特征的特征量的文件启动的进程进行关闭,去除了所述具有root权限病毒的特征的特征量的文件的自启动能力,因此,相对现有技术,本申请实施例对具有root权限病毒进行的查杀更彻底。
本申请实施例还提供了一种存储介质,所述存储介质用于存储应用程序,所述应用程序用于在运行时执行所述root病毒清理方法,方法包括:
根据预设的病毒库,检测智能设备中是否有具有root权限病毒特征的文件;
当检测到具有root权限病毒特征的文件时,获取系统root权限;
关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程;
将系统启动项恢复为具有root权限病毒入侵前的状态;
删除所述检测到的所有具有root权限病毒特征的文件。
由于本申请实施例中,智能设备对具有root权限病毒的特征的特征量的文件启动的进程进行关闭,去除了所述具有root权限病毒的特征的特征量的文件的自启动能力,因此,相对现有技术,本申请实施例对具有root权限病毒进行的查杀更彻底。
对于系统/装置/设备实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本领域普通技术人员可以理解实现上述方法实施方式中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于计算机可读取存储介质中,这里所称得的存储介质,如:ROM/RAM、磁碟、光盘等。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (19)

  1. 一种root病毒清理方法,其特征在于,应用于智能设备,所述方法包括步骤:
    根据预设的病毒库,检测所述智能设备中是否有具有root权限病毒特征的文件;
    当检测到具有root权限病毒特征的文件时,获取系统root权限;
    关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程;
    将系统启动项恢复为具有root权限病毒入侵前的状态;
    删除所述检测到的所有具有root权限病毒特征的文件。
  2. 根据权利要求1所述的方法,其特征在于,所述获取系统root权限,包括:
    向系统请求所述系统root权限,或者
    运行预设的用于获取root权限的程序,获取系统root权限,或者
    下载并运行预设的用于获取root权限的程序,获取系统root权限。
  3. 根据权利要求1所述的方法,其特征在于,所述获取系统root权限,包括:
    从预设病毒库中获得所述具有root权限病毒的入侵特征文件的存储路径信息;
    根据获得的所述入侵特征文件的存储路径信息,查找到智能设备中的所述入侵特征文件;
    根据查找到的入侵特征文件,获得具有系统root权限的进程。
  4. 根据权利要求3所述的方法,其特征在于,所述根据查找到的入侵特征文件,获得具有系统root权限的进程,包括:
    若所述入侵特征文件为记录有获取root权限的方案可执行文件,则执行所述入侵特征文件,得到获取root权限的方案,根据所述获取root权限的方 案,获得具有root权限的进程;若所述入侵特征文件为切换超级用户文件,则执行所述切换超级用户文件,获得具有root权限的进程。
  5. 根据权利要求4所述的方法,其特征在于,所述执行所述入侵特征文件,得到获取root权限的方案,根据所述获取root权限的方案,获得具有root权限的清理进程,包括:
    执行所述入侵特征文件,得到入侵进程,以使所述入侵进程自动触发与所述具有root权限病毒对应的系统漏洞,利用所述系统漏洞将所述入侵进程在系统内核中的进程用户身份标识位置零,得到具有root权限的进程;
    所述执行所述切换超级用户文件,获得具有root权限的清理进程,包括:
    执行所述入侵特征文件,生成具有root权限的切换超级用户进程,以使使用当前智能设备的用户具有与所述具有root权限病毒相同的root权限。
  6. 根据权利要求1所述的方法,其特征在于,所述关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程,包括:
    根据所述检测到的具有root权限病毒特征的文件的文件名,确定每个所述具有root权限病毒特征的文件所对应的进程标识;
    调用进程关闭指令,关闭每个所述进程标识所对应的进程。
  7. 根据权利要求1所述的方法,其特征在于,所述将系统启动项恢复为具有root权限病毒入侵前的状态,包括:
    确定所述所有具有root权限病毒特征的文件的存储路径,并在系统中的恢复安装列表文件中查找是否存在所述具有root权限病毒特征的文件的存储路径信息,若是,则调用预设的路径删除指令,将所述具有root权限病毒特征的文件的存储路径信息从所述恢复安装列表中删除,或者
    判断系统中的每个系统启动时默认执行的可执行文件中,是否有具有root权限病毒特征的文件,若有,则删除该文件,并恢复与被删除文件对应的原始文件。
  8. 根据权利要求1所述的方法,其特征在于,所述删除所述检测到的所有具有root权限病毒特征的文件,包括:
    在所述具有root权限病毒特征的文件的属性信息表中查找到拒绝删除的属性信息,并删除所述属性信息;
    调用文件删除指令,删除所述具有root权限病毒特征的文件。
  9. 一种root病毒清理装置,其特征在于,应用于智能设备,所述装置包括:
    文件判断模块,用于根据预设的病毒库,检测所述智能设备中是否有具有root权限病毒特征的文件;
    权限获取模块,用于当所述文件判断模块检测到具有root权限病毒特征的文件时,获取系统root权限;
    进程关闭模块,用于关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程;
    启动恢复模块,用于将系统启动项恢复为具有root权限病毒入侵前的状态;
    删除模块,用于删除所述检测到的所有具有root权限病毒特征的文件。
  10. 根据权利要求9所述的装置,其特征在于,所述权限获取模块,具体用于:
    向系统请求所述系统root权限,或者
    运行预设的用于获取root权限的程序,获取系统root权限,或者
    下载并运行预设的用于获取root权限的程序,获取系统root权限。
  11. 根据权利要求9所述的装置,其特征在于,所述权限获取模块,包括:
    路径获取子模块,用于从预设病毒库中获得所述具有root权限病毒的入侵特征文件的存储路径信息;
    查找子模块,用于根据获得的所述入侵特征文件的存储路径信息,查找到智能设备中的所述入侵特征文件;
    获取子模块,用于根据查找到的入侵特征文件,获得具有系统root权限的进程。
  12. 根据权利要求11所述的装置,其特征在于,所述获取子模块,具体用于:
    若所述入侵特征文件为记录有所述具有root权限病毒获取root权限的方案的可执行文件,则执行所述入侵特征文件,得到获取root权限的方案,根据所述获取root权限的方案,获得具有root权限的进程;若所述入侵特征文件为切换超级用户文件,则执行所述切换超级用户文件,获得具有root权限的进程。
  13. 根据权利要求12所述的装置,其特征在于,所述获取子模块,具体用于:
    执行所述入侵特征文件,得到入侵进程,以使所述入侵进程自动触发与所述具有root权限病毒对应的系统漏洞,利用所述系统漏洞将所述入侵进程在系统内核中的进程用户身份标识位置零,得到具有root权限的进程;或者执行所述入侵特征文件,生成具有root权限的切换超级用户进程,以使使用当前智能设备的用户具有与所述具有root权限病毒相同的root权限。
  14. 根据权利要求9所述的装置,其特征在于,所述进程关闭模块,包括:
    标识确定子模块,用于根据所述具有root权限病毒的特征的文件的文件名,确定每个所述具有root权限病毒的特征的文件所对应的进程标识;
    指令调用子模块,用于调用进程关闭指令,关闭每个所述进程标识所对应的进程。
  15. 根据权利要求9所述的装置,其特征在于,所述启动恢复模块,包括:
    路径删除子模块,用于确定所述所有具有root权限病毒的特征的文件的存储路径,并在系统中的恢复安装列表文件中查找是否存在所述具有root权限病毒的特征的文件的存储路径信息,若是,则调用预设的路径删除指令, 将所述具有root权限病毒的特征的文件的存储路径信息从所述恢复安装列表中删除;
    启动项删除子模块,用于判断系统中的每个系统启动时默认执行的可执行文件中,是否有具有root权限病毒的特征的文件,若有,则删除该文件,并恢复与被删除文件对应的原始文件。
  16. 根据权利要求9所述的装置,其特征在于,所述删除模块,包括:
    属性删除子模块,用于在所述具有root权限病毒的特征的文件的属性信息表中查找到拒绝删除的属性信息,并删除所述属性信息;
    文件删除子模块,用于调用文件删除指令,删除所述具有root权限病毒的特征的文件。
  17. 一种电子设备,其特征在于,所述电子设备包括:
    处理器、存储器、通信接口和总线;
    所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
    所述存储器存储可执行程序代码;
    所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于:
    根据预设的病毒库,检测智能设备中是否有具有root权限病毒特征的文件;
    当检测到具有root权限病毒特征的文件时,获取系统root权限;
    关闭所有检测到的具有root权限病毒特征的文件所对应的所有进程;
    将系统启动项恢复为具有root权限病毒入侵前的状态;
    删除所述检测到的所有具有root权限病毒特征的文件。
  18. 一种应用程序,其特征在于,所述应用程序用于在运行时执行权利要求1-8任一项所述的root病毒清理方法。
  19. 一种存储介质,其特征在于,所述存储介质用于存储应用程序,所述应用程序用于在运行时执行权利要求1-8任一项所述的root病毒清理方法。
PCT/CN2016/112036 2015-12-31 2016-12-26 一种root病毒清理方法、装置及电子设备 WO2017114341A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/066,040 US10878094B2 (en) 2015-12-31 2016-12-26 Root virus removal method and apparatus, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201511031245.1A CN106934288B (zh) 2015-12-31 2015-12-31 一种root病毒清理方法、装置及电子设备
CN201511031245.1 2015-12-31

Publications (1)

Publication Number Publication Date
WO2017114341A1 true WO2017114341A1 (zh) 2017-07-06

Family

ID=59225629

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/112036 WO2017114341A1 (zh) 2015-12-31 2016-12-26 一种root病毒清理方法、装置及电子设备

Country Status (3)

Country Link
US (1) US10878094B2 (zh)
CN (1) CN106934288B (zh)
WO (1) WO2017114341A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109947366B (zh) * 2019-03-15 2022-04-01 温州职业技术学院 一种电子信息安全粉碎装置
CN117131515B (zh) * 2023-10-25 2024-02-20 深圳市慧为智能科技股份有限公司 一种应用请求执行方法、装置、计算机设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663286A (zh) * 2012-03-21 2012-09-12 奇智软件(北京)有限公司 一种病毒apk的识别方法及装置
CN102663285A (zh) * 2012-03-21 2012-09-12 奇智软件(北京)有限公司 一种apk病毒特征码的提取方法及装置
CN102799801A (zh) * 2011-05-27 2012-11-28 网秦无限(北京)科技有限公司 利用移动存储器查杀移动设备病毒的方法和系统
CN103530559A (zh) * 2013-09-27 2014-01-22 北京理工大学 一种Android系统的完整性保护系统
CN105095764A (zh) * 2015-09-17 2015-11-25 百度在线网络技术(北京)有限公司 病毒的查杀方法及装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030159070A1 (en) * 2001-05-28 2003-08-21 Yaron Mayer System and method for comprehensive general generic protection for computers against malicious programs that may steal information and/or cause damages
US7707620B2 (en) * 2005-05-06 2010-04-27 Cisco Technology, Inc. Method to control and secure setuid/gid executables and processes
US7874001B2 (en) * 2005-07-15 2011-01-18 Microsoft Corporation Detecting user-mode rootkits
US8572371B2 (en) * 2005-10-05 2013-10-29 Ca, Inc. Discovery of kernel rootkits with memory scan
US8127316B1 (en) * 2006-11-30 2012-02-28 Quest Software, Inc. System and method for intercepting process creation events
US9088606B2 (en) * 2012-07-05 2015-07-21 Tenable Network Security, Inc. System and method for strategic anti-malware monitoring
JP6590481B2 (ja) * 2012-12-07 2019-10-16 キヤノン電子株式会社 ウイルス侵入経路特定装置、ウイルス侵入経路特定方法およびプログラム
CN104008340B (zh) * 2014-06-09 2017-02-15 北京奇虎科技有限公司 病毒查杀方法及装置
CN104573515A (zh) * 2014-12-19 2015-04-29 百度在线网络技术(北京)有限公司 一种病毒处理方法、装置和系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799801A (zh) * 2011-05-27 2012-11-28 网秦无限(北京)科技有限公司 利用移动存储器查杀移动设备病毒的方法和系统
CN102663286A (zh) * 2012-03-21 2012-09-12 奇智软件(北京)有限公司 一种病毒apk的识别方法及装置
CN102663285A (zh) * 2012-03-21 2012-09-12 奇智软件(北京)有限公司 一种apk病毒特征码的提取方法及装置
CN103530559A (zh) * 2013-09-27 2014-01-22 北京理工大学 一种Android系统的完整性保护系统
CN105095764A (zh) * 2015-09-17 2015-11-25 百度在线网络技术(北京)有限公司 病毒的查杀方法及装置

Also Published As

Publication number Publication date
CN106934288B (zh) 2021-04-16
CN106934288A (zh) 2017-07-07
US10878094B2 (en) 2020-12-29
US20190018963A1 (en) 2019-01-17

Similar Documents

Publication Publication Date Title
US11003775B2 (en) Methods for behavioral detection and prevention of cyberattacks, and related apparatus and techniques
JP6455738B2 (ja) パッチファイル分析システム
US8661541B2 (en) Detecting user-mode rootkits
US20170171229A1 (en) System and method for determining summary events of an attack
US8397292B2 (en) Method and device for online secure logging-on
US20100306851A1 (en) Method and apparatus for preventing a vulnerability of a web browser from being exploited
US20140289851A1 (en) Malware Discovery Method and System
RU2723665C1 (ru) Динамический индикатор репутации для оптимизации операций по обеспечению компьютерной безопасности
CN111259348B (zh) 一种安全运行可执行文件的方法及系统
US20190147163A1 (en) Inferential exploit attempt detection
RU2697954C2 (ru) Система и способ создания антивирусной записи
US20200210580A1 (en) Systems and methods for protecting against malware code injections in trusted processes by a multi-target injector
US9064130B1 (en) Data loss prevention in the event of malware detection
KR20170090645A (ko) 랜섬웨어 바이러스에 의한 감염을 방지하는 시스템 및 방법
WO2017172190A1 (en) Trusted execution of called function
GB2510701A (en) Detecting malware code injection by determining whether return address on stack thread points to suspicious memory area
CN110659491B (zh) 一种计算机系统恢复方法、装置、设备及可读存储介质
KR100745639B1 (ko) 파일 시스템 및 레지스트리를 보호하는 방법 및 그 장치
WO2017114341A1 (zh) 一种root病毒清理方法、装置及电子设备
US9003533B1 (en) Systems and methods for detecting malware
KR101967663B1 (ko) 인가된 프로세스의 역할 기반 접근 통제 시스템
KR100666562B1 (ko) 커널 드라이버 및 프로세스 보호 방법
KR101503827B1 (ko) 절대 경로 관리를 통한 악성 프로그램 검사 시스템
WO2017114344A1 (zh) 一种root病毒清理方法、装置及电子设备
US8640242B2 (en) Preventing and detecting print-provider startup malware

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22/10/2018)

122 Ep: pct application non-entry in european phase

Ref document number: 16881130

Country of ref document: EP

Kind code of ref document: A1