News for hackers. Stuff that matters.
Re:Keystroke timing obfuscation added to SSH(1) by colmmacc on Tuesday August 29, 2023 @11:13AM (#37309122)
Keystroke timing has been a concern for terminal I/O since the 1980s and folks were using primitive encryption with stelnet and kerberos.

Most terminal applications use buffered I/O for password entry, which is still an important security feature. In that mode, nothing is sent to the other end until the user presses return. A MiTM only "sees" one packet no matter what, and with padding they can't even infer the password length.

For a time, there was rich pickings in applications that accepted passwords in unbuffered mode. Many of them doing it so that they could echo "*" symbols, character by character, as the user typed. That simple feature looks cool, and does give the user feedback ... but would leak the keystroke rate, which is the last thing you want on password entry.

I hope we preserve buffered I/O for password entry, because it's still better than what ssh can do with some obfuscation. But it's great to see ssh add this, and will help protect content that can't be buffered, like shell and editor input.

Re:Keystroke timing obfuscation added to SSH(1) by darkclouds on Tuesday August 29, 2023 @11:24AM (#37309300)
> Keystroke timing has been a concern for terminal I/O since the 1980s and folks were using primitive encryption with stelnet and kerberos.

I had a visual basic AI addon in the 1990's that could work out who was typing at the keyboard from their typing pattern within a few minutes of typing, which kind of rendered the logon process mute.

Today, that can applied to touchscreen logons by tying finger pressure patterns ie size and shape of finger contact with the touchscreen to a user, and when incorporating swipes or mouse movements in the desktop OS context, its possible to have a security app which can lock a system if someone is using a device and user account which is not theirs.

At the very least you can log every time one's GF/missus has gone through your phone.

Re:Keystroke timing obfuscation added to SSH(1) by placesalt on Tuesday August 29, 2023 @11:35AM (#37309478)
> mute

moot?

Re:Keystroke timing obfuscation added to SSH(1) by zoklet-enjoyer on Tuesday August 29, 2023 @11:47AM (#37309650)
That's the 4chan guy
Re:Keystroke timing obfuscation added to SSH(1) by tomrod on Tuesday August 29, 2023 @11:57AM (#37309819)
Whose username is derived from "moot".
Re:Keystroke timing obfuscation added to SSH(1) by 14u2c on Tuesday August 29, 2023 @12:48PM (#37310564)
Nah it's a brand of synthesizer.
Re:Keystroke timing obfuscation added to SSH(1) by pessimizer on Tuesday August 29, 2023 @01:43PM (#37311314)
No, the meaning of "moot" is clear. It simply means a question that at the current time has lost its relevance, or that at the current time has just become the only question that is relevant. Easy.
Re:Keystroke timing obfuscation added to SSH(1) by pkulak on Tuesday August 29, 2023 @11:55AM (#37309780)
Like a cow’s opinion.
[dead]
Re:Keystroke timing obfuscation added to SSH(1) by darkclouds on Tuesday August 29, 2023 @03:24PM (#37312610)
I dont know, I dont think we even had that much access to tune it so to speak, this was VB4 (1991) back then, I dont think it was a VB extension but an OCX (1994) which is OLE2/ActiveX technology.

I think I got it from a 3.5" disc on the front of a computer mag from memory in the UK but it was a US company that wrote it. So there might be a copy of it in the wayback machine.

It was quite simple to use, so alot of their AI decisions or tuning was probably already made for us in order for it to be put out there as an addon.

But I have never seen anything since for an addon, and it seemed such a good idea in the scheme of things when it comes to computer security with all the hacking that is in the press today.

Re:Keystroke timing obfuscation added to SSH(1) by eklitzke on Tuesday August 29, 2023 @12:27PM (#37310276)
Password based ssh authentication should be used approximately never.
Re:Keystroke timing obfuscation added to SSH(1) by tsbinz on Tuesday August 29, 2023 @12:34PM (#37310360)
That is not the only time you use passwords over ssh, e.g. I don't use a password to remote into my desktop from my laptop, but I do use one when using sudo on the desktop.
Re:Keystroke timing obfuscation added to SSH(1) by vladvasiliu on Tuesday August 29, 2023 @02:21PM (#37311804)
Is there no way to forward fido tokens? Or the GPG agent with a Yubikey.

Under Windows, you can forward your smartcard over remote desktop. It's one of the few things Windows has I miss on Linux.

Re:Keystroke timing obfuscation added to SSH(1) by 2Gkashmiri on Tuesday August 29, 2023 @02:36PM (#37311997)
i attempt to use this and some programs recognize this and many just don't
Re:Keystroke timing obfuscation added to SSH(1) by vladvasiliu on Tuesday August 29, 2023 @05:32PM (#37314430)
Don't these apps just use PAM? Since the initial complaint was about sudo, I'd figure pam / polkit would handle this, and apps would call those to obtain privilege elevation.
Re:Keystroke timing obfuscation added to SSH(1) by ptman on Wednesday August 30, 2023 @05:23AM (#37319428)
Forwarding the ssh agent (-A) is considered insecure. Instead man ssh recommends using a jump host (-J)
Re:Keystroke timing obfuscation added to SSH(1) by vladvasiliu on Wednesday August 30, 2023 @07:20AM (#37320334)
I was talking about the GPG agent, so that the key on the smart card can be used to for sudo elevation on the remote host. This usually requires user interaction with the key, so just having access to the agent wouldn't do much. I don't think the ssh agent would help with this.

To your point, I wonder whether that consideration holds when the private key is held on an external device, like is the case with a YubiKey. I use that setup, and I can't add the key to the ssh agent.

    $ ssh-add .ssh/id_yubikey_gpg.pub                                                                                                                                                                                                                                                                                                                     
    Error loading key ".ssh/id_yubikey_gpg.pub": error in libcrypto
SSH connections work fine with that key.
Re:Keystroke timing obfuscation added to SSH(1) by ehutch79 on Tuesday August 29, 2023 @02:26PM (#37311853)
That's not what the parent is talking about.

They're specifically refering to password authentication to make the ssh connection.

Re:Keystroke timing obfuscation added to SSH(1) by rollcat on Tuesday August 29, 2023 @05:18PM (#37314264)
Actually this is something that is relevant to my interests.

I prefer to have sudo ask for a password when I'm physically in front of the machine, but not if it's a remote session (e.g. SSH from my laptop to my desktop).

Maybe the SSH agent on the client can re-authenticate to the server when requested?

Re:Keystroke timing obfuscation added to SSH(1) by patrakov on Tuesday August 29, 2023 @05:29PM (#37314399)
> Maybe the SSH agent on the client can re-authenticate to the server when requested?

There is a PAM module that does this: https://github.com/jbeverly/pam_ssh_agent_auth

Note that this is a bad idea from the security standpoint, as it requires SSH agent forwarding. Which means that, if the remote server is compromised, the attacker can use your SSH agent to log into other servers as you.

Re:Keystroke timing obfuscation added to SSH(1) by rollcat on Tuesday August 29, 2023 @06:06PM (#37314765)
The local agent can ask the user to approve/deny signing requests.
Re:Keystroke timing obfuscation added to SSH(1) by riffraff on Wednesday August 30, 2023 @02:27AM (#37318388)
FWIW, you can probably configure sudo to use something other than passwords. On a Mac you can use the fingerprint reader for example, it's just disabled by default.

And your terminal may come with a password manager too, which would be unlocked with whatever means.

Again, on a Mac with iTerm you can do this with a fingerprint.

Re:Keystroke timing obfuscation added to SSH(1) by Filligree on Tuesday August 29, 2023 @12:37PM (#37310404)
we're not necessarily talking about ssh authentication. Wouldn't that send the entire password as a single packet, anyway?
Re:Keystroke timing obfuscation added to SSH(1) by djmdjm on Wednesday August 30, 2023 @01:07AM (#37317907)
correct - this is for the post-auth session and not the authentication phase
Re:Keystroke timing obfuscation added to SSH(1) by marginalia_nu on Tuesday August 29, 2023 @12:35PM (#37310382)
How would you log in for the first time into a headless device?
Re:Keystroke timing obfuscation added to SSH(1) by dan_quixote on Tuesday August 29, 2023 @12:39PM (#37310442)
You can commonly deploy the device/server with the client's public key.
Re:Keystroke timing obfuscation added to SSH(1) by numpad0 on Tuesday August 29, 2023 @12:43PM (#37310489)
That's assuming the device runs GNU/Linux with / mounted rw. But not everything is a laptop or a desktop.
Re:Keystroke timing obfuscation added to SSH(1) by dredmorbius on Tuesday August 29, 2023 @01:38PM (#37311254)
[delayed]
Re:Keystroke timing obfuscation added to SSH(1) by fragmede on Tuesday August 29, 2023 @02:51PM (#37312184)
I don't know. I come across old AP/routers where I've forgotten the login credentials and find myself hard resetting them with some regularly, one that's above "approximately never" anyway.
Re:Keystroke timing obfuscation added to SSH(1) by dredmorbius on Tuesday August 29, 2023 @10:59PM (#37317133)
I'm presuming the hard reset is to a factory-assigned password.

Is that uniform across all devices, or device-specific?

Practice I've seen for some years now is to have a label on the device with admin/root password, which is presumably neither uniform across devices nor trivially-determinable from device characteristics (e.g., MAC address, sequential serial numbers, etc.).

I'd still consider that practice reasonably tolerable, though you should be keeping better tabs on assets and credentials.

Re:Keystroke timing obfuscation added to SSH(1) by samus on Tuesday August 29, 2023 @05:17PM (#37314249)
It could be totally fine if you disable WiFi and connect physically. At least the first time for setup.
Re:Keystroke timing obfuscation added to SSH(1) by yjftsjthsd-h on Tuesday August 29, 2023 @01:24PM (#37311067)
No, it's assuming a device running a ssh daemon with something mounted rw or user-modifiable[0] that can hold an authorized_keys file. A NetBSD embedded board that configures sshd with `AuthorizedKeysFile /sdcard/config/authorized_keys` would be fine, for instance.

[0] For example, you could let the user write their key to an SD card and then mount it ro on the device.

Re:Keystroke timing obfuscation added to SSH(1) by fragmede on Tuesday August 29, 2023 @02:48PM (#37312143)
So what do you do when the device has no long-term storage like an SD card?
Re:Keystroke timing obfuscation added to SSH(1) by samus on Tuesday August 29, 2023 @05:15PM (#37314229)
Such a device is then simply not suitable for situations where the issues with SSH password authentication become relevant.
Re:Keystroke timing obfuscation added to SSH(1) by yjftsjthsd-h on Wednesday August 30, 2023 @05:46PM (#37329587)
What kind of device runs sshd but has no persistent storage?
Re:Keystroke timing obfuscation added to SSH(1) by marginalia_nu on Tuesday August 29, 2023 @04:51PM (#37313876)
What if it's mass produced and sold in a store?
Re:Keystroke timing obfuscation added to SSH(1) by Filligree on Tuesday August 29, 2023 @12:38PM (#37310420)
I'd use a base image with a baked-in SSH certificate allowed.

Fairly trivial to make, at least with NixOS.

Re:Keystroke timing obfuscation added to SSH(1) by marginalia_nu on Tuesday August 29, 2023 @12:49PM (#37310580)
This hinges on this being either a VM or some hardware you've set up yourself.
Re:Keystroke timing obfuscation added to SSH(1) by booi on Tuesday August 29, 2023 @02:17PM (#37311749)
what other situation would you be in?
Re:Keystroke timing obfuscation added to SSH(1) by fragmede on Tuesday August 29, 2023 @02:47PM (#37312130)
Any device where you don't control the initial firmware, and the firmware doesn't support ssh keys. AP/Routers (consumer and commercial and industrial grade), Shared hosting with ssh but limited features (eg GoDaddy)...
Re:Keystroke timing obfuscation added to SSH(1) by nine_k on Tuesday August 29, 2023 @04:53PM (#37313920)
For physical devices, you can usually connect them via a dedicated Ethernet cable right to your laptop, and set the initial password. They likely don't have the right network settings anyway to drop them right into the bigger LAN.

Otherwise I think you just prepare a certificate ahead of time, and scp it during the first connection, then immediately disable password-based access, or at least change the password. Any passive eavesdropping still needs to defeat the encryption somehow (no feasible ways are known now), even having seen the initial exchange.

If you have an active MITM attack, all bets are off, because the attacker could even grab the image with the pre-baked key you're sending, and copy or change the key. If this is not possible, then the pre-baked key would help. If your security is really important, don't use ther cheap GoDaddy's offerings with limited SSH.

Re:Keystroke timing obfuscation added to SSH(1) by marginalia_nu on Tuesday August 29, 2023 @04:50PM (#37313858)
Let's say you bought a router and now you want to log into it.
Re:Keystroke timing obfuscation added to SSH(1) by samus on Tuesday August 29, 2023 @05:19PM (#37314273)
Then you connect physically and do whatever is necessary to prepare that router for your intended use.
Re:Keystroke timing obfuscation added to SSH(1) by marginalia_nu on Tuesday August 29, 2023 @05:24PM (#37314334)
Connect to what? It only has an ethetnet jack.
Re:Keystroke timing obfuscation added to SSH(1) by Filligree on Wednesday August 30, 2023 @11:16AM (#37323485)
Your laptop, for instance.
Re:Keystroke timing obfuscation added to SSH(1) by froggit on Thursday August 31, 2023 @09:06PM (#37345547)
Are you being intentionally difficult or have you just never bought and set up a router?
Re:Keystroke timing obfuscation added to SSH(1) by vladvasiliu on Tuesday August 29, 2023 @02:24PM (#37311836)
Same way you'd get the password? It's either a physical or virtual server you more or less control, in which case the siblings' answers apply. Otherwise, it's probably some kind of image or something someone else controls, in which case bake in or send them your public key or certificate (if you've got colleagues in the same situation as yourself).
Re:Keystroke timing obfuscation added to SSH(1) by marginalia_nu on Tuesday August 29, 2023 @04:49PM (#37313844)
Getting a password does not require modifying the system. Injecting a public key does.
Re:Keystroke timing obfuscation added to SSH(1) by vladvasiliu on Tuesday August 29, 2023 @05:30PM (#37314411)
The password needs to be generated somehow, right? Assuming you don't you use a pre-baked password that repeats across machines, you could replace the password generation and retrieval with deploying a public key instead.
Re:Keystroke timing obfuscation added to SSH(1) by rollcat on Tuesday August 29, 2023 @05:21PM (#37314295)
The remote system must generate its own SSH private key; you could use that opportunity to deploy the authorized keys before sealing the system as read-only.
Re:Keystroke timing obfuscation added to SSH(1) by glitchc on Tuesday August 29, 2023 @01:25PM (#37311083)
This is naive in the extreme. There are many scenarios where passwords are needed, for bootstrapping, a disgruntled admin leaving, etc.

There is a role for a common secret in a secure ecosystem (password, passkey)

Re:Keystroke timing obfuscation added to SSH(1) by scarby2 on Tuesday August 29, 2023 @01:34PM (#37311200)
That common secret is usually an ssh key which is held somewhere secure hopefully with auditable access.

For bootstrapping you can bake a bootstrapping key into your installer which is removed after the system is configured.

Re:Keystroke timing obfuscation added to SSH(1) by djmdjm on Wednesday August 30, 2023 @01:06AM (#37317901)
This is completely irrelevant to password based SSH authentication. The timing obfuscation is for the session _after_ authentication.
Re:Keystroke timing obfuscation added to SSH(1) by pbhjpbhj on Tuesday August 29, 2023 @12:49PM (#37310583)
Aside, I've noticed that the current technique of rendering a fixed number of asterisks independent of the password length is quite confusing to users -- "that's wrong, it's the wrong length", resulting in attempts to type in the "correct" password and this obviating the benefit of the stored password.

Not sure how to fix that. I recall a visible hash of some form being used in the past (eg take a 2-digit hash, pair of with a smiley; I must have entered it right, it's showing me ROFL smiley), but that would aid shoulder surfed password entries, at least.

Re:Keystroke timing obfuscation added to SSH(1) by letsdothisagain on Tuesday August 29, 2023 @01:25PM (#37311076)
I'm honestly seeing little value in asterisks with WFH and the move to passphrases. Feedback is important when you're typing a long phrase with complete precision. Plus shoulder surfing is simply not a thing when my physical security profile now involves a locked front door and a call to the police.
Re:Keystroke timing obfuscation added to SSH(1) by iknowstuff on Tuesday August 29, 2023 @02:21PM (#37311795)
Are you describing your experience or implying that the industry should change this because you can WFH?
Re:Keystroke timing obfuscation added to SSH(1) by froggit on Thursday August 31, 2023 @08:44PM (#37345420)
The latter. They seemingly meant "I can WFH, so asterisks are meaningless to everyone. F@&# asterisks!"
Re:Keystroke timing obfuscation added to SSH(1) by autoexec on Tuesday August 29, 2023 @02:32PM (#37311945)
WFH also means Working From my backyard, the coffee shop around the corner, the library, a friend's house, a hotel room, etc.

Even for people who only work at home while working remotely, private homes can see a lot of traffic. I wouldn't assume all screens are kept and used in totally secure environments so we should probably still stick with masked passwords and telling users not to keep passwords written on a post-it note stuck to their monitor.

Re:Keystroke timing obfuscation added to SSH(1) by aeternum on Tuesday August 29, 2023 @11:40PM (#37317388)
And now employees simply leave their laptop open with the SSH window up while getting their coffee because it's now so annoying to close the lid and correctly type the password.

>USB Rubber Ducky has entered the chat

Re:Keystroke timing obfuscation added to SSH(1) by matt-attack on Wednesday August 30, 2023 @10:14AM (#37322478)
If they can see the screen wouldn’t they be better off just looking at the keyboard to directly observe what’s being typed?
Re:Keystroke timing obfuscation added to SSH(1) by jgalt212 on Thursday August 31, 2023 @09:53AM (#37337188)
> the coffee shop around the corner

I would hope people in high leverage job roles would just avoid such behavior.

Re:Keystroke timing obfuscation added to SSH(1) by froggit on Thursday August 31, 2023 @08:28PM (#37345321)
> I would hope people in high leverage job roles would just avoid such behavior.

I used to hope that as well. Then I met people and lost that hope. It's truly impressive how much stupid shit gets pulled by people that "should know better."

Re:Keystroke timing obfuscation added to SSH(1) by wizofaus on Tuesday August 29, 2023 @02:34PM (#37311961)
You've never typed a password in while screen sharing?
Re:Keystroke timing obfuscation added to SSH(1) by kelnos on Tuesday August 29, 2023 @02:41PM (#37312042)
[delayed]
Re:Keystroke timing obfuscation added to SSH(1) by axus on Tuesday August 29, 2023 @02:50PM (#37312180)
Sadly I think security systems will have to accommodate the possibility that someone else can see your screen. And hope that they can't see your keyboard.
Re:Keystroke timing obfuscation added to SSH(1) by wizofaus on Tuesday August 29, 2023 @03:03PM (#37312327)
What if you're demonstrating a problem with a login screen? And yes, I've had to do exactly that more than once. I wouldn't do it with a particularly sensitive password (online banking etc) but there are enough passwords I use regularly for work purposes where it wouldn't be a significant risk for others to watch me type it in, certainly if the characters aren't revealed at all while typing. Though having password fields be able to detect your screen is being shared automatically and obscure what pixels are relayed would be nice.
Re:Keystroke timing obfuscation added to SSH(1) by jrockway on Tuesday August 29, 2023 @05:04PM (#37314081)
Why use a good password while testing your login screen? I use "iamroot" and "password".
Re:Keystroke timing obfuscation added to SSH(1) by wizofaus on Tuesday August 29, 2023 @07:24PM (#37315516)
They're typically passwords that are only for testing accounts anyway, and that are known to the team members I'm sharing with. But...it's easy to slip up now and then and forget you're actually putting in a password while screen sharing that it's probably best not to have your co-workers know! Obviously the worst is your actual O/S password, as knowing that could potentially allow a co-worker access to other passwords that are quite sensitive, but I'm not sure it's even possible to screen share your O/S login screen - probably shouldn't be! It is a good argument for not re-using that password for any browser-based logins, but SSO policies tend to make that impossible unfortunately. Mind you I use a pin for my O/S login screen, whereas for browser-based logins you can't.
Re:Keystroke timing obfuscation added to SSH(1) by paulddraper on Tuesday August 29, 2023 @04:02PM (#37313126)
I'm going to suggest that is correct and also unusual behavior.
Re:Keystroke timing obfuscation added to SSH(1) by maccard on Tuesday August 29, 2023 @04:30PM (#37313552)
I don't type passwords. My password manager fills them for me, or I paste them.
Re:Keystroke timing obfuscation added to SSH(1) by jamedjo on Tuesday August 29, 2023 @05:56PM (#37314678)
Unlocking the password manager means I need to type a master password in while in a public place. Feels higher risk when it is an unimportant website but potentially gives access to all websites. Still better than the passwords being accessible on disk but having individual passwords would reduce the impact of any password leak.
Re:Keystroke timing obfuscation added to SSH(1) by maccard on Tuesday August 29, 2023 @06:01PM (#37314719)
1password uses biometrics on my 7 year old MacBook Pro, so even if I'm out and about I still don't need to type it.
Re:Keystroke timing obfuscation added to SSH(1) by riffraff on Wednesday August 30, 2023 @02:21AM (#37318359)
1p works great on my mac but still asks for a password from time to time, I'm not sure of the exact mechanic.

OTOH even Chrome's password manager now integrates with the Mac fingerprint auth.

Re:Keystroke timing obfuscation added to SSH(1) by maccard on Wednesday August 30, 2023 @08:23AM (#37320944)
It's every two weeks. If your threat model involves being spied on over the shoulder for your master password while in a cafe you "just" need to ensure you enter your password in a safe location every two weeks.
Re:Keystroke timing obfuscation added to SSH(1) by fluidcruft on Tuesday August 29, 2023 @08:39PM (#37316139)
I have this InputStick USB dohicky that shows up as a generic USB keyboard when plugged in but is also an encrypted Bluetooth dongle. There's a plugin to Keepass2Android that I use to type passwords from my phone. I use that to unlock my password manager (using a giant untypable passphrase).
Re:Keystroke timing obfuscation added to SSH(1) by koheripbal on Tuesday August 29, 2023 @02:37PM (#37312004)
Plenty of value in confirming that you are hitting each key exactly once.
Re:Keystroke timing obfuscation added to SSH(1) by EGreg on Tuesday August 29, 2023 @05:35PM (#37314459)
Why not just mutate a specific fixed-length line with every keypress?
Re:Keystroke timing obfuscation added to SSH(1) by glaucon on Tuesday August 29, 2023 @04:38PM (#37313669)
> I'm honestly seeing little value in asterisks

They're essential ! How else would we encourage the average user to use as short and and as simple a password as they can get away with ?

Re:Keystroke timing obfuscation added to SSH(1) by hedora on Tuesday August 29, 2023 @01:56PM (#37311477)
The browser could use a different rendering convention for autopopulated passwords. For instance, it could render a solid black bar (no characters for the user to count) or maybe the phrase "autofilled", perhaps with a strange background color / rendering convention.
Re:Keystroke timing obfuscation added to SSH(1) by smaudet on Tuesday August 29, 2023 @03:26PM (#37312629)
The login fractal - a shape that is infinitely recurring, starts at a random place, and indicates entry with "zooming".
Re:Keystroke timing obfuscation added to SSH(1) by yencabulator on Tuesday August 29, 2023 @04:41PM (#37313720)
[delayed]
Re:Keystroke timing obfuscation added to SSH(1) by Vicinity9635 on Tuesday August 29, 2023 @06:44PM (#37315131)
I remember seeing this in Lotus Notes. Never saw it before that, or since.
Re:Keystroke timing obfuscation added to SSH(1) by yencabulator on Tuesday August 29, 2023 @06:48PM (#37315161)
Oh yes, that could be it! Employer made me run Windows in a VM to read corporate email.

My memory doesn't match videos I can find online of it, but that could be version differences.

Re:Keystroke timing obfuscation added to SSH(1) by compsciphd on Wednesday August 30, 2023 @09:45AM (#37322062)
At IBM someone made something called fetchnotes that worked like fetchmail, but worked with mail and calendar, made me able to get away with minimal usage of notes.
Re:Keystroke timing obfuscation added to SSH(1) by nmstoker on Tuesday August 29, 2023 @06:57PM (#37315260)
Yes. Wasn't it to make it harder spoof a password prompt with a static image popping up?
Re:Keystroke timing obfuscation added to SSH(1) by Cyykratahk on Wednesday August 30, 2023 @04:50AM (#37319252)
I think it was to provide an indication that the password was correct at a glance. (IIRC the number of dots in the password field was also generated, so it didn't necessarily match the number of chars)

The image was essentially a simple checksum. Each user would eventually memorise which icon was "theirs".

Re:Keystroke timing obfuscation added to SSH(1) by _emacsomancer_ on Tuesday August 29, 2023 @06:59PM (#37315284)
xsecurelock[https://github.com/google/xsecurelock] has a few variants on this.
Re:Keystroke timing obfuscation added to SSH(1) by whatusername on Tuesday August 29, 2023 @05:16PM (#37314235)
Lotus Notes used to have that. (Might still do?)

https://security.stackexchange.com/questions/41247/changing-...

Re:Keystroke timing obfuscation added to SSH(1) by lhamil64 on Tuesday August 29, 2023 @05:56PM (#37314683)
We used Notes at work until a few years ago and it still had it IIRC. I never stopped to think about why the pictures changed, that's interesting. Another annoying decision is that they prevented pasting passwords, which is very inconvenient when using a password manager. I ended up having to use one that simulated keystrokes.
Re:Keystroke timing obfuscation added to SSH(1) by Too on Tuesday August 29, 2023 @11:50PM (#37317455)
I’ve seen some programs render three asterisks per key stroke. Defers human shoulder surfers from seeing the length of your password.

I think simplest and safest solution would be a shape that rotates at random interval for each key stroke.

Depends what problem you want to solve. Did keyboard register my press? vs did I type the same thing as last time.? have some different constraints.

Re:Keystroke timing obfuscation added to SSH(1) by slim on Wednesday August 30, 2023 @05:07PM (#37329154)
What about : "You are typing..." like in IM apps
Re:Keystroke timing obfuscation added to SSH(1) by gregw2 on Tuesday August 29, 2023 @02:10PM (#37311669)
Does anyone know any SSH clients that support line-buffering of input?

I.e. where what you type doesn't get transmitted until you hit or click return/send?

I had one of these clients (but for telnet) back in more active MUD gaming days but haven't seen it with the few SSH clients I've used since... but always thought that would be a good defense to SSH keystroke timing data leakage, and potentially superior to this 20ms delay approach mentioned in this article, at least for some usage scenarios.

(Although now that I think about it, ideally you might want it to also transmit when someone hits tab so you could still have linux shell autocomplete...)

Re:Keystroke timing obfuscation added to SSH(1) by kelnos on Tuesday August 29, 2023 @02:42PM (#37312066)
That would only work if the ssh client could know exactly what was going on in the user session. Like, how would that work if I were editing a file with vim? Or even just typing a command into the shell (where I might need to backtrack and edit the command)?

This doesn't seem very feasible or useful to me.

Re:Keystroke timing obfuscation added to SSH(1) by yencabulator on Tuesday August 29, 2023 @04:58PM (#37313994)
That's what the TTY settings are for. The program displayed controls line buffering by setting the TTY mode as it wants.

https://www.linusakesson.net/programming/tty/

Re:Keystroke timing obfuscation added to SSH(1) by howeyc on Tuesday August 29, 2023 @02:33PM (#37311956)
I would assume that doesn't work well for text editing.
Re:Keystroke timing obfuscation added to SSH(1) by jesprenj on Tuesday August 29, 2023 @02:51PM (#37312189)
mosh is quite smart with this
Re:Keystroke timing obfuscation added to SSH(1) by gregw2 on Tuesday August 29, 2023 @05:31PM (#37314424)
Not exactly what I was looking for in terms of the security side of things but perhaps more sophisticated in terms of the editing handling. Cool, thanks for the reply!

Money quote from https://mosh.org/#techinfo :

Remote-shell protocols traditionally work by conveying a byte-stream from the server to the client, to be interpreted by the client's terminal. (This includes TELNET, RLOGIN, and SSH.) Mosh works differently and at a different layer. With Mosh, the server and client both maintain a snapshot of the current screen state. The problem becomes one of state-synchronization: getting the client to the most recent server-side screen as efficiently as possible.

This is accomplished using a new protocol called the State Synchronization Protocol, for which Mosh is the first application. SSP runs over UDP, synchronizing the state of any object from one host to another. Datagrams are encrypted and authenticated using AES-128 in OCB3 mode. ...

Roaming with SSP becomes easy: the client sends datagrams to the server with increasing sequence numbers, including a "heartbeat" at least once every three seconds. ...

Instant local echo and line editing

The other major benefit of working at the terminal-emulation layer is that the Mosh client is free to scribble on the local screen without lasting consequence. We use this to implement intelligent local echo. The client runs a predictive model in the background of the server's behavior, hypothesizing that each keystroke will be echoed at the cursor location and that the backspace and left- and right-arrow keys will have their traditional effect. But only when a prediction is confirmed by the server are these effects actually shown to the user. (In addition, by default predictions are only displayed on high-delay connections or during a network “glitch.”) Predictions are done in epochs: when the user does something that might alter the echo behavior — like hit ESC or carriage return or an up- or down-arrow — Mosh goes back into making background predictions until a prediction from the new batch can be confirmed as correct.

Thus, unlike previous attempts at local echo with TELNET and RLOGIN, Mosh's local echo can be used everywhere, even in full-screen programs like emacs and vi.

Re:Keystroke timing obfuscation added to SSH(1) by yencabulator on Tuesday August 29, 2023 @05:03PM (#37314063)
That's more a choice a current-day shell etc does for you, wanting to control the editing experience. Run `cat` and it'll switch to line buffered mode, note how your arrow keys just input line noise, and watch the cat process with ptrace if you want to confirm it really receives the whole line in one read syscall.
Re:Keystroke timing obfuscation added to SSH(1) by a-dub on Tuesday August 29, 2023 @03:11PM (#37312438)
i don't really type passwords into remote connected terminals anymore and haven't for some time. shrug

while shoring up the existing holes is worthwhile, people should really be using keys or difficult to type passwords in 2023.

Re:Keystroke timing obfuscation added to SSH(1) by abwizz on Wednesday August 30, 2023 @08:27AM (#37320978)
> Most terminal applications use buffered I/O for password entry

does the existance of this patch implicate that openssh does not behave that way?

Re:Keystroke timing obfuscation added to SSH(1) by alickz on Thursday August 31, 2023 @06:16AM (#37334885)
so that's why my terminal doesn't show "*" as i type my password?

tripped me up the first time i used a shell. interesting to see why