ArticleslgStudy

computer science

Keylogger

Keylogger is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Keylogger rather than just read about it. In short: A keystroke logger (keylogger) is a hardware or software component for logging the input of a keyboard. The person using the keyboard is typically unaware that their actions are being monitored.

Keylogger — main illustration
Keylogger — illustration

Key takeaways

  • Keylogger belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Keylogger to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Keylogger from memory before moving on to harder problems.

Reference excerpt

A keystroke logger (keylogger) is a hardware or software component for logging the input of a keyboard. The person using the keyboard is typically unaware that their actions are being monitored. Data can then be retrieved by the person operating the logging program. While the programs themselves are legal, with many designed to allow employers to oversee the use of their computers, keyloggers are most often used for stealing passwords and other confidential information. Keystroke logging can also be utilized to monitor activities of children in schools or at home and by law enforcement officials to investigate malicious usage. Keylogging can also be used to study keystroke dynamics or human-computer interaction. Numerous keylogging methods exist, ranging from hardware and software-based approaches to acoustic cryptanalysis.

History In the mid-1970s, the Soviet Union developed and deployed a hardware keylogger targeting US Embassy typewriters. Termed the "selectric bug", it transmitted the typed characters on IBM Selectric typewriters via magnetic detection of the mechanisms causing rotation of the print head. An early keylogger was written by Perry Kivolowitz and posted to the Usenet newsgroup net.unix-wizards, net.sources on November 17, 1983. The posting seems to be a motivating factor in restricting access to /dev/kmem on Unix systems. The user-mode program operated by locating and dumping character lists (clients) as they were assembled in the Unix kernel. In the 1970s, spies installed keystroke loggers in the US Embassy and Consulate buildings in Moscow. They installed the bugs in Selectric II and Selectric III electric typewriters. Soviet embassies used manual typewriters, rather than electric typewriters, for classified information—apparently because they are immune to such bugs. As of 2013, Russian special services still use typewriters.

Types

Software

A software-based keylogger is a computer program designed to record any input from the keyboard. Keyloggers are used in IT organizations to troubleshoot technical problems with computers and business networks. Families and businesspeople use keyloggers legally to monitor network usage without their users' direct knowledge. Microsoft publicly stated that Windows 10 has a built-in keylogger in its final version "to improve typing and writing services". However, malicious individuals can use keyloggers on public computers to steal passwords or credit card information. Most keyloggers are not stopped by HTTPS encryption because that only protects data in transit between computers; software-based keyloggers run on the affected user's computer, reading keyboard inputs directly as the user types. From a technical perspective, there are several categories:

Hypervisor-based: The keylogger can theoretically reside in a malware hypervisor running underneath the operating system, which thus remains untouched. It effectively becomes a virtual machine. Blue Pill is a conceptual example. Kernel-based: A program on the machine obtains root access to hide in the OS and intercepts keystrokes that pass through the kernel. This method is difficult both to write and to combat. Such keyloggers reside at the kernel level, which makes them difficult to detect, especially for user-mode applications that do not have root access. They are frequently implemented as rootkits that subvert the operating system kernel to gain unauthorized access to the hardware. This makes them very powerful. A keylogger using this method can act as a keyboard device driver, for example, and thus gain access to any information typed on the keyboard as it goes to the operating system. API-based: These keyloggers hook keyboard APIs inside a running application. The keylogger registers keystroke events as if it was a normal piece of the application instead of malware. The keylogger receives an event each time the user presses or releases a key. The keylogger simply records it. This is usually done by inject a DLL to other processes. Windows APIs such as GetAsyncKeyState(), GetForegroundWindow(), etc. are used to poll the state of the keyboard or to subscribe to keyboard events. A more recent example simply polls the BIOS for pre-boot authentication PINs that have not been cleared from memory. Form grabbing based: Form grabbing-based keyloggers log Web form submissions by recording the form data on submit events. This happens when the user completes a form and submits it, usually by clicking a button or pressing enter. This type of keylogger records form data before it is passed over the Internet. IME-based: A malicious IME can do keylogging. JavaScript-based: A malicious script tag is injected into a targeted web page, and listens for key events such as onKeyUp(). Scripts can be injected via a variety of methods, including cross-site scripting, man-in-the-browser, man-in-the-middle, or a compromise of the remote website. Memory-injection-based: Memory Injection (MitB)-based keyloggers perform their logging function by altering the memory tables associated with the browser and other system functions. By patching the memory tables or injecting directly into memory, this technique can be used by malware authors to bypass Windows UAC (User Account Control). The Zeus and SpyEye trojans use this method exclusively. Non-Windows systems have protection mechanisms that allow access to locally recorded data from a remote location. Remote communication may be achieved when one of these methods is used: Data is uploaded to a website, database or an FTP server. Data is periodically emailed to a pre-defined email address. Data is Wirelessly transmitted employing an attached hardware system. The software enables a remote login to the local machine from the Internet or the local network, for data logs stored on the target machine.

Keystroke logging in writing process research Since 2006, keystroke logging has been an established research method for the study of writing processes. Different programs have been developed to collect online process data of writing activities, including Inputlog, Scriptlog, Translog, GGXLog, and TypeFlow. Keystroke logging is used legitimately as a suitable research instrument in several writing contexts. These include studies on cognitive writing processes, which include

… excerpt ends here. Continue reading the full article.

Illustrations

Keylogger: A keylogger example of a screen capture, which holds potentially confidential and private information. The image below holds the corresponding keylogger text result.
A keylogger example of a screen capture, which holds potentially confidential and private information. The image below holds the corresponding keylogger text result.
Keylogger: A logfile from a software-based keylogger, based on the screen capture above
A logfile from a software-based keylogger, based on the screen capture above
Keylogger: A Hardware keylogger for USB-Keyboards
A Hardware keylogger for USB-Keyboards
Keylogger: A connected hardware-based keylogger.
A connected hardware-based keylogger.

Worked examples

Example 1 — a first encounter with Keylogger

Start with the simplest possible case. Write down what Keylogger claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Keylogger before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Keylogger ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Keylogger

In research
Keylogger appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Keylogger in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Keylogger is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cryptographic attacks, Cybercrime, Malware, so understanding it makes those chapters shorter.
In everyday life
Look for Keylogger outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Keylogger” →

How to study Keylogger in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Keylogger means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Keylogger out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Keylogger in simple terms?

A keystroke logger (keylogger) is a hardware or software component for logging the input of a keyboard. The person using the keyboard is typically unaware that their actions are being monitored.

Why does Keylogger matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Keylogger?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Keylogger.

Tags

  • Cryptographic attacks
  • Cybercrime
  • Malware
  • Security breaches
  • Spyware
  • Surveillance
  • Types of malware

Keep exploring