(12) United States Patent (10) Patent No.: US 7,921.461 B1 Golchikov Et Al
Total Page:16
File Type:pdf, Size:1020Kb
USOO7921461B1 (12) United States Patent (10) Patent No.: US 7,921.461 B1 Golchikov et al. (45) Date of Patent: Apr. 5, 2011 (54) SYSTEMAND METHOD FOR ROOTKIT S.8. 53 A. : SS Eyrdseter . et. al.. ............... 7 1. DETECTION AND CURE 2004/O181561 A1 9, 2004 Knox et al. 2005, 0021994 A1 1/2005 Barton et al. (75) Inventors: Andrey V. Golchikov, Moscow (RU); 2005/0278788 A1 12/2005. Jindal et al. Andrey V. Sobko, Moscow (RU) 2006/0031673 A1 2/2006 Becket al. .................... T13, 164 2006.0053270 A1* 3, 2006 Dunn et al. 712/13 (73) Assignee: Kaspersky Lab, ZAO, Moscow (RU) 2.99. A. : 29: RSU ca.tal. ... 2. (*) Notice: Subject to any disclaimer, the term of this 2008.0034429 A1 ck 2/2008 Schneider ....................... T26/23 patent is extended or adjusted under 35 OTHER PUBLICATIONS U.S.C. 154(b) by 1115 days. Simon Baker et al. "Checking Microsoft Windows(R) Systems for (21) Appl. No.: 11/623,364 Signs of Compromise', Oct. 28, 2005, version 1.3.4, pp. 1-18.* y x- - - 9 * cited by examiner (22) Filed: Jan. 16, 2007 Primary Examiner — Farid Homayoumehr (51) Int. Cl. Assistant Examiner — Michael Guirguis ge. 5.b4. 3:08: (74) Attorney, Agent, or Firm — Bardmesser Law Group GSB 23/00 (2006.01) (57) ABSTRACT (52) U.S. Cl. ................... 726/23: 726/24; 726/25; 713/2 ASVstem. method and computer program product for SVStem (58) Field of Classification Search .................... 726/26, ystem, computer program pr ySt. 726/23 25: 713/2 for detecting a rootkit on a computer having an operating S lication file f let h his s system, including a native application in ring 0 which, when ee appl1cauon Ille Ior complete searcn n1Story. the operating system is in a trusted State upon a reboot of the (56) References Cited computer, after loading of the boot drivers but before loading of non-boot drivers, generates a first Snapshot for selected U.S. PATENT DOCUMENTS files of the operating system and for a registry; the first Snap 5,613.002 A 3, 1997 Keph 1 shot being stored on a persistent storage medium of the com 5.878,050 A 3, 1999 E. I. puter; a second snapshot for the selected files and for the 5.995,982. A 1/1999 Mercer registry generated by the ordinary application after the load 6,021,491 A 2/2000 Renaud ing of the non-boot drivers, generating; means for comparing 3. g R ck 3. Hanah . T13, 189 the second Snapshot with the first Snapshot; and upon detect C 7,631.3576,990,600 B2B1 * 12/20091/2006 StringhamRyan et al. ...................... T26/24 registrying, in branch,s E. means forE. 1nforming ofa masked a user of t possibleR rootkit 2001/0037323 A1* 11/2001 Moulton et al. .................. 707/1 presence on the computer. 2002fOO 10459 A1 1/2002 Whittier et al. 2002/0174349 A1 11, 2002 Wolff et al. 23 Claims, 3 Drawing Sheets Gre)- 2 Loadboot drivers 104 Call native application, generate 108 snapshot 1 122 Cure system of end of load process, possible start the rootkit 108 of rootkit 120-N- Generate (receive?) snapshot 1 110 Generate snapshot 2 118/N Loadboot driver 112 are snapshots 1 and 2 the same? 3-> 118 114 Inform user"no rootkit present" 102 U.S. Patent Apr. 5, 2011 Sheet 1 of 3 US 7,921.461 B1 LOadbOOt driverS 104 Call native application, generate 122 106 snapshot 1 Cure system of 108 End of load process, possible start the rootkit of rootkit 1201Nu- Generate (receive?) 110 Generate snapshot 2 L- Snapshot 1' 118 112 Are Snapshots 1 and 2 the Same? 9 CD ch 116 Inform user "no rootkit present" GeoD 102 FIG. 1 U.S. Patent Apr. 5, 2011 Sheet 2 of 3 US 7,921.461 B1 ZZZ SuunS|Ou?uOO 092 ?SnOW ZOZ U.S. Patent Apr. 5, 2011 Sheet 3 of 3 US 7,921.461 B1 ?ueduuOO US 7,921,461 B1 1. 2 SYSTEMAND METHOD FOR ROOTKT function call, and provides its own return parameters to the DETECTION AND CURE antivirus Software, but masks its own process. Also, the root kit typically hides the files in which it is stored from conven BACKGROUND OF THE INVENTION tional antivirus mechanisms that check whether files contain known virus signatures. In other words, the files where the 1. Field of the Invention rootkit is stored are never actually checked by the antivirus The present invention relates to computer systems and, software, which makes rootkits particularly difficult to detect more specifically, to a system, method and computer program and cure. product for rootkit detection. In the context of the Microsoft Windows operating system, 2. Background Art 10 a rootkit operates by intercepting the system function calls (so A rootkit is a set of software tools frequently used by a third called Windows APIs). Interception and modification of the party (usually an intruder) after gaining access to a computer lower level API functions is the mechanism that rootkits use system intended to conceal running processes, files or system to mask their presence in the system. Furthermore, rootkits data, which helps an intruder maintain access to a system can often mask the presence, in the system, of any descrip without the user's knowledge. Rootkits are known to exist for 15 tions of the rootkit in the process configuration settings, files a variety of operating systems such as Linux, Solaris and and folders, register keys, etc. Many rootkits install their own versions of Microsoft Windows. A computer with a rootkit on drivers and services into the system. The added drivers and it is referred to as a “rootkited' computer. services are also, obviously, masked. U.S. Pat. No. 7,032,114 The term “rootkit' (also written as “root kit') originally describes a method of detecting a rootkit, where an initial referred to a set of recompiled Unix tools such as “ps.” “net sample is formed, after which the current sample of operating stat.” “w” and “passwd that would carefully hide any trace of system is compared with the initial sample, in order to iden the intruder that those commands would normally display, tify the presence of a rootkit. thus allowing the intruders to maintain “root’ on the system U.S. Publication Application No. 2006/0168352 describes without the system administrator even seeing them. Now the a conventional method of disinfecting a network node, where term is not generally restricted to Unix-based operating sys 25 an initial Snapshot is formed, and a Subsequent Snapshot, tems, as tools that perform a similar set of tasks now exist for formed during the reboot process, is compared to the original non-Unix operating systems such as Microsoft Windows Snapshot. (even though Such operating systems may not have a “root U.S. Pat. No. 6,792,556 describes a conventional method account). of identifying a virus and computer recovery after being A rootkittypically hides logins, processes, threads, registry 30 infected by a virus during the boot process, where a Snapshot keys, files, and logs and may include Software to intercept of the system state is saved to a file, and then, during the boot data from terminals, network connections, and the keyboard. process, a current boot entry is generated, and a comparison Rootkits come in three different “flavors’: kernel, library of the current boot entry with the snapshot is performed. and application level kits. Kernel level Rootkits add addi Based on the comparison, in the case of virus presence, the tional code and/or replace a portion of kernel code with modi 35 system is restored from the original Snapshot. Furthermore, fied code to help hide a backdoor on a computer system. This the Snapshot can take a control sum into account. is often accomplished by adding a new code to the kernel via However, most conventional methods cannot be used to a device driver or loadable module, such as Loadable Kernel detect the presence of a rootkit, due to its very nature. Fur Modules in Linux or device drivers in Microsoft Windows. thermore, most of the conventional methods do not guarantee Library rootkits commonly patch, hook, or replace system 40 the detection of most rootkits that mask their existence, even calls with versions that hide information about the attacker. where signature comparisons are used. Application level rootkits may replace regular application Accordingly, there is a need in the art for a system and binaries with trojanized fakes, or they may modify the behav method for a more effective detection and cure of rootkit ior of existing applications using hooks, patches, injected infected computers. code, or other means. Kernel rootkits can be especially dan 45 gerous because they can be difficult to detect without appro SUMMARY OF THE INVENTION priate Software. Rootkits are usually written to the disk storage for activa The present invention relates to a detecting and curing tion after operating system restart and are hiddden from the rootkit, that substantially obviates one or more of the disad operating system during requests to the file system. "Root 50 Vantages of the conventional art. kits' are difficult to detect because they are activated before In an exemplary embodiment of the present invention, the operating system has completely booted up and often there is provided a system, method and computer program allows the installation of hidden files, processes and hidden product for system for detecting a rootkit on a computer user accounts in the systems OS. Rootkits are usually embed having an operating system, the system including a native ded in operating system processes in a filter-like manner, so 55 application in ring 0 which, when the operating system is in a that any regular detection means of the operating system trusted State upon a reboot of the computer, after loading of cannot get information related to hidden software or software the boot drivers but before loading of non-boot drivers, gen pieces.