Top
Best
New

Posted by matt_d 3 hours ago

Spaghettifying DRAM(github.com)
281 points | 81 comments
MattSteelblade 3 hours ago|
I cannot wait for the accompanying Black Hat talk. Christopher Domas is one of my absolute favorite all-time hackers. He does such a fantastic job of explaining his work. Some of my favorite talks of his:

- Psychological Warfare in Reverse Engineering https://www.youtube.com/watch?v=HlUe0TUHOIc

- The MoVfuscator https://www.youtube.com/watch?v=R7EEoWg6Ekk

- Hardware Backdoors in redacted x86 https://www.youtube.com/watch?v=jmTwlEh8L7g

nerdsniper 44 minutes ago||
My introduction to his work was "The future of RE Dynamic Binary Visualization"[0] which completely blew me away. It still feels futuristic today, 13 years later. Novel UI/UX paradigms like this are slow to find widespread adoption, even when they're so clearly demonstrated to be such an ideal fit for their purpose.

0: https://www.youtube.com/watch?v=4bM3Gut1hIk&pp=ygURY2hyaXN0b...

superkuh 16 minutes ago|||
I love digraphs. I learned about them from that talk's associated paper... but only about 2 years ago. I've been dumping my system and GPU RAM raw and visualizing via digraphs and it's amazing how such a simple algorithm operating on arbitrary bytes leads to such distinct and consistent image.
anthk 30 minutes ago|||
TBH with the DDD debugger you had a graph with the C structures right away.
Hasz 2 hours ago|||
If this is the same dude I am thinking of, his wife is also the CISO of Mozilla and do security research together, afair they have a whole book on x86 reverse engineering.

Very cool!

Intermernet 42 minutes ago||
x86 Software Reverse‐Engineering, Cracking, and Counter‐Measures By Stephanie Domas and Christopher Domas

https://onlinelibrary.wiley.com/doi/book/10.1002/97813942771...

jambalaya8 2 hours ago||
His stuff is something else.
WhiteDawn 1 hour ago||
This is all great to get full unfettered access to your own system, as life should be.

I’m sure Xbox and PlayStation security groups are a little nervous right now though. Getting ring-0 on those machines is near impossible, but once you do then everything else becomes wide open

ransom_rs 1 hour ago|
Seems like this should get us a newer PS4 jailbreak?
weinzierl 48 minutes ago||
When I started with computers, DRAM was understandable by a teenager: RAS, CAS, read, done.

Ok, the necessary refresh was always a little pain, but still something manageable.

Nowadays, I feel you need three PhD's to even bring up a micro with DRAM and don't get me started on the proprietary binary blobs necessary just for DRAM access. No wonder PSRAM is a thing.

The corollary is that it shouldn't be too surprising that this gigantic attack surface provides many opportunities. (Of course that doesn't mean it is easy to find them, hat tip to Christopher Domas, just that I expect there to be many more).

gmueckl 1 hour ago||
OK, so this works on AMD Jaguar according to the README. That's a architecture from 2013. There's notes about Zen 3 having a different base address for the memory controller registers, but that's it. What newer CPUs does attack actually work on?
devttyeu 1 hour ago||
Zen has completely different memory controller IP (UMC), that's configured at boot by AGESA/PSP. I doubt this exploit applies to modern Zen CPUs, however AMD are the only ones who could really confirm this.
CartwheelLinux 1 hour ago||
That information is intentionally left out
gmueckl 1 hour ago||
Then publishing it in this incomplete state is just pointless fearmongering and will just make others fill in this information within the next couple of days. And the good guys likely won't be the first ones to do that.
raver1975 39 minutes ago||
I spaghettify my memory every time I write C code.
dzdt 3 hours ago||
So on an affected system, ring 0 root has access to pretty much everything that was hidden in negative ring territory. The page is pretty quiet about what other processor families might be similar beyond this specific AMD16h (an older AMD low-power family)?
m1el 2 hours ago||
from the GH page: > Developed and tested on AMD Family 16h CPUs, the last generation whose datasheets document the DRAM controller's translation registers — and show that they can't be locked. 17h and beyond simply leave this information out.
embedding-shape 2 hours ago||
As long as you know the controller's translation registers, it's applicable? Not tested on later one's merely because the information wasn't readily available it seems.

> Developed and tested on AMD Family 16h CPUs, the last generation whose datasheets document the DRAM controller's translation registers — and show that they can't be locked. 17h and beyond simply leave this information out.

zahlman 1 hour ago||
This is only applicable if you already have root (in order to get beyond that), right? It doesn't expose new risk of local privilege escalation?
creshal 59 seconds ago||
Reaching into ring -2 or the TPM allows privilege escalations past traditional "root permissions" and lets attackers defeat the sort of tamper protection that's designed to make escalations to local root manageable. Wipe-resistant malware, falsified cryptographic attestations, all sorts of fun.
odo1242 1 hour ago||
Yep, I believe so
ziofill 43 minutes ago||
But it supercharges what can be done once you get root, no?
odo1242 35 minutes ago||
Yep.
ecshafer 48 minutes ago||
This is so cool. Outside of a cool demo, and maybe some black hat type stuff, this is surely dangerous, a bad idea, and shouldn't be done in prod. But pure hacker ethos at its heart.
devttyeu 2 hours ago||
The big question is whether this can break out of KVM and whether it can be microrode patched / patched in any other way.

And whether it's really real in the first place.

summa_tech 2 hours ago||
One hopes that a hypervisor would not expose hardware control registers directly in the first place, except ones deliberately designed for virtualization support.

Otherwise, the guest is running effectively at the same privilege level as the hypervisor (that's useful sometimes, but probably not intended in most applications).

devttyeu 2 hours ago||
Yeah, just started looking at this with my team (we run a cloud with VM instance offering on AMD so this very much caught our eye)

So far seems this is about right:

1. You need platform register access, so seems can't KVM-escape with just this

2. Big question is what about breaking Confidential SEV-SNP guests from the host?

devttyeu 2 hours ago||
Ok, on 2. and in general this exploit only works on pre-Zen AMD platforms as the repo states in not-so-clear terms.

Zen changed DTC (DRAM Controller) to UMC (Unified Memory Controller), UMC is programmed at boot, and one would hope they figured that locking access to it makes sense when they were adding confidential compute support; Not clear though because there is no public documentation on it, so best we can hope for is some statement from AMD/3rd party researcher saying "this won't work on Zen because X/Y/Z"

quotemstr 1 hour ago||
This hack is 99% giving people the control over their own computers they should already have had. Guy is a Robin Hood.
MSFT_Edging 58 minutes ago||
When Chris Domas left Battelle for Intel years back, shortly after hardware-fuzzing a bank of thin-clients to discover undocumented x86 instructions, I was convinced Intel was basically keeping him on the payroll to shut him up.
dooglius 2 hours ago|
I don't understand the threat model being attacked here. If you had physical DRAM access you could do all of this anyway right? And I would assume that an unprivileged user would not have write access to the DRAM controller registers?
fulafel 1 hour ago||
This doesn't require physical DRAM access, it's all software.

With ring-0 access, this lets you poke "even things walled off and invisible to ring-0 or the CPU itself" including things that the security processor tries hard to wall off.

VorpalWay 1 hour ago||
Which arguably is a good thing. As a owner of the system I really should have complete control over it. But currently there is software I have no control over running at even higher privilege levels.

The only modern silicon that gives me full control over what code is running is some (or most?) microcontrollers.

And this isn't just a question of FOSS principle. Especially SMM is problematic by unpredictably taking CPU cycles away from your workload. This can mess up hard realtime workloads, such as found in CNC controllers. If you are running something like LinuxCNC this something you need to measure to figure out if a given computer is suitable for that job.

quotemstr 2 hours ago||
Even physical DRAM access would be thwarted by transparent total memory encryption, so this hack is still something else.
More comments...