File site/docs/install/deguard.md added (mode: 100644) (index 0000000..95ced55) |
|
1 |
|
--- |
|
2 |
|
title: Disabling Intel Boot Guard on MEv11 |
|
3 |
|
x-toc-enable: true |
|
4 |
|
... |
|
5 |
|
|
|
6 |
|
This covers Intel Skylake, Kaby Lake and Kaby Lake Refresh / Coffeelake |
|
7 |
|
machines; note that Coffeelake includes KabyLake Refresh and may have MEv12. |
|
8 |
|
This page concerns only those platforms that have Intel MEv11, not MEv12. The |
|
9 |
|
facts on this page are applicable to both *mobile* and *desktop* platforms. |
|
10 |
|
|
|
11 |
|
The Intel Boot Guard is a security mechanism implemented by intel, but not all |
|
12 |
|
vendors enable it. If enabled, the bootblock in the flash is protected at boot |
|
13 |
|
time by cryptographic signature verification; this means only the vendor can |
|
14 |
|
update the flash. |
|
15 |
|
|
|
16 |
|
On systems with MEv11, a bug exists in older versions (of MEv11) that allows |
|
17 |
|
for unsigned code execution, at a very early stage in the boot process, to the |
|
18 |
|
point that almost all of the ME firmware in flash can be fully replaced. The |
|
19 |
|
ME is also what implements Boot Guard, and the hack is possible *before* Boot |
|
20 |
|
Guard is enforced, allowing for it to be disabled. |
|
21 |
|
|
|
22 |
|
See: [CVE-2017-5705](https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00086.html) |
|
23 |
|
|
|
24 |
|
Mate Kukri, who authored the ThinkPad T480/T480 and OptiPlex 3050 Micro ports, |
|
25 |
|
wrote a tool called *deguard*, which Libreboot uses on these boards. This tool |
|
26 |
|
reconfigures the ME, exploiting it so as to disable the Boot Guard. |
|
27 |
|
|
|
28 |
|
This is done by externally flashing an older version. Libreboot's build system |
|
29 |
|
automatically downloads this older version, runs `me_cleaner` on it, and applies |
|
30 |
|
the deguard hack; this includes machine-specific ME configuration, which is |
|
31 |
|
added per machine by extracting it from a dump of the original flash. The |
|
32 |
|
resulting configuration (for the MFS partition in the ME) is then inserted into |
|
33 |
|
the generic ME image. |
|
34 |
|
|
|
35 |
|
Note that the deguard utility can *also* be used on MEv11 setups that *don't* |
|
36 |
|
have Boot Guard, if you simply want to auto-download and neuter a generic ME |
|
37 |
|
image, and then provide machine configuration. It is essentially doing the same |
|
38 |
|
thing that Intel's own *FITC* utility does (Intel Flash Image Tool), which is |
|
39 |
|
normally only available to vendors; the *deguard* utility written by Mate Kukri |
|
40 |
|
is available under a free software license, and included by default in Libreboot |
|
41 |
|
releases. It can be used for *any* MEv11-based system. |
|
42 |
|
|
|
43 |
|
To download deguard in lbmk (Libreboot's build system), do this: |
|
44 |
|
|
|
45 |
|
./mk -f deguard |
|
46 |
|
|
|
47 |
|
Then go in `src/deguard/` and the `README.md` file in there tells you more |
|
48 |
|
information about how it works, and how to use it. You do not need to run |
|
49 |
|
this tool yourself, unless you're adding a new board, because Libreboot is |
|
50 |
|
programmed to use it automatically, during the build process (or during |
|
51 |
|
insertion of vendor files after the fact, on release images). |
|
52 |
|
|
|
53 |
|
With deguard, the machine is operating in a state as though the Boot Guard keys |
|
54 |
|
were never fused, even if they were. [Previous work](https://trmm.net/TOCTOU/) |
|
55 |
|
has been done by others, related to the Boot Guard, but nothing quite so |
|
56 |
|
thorough and easy to use as deguard existed previously! |
|
57 |
|
|
|
58 |
|
Mate Kukri was able to figure this out and implement deguard, using existing |
|
59 |
|
work done by PT Research and Youness El Alaoui, exploiting the Intel SA 00086 |
|
60 |
|
bug which you can read more about here: |
|
61 |
|
|
|
62 |
|
<https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00086.html> |
|
63 |
|
|
|
64 |
|
<https://www.intel.com/content/www/us/en/support/articles/000025619/software.html> |
|
65 |
|
|
|
66 |
|
Note that *Intel* refers to this as a means of a so-called *attacker* running |
|
67 |
|
so-called *malicious* code; while this may also be possible in the strictest |
|
68 |
|
sense, flash write protection is possible on these machines, which you can |
|
69 |
|
read about on the [GRUB hardening](../linux/grub_hardening.md) page. Intel made |
|
70 |
|
the Boot Guard without giving users control of it, so people have worked for |
|
71 |
|
years to try to hack around it, as a matter of user freedom. So remember: when |
|
72 |
|
Intel is talking about security, they mean *their* security, not yours. To them, |
|
73 |
|
you are simply flashing malicious code. But they are the ones with malice. |
|
74 |
|
|
|
75 |
|
Mate Kukri and others who work on such hacks are heroes, and they have done a |
|
76 |
|
great service to the Libreboot project. |
|
77 |
|
|
|
78 |
|
Many more machines are now possible to port to coreboot, thanks to this hack. |