Live data from Hacker News

Why does SSH send 100 packets per keystroke?

eieio.games

281–290 of 375 posts

Re: Why does SSH send 100 packets per keystroke?

#281
>In 2023, ssh added keystroke timing obfuscation. The idea is that the speed at which you type different letters betrays some information about which letters you’re typing. So ssh sends lots of “chaff” packets along with your keystrokes to make it hard for an attacker to determine when you’re actually entering keys.

Why not just add random "jitter" to the keystroke packets, but keeping just the 1 actual packet?

Re: Why does SSH send 100 packets per keystroke?

#282

> In 2023, ssh added keystroke timing obfuscation. The idea is that the speed at which you type different letters betrays some information about which letters you’re typing. So ssh sends lots of “chaff” packets along with your keystrokes to make it hard for an attacker to determine when you’re actually entering keys. Why not just add random "jitter" to the keystroke packets, but keeping just the 1 actual packet?

Jitter could be filtered out, I presume.

Re: Why does SSH send 100 packets per keystroke?

#283
post #194

Earlier quoted context omitted.

> several 56k baud modems These were almost definitely 8k baud.

Confusing baud and bit rates is consistent with actually being there, though.

As someone that started with 300/300 and went via 1200/75 to 9600 etc - I don't believe conflating signalling changes with bps is an indication of physical or temporal proximity.

Re: Why does SSH send 100 packets per keystroke?

#284

> In 2023, ssh added keystroke timing obfuscation. The idea is that the speed at which you type different letters betrays some information about which letters you’re typing. So ssh sends lots of “chaff” packets along with your keystrokes to make it hard for an attacker to determine when you’re actually entering keys. Why not just add random "jitter" to the keystroke packets, but keeping just the 1 actual packet?

Jitter could be filtered out, I presume.

How? You can't average out the noise here because the attack involves discriminating the different types of events from one another based on the thing you'd be averaging.

Re: Why does SSH send 100 packets per keystroke?

#285

The 2023 timing obfuscation is a nice case study in security defaults vs edge cases. Most SSH users won't notice 100 packets per keystroke - it's noise in the bandwidth budget. But for high-frequency terminal apps, it becomes the dominant cost. At 2000 concurrent players updating 80x60 chars at 10fps, a custom protocol might be the right answer regardless of obfuscation settings.

You'd think the cover traffic would automatically cut out once the connection reached a certain rate though.

Re: Why does SSH send 100 packets per keystroke?

#286

Earlier quoted context omitted.

Jitter could be filtered out, I presume.

How? You can't average out the noise here because the attack involves discriminating the different types of events from one another based on the thing you'd be averaging.

One clue is that you cannot predict what key user is going to press next reliably, so the jitter would always be added to actual key press. You can minimise that by adding constant latency, so that you could simulate pulling events back in time, but still this is going to get complex quick and still could be filtered out. As for methods, it depends on the jitter. Think of things like noise removal in audio and adaptive filtering. Adding extra packets is much easier and more secure.

Re: Why does SSH send 100 packets per keystroke?

#287

Earlier quoted context omitted.

I assure you that if you rubber duck at another engineer that doesn't understand what you're doing, you will also be pummeled with information that may or may not be relevant. ;)

That isn't rubber duck debugging. It's just talking to someone about the problem. The entire point of rubber duck debugging is that the other side literally cannot respond - it's an inanimate object, or even a literal duck/animal.

I don't think that's right. When you explain a technical problem to someone who isn't intimately familiar with it you're forced to think through the individual steps in quite a bit of detail. Of course that itself is an acquired skill but never mind that.

The point or rubber duck debugging then is to realize the benefit of verbally describing the problem without needing to interrupt your colleague and waste his time in order to do so. It's born of the recognition that often, midway through wasting your colleague's time, you'll trail off with an "oh ..." and exit the conversation. You've ended up figuring out the problem before ever actually receiving any feedback.

To that end an LLM works perfectly well as long as you still need to walk through a full explanation of the problem (ie minimal relevant context). An added bonus being that the LLM offers at least some of the benefits of a live person who can point out errors or alert you to new information as you go.

Basically my quibble is that to me the entire point of rubber duck debugging is "doesn't waste a real person's time" but it comes with the noticeable drawback of "plastic duck is incapable of contributing any useful insights".

Re: Why does SSH send 100 packets per keystroke?

#288

The 2023 timing obfuscation is a nice case study in security defaults vs edge cases. Most SSH users won't notice 100 packets per keystroke - it's noise in the bandwidth budget. But for high-frequency terminal apps, it becomes the dominant cost. At 2000 concurrent players updating 80x60 chars at 10fps, a custom protocol might be the right answer regardless of obfuscation settings.

Just think of the trees burnt in the name of security!

[deleted]

Re: Why does SSH send 100 packets per keystroke?

#289

Earlier quoted context omitted.

A rubber ducky demands that you think about your own questions, rather than taking a mental back seat as you get pummeled with information that may or may not be relevant.

I'm not saying you should do this, but you can do this: https://gist.github.com/shmup/100a7529724cedfcda1276a65664dc...

Amusingly that looks less like "rubber duck debugging" and more like "socratic questions". Which certainly isn't a bad thing.

Re: Why does SSH send 100 packets per keystroke?

#290

The 2023 timing obfuscation is a nice case study in security defaults vs edge cases. Most SSH users won't notice 100 packets per keystroke - it's noise in the bandwidth budget. But for high-frequency terminal apps, it becomes the dominant cost. At 2000 concurrent players updating 80x60 chars at 10fps, a custom protocol might be the right answer regardless of obfuscation settings.

Just think of the trees burnt in the name of security!

Each of our devices spents a lot of energy dedicated to encryption. By now, all disks you did not set up manually are most likely encrypted and hardly any unencrypted package will travel out of your network. That's not to mention the tons of load and dedicated hardware we have just to terminate https and scan traffic for suspicious activity or the hardware being replaced because it's internal security triggered/broke.

In a perfect world, we could send all traffic completely unencrypted and never scan for a malicious payload, saving all that energy and hardware. But we do not live in that world and drawing the line with this minor, mostly unintrusive security feature seems strange.

Post reply on HN