We missed this Blackhat talk back in August, but it’s so good we’re glad to find out about it now. [Christopher Domas] details his obsession with hidden processor instructions, and how he discovered an intentional backdoor in certain x86 processors. These processors have a secondary RISC core, and an undocumented procedure to run code on that core, bypassing the normal user/kernel separation mechanisms.
The result is that these specific processors have an intentional mechanism that allows any unprivileged user to jump directly to root level access. The most fascinating part of the talk is the methodical approach [Domas] took to discover the details of this undocumented feature. Once he had an idea of what he was looking for, he automated the process of checking every possible x86 instruction, looking for the one instruction that allowed running code on that extra core. The whole talk is entertaining and instructional, check it out after the break!
There’s a ton of research poking at the instruction level of complication processors. One of our favorites, also by [Domas], is sandsifter which searches for undocumented instructions.
The thing is will all this insight result in better code for the majority that use these processors? Or like zero-day exploits benefit only a few.
I suspect the publicity will make manufacturers less likely to pull stunts like this in the future.
Like the publicity had any control over 3 letters that inserted those instructions, lol.
Not likely. It took what, 18 years to find this bug/feature. It’s a small community that pay attention to, and an even smaller community that go hunting for these security beaches. This publicity isn’t loud enough and many of the people will be content in that ‘not my hardware, not my problem’ sentiment. Disregarding that if it’s on these chips a similar beach is probably on their hardware. So it is in fact their problem.
Has anyone checked their https certificates lately? Remember the fantastic beach of issuing protocol on those a few years ago?
Did your keyboard have a breach on the ‘r’ key?
Have you never stayed on any one of the many security beaches? It’s quite wonderful.
What is with the clickbait title? This exploit only affects ancient VIA C3 CPUs which came out nearly 20 years ago and only some boards with a BIOS which mistakenly leaves it enabled. It is a VIA specific extension so it won’t work on anything else.
It is just a terrible implementation by VIA. They did document this but you needed to sign NDAs and be a big customer to get the documentation. They just referred to it as an “alternate instruction set” designed to be used for debugging and testing. Presumably it would have been used for something like SMM.
If you’re still running a VIA C3 then you need to consider upgrading as they were glacially slow even when brand new.
It’s unclear to me how you can assume this is a single incident! Only because it’s 20 years old, does not mean it’s not part of any other processor.
Because Domas said it was only on the VIA C3 and later VIA CPUs didn’t have the AIS “feature”.
AIS is what the underlying RISC core inside the VIA C3 actually runs.
What you are assuming is that Domas exhaustively examined ALL possible processors. And even if he did, his methods might, for some unexpected reasons turn up nothing when there in fact still is a problem/hidden processor.
What happened is that he happened to read a few patents and deduced that something like this might be possible to figure out for VIA C3 CPUs. So he got a few computers and when things looked promising he dove deeper. (and bought more of those computers with the same CPU).
If you listen to his talk you will notice that the patents were important in finding a direction in which to search. If say AMD decides not to patent their “hidden CPU” ideas, it is quite possible that the AMD processors to this time share a similar hole, just that it is even harder to find.
you have missed the point entirely – it isn’t that this particular processor had this particular backdoor, it’s 1) these are the types of tools/ things you can do to probe hardware, and 2) who knows what other backdoors other processors have! Particularly if people were silly enough to do this one!
And yes, it has to be public preasure that stops them doing things like this…
its not even an exploit, this Via C3 mode is fully documented in processor datasheet :/
This guy very much went the long way around in finding this. As it turns out the existence of this alternate execution mode, the correct MSR bit to disable it, the magic two-byte instruction to enter it, and the fact that it bypasses normal protection checks is all documented in Appendix A of the datasheet: http://datasheets.chipdb.org/VIA/Nehemiah/VIA%20C3%20Nehemiah%20Datasheet%20R113.pdf
Yup, that’s the thing…. it’s like “closing” the X86 instruction translation “program” (an electronic logical mechanism block that outputs RISC code for the RISC core to execute)
And then just running code directly onto the RISC core.
A modern X86_64 system looks more and more like a set of virtual machines (hypervisor, SMM) made out of hardware blobs (SMM) and software blobs (Intel Management engine, AMT, etc) etched onto a piece of silicon (SoC/atom) or few(CPU+PCH or CPU+North+South bridges).
Heck, I guess by emulating the functions of a modern X86 system on multiple STM32 and/or atmel MCUs that are as clocked as fast as the CPU that mess is simulating… there would be no noticeable drop in performance.
Risc core on the output of an Atmel that translates and organizes instructions (Pipeline controller+Translation bus),
MMIO by taking pointer data from the RISC core and tests the boundary…
Kernel mode vs User mode…. Just check the permissions via another controller…
and so on….
for my sanity, I’ll skip this rabbithole
It’s for the best.
You are correct! Second to last page. However, it does not specify the instructions available which is one of the main parts of the talk. Still a brilliant depction of how to get into the meat of the inner workings of a processor…
Cyrix……… Good mode my ass
What notebook model on photo?
Acer Aspire One 722 is my guess.
“instruction level of complication processors.”
This is a hack?
Seriously? I can see how some of the things on here trigger that “Not a Hack” reaction, but this one? This is the kind of stuff this site is made for. Even if the end result wasn’t earth-shattering, that’s some real outside the box thinking there.
He built a cluster of computers and used brute force methods to find instructions to crash them. Note, this was not the goal.. Then had another system to detect and recover failed nodes automatically. Yes its a hack!
For me the takeaway lesson from this is not that such features exist, I already understood this was possible, but rather that it is possible to reverse engineer and exploit such a feature starting with very few clues just by being logical and systematic in how you go about mapping out the processor’s behavior. Once again somebody proves that obscurity is not security.
Except it wasn’t obscure so it doesn’t prove that. It does however prove that if one never goes looking, one will never find.
No you are just arguing for the sake of it and being a bore. Before now did you honestly believe that a people could go through the sequence he did to arrive at the instruction set of the RISC core? It is certainly a first for the public domain, even if such antics are routine for the NSA et al.
Pffft! Did you hold your pinky up before typing that? Using one’s brains, talents and available information happens all the time. It’s the foundation for hacking. So yes I believe others could and probably have done this before.
No I didn’t, but I will in future.
It’s on the old VIA C3, so big deal. To actually do anything with this info one would have to know the native instruction set of the RISC core in order to run anything on it while ignoring the x86 ‘wrapper’ and translation system.
What would be interesting is an operating system and applications written to run directly on the CPU’s real core. Would it have any performance advantage over running a conventional x86 OS on it?
Did you watch the video all the way through? Or just stop when he said that?
Man… you missed out!
He goes about reverse engineering just enough of that unknown instruction set to actually write a privilege escalator!
That alone would be a worthy hack! This is about a dozen hacks layered one atop the next at least!
He does say, that to get that god bit *set* requires root…. but that some systems come out of the box with it already set! (meaning, insta root with a couple-page long .c file from an ordinary user account).
Scary!
But what’s interesting and impressive about this isn’t that he did this on this one old system, it’s the approach of it. No help, no docs, just a suspicion, a handful of patents carefully read yielding vague descriptions of a possible ‘secret handshake’, and some very clever hacks!
We’re easily at the point where we cannot know for certain whether our computer systems — which we depend upon for most of our engineering (including the design of new chips!) — are in fact not already compromised. New chips are compiled now. The artwork is far too big and detailed for even a large team of humans to actually verify by inspection.
Did you ever hear about the concept of a compromised compiler for the self-hosting language, that, when detecting it is compiling itself, reinserts the compromise so the source code stays perfectly clean, and the compromise survives another generation?
So what happens if the chip manufacturer themselves gets compromised, and the attacker can ensure his own hidden core is a part of each new generation of chip?
If you can’t measure it, you can’t control it. No measure-record-analyse cycle, no science. No science, no engineering also. Just, ‘wizardry’.
I’m for throwing up my hands too. How do these GOD-like creatures even create these things? Must be a miracle.
All these “Meh, not much of a Hack” or “this is old tech”… do you trust your current CPU? your phone, watch, smart-tv? what if you had the tools to go out, and find these hidden instructions? You have to start somewhere “simple” right? Its a very interesting talk and altho its VIA and an older cpu, it got me wondering about more modern systems, with microcode updates and many cores with core inside them. I heard you guys liked dem various architectures, so Ive put all of em in your Intel i9000-1337 ;)
You are correct. All you need to know is where it is looking for a trusted signed update and spoof it. Inject whatever package you want at that point and resign the code. There is also the issue with firmware updates and access levels of internal devices that can allow for sniffing and injection of code or diagnostic/qc modes ????
“x86 processors” did kind of imply the sort that people actually use. Rather than a low-performance, bottom-end chip from 20 years ago. Fairly sure they were never used in servers, and it’s really really unlikely you’ll find one online or offline nowadays.
Sure it’s interesting the way the guy hacked his way in, but the title of this dresses it up like it’s a way of getting hold of the We Know Best Module in a modern Intel or AMD CPU. Making it possible to pwn millions of machines and theoretically not get caught. Much more interesting than this.
Not that this isn’t interesting, but be careful with the hype.
Excellent insight and description in that presentation. I’m amazed at the work that went in for possibly no value to the output unless you found the backdoor. I like how it was listed as a case study but it is much more than that. If properly exploited this flaw could do damage to national security and at minimum could cause extensive damage by making identity theft easier. I have to think sometimes that these very complex holes or privilege escalations are left there by design and I won’t say more about that. We need to keep a close eye on our “Trusted sources”.
This “feature” is documented on the data sheet of the CPU (actually on many data sheets of different CPUs from the same vendor) so I find it weird that he spent so much time and effort going over patent docs and doing all this fuzzing and the side channel attack just to discover something mentioned on the CPU’s data sheet (which should have been the first thing he should have read). As for the instruction set someone is using it, there must be at least one binary out there that includes code for that separate processor (which is not really a separate processor -since it shares the same register file etc-, it’s a different execution mode as the data sheet mentions, it seems as a way to directly run microcode) and it shouldn’t be too hard to find those segments of continuous LEA or BOUND instructions. I’d start with the firmware code implemented on the BIOS, that code is probably the reason he got the MSR bit pre-enabled on those PCs because someone forgot to turn it off. Maybe some windows drivers from VIA are using it as well. Also it turns out that some information regarding that instruction set were present on some presentations from VIA and patent docs as well, including hints on their formating. I’d expect he would use such information on his fuzzer. I don’t get why he did it the way he did but kudos for his work and for finding the issue with those PCs (I’d expect to see a patch for the Linux kernel to clear this MSR bit as it happens on Windows) !
All that matters is those 3 letters represent my country and not another. Think of all the good that came from having a backdoor into every mainframe fort he past 40 years, countless wars stopped before making past the planning stage, financial advantages that have kept our country from collapsing and so on. There’s a lot going on in the world we don’t know about and that’s a good thing or none of us would be able to sleep soundly.
So, a backdoor man, huh? Like Promis, Inslaw, and the Clinton era transfer of satellite technology to China? The Pollard sale of intel to Russia through Israel? Actually, stuff that happens is pretty much common knowledge ever since Bamford wrote The Puzzle Palace decades ago.