Security Bulletin - Keyloggers and Spyware

ITSB-49

March 2008                                                                   

Security Bulletin – Keyloggers and Spyware


Purpose

The purpose of this Bulletin is to advise Government of Canada (GC) departments and agencies of the security threat posed by modern “keylogger” software with enhanced data capture capabilities which utilize “stealth” techniques to hide from anti-virus and anti-spyware scanners.

 

Background

A ‘keystroke logger’ or ‘keylogger’ is a type of software that is commonly associated with spyware, which is any unauthorized or malicious software installed to secretly monitor user activity and/or to gather data which is stored on a compromised computer.

In reality, like many malicious hacker tools, keyloggers originated as an administrative and diagnostic tool; however, even helpful tools may be subverted and used for illegal or questionable activities. Such is the case with keylogging software.

A traditional keylogger program has the ability to record every keystroke typed at the keyboard at any time. Keyloggers have been used to capture user names, passwords, account numbers or other sensitive information typed at the keyboard. These keystrokes are saved to a log file that can be transmitted to an unknown third party – e.g., in February 2006, it was publicly reported in the EU that foreign criminal organizations utilized keylogger software to capture users’ bank account numbers and passwords, and stole over 1 million Euros.

In this attack, a keylogger program was invisibly installed on users’ machines through e-mail attachments or “drive-by” downloads (web content which exploits known system security problems in operating systems, web browser and messaging software to automatically download and install arbitrary code) when users visited certain Web sites.

Recently, a new type of keylogger software containing greatly enhanced features has appeared. This new generation of keylogger software not only captures keystrokes, but is also able to:

The advanced capability of these new keyloggers now make available to an attacker a more complete picture of the activities performed on a computer with minimal danger of discovery, and dramatically increases the risk of compromise of sensitive data.

Many of these keyloggers are now packaged as commercial software and available for anyone to download and install, increasing the threat due to insider activity.

 

Technical

Several common methods of “hiding” a process from the operating system or scanning software exist:

Method 1: System calls to enumerate disk directories are altered to prevent listing of files used by the keylogger. Files then become invisible to File Manager and “dir” command, so anti-virus and spyware scanners cannot see or scan the files.

Method 2: System calls to open and read files are altered so that when compromised operating system files are scanned, an unaltered version of the file is presented and passes the scan.

Such techniques are often used to make keyloggers and other spyware virtually invisible to the current generation of virus and spyware scanners, and also complicate the removal of such unwanted software because the host operating system is also compromised.

Typically, off-line “forensic”-style scanner tools are used to detect/defeat these “stealth” techniques; the disadvantages of these types of tools include the fact that system must be rebooted with the tool CD. Unlike current virus scanners which run in conjunction with user process and allow the user to continue to work, off-line tools need to boot into a protected environment to remove the influence of a compromised host operating system. As well, most tools of this nature are either proprietary or, in the case of freely available toolsets, still experimental or undergoing active development.

All operating systems (Windows, Unix/Linux/MacOS) are vulnerable to similar techniques, although Windows tends to be the primary target due to the large number of installations.

The new Microsoft Windows Vista operating system contains features (e.g., the Hypervisor) that makes it more resistant, but not immune, to such “stealth” techniques. A number of commercial keylogger packages already advertise full Windows Vista compatibility.

 

Impact on Government of Canada Departments

Traditionally, the risk arising from traditional keyloggers is high but considered as having only minimal impact because the amount of data that can be typed at a keyboard is comparatively low and without context (i.e., the application or system a password is for may not be evident in a keystroke log).

However, beyond the threat resulting from compromise of user names, passwords and other data typed in from a keyboard that traditional keyloggers pose, the new generation of enhanced key and data loggers introduce several serious security threats to GC departments and agencies:


Recommendation

Because new generation keyloggers may not be detectable by common virus and spyware scanners, GC departments and agencies can minimize the risks from keyloggers by:


Contacts and Assistance

Head, IT Security Client Services
Communications Security Establishment Canada
PO Box 9703, Terminal
Ottawa, Ont K1G 3Z4
Telephone: (613) 991-8495
e-mail : itsclientservices@cse-cst.gc.ca

Signature
Gwen Beauchemin
Director, IT Security Mission Management