8 ms·
An X86 Design Flaw Allowing Universal Privilege Escalation
- xgbi 11y agoStrangely, when I clicked the link my Macbook Air kernel-panicked. This is the first time it happened in maybe 2 years.. I though the website was actually using an exploit to kill all PCs kernels. After a reboot all went fine, though.
- wmf 11y agoI wonder if this is SMM or something even darker and deeper.
- userbinator 11y agoSMM was my first thought too, although "gone unnoticed for 20 years" (1995) suggests something newer; SMM was introduced in 1990 with the 386SL, and this suggests P6-level. Microcode seems about right - that was introduced in the P6. But, it's also signed (at least Intel ucode is - not sure about AMD) according to previous research... either way, this is going to be interesting.
- mmastrac 11y ago"directed against a uniquely vulnerable string of code running on every single system" That seems to fit with the idea of microcode, but it's pretty vague. What else would be running on every system from the P6?
- nly 11y agoIf it is microcode it wouldn't be a complete disaster. Microcode updates are volatile and can ship with BIOS. Even when updated by Linux it happens early out of initrd.
- dlitz 11y agoSigned how, though? A crypto scheme that Intel came up with 20 years ago is probably not secure, and if they haven't updated it since then, well...
- userbinator 11y agohttp://inertiawar.com/microcode/ http://inertiawar.com/microcode/ suggests a variant of SHA1 or SHA2 with 2048-bit RSA. No doubt it's changed since the P6, probably with different private keys for each CPU model/family, but the public key must be present in the hardware in order to verify, so theoretically it could be extracted... Edit: public key. There might be a test mode which bypasses this or something.
- kryptiskt 11y agoNo, the private key doesn't have to be present. They sign with the private key, the CPU verifies with the public key.
- nly 11y ago"Memory sinkhole" seems be a pun on the "memory hole", which suggests it might be MMU related?
- Zenst 11y agoIf you read "but 40 years of x86 evolution have left a labyrinth of forgotten backdoors into the ultra-privileged modes" then I'm more inclined to agree, though also wondering about V86 monitor after looking at http://www.scs.stanford.edu/05au-cs240c/lab/i386/s15_03.htm http://www.scs.stanford.edu/05au-cs240c/lab/i386/s15_03.htm
- Taniwha 11y agoI think you're right - SMM mode it is, we know the NSA has a bunch of SMM rootkits, I bet someonme found the vector the NSA uses
- Moral_ 11y agoto demonstrate how to jump malicious code from the paltry ring 0 into the deepest, darkest realms of the processor. So you already have to be in ring 0. Pretty click baity title.
- dmix 11y ago"Privilege Escalation" implies you start from an unprivileged state does it not? That sentence might just be poorly structured.
- geofft 11y agoIt means you go from some level of privilege (which could be none at all) to more privilege. For instance, "a WordPress author can get a shell on the server" would be a privilege escalation, even though being able to write blog posts is quite privileged on its own. That said, I'm not particularly convinced that (unvirtualized) ring 0 to SMM is really a violation of a security policy... it's not like SMM really tries to confine what ring 0 can do, it just wants things like interrupt priority.
- pgeorgi 11y agoSince SMM allows for all kinds of things that ring 0 can't do (one example: writing to flash even if write protections are enabled, unless a second set of write protections, added in later chip generations, is _also_ enabled), arbitrary code execution in SMM is a bad thing. Also later ring 0 code can't get rid of code installed into SMM earlier (that may still trigger through events or timers).
- weland 11y agoIf you go from having your own ring 0 (as a guest in a hypervisor) to messing around with everyone's ring 0, it's very much a privilege escalation.
- zerohp 11y agoVT-x allows guest operating systems to run in Ring 0. If this exploit works then a guest OS can exploit the hypervisor.
- pg_is_a_butt 11y ago"design flaw"... hilarious. like it wasn't mandated by jack-booted agency thugs.
- im3w1l 11y agoWhat is more privileged than ring 0? Microcode?
- zerohp 11y agoA hypervisor runs below ring 0 and system management mode runs below that.
- ajross 11y ago... sort of. "Ring 0" is a historical abstraction from the 80286 protected mode model. There was a two bit field associated with segment and gate descriptors that enforced privilege separation, so you couldn't load segment registers with data at a higher priviledge level, and were disallowed from making traps into higher levels except as specifically allowed (we call those "syscalls" today). None of this stuff is used anymore. We have the kernel in ring zero and we have everything else. A hypervisor is absracting the whole CPU, so the guests have their own rings, etc... SMM is likewise outside the ring model. And of course we have all sorts of other priviledge abstractions in modern hardware: iommu's exist for this purpose of course (though with a different threat model), as does memory mapping handled by microcontrollers on the fabric of modern SoCs. The NX bit doesn't fit into "rings" but is clearly related technology, etc... Basically we need to stop talking about 286 protected mode except when that's really what we mean. Frankly I have no idea what this attack means by "ring 0", but I'm guessing like everyone else this is an exploit in SMM code.
- Blackthorn 11y agoRings are an extremely convenient abstraction when it comes to talking about operations that trap (so, basically, the whole foundation that security is built on). It's perfectly reasonable to keep talking about it even if the origins are no longer used (or usable at all, in long mode). It even makes sense with the NX bit, thanks to the control register that lets ring 0 bypass write protection. To be clear, the only thing I'm disagreeing with here is your last paragraph.
- danbruc 11y ago
- smegel 11y agoI remember a post a few years ago about running code by triggering page faults in the MMU. Basically they created a single instruction computer (which can be Turing complete) out of the MMU, hence allowing processing to occur with the MMU that is invisible to the CPU and everything else. I wonder if related. http://en.wikipedia.org/wiki/One_instruction_set_computer http://en.wikipedia.org/wiki/One_instruction_set_computer
- jbangert 11y ago(author here) https://github.com/jbangert/trapcc https://github.com/jbangert/trapcc We did get a few hypervisor crashes and the Intel architecture has all sorts of subtle behaviour that is often not modelled properly. It would be good to see someone build on my work.
- jhallenworld 11y ago"deepest, darkest realms of the processor..." is it the ME? https://recon.cx/2014/slides/Recon%202014%20Skochinsky.pdf https://recon.cx/2014/slides/Recon%202014%20Skochinsky.pdf
- userbinator 11y agoME is in the chipset and it's much newer than 20 years.
- nly 11y agoIt's kind of scary that there's a micro-JVM on my chipset that allows new code to be loaded in to such a privileged system dynamically.
- ymse 11y agoJust like your mobile.. http://www.osnews.com/story/27416/The_second_operating_system_hiding_in_every_mobile_phone http://www.osnews.com/story/27416/The_second_operating_syste...
- lmm 11y agoMakes me think of this guy who managed to install linux on his hard drive: https://spritesmods.com/?art=hddhack&page=7 https://spritesmods.com/?art=hddhack&page=7
- aji 11y agoIs this about the IA-32 debugger? There's a Phrack article that describes something similar: http://phrack.org/issues/65/8.html http://phrack.org/issues/65/8.html
- deleted 11y ago[deleted]
- walterbell 11y agoEarlier work from the ITL/Qubes team, including SMM attacks: http://invisiblethingslab.com/itl/Resources.html http://invisiblethingslab.com/itl/Resources.html
- 0xFFC 11y agoSo guy's did I understand correctly ? They found a flaw in x86 so the guest can exploit host ? ( Maybe much restricted than what I said , but the main idea is correct ?)
- vardump 11y agoThe worst case is a VM escape for hardware accelerated (VT-x/AMD-V). So does this exploit work under virtualized ring 0? That would be a disaster for many cloud providers and for virtualization in general. Maybe this is something about controlled change of flow of execution in SMM mode?
- tptacek 11y agoMy guess is that if you have a universal hardware hypervisor escape, you write the abstract for that talk much differently.
- tempodox 11y agoRegardless of the content, white text on black background is VERY BAD for reading. Please make this text more readable.
- bognition 11y agoWow. Ok so given that this is a hardware flaw and not a software flaw is this kind of disclosure reasonable? In the case of software vulnerabilities, researchers typically inform vendors and allow them time to distribute a patch. Is there anything analogous here for hardware? If yes how does intel (or any hardware vendor) get ahead of this by distributing a fix?
- JoeAltmaier 11y agoIf its an unfixable problem then there's an obligation to disclose. Else only the 'bad guys' know.
- bognition 11y agoBut doesn't this assume that the 'bad guys' have knowledge of the exploit. This feels like a faulty assumption. However after disclosure the bad guys will definitely have knowledge. Also after disclosure what is the right course of action? We certainly can't require the replacement of all vulnerable hardware.
- Kalium 11y agoLet's break it down for examination. Before disclosure, the bad guys may know and the good guys certainly do not know. After disclosure, both bad guys know and good guys know. Good guys who know can take protective steps. Who gains the most?
- kllrnohj 11y ago> Ok so given that this is a hardware flaw and not a software flaw is this kind of disclosure reasonable? Yes. Always, always yes. Even if it's unfixable, ignorance of there even being a problem is not better. > Is there anything analogous here for hardware? Yes, actually. BIOS updates can include microcode updates and workarounds for hardware issues. Similarly if it takes a specific pattern to happen (which this almost certainly does as that's how these things work), that's going to be trivial for everyone's antivirus scanners to catch.
- louwrentius 11y agoThis sounds very significant to me. Basically this vulnerability affects multi-tennant systems where if you have a VM, you can then expoint this vulnerability to take control of a VM of somebody else. This type of vulnerability, however rare, could be an argument why you should run systems with different security classifications on different physical hardware (different physical virtualisation clusters).
- charonn0 11y agoAm I missing something here? It's just a couple of sentences of some BS about negative rings.
- scott_karana 11y agoIt's an exploit that'll be presented at the upcoming Blackhat conference.
- charonn0 11y agoThanks, it makes much more sense sense now.