The exemplary and non-limiting embodiments of the present application relate generally to security methods, apparatuses and computer programs and, more specifically, to securing such apparatuses and computer systems against malware infections.
Malware, short for malicious software, is a term used to define malicious software that can be unwittingly installed on computers and computer systems. Malware can be used by an attacker, for example, to disrupt the normal computer operation, to take control of a computer, or to collect confidential user information such as bank login details. In order to defend against malware attacks, a computer user may install an anti-virus application. Such applications employ a number of techniques to detect malware including searching for fingerprints of known viruses, and analyzing device and/or software behavior (including using rules or “heuristics” to identify suspicious behavior).
Malware has become more and more efficient against detection and removal by anti-virus engines. Malware may utilize kernel-level protection techniques by patching system drivers and integrating malicious code directly into low-level disk systems. Malware can also infect the contents of the master boot record (MBR) stored on the device. The MBR is the 512-byte boot sector, which is the first sector (“LBA Sector 0”) of a partitioned data storage device. In a computer's hard disk drive, the MBR is the sector that the BIOS (stored in RAM memory) looks first for instructions what to do, when the computer is booted.
By installing malicious code into the MBR of a device, which is started ahead of the operating system (OS), an attacker may be able to install malware into the computer itself. An example of such malware is Rootkit MBR.TDSS.B. This malware is able to create its own file system that is located near to the end of the hard disk. The launch point of the malware may reside at the MBR of the disk and the malware is started together with an OS kernel. After the file system becomes available for the computer system, the malware patches a system driver and hooks access to the infected MBR. Thus, it is possible that an attempt to read the infected sector from a scanner driver or process is filtered by the malware. The malware may respond with an original, pre-infected, copy of the MBR as the result of the read attempt, thus fooling the scanner and remaining undetected. Such penetration method allows the malware to withstand an anti-virus scanner. Current detection and removal instructions instruct the user to boot the operating system from an external media (for example, bootable CD or USB) and to perform an offline disinfection. Such offline methods have poor usability and, moreover, the user may be unaware that the system is infected.
The following presents a simplified summary of the invention and provides a basic understanding of some aspects of the invention. The summary is not an extensive overview of the invention, and does not identify key elements of the invention or specify the scope of the invention. Its sole purpose is to present some concepts of the invention in a simplified form as an introduction to the more detailed description that is presented later.
The claims describe various aspects of the invention.
According to one aspect of the present invention, there is provided a method of protecting a processing system against malware infection. The method comprises: during the loading of an operating system, loading a boot time driver that is installed by an anti-virus application; reading a master boot record data by the boot time driver as soon as the operating system is ready to handle the request for reading the master boot record data; analyzing the collected master boot record data to identify any malicious entities; and in the event that malicious entities are identified, controlling the behavior of the processing system in order to disable the malicious entity.
According to a second aspect of the present invention, there is provided an apparatus, comprising: at least one processor; and at least one memory including executable instructions, the at least one memory and the executable instructions being configured to, in cooperation with the at least one processor, cause the apparatus to perform at least the following: during the loading of an operating system, loading a boot time driver that is installed by an anti-virus application; reading a master boot record data by the boot time driver as soon as the operating system is ready to handle the request for reading the master boot record data; analyzing the collected master boot record data to identify any malicious entities; and in the event that malicious entities are identified, controlling the behavior of the processing system in order to disable the malicious entity.
According to a third aspect of the present invention, there is provided a computer program, comprising code for loading a boot time driver that is installed by an anti-virus application during the loading of an operating system; code for reading a master boot record data by the boot time driver as soon as the operating system is ready to handle the request for reading the master boot record data; code for analyzing the collected master boot record data to identify any malicious entities; and code for controlling the behavior of the processing system in order to disable the malicious entity in the event that malicious entities are identified, when the computer program is run on a processor.
All combinations of the various aspects, embodiments and features of the invention are possible and within the scope of the present invention as claimed.
The accompanying drawings provide a more complete understanding of the embodiments of the present invention according to the following descriptions:
Example embodiments of the present invention are later described in more detail with reference to the accompanying drawings, in which some embodiments of the invention are shown. The invention may be embodied in many different forms and should not be construed as limited to the embodiments set forth here. Although the specification may refer to “an”, “one”, or “some” embodiment in several locations, this does not necessarily mean that each such reference is to the same embodiment, or that the feature only applies to a single embodiment. Single features of different embodiments may also be combined to provide other embodiments.
The present invention can apply to any processing system, terminal, server, corresponding component, or to any computer system or combination of different communications systems that support the required functionality. Due to the rapid development of the specifications of computer systems and protocols that are used, all words and expressions should be interpreted broadly; they are intended only to illustrate the embodiment.
An embodiment of the invention can be realized using a computer system 1, as illustrated in
The process of loading an operating system 7 into system memory may begin with the system BIOS invoking a boot loader from a boot volume. The boot loader loads the kernel of the OS and boot time drivers into system memory from the boot volume. A file system driver is loaded by a boot loader into system memory. The file system driver is the driver for the native file system of the OS 7.
In an embodiment, the anti-virus application 8 installs a boot time driver. During the loading of the OS 7, the boot time driver installed that is by the anti-virus application 8 is also loaded. The anti-virus application 8 comprises an MBR code reading unit 11 that is configured to read the MBR data by using the boot time driver as soon as the OS 7 is ready to handle the request for reading the MBR data. The collected MBR code may be analyzed in a scanning unit 13 of the anti-virus application 8 in order to identify any malicious entities within the MBR code. The anti-virus application 8 may make use of signatures and/or other features to identify suspect as well as trusted MBR code. This information may be stored in a memory portion 14 of the hard disk drive. The scanning unit 13 provides a result, for example trusted, malicious, suspicious, etc., to an action unit 15. In the event that malicious entities are identified, the behavior of the processing system may be controlled by the action unit 15 in order to disable the malicious entity. The action unit 15 is configured to take appropriate action depending upon the result that is determined.
In an embodiment, the anti-virus application 8 comprises an MBR copy unit 12 that is configured to create a clean copy of the MBR. The clean copy of the MBR is passed to the boot time driver, and in the event that malicious entities are identified in the MBR data, the infected MBR may be replaced with the clean copy of the MBR. The clean copy of the MBR may be stored in a system driver registry, for example.
The MBR launch point is very efficient from malware author's point of view. Therefore detecting and removing such malware, e.g. Trojans, is important. On an infected system, the viral loader may start working along with the infected driver. However, the viral loader code is unable to perform any modification or patching as long as the file system is not yet available. The resident loader code must wait for the file system notification to indicate that the file system is ready and only then it is able to patch one of the system drivers, for example atapi.sys. In the same time, the kernel loads the hard drive port driver, which is used by the operating system to load other system drivers including the file system drivers. There is a short time window after starting to load the boot driver and before malware patches the file system driver. In an embodiment, this time window is used to read the infected MBR, when the OS is not yet hooked by malware.
200: If an operating system load is detected to start, then 202 is entered.
202: A boot time driver installed by an anti-virus application is loaded. In an embodiment, the driver has a start type 0, which means that the driver is loaded ahead of file system.
204: MBR data is read by the boot time driver as soon as the OS is ready to handle the request. Due to performance optimization of some systems, the boot time driver may be unable to read disk within a DriverEntry routine, and ZwCreateFile routine returns: a STATUS_OBJECT_PATH_NOT_FOUND error. The DriverEntry is the first routine that is called after a driver is loaded and it is responsible for initializing the driver. The ZwCreateFile is a routine that creates a new file or opens an existing file. In an embodiment, there are one (or more) of the following actions, depending upon the product configuration that can be used to enable the successful reading of the disk:
Using one of the alternative methods above, the anti-virus boot time driver can open and read the raw disk data of the MBR, for example by using the ZwCreateFile routine. An example of a pseudocode that can be used for reading the MBR data is shown below:
206: MBR data collected during the reading of the MBR is analyzed.
208: If any malicious entities are detected or identified during the analysis, then 210 is entered. The anti-virus application has typically a database of suspicious actions and malicious entities, and it scans the MBR code to determine if any of these are present. An example of a suspicious action may be the presence of instructions requiring reading and writing to the local hard drive of the device.
210: Behavior of the processing system is controlled in order to disable any malicious entities. The detection of a suspicious instruction or malicious entity in the MBR code causes the anti-virus application to take certain defensive actions. This can include one or more of the following actions, depending upon product configuration:
300: A clean copy of MBR is created by the anti-virus application. This can include one (or more) of the following actions, depending upon the product configuration:
302: The clean copy of the MBR is passed to the boot time driver. The boot time driver may store the copy in a system driver registry. The system driver registry is accessible in a very early stage of the booting process as it contains input for the driver configuration. The same registry can be used to store the clean copy of the MBR that is received from anti-virus.
304: If a malicious entity is detected or identified during the analysis (as in 206 of
306: The infected MBR is replaced with the clean copy of the MBR. An example of a pseudocode that can be used for replacing infected MBR with the clean copy of the MBR is shown below:
After the clean copy of the MBR has been written, the system driver forces the system to reboot. The system is now booted from the clean copy and the malware is disabled.
Without in any way limiting the scope, interpretation or application of the claims appearing below, the technical effects of one or more of the example embodiments disclosed here reduce the security risks caused by malware on end user devices. Resources of the system can also be saved when there is no need for offline booting of the operating system when detecting and/or removing certain kind of malware, such as MBR-style rootkits. The described embodiments are also very reliable and generic.
The steps, points, signaling messages and related functions described above in relation to
The techniques described here may be implemented by various means. An apparatus or system that implements one or more of the described functions with an embodiment comprises not only existing means, but also means for implementing one or more functions of a corresponding apparatus that is described with an embodiment. An apparatus or system may also comprise separate means for each separate function. These techniques may be implemented in one or more modules of hardware or combinations thereof. For software, implementation can be through modules, for example, procedures and functions that perform the functions described here. The software code may be stored in any suitable data storage medium that is readable by processors, computers, memory units or articles of manufacture, and may be executed by one or more processors or computers. The data storage medium or memory unit may be implemented within the processor or computer, or as an external part of the processor or computer, in which case it can be connected to the processor or computer via various means known in the field.
The programming, such as executable code or instructions, electronic data, databases or other digital information can be stored into memories and may include a processor-usable medium. A processor-usable medium may be embodied in any computer program product or an article of manufacture which can contain, store, or maintain programming, data or digital information for use by or in connection with an instruction execution system, including the processor 2 in the exemplary embodiment.
An embodiment provides a computer program product that comprises a computer-readable medium bearing a computer program code that is embodied therein for use with a computer. The computer program code comprises a code for loading a boot time driver installed by an anti-virus application during the loading of an operating system; a code for reading a master boot record data by the boot time driver as soon as the operating system is ready to handle the request for reading the master boot record data; a code for analyzing the collected master boot record data to identify any malicious entities; and a code for controlling the behavior of the processing system in order to disable the malicious entity in the event that malicious entities are identified, when the computer program is run on a processor.
Embodiments of the present invention may be implemented in software, hardware, application logic or a combination of these. In an example of an embodiment, the application logic, software or a set of instructions is maintained on any conventional computer-readable media. In the context of this document, a “computer-readable medium” may be any media or means that can contain, store, communicate, propagate or transport the instructions for use by or in connection with an instruction execution system, apparatus, or device, such as a computer. A computer-readable medium may comprise a computer-readable storage medium that may be any media or means that can contain or store the instructions for use by or in connection with an instruction execution system, apparatus, or device, such as a computer.
The various aspects of the invention are not limited to the combinations explicitly set out in the independent claims. Other aspects of the invention may comprise combinations of features from the described embodiments, the dependent claims and the independent claims.
It is obvious to a person skilled in the field that, as the technology advances, the inventive concept can be implemented in various ways. The invention and its embodiments are not limited to the examples described above but may vary within the scope of the claims.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/IB2011/052994 | 7/6/2011 | WO | 00 | 1/6/2014 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2013/005079 | 1/10/2013 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
5509120 | Merkin et al. | Apr 1996 | A |
6802028 | Ruff et al. | Oct 2004 | B1 |
7665123 | Szor et al. | Feb 2010 | B1 |
8417962 | Novak et al. | Apr 2013 | B2 |
8713686 | Kane | Apr 2014 | B2 |
20060041738 | Lai | Feb 2006 | A1 |
20060236399 | Han | Oct 2006 | A1 |
Number | Date | Country | |
---|---|---|---|
20140137253 A1 | May 2014 | US |