You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
3.9 KiB

  1. # me\_cleaner [![Donation](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=B5HCXCLZVCVZ8)
  2. _me\_cleaner_ is a Python script able to modify an Intel ME firmware image with
  3. the final purpose of reducing its ability to interact with the system.
  4. ## Intel ME
  5. Intel ME is a co-processor integrated in all post-2006 Intel boards, which is
  6. the base hardware for many Intel features like Intel AMT, Intel Boot Guard,
  7. Intel PAVP and many others. To provide such features, it requires full access to
  8. the system, including memory (through DMA) and network access (transparent to
  9. the user).
  10. Unlike many other firmware components, the Intel ME firmware can't be neither
  11. disabled nor reimplemented, as it is tightly integrated in the boot process and
  12. it is signed.
  13. This poses an issue both to the free firmware implementations like [coreboot](
  14. https://www.coreboot.org/), which are forced to rely on a proprietary, obscure
  15. and always-on blob, and to the privacy-aware users, who are reasonably worried
  16. about such firmware, running on the lowest privilege ring on x86.
  17. ## What can be done
  18. Before Nehalem (ME version 6, 2008/2009) the ME firmware could be removed
  19. completely from the flash chip by setting a couple of bits inside the flash
  20. descriptor, effectively disabling it.
  21. Starting from Nehalem the Intel ME firmware can't be removed anymore: without a
  22. valid firmware the PC shuts off forcefully after 30 minutes, probably as an
  23. attempt to enforce the Intel Anti-Theft policies.
  24. However, while Intel ME can't be turned off completely, it is still possible to
  25. modify its firmware up to a point where Intel ME is active only during the boot
  26. process, effectively disabling it during the normal operation, which is what
  27. _me\_cleaner_ tries to accomplish.
  28. ## Platform support
  29. _me\_cleaner_ currently works on [most of the Intel platforms](
  30. https://github.com/corna/me_cleaner/wiki/me_cleaner-status); while this doesn't
  31. mean it works on all the boards (due to the different firmware implementations),
  32. it has been proven quite reliable on a great number of them.
  33. ## Usage
  34. _me\_cleaner_ should handle all the steps necessary to the modification of an
  35. Intel ME firmware with the command:
  36. $ python me_cleaner.py -S -O modified_image.bin original_dump.bin
  37. However, obtaining the original firmware and flashing back the modified one is
  38. usually not trivial, as the Intel ME firmware region is often non-writable from
  39. the OS (and it's not a safe option anyways), requiring the use of an external
  40. SPI programmer.
  41. ## Results
  42. For pre-Skylake firmware (ME version < 11) this tool removes almost everything,
  43. leaving only the two fundamental modules needed for the correct boot, `ROMP` and
  44. `BUP`. The code size is reduced from 1.5 MB (non-AMT firmware) or 5 MB (AMT
  45. firmware) to ~90 kB of compressed code.
  46. Starting from Skylake (ME version >= 11) the ME subsystem and the firmware
  47. structure have changed, requiring substantial changes in _me\_cleaner_.
  48. The fundamental modules required for the correct boot are now four (`rbe`,
  49. `kernel`, `syslib` and `bup`) and the minimum code size is ~300 kB of compressed
  50. code (from the 2 MB of the non-AMT firmware and the 7 MB of the AMT one).
  51. On some boards the OEM firmware fails to boot without a valid Intel ME firmware;
  52. in the other cases the system should work with minor inconveniences (like longer
  53. boot times or warning messages) or without issues at all.
  54. Obviously, the features provided by Intel ME won't be functional anymore after
  55. the modifications.
  56. ## Documentation
  57. The detailed documentation about the working of _me\_cleaner_ can be found on
  58. the page ["How does it work?" page](
  59. https://github.com/corna/me_cleaner/wiki/How-does-it-work%3F).
  60. Various guides and tutorials are available on the Internet, however a good
  61. starting point is the ["How to apply me_cleaner" guide](
  62. https://github.com/corna/me_cleaner/wiki/How-to-apply-me_cleaner).