All About Cookies is an independent, advertising-supported website. Some of the offers that appear on this site are from third-party advertisers from which All About Cookies receives compensation. This compensation may impact how and where products appear on this site (including, for example, the order in which they appear).
All About Cookies does not include all financial or credit offers that might be available to consumers nor do we include all companies or all available products. Information is accurate as of the publishing date and has not been provided or endorsed by the advertiser.
The All About Cookies editorial team strives to provide accurate, in-depth information and reviews to help you, our reader, make online privacy decisions with confidence. Here's what you can expect from us:
- All About Cookies makes money when you click the links on our site to some of the products and offers that we mention. These partnerships do not influence our opinions or recommendations. Read more about how we make money.
- Partners are not able to review or request changes to our content except for compliance reasons.
- We aim to make sure everything on our site is up-to-date and accurate as of the publishing date, but we cannot guarantee we haven't missed something. It's your responsibility to double-check all information before making any decision. If you spot something that looks wrong, please let us know.
A keylogger is malware that can record your keystrokes without your consent or knowledge. This type of spyware can have serious consequences.
For example, in 2022, LastPass suffered a massive data breach that affected 30 million customers due to a keylogger attack. A threat actor carried out this attack by exploiting vulnerabilities found in third-party software on a home computer belonging to one of LastPass’s developers. This enabled remote code execution (RCE) and allowed them to install a keylogger. As a result, the threat actor was able to obtain the developer's master password via keylogging and ultimately gain access to LastPass's corporate vault.
This is one of many unfortunate keylogger attacks. As the number of such attacks continues to rise, it’s important to understand what keyloggers are, how they're used, and what you can do to protect your devices — and identity.
How to know if your device has a keylogger
How to remove a keylogger
Are keyloggers legal?
Safety tips
FAQs
Bottom line
What is a keylogger?
A keylogger, or keystroke logger, is a hidden surveillance tool designed to monitor, record, and log every keystroke made on a keyboard, whether physical or virtual (e.g., touchscreen devices). It is a type of spyware that falls under the category of malware, also known as malicious software. Often, it’s installed without consent and used for nefarious purposes, but that isn’t always the case.
What is keystroke logging?
When a keylogger is installed on a targeted device, it begins keystroke logging, or "keylogging,” and records every keystroke made. Then it stores the keystroke data or information in a log file that belongs to a remote command-and-control (C&C) server. The person who installed a keylogger on a device can access its log file, which may contain sensitive information, whenever they want.
As a result, the keylogger owner can have the potential power to access sensitive information such as passwords, banking information, and credit card numbers. This includes confidential information as well, such as chats, messages, and more.
What devices and systems are affected by keyloggers?
Keyloggers can pose a threat to various devices and entities, which can include:
- PCs
- Laptops
- Mobile phones
- Tablets
- Financial institutions
- ATMs
- Multiplayer online role-playing games (MMORPGs)
Keyloggers often target computer devices and sometimes mobile phones. However, they have also been known to target financial institutions, ATMs, and online gaming such as MMORPGs. A keylogger records your keystrokes, among other things, and can also be used to steal account usernames and passwords. More commonly, keyloggers have been used to attack popular games such as “World of Warcraft” (WoW) and "League of Legends." They have also been sold on the Dark Web under a subscription model like iSpy, which was distributed via phishing emails and scam campaigns.
Types of keyloggers
There are multiple types of keyloggers, which can be installed through various methods, such as the kernel, browser, USB flash drive, and more. Some are rare and unique, such as acoustic keyloggers, which can eavesdrop on the distinct sounds of keystrokes on a keyboard to help attackers decipher what’s being typed.
Keyloggers primarily fall into two categories: software keyloggers and hardware keyloggers. They can be installed via keylogging software applications or physical hardware.
The following is a non-exhaustive list of the various types of keyloggers.
Software-based
- Kernel
- Application programming interface (API)
- Form-grabbing
- Screen
- Browser
- Hooks
- Remote Access Trojan (RAT)
Hardware-based
- PS/2 keyboard
- USB (e.g., flash drive, cables)
- Lightning to USB-C cable
- Hidden cameras
- Wireless sniffers
- Firmware/BIOS
- Acoustic
How keyloggers are spread
Keyloggers can spread and infect devices in various ways, whether intentionally or unintentionally. Below, we have listed the various methods and examples of spread under each category.
Unintentional ways keyloggers are spread
- Phishing attacks
- Malicious websites
- Social engineering
- Downloading malware, such as Trojans or rootkits containing keyloggers
Intentional ways keyloggers are spread
- IT departments installing them on all corporate devices
- Purchasing or downloading parental control software to monitor a child’s phone and internet activity
- Installing on one’s device for security research or ethical hacking purposes
How to know if your device has a keylogger
There are many ways to determine if a keylogger has infected a computer or mobile device, but the signs of infection differ. Below are the common signs of a keylogger infection, including the steps you can take to mitigate them.
Common signs that a keylogger has infected your computer
- Slow performance: Your browser runs slowly or your keystrokes are delayed, including your mouse movements.
- Disappearing cursor: Your cursor spontaneously disappears.
- Laggy mouse movements: Your cursor movement is slow and doesn’t match the speed at which you move your mouse.
- Error screens: You get error screens whenever websites or graphics load.
Common signs that a keylogger has infected your mobile device
- Overheating: Your phone gets physically hot, and even after closing all active apps, your phone continues to feel hot to the touch.
- Fast battery drain: You notice your battery drains quicker than normal.
- Strange phone activity or sounds: You may notice your phone, apps, and screen lights turning on and off randomly. You may also hear faint white noises or crackling sounds.
- Weird messages appear: You may receive weird messages with only characters or texts not supported by your device.
How to remove a keylogger
Follow the recommendations to remove a keylogger from your device:
- Use antivirus software that automatically removes malware, including keyloggers.
- Manually uninstall the keylogger from your device if located and clear temporary files to eliminate any residual traces of the keylogger.
- Another option is to reset your device to its factory settings and then restore it from a backup to ensure any existing malware, including keyloggers, are removed.
Follow these steps for mitigation if a keylogger has infected your computer
1. Check running applications and background processes.
- For Windows devices, use the Task Manager.
- For Mac devices, use the Activity Monitor.
2. Terminate any suspicious applications or processes.
3. Remove any unfamiliar applications or files installed on your device after researching them.
4. Perform a routine scan of your device with antivirus software, which can help detect and remove malware.
Antivirus | ||||
Best for | Best overall antivirus software | All-in-one software | Comprehensive security | Best value |
Starting price | $29.00/yr (first year only) | $35.99/first yr | $29.99/first yr | $3.19/mo (billed annually) |
Features | Zero-day scans, anti-phishing, ransomware protection, password manager, ad blocker, TotalVPN | Antivirus protection, VPN, password manager, security for multiple devices | Antivirus, malware, ransomware, and hacking protection, cloud backup, password manager, Norton Secure VPN | Antivirus protection, Surfshark VPN, private search engine, data leak alerts, ad blocker |
Learn more | Get TotalAV | Get Aura | Get Norton360 Antivirus | Get Surfshark Antivirus |
Follow these steps for mitigation if a keylogger has infected your mobile device
- Delete suspicious or strange unrecognized file names. Check your Downloads folder for unnoticeable files with random names and .APK file extensions. If you find such a file and don't remember downloading it, delete it immediately.
- Install and use reputable antivirus software. Use an antivirus software that detects and quarantines keyloggers. Keep your antivirus software updated and perform routine scans for malware.
- Restore your phone to factory settings or wipe it clean. If all else fails, reset your phone to its factory settings or wipe everything, but remember to back up any important files first.
Are keyloggers legal?
Keyloggers can be used for both legal and illegal purposes. Attackers and cybercriminals often use them for illegal activities, such as committing fraud or stealing their target’s banking information. But they can also be used for legitimate reasons, such as a parent monitoring their child's phone activity for safety reasons.
The best way to determine whether a keylogger has been installed legally or illegally is by asking, “Did you install the keylogger on a device you own?” If the answer is yes, then it’s typically legal.
If not, installing a keylogger on a device you don’t own without the owner’s consent is often illegal. There are exceptions, such as when federal authorities and the police have warrants to monitor your devices during a criminal investigation.
In the next sections, we'll unravel the legal and illegal uses of keyloggers, talk about the fine line between their ethical and unethical uses, and shed light on how violating the Electronic Communications Privacy Act (ECPA) can lead to serious legal consequences.
Illegal uses of keyloggers
Keyloggers can be misused for illegal activities without consent, often for nefarious purposes. Attackers and cybercriminals usually carry out these illegal activities. On the other hand, ordinary people with malicious intentions, such as a vengeful ex-partner or a disgruntled former employee, can also use them illegally without your knowledge.
Presented below is not a complete list of several reasons keyloggers are used illegally:
- Identity theft
- Financial fraud
- Corporate or industrial espionage
- Unauthorized access to personal accounts (e.g., email, social media)
- Obtaining personal details about you
- Device monitoring to find out if a partner is cheating
- Stalking
- Blackmail
Remember that you have directly broken the federal ECPA if you install a keylogger on someone else's device without their consent or knowledge, such as a partner's or spouse's device, when you suspect infidelity.
If it is discovered you have violated this law, which is an invasion of privacy, it can result in felony charges against you and a loss of trust from your partner. Also, depending on the severity of the crime, you could face fines or even imprisonment. In short, it’s never worth the risk.
Legal uses of keyloggers
Employers, parents, IT departments, and police or federal authorities can legally use keyloggers for several reasons. However, although it is legal for parents or legal guardians to install keyloggers and monitoring software on their minor's device, it is illegal for anyone to do the same on a device belonging to an adult child or an adult partner.
Here are some popular uses of keyloggers that are legal:
- Companies monitor their employees’ activities for productivity purposes
- Parents monitor their children’s screen time and internet use for their safety
- IT department troubleshoots software problems on company devices
- Federal authorities such as the FBI or police have a warrant to monitor the devices of a potential criminal in an ongoing criminal investigation
Although these are legal uses of keyloggers, it’s important to consider their ethical implications. For instance, employees under surveillance by their employer may view it as unethical and a violation of their privacy or trust. As a result, employers are encouraged to opt for other alternatives, such as installing tools like website blockers, enabling remote desktop access, and conducting time audits to measure their employees’ productivity.
Additionally, a legal guardian or parent who installs a keylogger on their teen's computer or mobile device without their knowledge can potentially damage the trust in their relationship, especially if their teen discovers they’ve been spied on. Walking a fine line between legality and ethics can be tricky, so it’s important to weigh the two and strike a balance.
Safety tips to avoid getting a keylogger
Many tips can help you prevent a keylogger from infecting your device. Follow the recommendations below for best security practices.
- Routinely update your operating system and apps. Always make sure your operating system and applications are up-to-date with the latest security patches.
- Use complex passwords and 2FA. Protect your device, apps, and accounts with strong, unique passwords that comply with NIST standards and enable two-factor authentication (2FA).
- Use a firewall. This security system monitors network traffic and can intercept data that keyloggers attempt to send over the internet, thus preventing keylogging.
- Use a password manager. Password managers allow you to easily generate strong, unique passwords and store them all in one place. They help you access and update your passwords easily in a secure cloud. This can help you further reduce the risk of keylogging.
- Get a VPN. Use a reputable virtual private network. A VPN can hide your local IP address and encrypt your data from prying eyes, securing your online data traffic.
- Avoid using public Wi-Fi. Do not use free public Wi-Fi networks at a coffee shop, airport, or any public place — even if password-protected. Public Wi-Fi makes you vulnerable to man-in-the-middle (MitM) attacks conducted by attackers, who can potentially deploy a keylogger on your device.
- Do not use USB storage devices you did not purchase brand new. Picking up and using a USB flash drive you’ve found in a parking lot or bought from a stranger on the street, for example, can be a sneaky way to lure you into installing a keylogger. (See Rubber Ducky.) Make sure you secure your USB storage devices, or any device for that matter when not used, in a safe place, too.
- Never click on suspicious links or download files from untrusted sources. Do not click on suspicious phishing links from emails or messages nor download files from unverified and untrusted sources. You can visit the website VirusTotal to analyze suspicious files and links.
- Install antivirus software. Installing reputable antivirus software on your device can prevent malware infections, as well as identify and remove malware more quickly than manual methods. This is an important tool in preventing keylogging.
FAQs
Are keyloggers viruses?
No. Keyloggers fall under a category of malware called spyware, which secretly monitors and collects information about its targets — in other words, spies on them. Computer viruses are not intended for spying purposes. A computer virus is another type of malware that copies itself (self-replicates), attaches itself to a program or host, and can carry malicious code. Even though keyloggers are not viruses, they often infect computers or mobile devices via Trojan viruses.
Can keyloggers see your screen?
The primary function of keyloggers is to log and record keystrokes made on a keyboard. But there have been reports of Android and iPhone mobile devices being infected with software keyloggers that can capture where the mobile user presses or taps on the screen. This lets a cybercriminal see what the user is typing by looking at the virtual buttons they are pressing. Spooky, isn’t it?
Are keyloggers illegal?
Keyloggers can be legal or illegal, depending on the circumstances. Keyloggers are legal when installed on a device owned by the person doing the installation. For example, it is legal when a parent installs a keylogger on their child’s device to monitor their phone and online activity for safety purposes. In contrast, installing a keylogger on a device you don’t own is illegal. One exception to this rule is when federal or local authorities have a warrant to monitor a person’s device to help with a criminal investigation.
Bottom line
Cybercriminals, malicious hackers, and other people with ill intent can install keyloggers on your devices without your knowledge to track your keystrokes and, ultimately, spy on you. Bad actors can steal your identity or commit financial fraud by obtaining sensitive information such as your ID numbers, banking information, credit card numbers, etc. As you can imagine, the outcome of having keyloggers installed on a device can be dangerous and scary.
It's important to know what keyloggers are, how to spot them, and how to prevent and remove them from your devices. Even though keyloggers are often associated with malicious uses, there are less scary and legal reasons for installing them on a device. For example, a parent might install a keylogger on their child's device so they can keep an eye on their screen time and internet use for safety reasons. In the end, being aware of keyloggers is one of the best ways to safeguard your privacy.
To proactively safeguard your devices and identity, invest in a comprehensive security suite that offers antivirus and identity theft protection.