Rootkit: Difference between revisions
fixing redirect using AWB |
m →Windows: DarkSpy Anti-rootkit link added. |
||
Line 99: | Line 99: | ||
===Software=== |
===Software=== |
||
=====Windows===== |
=====Windows===== |
||
* [http://www.fyyre.net/~cardmagic/index_en.html DarkSpy] - DarkSpy Anti-rootkit. |
|||
* [http://rkunhooker1.narod.ru/ Rootkit Unhooker] - Anti-rootkit software made by two Russian hackers. |
* [http://rkunhooker1.narod.ru/ Rootkit Unhooker] - Anti-rootkit software made by two Russian hackers. |
||
* [[RootkitRevealer]] from [[Sysinternals]] (Microsoft acquired Sysinternals in July, 2006). |
* [[RootkitRevealer]] from [[Sysinternals]] (Microsoft acquired Sysinternals in July, 2006). |
Revision as of 13:46, 30 May 2007
A rootkit is a set of software tools intended to conceal running processes, files or system data from the operating system. Rootkits have their origin in relatively benign applications, but in recent years have been used increasingly by malware to help intruders maintain access to systems while avoiding detection. Rootkits exist for a variety of operating systems, such as Microsoft Windows, Linux and Solaris. Rootkits often modify parts of the operating system or install themselves as drivers or kernel modules.
Origins
The term "rootkit" (also written as "root kit") originally referred to a set of recompiled Unix tools such as "ps", "netstat", "w" and "passwd" that would carefully hide any trace of the intruder that those commands would normally display, thus allowing the intruders to maintain "root" access (highest privilege) on the system without the system administrator even seeing them.
The term is no longer restricted to Unix-based operating systems, as tools that perform a similar set of tasks now exist for non-Unix operating systems such as Microsoft Windows, regardless of the existence (or lack of existence) of a "root" in the operating system.
Common use
A rootkit can take full control of a system. A rootkit's only purpose is to hide files, network connections, memory addresses, or registry entries from other programs used by system administrators to detect intended or unintended special privilege accesses to the computer resources. However, a rootkit may be incorporated with other files which have other purposes. It is important to note that the utilities bundled with the rootkit may be malicious in intent, but a rootkit is essentially a technology; it may be used for both productive and destructive purposes.
A rootkit is often used to hide utilities. These are often used to abuse a compromised system,and often include so-called "backdoors" to help the attacker subsequently access the system more easily. For example, the rootkit may hide an application that spawns a shell when the attacker connects to a particular network port on the system. Kernel rootkits may include similar functionality. A backdoor may also allow processes started by a non-privileged user to execute functions normally reserved for the superuser. All sorts of other tools useful for abuse can be hidden using rootkits. This includes tools for further attacks against computer systems which the compromised system communicates with, such as sniffers and keyloggers. A possible abuse is to use a compromised computer as a staging ground for further abuse (see zombie computer). This is often done to make the abuse appear to originate from the compromised system or network instead of the attacker. Tools for this can include denial-of-service attack tools, tools to relay chat sessions, and e-mail spam attacks. A major use for rootkits is allowing the programmer of the rootkit to see and access user names and log-in information for sites that require them. The programmer of the rootkit can store unique sets of log-in information from many different computers. This makes the rootkits extremely hazardous, as it allows trojans to access this personal information while the rootkit covers it up.
Rootkits are not always used to attack and gain control of a computer. Some software may use rootkits to hide from 3rd party scanners to prevent detection or tampering. Some emulation software and security software is known to be using rootkits.[1] Alcohol 120% and Daemon Tools are commercial examples of the use of non-hostile rootkits.
Rootkit is a term now loosely applied to cloaking techniques and methods.[2]
Types
Rootkits come in five different flavors: firmware, virtualized, kernel, library and application level kits.
Firmware
A firmware rootkit uses device or platform firmware to instantiate a persistent image of rootkit malware. The rootkit can hide in firmware because firmware often is not inspected for code integrity. John Heasman demonstrated viability of creating firmware rootkits in both ACPI[3] and in a PCI expansion ROM.[4]
Virtualized
Virtualised rootkits are the lowest level of rootkit currently produced. These rootkits work by modifying the boot sequence of the machine to load themselves instead of the original virtual machine monitor or operating system. Once loaded into memory a virtualised rootkit then loads the original operating system as a Virtual Machine thereby enabling the rootkit to intercept all hardware calls made by the guest OS. The SubVirt laboratory rootkit developed jointly by Microsoft and University of Michigan researchers is an example of a Virtual Machine based rootkit or VMBR.
Kernel level
Kernel level rootkits add additional code and/or replace a portion of kernel code with modified code to help hide a backdoor on a computer system. This is often accomplished by adding new code to the kernel via a device driver or loadable module, such as Loadable Kernel Modules in Linux or device drivers in Microsoft Windows. These rootkits often have serious impacts on entire system stability if mistakes are found to be present in the kit's code.
Kernel rootkits can be especially dangerous because they can be difficult to detect without appropriate software.
Library level
Library rootkits commonly patch, hook, or replace system calls with versions that hide information about the attacker.
Application level
Application level rootkits may replace regular application binaries with trojanized fakes, or they may modify the behavior of existing applications using hooks, patches, injected code, or other means.
Detecting
There are inherent limitations to any program that attempts to detect rootkits while the program is running under the suspect system. Rootkits are suites of programs that modify many of the tools and libraries upon which all programs on the system depend. Some rootkits modify the running kernel via loadable modules on Linux and many other forms of UNIX, and possibly through VxDs, virtual external drivers, on MS Windows platforms. The fundamental problem with rootkit detection is that the operating system currently running cannot be trusted. In other words, actions such as requesting a list of all running processes or a list of all files in a directory cannot be trusted to behave as intended by the original designers. Rootkit detectors that run on live systems currently only work because the rootkits detectable have not yet been developed to hide themselves fully.
The best and most reliable method for rootkit detection is to shut down the computer suspected of infection and check its storage by booting from an alternative medium (e.g. rescue CD-ROM or USB flash drive). A non-running rootkit cannot hide its presence, and most established antivirus programs will identify rootkits armed via standard OS calls (which are supposedly doctored (modified) by the rootkit) and lower level queries, which ought to remain reliable. If there is a difference, the presence of a rootkit infection can be assumed. Rootkits attempt to protect themselves by monitoring running processes and suspending their activity until the scanning has finished.
Security vendors envision a solution by integrating rootkit detection into traditional antivirus products. Should a rootkit decide to hide during the scan process, it will be identified by the stealth detector. If it decides to temporarily unload from the system, the traditional antivirus will find it using fingerprint detection. This combined defense may force attackers to implement counter-attack mechanisms (so called retro routines) in their rootkit code that will forcibly remove security software processes from memory, effectively killing the antivirus program. As with computer viruses, the detection and elimination of rootkits will be an ongoing struggle between the creators of the tools on both sides of this conflict.
There are several programs available to detect rootkits. On Unix-based systems, two of the most popular are chkrootkit and rkhunter. For the Windows platform there are many free detection tools such as Blacklight. Another Windows detector is RootkitRevealer from Sysinternals which will detect all current rootkits by comparing the results from the OS to the actual listing read from the disk itself. However, some rootkits started to add RootkitRevealer to a list of files it does not hide from--so in essence, they remove the differences between the two listings, and the detector doesn't report them.
As always, prevention is better than cure. If the integrity of the system install disks is trusted, cryptography may be used to monitor the integrity of the system. By "fingerprinting" the system files immediately after a fresh system install and then again after any subsequent changes made to the system (e.g. installing new software), the user or administrator will be alerted to any dangerous changes to the system's files. In the fingerprinting process a cryptographic hash function is used to create a fixed-length number that is dependent on every bit of data contained in the file being fingerprinted. By calculating and comparing hash values of files (the essence of the fingerprint) at regular intervals, changes not made by any intended user of the system can be detected.
Detection in firmware can be achieved by computing a cryptographic hash of firmware and comparing hash values to a whitelist of expected values, or by extending the hash value into TPM configuration registers, which are later compared to a whitelist of expected values. Code that performs hash, compare, and/or extend operations must itself not be compromised by the rootkit. The notion of an immutable (by a rootkit) root-of-trust ensures that the rootkit does not compromise the system at its most fundamental layer. Rootkit detection using a TPM is further described in Stopping Rootkits at the Network Edge, January 2007.
Removing
There is a body of opinion that holds this to be forbiddingly impractical. Even if the nature and composition of a rootkit is known, the time and effort of a system administrator with the necessary skills or experience would be better spent re-installing the operating system from scratch. Since drive imaging software makes the task of restoring a “clean” OS installation almost trivial, there is no good reason to try to dig a rootkit out directly. "I suppose traditional rootkits could be made to be as hard to remove as possible even when found, but I doubt this is much incentive for that, because the typical reaction of an experienced sysadmin on finding a rooted system is to save the data files, then reformat. This is so even if the rootkit is very well known and can be removed 100%." Rootkit Question
There is a way to delete a rootkit using another filesystem driver when the system is online. Rkdetector v2.0 implements a way to wipe hidden files when the system is running using its own NTFS and FAT32 filesystem driver. Once erased and after a system reboot, rootkit files will not be loaded because data contained is corrupted.
Comparison with computer viruses and worms
The key distinction between a computer virus and a rootkit relates to propagation. Like a rootkit, a computer virus modifies core software components of the system, inserting code which attempts to hide the "infection" and provides some additional feature or service to the attacker (the "payload" of a virus).
In the case of the rootkit the payload may attempt to maintain the integrity of the rootkit (the compromise to the system) --- for example every time one runs the rootkit's ps command it may check the copies of init and inetd on the system to ensure that they are still compromised, and "re-infecting" them as necessary. The rest of the payload is there to ensure that the intruder can continue to control the system. This generally involves having backdoors in the form of hard-coded username/password pairs, hidden command-line switches or magic environment variable settings which subvert the normal access control policies of the uncompromised versions of the programs. Some rootkits may add port knocking checks to existing network daemons (services) such as inetd or the sshd.
A computer virus can have any sort of payload. However, the computer virus also attempts to spread to other systems. In general, a rootkit limits itself to maintaining control of one system.
A program or suite of programs that attempts to automatically scan a network for vulnerable systems and to automatically exploit those vulnerabilities and compromise those systems is referred to as a computer worm. Other forms of computer worms work more passively, sniffing for usernames and passwords and using those to compromise accounts, installing copies of themselves into each such account (and usually relaying the compromised account information back to the intruder through some sort of covert channel).
Of course there are hybrids. A worm can install a rootkit, and a rootkit might include copies of one or more worms, packet sniffers or port scanners. Also many of the e-mail worms are commonly referred to as "viruses." So all of these terms have somewhat overlapping usage and can be easily conflated.
Publicly available
Like most software used by attackers, lots of implementations are shared and are easily available on the Internet. It is not uncommon to see a compromised system where a sophisticated publicly available rootkit hides the presence of unsophisticated worms or attack tools that appear to be written by inexperienced programmers.
Most of the rootkits available on the Internet are constructed as an exploit or "proof of concept" to demonstrate varying methods of hiding things within a computer system. Since these are often not fully optimized for stealth, they sometimes leave evidence of their presence on a system. Even so, when such rootkits are used in an attack they are often very effective.
See also
- Hacker con
- Computer virus
- Host-based intrusion detection system
- The SANS Institute
- 2005 Sony BMG CD copy protection scandal
References
- ^ Russinovich, Mark (2006-02-06). "Using Rootkits to Defeat Digital Rights Management". Winternals. SysInternals. Archived from Using Rootkits to Defeat Digital Rights Management the original on 2006-08-31. Retrieved 2006-08-13.
{{cite web}}
: Check|url=
value (help) - ^ Unearthing Root Kits by Mark Russinovich in Windows IT Pro June 2005.
- ^ Implementing and Detecting an ACPI Rootkit, by John Heasman, presented at BlackHat Federal, 2006.
- ^ Implementing and Detecting a PCI Rootkit by John Heasman, 15 November, 2006.
- Mark Russinovich, Advanced Malware Cleaning video, Microsoft TechEd: IT Forum, November 2006
- Robert S Morris, Sr. "UNIX Operating System Security", BSTJ, Vol. 62, No. 8, 1984 Bell Systems Technical Journal
- Jamie Butler and Greg Hoglund. Rootkits: Subverting the Windows Kernel. Addison Wesley, 2005. ISBN 0-321-29431-9
- Nancy Altholz and Larry Stevenson. Rootkits for Dummies. John Wiley and Sons Ltd, 2006. ISBN 0-471-91710-9
External links
This article's use of external links may not follow Wikipedia's policies or guidelines. |
- rootkit.com (online rootkit magazine)
- antirootkit.com Rootkit Detection & Removal Software.
- A test of anti-rootkit software made by InformationWeek, January 2007
- Strider GhostBuster Rootkit Detection from Microsoft Research
- Steve Gibson's Security Now! Episode #9 (on rootkits)
- Steve Gibson's Security Now! Episode #12 (on rootkits)
- Sony, Rootkits and Digital Rights Management Gone Too Far (Mark Russinovich's first blog entry about the Sony DRM rootkit, from which the scandal ensued)
- SIDE (proof of concept rootkit for Linux 2.6
- Designing BSD Rootkits An Introduction to Kernel Hacking (book by Joseph Kong)
- How to remove spyware from your PC: rid yourself of rootkits
- Glossary of malware terminology ("Rootkit" has a negative connotation)
Software
Windows
- DarkSpy - DarkSpy Anti-rootkit.
- Rootkit Unhooker - Anti-rootkit software made by two Russian hackers.
- RootkitRevealer from Sysinternals (Microsoft acquired Sysinternals in July, 2006).
- IceSword, by Chinese programmer "pjf_". Mirror available at MajorGeeks.
Unix, Linux
- chkrootkit locally checks for signs of a rootkit.
- rkhunter is an easy-to-use tool which checks computers running UNIX (clones) for the presence of rootkits and other unwanted tools.
Freeware and open source software
- Archon Scanner
- AVG Anti-Rootkit Free Edition
- DarkSpy
- GMER Rootkit scanner
- Helios Background scanning rootkit detection and inoculation software
- IceSword (slow Chinese site), faster file mirror, interview with the software creator "pjf_" and basic instructions for IceSword in English with illustrations
- klister Created by Joanna Rutkowska (Windows 2000)
- wssecure Application Monitor Realtime process monitoring with checksum check. (.NET 2)
- RAIDE
- Rootkit Unhooker A rootkit detector and remover
- System Virginity Verifier
- Sophos Anti-Rootkit Eliminates hidden applications and processes (Windows)
- Sysinternals Rootkit Revealer Scanner from Sysinternals
- Trend Micro Rootkit Buster Scanner from Trend Micro