News for hackers. Stuff that matters.
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.