In recent years, malware authors have developed increasingly sophisticated rootkits that burrow into the operating system itself, modifying basic filesystem and process management code in a way that ensures they are essentially invisible to anyone using the machine: no files visible, no processes apparent. While some progress has been made in detecting when a rootkit has compromised a system, preemptively blocking an attack has remained challenging, since the malware relies on important system functions. A team of computer scientists have now described a tool, called Hook Safe, that uses virtualization to preempt rootkits by moving and protecting the kernel functions that they target.
Rootkits burrow their way into an operating system’s kernel using a process called hooking. The services provided by a kernel—file system and hardware access, memory management, etc.—are accessible through callable functions. The kernel keeps track of where the functions reside in memory using pointers, which contain the address in memory of the function. Hooking involves replacing a legitimate function pointer with one provided by malware. So, for example, the malware might replace (or hook) a file system function with one that behaves perfectly normally except when it comes to the areas of the filesystem where the malware lives; in that case, it returns information that suggests the files aren’t there. Any software that uses the kernel for filesystem access will never know the rootkit is present.
Obviously, the simplest way of blocking a rootkit would be to prohibit this process by marking kernel memory as read-only. But there are two problems with this approach. For starters, the ability to perform a kernel hook has many legitimate uses, such as when a new input device hooks into the portions of the kernel that handle mouse or keyboard input. The other problem is that the function pointers are scattered around the kernel’s memory footprint, and are sometimes created and destroyed as the kernel creates new objects, like networking sockets. Locking the entire kernel down as read-only would cripple the operating system.

Loading comments...