- Whats a Rootkit?
- Whats Available To Help Find Rootkits?
- What To Do If Youve Been Rootkitted
What’s Available To Help Find Rootkits?
A number of tools are available to help you find rootkits on Windows systems. The basic rootkit-detection strategy is comparison. The software goes through the system, comparing the various files and register entries against some standard and looking for changes that shouldn’t be there.
A number of Windows rootkit detectors work by scanning the system in different ways and comparing the results. Microsoft’s prototype GhostBuster Inside-The-Box scans Win32 APIs and then parses the master file table and the registry hive file. Anything that shows up on the list of Win32 APIs should be reflected in the master file table and have matching entries in the registry hives. In addition, the program compares the API scan with the active process list and other kernel data structures. If the comparison detects processes or files on one place but not the others, the program reports it.
Of course, if the rootkit has gimmicked parts of the operating system so they lie about what’s going on, getting a truthful comparison can be difficult. This is one reason that more sophisticated rootkit-detection products use a separate operating system, often running from a read-only CD.
Microsoft has developed a tool called WinPE GhostBuster that uses a technique called a cross-view diff scan. This technique scans the entire system first from the inside and then from the outside, using a WinPE bootable CD. (WinPE is a stripped-down version of Windows that will fit on a single CD.) The program compares the two scans and reports any files that showed up on the outside scan but weren’t reported by the inside scan. These are almost always deliberately hidden files—part of a rootkit, in other words.
The biggest problem with any version of GhostBuster is that, as of this writing, you simply can’t get it. The GhostBuster tools are a research project at Microsoft, and Microsoft hasn’t said when (or if) they’ll be released. Microsoft is promising to include rootkit detection and blocking in future versions of its anti-spyware product, but isn’t saying what technologies it will use or when it will be released.
Aside from Microsoft’s reluctance to share its toys, outside-the-box detectors are probably state-of-the-art for rootkit detection. However, they’re not foolproof. Microsoft warns that WinPE GhostBuster doesn’t scan the memory in devices such as graphics cards, EEPROM, or in the BIOS. On the other hand, the BIOS and graphics systems are much more machine-specific than Windows itself, meaning that it will be harder for rootkit writers to infect as many machines.
Ideally, rootkit detection and cleaning should be part of every antivirus program. But almost no antivirus programs detect against or protect you from rootkits. This is partially because awareness of rootkits has been slow in coming, and partially because until very recently antivirus vendors didn’t consider rootkits to be their problem. This attitude is changing, and antivirus vendors are struggling to add rootkit detection to their software.
The effort to add rootkit detection to antivirus software is complicated by the fact that the classic virus-detection technique—signature detection—isn’t nearly as effective against rootkits. Some of the newer rootkits deliberately alter themselves in ways that change their signatures every time they infect a new system.
For the time being, if you want rootkit protection, you need specialized rootkit-detection software. A growing number of choices are available, with varying levels of sophistication. Many of these tools are available for free over the Internet.
RKDetect
RKDetect is a simple Visual Basic script that compares services on a remote computer by comparing scans at user level and kernel level. This detects the hidden services that are used to start rootkits. This technique is useful for detecting simple rootkits like Hacker Defender.
RootkitRevealer
RootkitRevealer, available from the Sysinternals Freeware web site, can find registry and filesystem inconsistencies that indicate rootkits, by performing both low-level (user level) and high-level (operating system level) scans and comparing the results.
Like many rootkit detectors, RootkitRevealer takes some technical sophistication to use. Not all the discrepancies the program reports are parts of rootkits, and you need the technical understanding to analyze the report to determine what’s what.
Unfortunately, some rootkit programs, including some versions of Hacker Defender, are easily modified to expose themselves only to RootkitRevealer so that the program doesn’t report them. This "unhiding" technique can be used against a number of other rootkit-detection programs as well.
Within a matter of days of unhiding against RootkitRevealer becoming known, a workaround was discovered—renaming the program’s .exe file so it wouldn’t be recognized by the rootkit. Unfortunately, this was quickly followed by the bad guys discovering a workaround for the workaround, and the good guys coming up with a workaround to the workaround to the workaround—and so the game continues. (See Robert Hensing’s Secure Windows Initiative blog for more information.)
F-Secure Blacklight Rootkit Elimination Technology
F-Secure Blacklight Rootkit Elimination Technology is designed not only to detect hidden files, but to eliminate them. This makes it different from most of the programs on the market that simply detect rootkits. However, again, the rootkit writers are using the "unhiding" technique to conceal rootkits from Blacklight. Blacklight recommends renaming the .exe file to avoid unhiding.
Blacklight is much more of a commercial product than offerings such as RootkitRevealer and RKDetect. For one , it attempts to filter out false positives from the list of discrepancies.
At this writing, Blacklight is still in beta, but is expected to go commercial at the end of 2005.
RootKit Hook Analyzer
RootKit Hook Analyzer from Resplendence looks for kernel hooks on a Windows system. Kernel hooks are an old and deprecated method of accessing services in the Windows kernel. They’re still used by some antivirus and system tools to do particularly difficult jobs that can’t be handled conventionally. However, kernel hooks are also a classic method for rootkits to access services.
Again, the user has to be able to analyze the list of hooks the program finds, to determine which ones are dangerous and which aren’t.
RootKit Hook Analyzer is currently a free download from Resplendence. It will be incorporated into a forthcoming version of the company’s antivirus program.