45

My question is about the text that I type on a keyboard while in a web browser. I understand that if the website has HTTPS the connection from my browser to the website is secure/encrypted, but what about the text that I type on the keyboard on the local computer?

For example, at an internet cafe, if you open a Chrome window and go to a secure site (HTTPS) is the text that you type on the keyboard secure from the keyboard to the browser? Can key logging software on the local computer access the text?

My concern is logging into my email account (or any other private account) on a public computer, can the password that I type be intercepted? If so, is there any way for a user of a public computer to ensure the privacy of their password in this scenario?

16
  • 3
    If you are too concerned about key logging then open up any Wikipedia page, then copy and paste all characters you need to login ... but again maybe the clipboard is also logged!
    – daygoor
    Commented Jan 15, 2019 at 8:12
  • 15
    @daygoor even if the clipboard isn't logged, I'd expect a keylogger on the machine itself to be able to say that you've highlighted and most likely also copied the individual characters. So in a log you might see highlight "h" -> Ctrl+C -> highlight "u" -> Ctrl+C -> highlight "n" -> Ctrl+C -> highlight "t" -> Ctrl+C -> highlight "e" -> Ctrl+C -> highlight "r" -> Ctrl+C -> highlight "2" -> Ctrl+C or something sufficiently similar to this. Even if you right-click -> copy, I'd assume a keylogger would note that.
    – VLAZ
    Commented Jan 15, 2019 at 9:14
  • 4
    This strongly depends on the operating system being used - specifically how well it isolates individual applications (from each other and the shared components like keyboard) and how well it helps to apply correct access rights. --- Still even if the OS perfectly isolates the applications there are possible vulnerabilities or misconfigurations allowing unauthorized access. Commented Jan 15, 2019 at 10:18
  • 1
    @pabouk that's a lot of variables that you can hardly account for. Sure, you can't even prove or disprove (easily) the existence, sophistication, and mode of operation of a keylogger however if untrusted, a foreign machine should be assumed absolutely compromised. This cuts down on the assumptions and possibilities you have to consider when deciding how to handle it. With this setup in mind, copy/pasting characters from a document is not safe the least and this misconception should not be perpetuated.
    – VLAZ
    Commented Jan 15, 2019 at 12:09
  • 1
    @frarugi87 I disagree for this instance. There can be a lot of data harvesting that is totally viable to gather from a public PC. A Facebook password is very likely to be caught which...may have some value, or not. But more importantly, an attacker might be able to gather stuff like payment details. And the attacker need not be the owner of the public computer - it might be anybody who had access to it and decided to use it to harvest data. Public PCs don't tend to have a 4096 but RSA encryption. It might even be infected over the Internet without it being specifically targeted.
    – VLAZ
    Commented Jan 15, 2019 at 13:09

6 Answers 6

85

No, your data is not safe from key loggers on a local computer. There isn't much more to say here, to be fair. A key logger will grab and save any key stroke entered. The tls (https) encryption happens "after" the driver from keyboard "sends" those key strokes to the browser, "through" the key logger.

Even if encryption is being used and there isn't one many types of spyware on the computer, the connection between the computer and site might have a Man in The Middle (MiTM) device in between which tricks your computer into thinking it's using encryption when it's not.

Good question. Yes, on a public kiosk you run the risk of credential harvesting. I can not think of anything that would bypass keylogging software (VPN will fix MiTM issues). Beware.

17
  • 53
    It's worse than that: on any computer that you don't control, the CA certificates used to verify the identities of the servers may have been compromised. So you might not be talking to the web site you think you are - even if you're using HTTPS. Don't trust public computers.
    – z0r
    Commented Jan 14, 2019 at 23:44
  • 10
    Multi-factor authentication is the mitigation for that, isn't it? Commented Jan 15, 2019 at 1:01
  • 15
    If you use a 3rd-party computer to log into your e-mail, the ultimate line of defense against someone else loging into your account is using MFA. Even if they key-log your MFA token, it should be useless for them to access your account. Commented Jan 15, 2019 at 1:58
  • 10
    @mgarciaisaia it depends on the nature of compromise. If it was simple keylogger, than yes, you might be protected by 2FA (although some of them allow fall back to less secure settings!). However, if the malware on public kiosk is little smarter, it could do a lot of damage. For example, when you click "logout" it might show you fake screen saying you are logged out, while in reality it did not log you out and is in the background doing stuff in your account, like setting up forwarding of all emails somewhere, changing recovery settings etc. Commented Jan 15, 2019 at 2:46
  • 5
    @nardnob: One word: hardware keylogger (ok, two words).
    – sleske
    Commented Jan 15, 2019 at 21:22
23

HTTPS can't possibly fully protect your user input on an untrusted computer: The computer could have keylogger software installed. The keyboard could have firmware programmed to keylog you. There could be a hardware device between the computer and the keyboard recording keypresses. There could be screen recording software running. There could be a video camera pointed at the keyboard while you're using it. The computer might be configured to fully trust a network proxy that acts as a man-in-the-middle for all HTTP and HTTPS connections.

1
  • 6
    …the computer might be running a software that looks like a browser with a website to you but doesn't even access any network.
    – Bergi
    Commented Jan 15, 2019 at 12:54
2

As covered in other answers, HTTPS only protects the transmission part of the communication, between your computer (browser) and the remote server. Anything between the user (human) and the browser is vulnerable to attackers.

Even if the keyboard is secured between the browser, a camera (outside the computer) could capture a video of you entering the password - that doesn't even remotely have anything to do with HTTPS.


Actions speak louder than words.

Long ago when I was 15, I wrote a simple key logger that is able to log almost everything. It nevertheless successfully stole a lot of passwords, including those entered into an HTTPS page.

Link: My GitHub repo of the aforementioned key logger program.

0
1

Workaround: to bypass keylogging software, you can draw a keyboard on screen and ask the user to click the keys on that keyboard using a mouse or trackball (that data would be very hard to log). Of course, this could be tiring for the users, so you might want to use this only to type passwords or small texts.

3
  • 3
    This doesn't answer the question. The user is entering a password into a webpage over which they have no control.
    – Chenmunka
    Commented Jan 16, 2019 at 15:08
  • @Daniel777 I actually used to have a bank account that had a password and a PIN that was entered by using the mouse to click on the numbers on a drawn number pad. It seemed to be a good way to secure access, but I think people didn't like that so they removed it.
    – Devil07
    Commented Jan 16, 2019 at 15:13
  • 2
    Not necessarily effective. Commented Jan 16, 2019 at 15:17
0

Everything you type on keyboard is processed by some software which is part of your operation system. It could be kernel itself, it's modules or drivers. This software decodes your keystrokes and delivers them to application (browser in this case).

Many operation systems provide API to "inject" some third party software to this process. Of course, modern OS does not allow everyone to do that: you must have appropriate rights, or it will not allow you to read keys clicked by other user working on same machine.

But if someone with sufficient rights installed such software, it may have access to your keys. Even worse: if OS has bug, hacker may "workaround" this check and install such software. One example of it is keylogger: it literally logs all keystrokes.

On public computer, you can't be sure there is no keylogger installed because you are not the one who installed this OS, your account does not have admin rights, so you can't even check what is running on this computer.

Use two phase auth: with it server will send you text message with code, so you could only access your email if your have access to your mobile phone.

Password-only auth is not safe on public computers.

0

Some antimalware solutions have a feature protecting keyboard input with a kernel mode driver, but don't think it is unbreakable: if malware manages to execute its own code in kernel mode, the AV driver cannot protect the stuff, everything in kernel mode is equally privileged.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .