Live data from Hacker News

CPU Backdoors

danluu.com

41–50 of 51 posts

Re: CPU Backdoors

#41
post #5
post #3

Cool article. I didn't understand how the privilege escalation would be exploited. Obviously if the attacker already has access to the box, he can get root with this exploit. I think a chip backdoor could also be based on information leaking rather than executing arbitrary code. The steps would be: 1. Identify critical info, like crypto keys, from heuristics. This means keeping a special buffer, since you don't know…

1. You design your CPU so whenever you execute an add instruction with $r1 = x, $r2 = y (say these are the add inputs), the next add instruction will switch to ring-0 mode and run code at address which is the result of the add. 2. You don't need access to the box. You just get the target to load a site with JS that sets x and y to those specfic values and adds them, and then adds zero to some address you want to exec…

Sounds convincing.

I'm not clear on the "million tricks" though. Suppose you embed some machine language in a string javascript, and use your r1/r2 trick - how can you compute the address of the machine language you want to execute?

Or are you saying there are existing chunks of machine language in the OS or apps that would be useful to remote execute, with no arguments?

Re: CPU Backdoors

#42
post #22
post #9

While the main point of the article is interesting, some of the details don't really make sense. For example, it would be difficult to make an instruction like fyl2x or fadd cause a privilege level change. The reason is that floating point instructions are executed on a separate unit (the FPU), with a separate decoder. This unit would not have the means to communicate back information such as "change privilege level"…

Modifying the masks struck me as a fairly farfetched scenario. I don't know how many spare gates a processor ships with but you would have to know the design pretty intimately to be able to include something malicious by remapping, both in terms of logic and physical constraints.

[deleted]

Re: CPU Backdoors

#43
post #32

Earlier quoted context omitted.

The reason is that floating point instructions are executed on a separate unit (the FPU), with a separate decoder. I don't think that has been true for a very long time. If the backdoor depends on some "magic values", it would be relatively easy to spot just by looking at the microcode. The problem with both your theory and the article's theory is that nobody outside the chip companies themselves really knows how the…

There are so many people involved in the design and manufacturing of a processor, that I don't see how it's possible to hide a backdoor, either in the microcode or during manufacturing. We're not talking about some secret government agency, we're taking about a place with many workers around the world, with different agendas. Eventually someone will find about about the backdoor and leak information about its existen…

This is a very interesting topic - how much can we rely on the tendency of people to leak.

I notice that despite the thousands who have worked for Intel, virtually no Intel confidential material has been leaked. At least, that I'm aware of.

People value their careers and houses, and I'm sure Intel threatens employees with consequences for leaking.

Re: CPU Backdoors

#44
post #40

Earlier quoted context omitted.

If you're really being nasty you can potentially do this even without JS - say, by using CSS layout.

But can one predict how CSS will look to the CPU? Or do you assume a memcpy will happen at some point, and catch it then?

memcpy is one route.

But, given that (almost) everyone runs browsers for which the binaries, at least, are avaliable, it's relatively straightforward to come up with something that triggers the vulnerability.

And even if you don't know what browser they are using, you can make guesses. For example - if you have an image that's 102px wide and immediately to the right of an image that's 57px wide, at some point the CPU will probably add 57 and 102. Things like that.

Re: CPU Backdoors

#45

Earlier quoted context omitted.

> having a floating point uOp look at more than two operands would have humungous implications for the architecture. Actually, in HSW and later all FP ops can have 3 register inputs, they added one to support FMA. However, this is irrelevant. The scenario basically everyone has been talking about is exploiting a microcoded instruction. In case you are unfamiliar with the term, when the CPU frontend reads in an instru…

Oh, I see. I hadn't recognized that fyl2x was a microcoded instruction. Looking at the page again I totally missed the footnote and he's completely right. However, for FMA I assume that they break the FMA instruction into two uOps that have to be issued back to back to the same execution unit. The changes to the reorder register renaming logic would be just too painful otherwise, especially since Intel uses a unified…

> However, for FMA I assume that they break the FMA instruction into two uOps that have to be issued back to back to the same execution unit. The changes to the reorder register renaming logic would be just too painful otherwise, especially since Intel uses a unified scheduler which also handles the integer ops.

FMAs are not split, they are executed as single instructions issued in a single cycle. There were no changes to renaming or reorder logic from 3-op instructions. Since SNB, Intel has been using PRF, where the rename system is decoupled enough from the scheduler that there is no need for any changes.

Re: CPU Backdoors

#46

The Novena laptop seems almost devoid of backdoors. http://www.wired.co.uk/news/archive/2014-01/20/open-source-l...

Cool. What about tempest? If you're buying a heavy, slow laptop for security, it would be nice to know it's tempest-safe.

Re: CPU Backdoors

#47

Earlier quoted context omitted.

Absolutely. NICs in general are a very fruitful vector for persistence, and had been extensively studied by the NSA. Generally, anything with a microcontroller that might run firmware (BIOS or UEFI), access DMA (via PCI, PCIe, FireWire) or be a storage peripheral that might pass code to the boot process (HDD/SSD/CD/DVD/BD/Flash drive/memory card firmware, including USB) or input (USB) is a potential problem. That is…

Supply chain integrity is a huge, possibly unsolvable problem. One of the arguments for domestic manufacture of at least some keystone parts, and one of the reasons IBM is still in the fab business.

Since those who say "domestic" usually mean USA, I'm guessing you live there.

Bad news: your government is one of the attackers. (So is mine, unfortunately.) I take it you've seen the NSA interdiction guys taking discreet hacksaws to Cisco parcels en route to 'implant' (backdoor) them by now?

Did you think that was something that only happens abroad?

Re: CPU Backdoors

#48

CPU backdoors are a very real concern, but not only in the CPU but in the growing complexity of the motherboard chipset. For example, a malicious memory controller could manipulate data on the way to the CPU, causing a faithful CPU to do malicious things. For highly secured systems, this is of growing concern. With the amount of stuff made in China the supply chain is considered a considerable attack surface which ha…

I abandoned x86 a few years back, because I'm far less concerned about China knowing my secrets than I am with the Five Eyes countries violating my privacy. The likelihood of the nsa or gchq tampering with an allwinner or freescale chip en route is much lower than with Intel or AMD. And far more resources would be involved than would be financially reasonable to tailor an operation for a small-potatoes corporation running an all-ARM setup like mine.

So I'm seeing it as a decrease in attack surface, overall.

Re: CPU Backdoors

#49
post #2

Wow..light involved in the lithography process causes wear on the lenses? To what degree?

I worked for an optical company building complete objective lenses and illuminator optics for steppers using G-line, I-line, and ArF and KrF laser sources. "Solarization" and ablation of the lens coatings was an ongoing problem, especially for UV sources. A stepper objective has 20+ lens elements. Lenses were refurbished by replacing elements as their transmission fell.

Re: CPU Backdoors

#50
post #46

The Novena laptop seems almost devoid of backdoors. http://www.wired.co.uk/news/archive/2014-01/20/open-source-l...

Cool. What about tempest? If you're buying a heavy, slow laptop for security, it would be nice to know it's tempest-safe.

I wouldn't bet a dollar that it is tempest safe.

ps: for the ignorants, like I was two minutes ago, http://www.webopedia.com/TERM/T/Tempest.html tempest is about reading devices electromagnetic radiations to intercept data.

Post reply on HN