News for hackers. Stuff that matters.
Re:Hertzbleed Attack by xoa on Tuesday June 14, 2022 @02:36PM (#31743896)
>What can you do about it? Nerf your CPU performance by disabling "turbo boost" or equivalent.

Eh? Doesn't this require an attacker to actually be able to talk to the targeted system? You mention classes of actor ("journalist, human rights activist, etc") that aren't online public service providers or at least perhaps shouldn't be. Private devices connecting out to the greater net are effectively universally behind firewalls and often (CG)NAT as well and not unilaterally addressable the other direction. For private services, access should be exclusively via VPN (direct WG or mesh like nebula or something) with PSK alongside public keys and perhaps something like port knocking in front as well.

Same as with other hot class side channel attacks, the attacker does in fact need to be able to get the targeted system to run something somehow. So the most basic thing to do about it is simply not allow attackers to do that. The players for whom this is fundamentally impossible are general public online service providers, but that isn't the class most people or businesses fall into. If attackers are getting sensitive servers to respond to arbitrary code then they have already gotten access credentials of some kind.

Re:Hertzbleed Attack by BoppreH on Tuesday June 14, 2022 @03:20PM (#31744630)
> the attacker does in fact need to be able to get the targeted system to run something somehow

Unfortunately that includes Javascript, and now that affects virtually everybody. Speculation: if you can find a Javascript call that uses protected keys, you might be able to extract secrets from that route.

Re:Hertzbleed Attack by xoa on Tuesday June 14, 2022 @03:58PM (#31745209)
OK, but can you walk me through the threat model here? This isn't a rhetorical question, it's easy to see how servers in general and shared hosting, colocated VMs etc in particularly might theoretically face a threat here, I'm just trying to get a better understanding of how GP would be correct for end user devices. The individual in question on the smartphone or computer specifically chooses to initiate a connection to a desired web server, and you're imagining said server was hacked or otherwise compromised/untrustworthy and begins running Hertzbleed via JS, and that JS has the precision in practice for it to work. So vs other RCEs and such what is the path here? What short secrets (AFAICT these attacks aren't about pulling gigabytes of RAM but a few bits of key stuff) is it going after that, after having obtained them, represent a serious compromise by themselves or allow further escalation? Nothing done on the user device is going to affect the network hardware they're going through, and this attack is about reading not writing, so what is the attacker getting that will then let them break out of the web broswer/OS sandboxes and start pulling more the other direction?

I can see that if other persistent access credentials were sitting unencrypted in memory that could be an issue if the attacker can use those to hop into other services the user has access to, but that's manageable via care with device usage, proper MFA etc right? Or I can see how true external IP address might be a dangerous short secret for someone trying to hide (vs merely secure) via VPN. But I think in those cases externalizing the VPN to the network level is a good idea anyway since being 100% sure of zero leaks in a modern OS/application stack is challenging, and then the user device doesn't have to know anything about the real IP at all. JS also already allows a huge amount of fingerprinting, so if someone is allowing JS to run and is deadly worried about privacy they must be thinking about mitigations there already.

Again, not at all denying that incredibly tricky stuff can be done using little leaks like this to escalate in surprising ways. But for a dedicated web browsing device with only outgoing and session access to WAN, likely though a VPN but not necessarily on-device, what new threat scenario is this such that completely disabling dynamic frequency is the only response? Although I suppose for a dedicated web browsing device using tor browser or the like disabling that might not actually be a big deal anyway.

Re:Hertzbleed Attack by BoppreH on Tuesday June 14, 2022 @04:39PM (#31745742)
The exploit comes from a hacked server, a bad ad, social engineering, etc.

As for the attack, imagine a browser that encrypts local storage with a system key. If I understand correctly, by storing different patterns of bits, Hertzbleed might be able to extract the system key from the timings to save data.

This might sound very theoretical, but modern OS'es (and password managers) have lots of keys like that. There's a good chance one or more of them are reachable from Javascript. And that's just what popped in my mind in two minutes, I'm sure red teams will have better ideas.

The scary part is that this is another attack in the same ugly class as Meltdown and Spectre, where the antidote is nearly as damaging as the poison.

Re:Hertzbleed Attack by lossolo on Tuesday June 14, 2022 @06:51PM (#31746988)
> imagine a browser that encrypts local storage with a system key. If I understand correctly, by storing different patterns of bits, Hertzbleed might be able to extract the system key from the timings to save data.

Don't you need precise clocks for this in JS? The ones that were disabled in browsers after Meltdown/Spectre.

Re:Hertzbleed Attack by mintplant on Wednesday June 15, 2022 @12:43AM (#31749199)
A lot of that has since been rolled back as different mitigations have been deployed against Spectre.
Re:Hertzbleed Attack by slimsag on Wednesday June 15, 2022 @01:15AM (#31749371)
Source? The MDN is very clear about precise timing not being available due to Spectre mitigations.
Re:Hertzbleed Attack by thepangolino on Wednesday June 15, 2022 @04:44AM (#31750539)
>by storing different patterns of bits, Hertzbleed might be able to extract the system key from the timings to save data.

Isn't that practically impossible given the amount of random software running on a regular computer nowadays? This is not based on hdd write speeds but processor timings which are affected by every single cat video you are watching.

Re:Hertzbleed Attack by neurostimulant on Tuesday June 14, 2022 @05:50PM (#31746499)
Many password managers are using end-to-end encryption and have browser extensions written in js. It would be bad if hertzbleed can be used to extract keys used by those password manager extensions.
Re:Hertzbleed Attack by mgiampapa on Tuesday June 14, 2022 @05:20PM (#31746242)
On most shared infrastructure would be even harder to exploit. In an ideal world you are sharing the infrastructure to maximize CPU and other resource utilization. When running workloads on VMWare for example, the best practice is to disable deep C states and not allow the CPU to dynamically scale down. This prevents all kinds of clock drift issues in guest VMs that expect a CPU cycle to be relatively constant.
Re:Hertzbleed Attack by angry_octet on Friday June 17, 2022 @09:31AM (#31777874)
This is not about power saving, it is dynamically, on the granularity of individual instructions, balancing the thermal dissipation available across cores. When some cores are relatively idle (e.g. waiting on cache fill) it uses the available amps to run other cores at "turbo boost" frequencies.

For some single threaded code we force other cores to idle so that one thread can get maximum cache and maximum frequency. A similar approach could be used to minimise the power analysis signal.

Re:Hertzbleed Attack by progval on Wednesday June 15, 2022 @02:08PM (#31756881)
untrustworthy server that runs malicious JS: potentially half the links one clicks on HN or Reddit

short secrets which aren't mitigated by MFA: session cookies, TLS client certificates, secret keys of e2ee IM apps (eg. Element), Zerobin URLs, ... Maybe even TLS session keys?

Re:Hertzbleed Attack by userbinator on Tuesday June 14, 2022 @08:11PM (#31747642)
Just like Spectre/Meltdown, it assumes you have an idea where to extract the secrets from, and more importantly what they secure. A string of random bytes is worth nothing to someone who doesn't know what they're the key to.

...and someone who is running JS is probably also running tons of other JS, adding even more noise to what already exists.

Re:Hertzbleed Attack by bobkazamakis on Tuesday June 14, 2022 @03:49PM (#31745063)
> the attacker does in fact need to be able to get the targeted system to run something somehow

>Unfortunately that includes Javascript, and now that affects virtually everybody.

Debatable -- not because of the goofballs who insist on never running javascript, but because it doesn't have the necessary clock precision available.

Re:Hertzbleed Attack by fpoling on Tuesday June 14, 2022 @05:34PM (#31746369)
When Spectre came it turned out that it was very straightforward to implement the relevant attacks in JS. A script can use workers with shared memory access to monitor execution and get a timer with less than 100ns resolution. As the result the shared memory were disabled. Later under the presumption that relevant issues were mitigated, the shared memory was re-enabled again.

So I wonder if the shared memory will be disabled again as it may allow to monitor frequency changes.

Re:Hertzbleed Attack by jabart on Tuesday June 14, 2022 @06:56PM (#31747028)
My understanding was that the timer precision was limited and that was never re-enabled.

From MDN.

"It's important to keep in mind that to mitigate potential security threats such as Spectre, browsers typically round the returned value by some amount in order to be less predictable. This inherently introduces a degree of inaccuracy by limiting the resolution or precision of the timer. For example, Firefox rounds the returned time to 1 millisecond increments."

Re:Hertzbleed Attack by josefx on Wednesday June 15, 2022 @06:42AM (#31751172)
If I remember correctly they also had to disable shared array buffers because a thread just incrementing a shared value can be used as timer.
Re:Hertzbleed Attack by contravariant on Tuesday June 14, 2022 @07:34PM (#31747349)
Could anyone explain how rounding the timing protects against just running the thing you want timed 1000 times to get microsecond precision?
Re:Hertzbleed Attack by thristian on Tuesday June 14, 2022 @10:56PM (#31748628)
Same as any security: making an attack more expensive to mount means people are less likely to try it. If high-resolution timers allow you to mount an attack in the three minutes the target takes to read a listicle page, then rounded timers require the target to keep the page open in the foreground for 3000 minutes, or 50 hours. That's much more difficult to do.
Re:Hertzbleed Attack by vajrabum on Tuesday June 14, 2022 @10:05PM (#31748324)
Isn't rounding pretty much the same thing as throwing away some precision in this case? So if I drop some (enough) bits and add .5 then no amount of averaging is going to recover the lost precision. Or maybe I misunderstand?
Re:Hertzbleed Attack by danielheath on Tuesday June 14, 2022 @11:22PM (#31748774)
Example: You need to know how whether an operation takes 30 or 31 milliseconds, but your timer is rounded to the nearest 100ms, so you just get 0 or 100.

If you repeat the operation 100 times and time how long that takes, you should either get 3000 or 3100 milliseconds.

Re:Hertzbleed Attack by usrusr on Wednesday June 15, 2022 @03:26AM (#31750076)
..and a dramatically increased likelihood of something unrelated going on in the system ruining your results. It's easy to dismiss mitigations like this as "not a solution", but at least those that add uncertainty to sidechannel attacks seem to complement each other quite nicely. Uncertainties don't add, they multiply.
Re:Hertzbleed Attack by SOLAR_FIELDS on Tuesday June 14, 2022 @09:51PM (#31748243)
I know next to nothing about the internals of how the rounding code works, but couldn't randomly choosing to round up or down mitigate this somewhat?
Re:Hertzbleed Attack by arpafaucon on Wednesday June 15, 2022 @02:09AM (#31749660)
If you round up and down with the same probability, it will get canceled on the long run.

I suppose this does mitigate the risk a little, but risks breaking other things. For example, you don't have the simple logic sequence: a < b => round(a) < round(b)

So I'd say "not worth it"

Re:Hertzbleed Attack by rswail on Wednesday June 15, 2022 @04:31AM (#31750474)
Minor correction:

iff |a| < |b| then round(|a|) < = round(|b|)

Re:Hertzbleed Attack by icedchai on Wednesday June 15, 2022 @05:40PM (#31759805)
There were proof of concepts. Were there ever any actual real world attacks?
Re:Hertzbleed Attack by jnordwick on Thursday June 16, 2022 @02:36AM (#31763065)
never. nothing ever recovered in a root kit. nothing seen for sale. even the original POCs were horrible biased and didn't work. simple moving the targeted buffer around in memory would have make it virtually impossible to exfiltrate it.
Re:Hertzbleed Attack by smaudet on Wednesday June 15, 2022 @03:03AM (#31749963)
I don't have a problem running JS but it is getting to the point where, if you can't prove you are JS worth running perhaps the browser should refuse to.

Why have we gone from 'oh only run programs you trust not anything from the web' to 'oh just run every bit of bloatware out there any time you move around the web?

99% of JS should not exist, 0.9 % of it does anything useful and the other .1% is straight up malicious...

Re:Hertzbleed Attack by joveian on Wednesday June 15, 2022 @03:26PM (#31758116)
I do this with uBlock Origin. It is easy and I'd say less impactful than blocking third party domain (de-CNAMEd) CDNs by default (that I also do). Some sites just don't show anything without javascript, though, so it works best if you are often willing to just ignore those sites (not common but not all that uncommon either).