x60_security.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <style type="text/css">
  7. @import url('../css/main.css');
  8. </style>
  9. <title>Libreboot documentation: Security on the ThinkPad X60</title>
  10. </head>
  11. <body>
  12. <div class="section">
  13. <h1>Security on the ThinkPad X60</h1>
  14. <p>Hardware modifications to enhance security on the ThinkPad X60. This tutorial is <b>incomplete</b> at the time of writing.</p>
  15. <p><a href="index.html">Back to previous index</a></p>
  16. </div>
  17. <div class="section">
  18. <h1>Table of Contents</h1>
  19. <ul>
  20. <li><a href="#hardware_requirements">Hardware Requirements</a></li>
  21. <li><a href="#software_requirements">Software Requirements</a></li>
  22. <li><a href="#procedure">The procedure</a></li>
  23. </ul>
  24. </div>
  25. <div class="section">
  26. <h1 id="hardware_requirements">Hardware requirements</h1>
  27. <ul>
  28. <li>An X60</li>
  29. <li>screwdriver</li>
  30. <li>(in a later version of this tutorial: soldering iron and scalpel)</li>
  31. </ul>
  32. <h1 id="software_requirements">Software requirements</h1>
  33. <ul>
  34. <li>none (at least in the scope of the article as-is)</li>
  35. <li>You probably want to encrypt your GNU/Linux install using LUKS</li>
  36. </ul>
  37. </div>
  38. <div class="section">
  39. <h1>
  40. Rationale
  41. </h1>
  42. <p>
  43. Most people think of security on the software side: the hardware is important aswell.
  44. </p>
  45. <p>
  46. This tutorial deals with reducing the number of devices that have direct memory access that
  47. could communicate with inputs/outputs that could be used to remotely
  48. command the system (or leak data). All of this is purely theoretical for the time being.
  49. </p>
  50. <h1 id="procedure">Disassembly</h1>
  51. <p>
  52. Firstly remove the bluetooth (if your X60 has this):<br/>
  53. The marked screws are underneath those stickers (marked in those 3 locations at the bottom of the LCD assembly):<br/>
  54. <img src="../images/x60_security/0000_bluetooth0.jpg" alt="" /><br/>
  55. Now gently pry off the bottom part of the front bezel, and the bluetooth module is on the left (easily removable):<br/>
  56. <img src="../images/x60_security/0000_bluetooth.jpg" alt="" /><br/>
  57. </p>
  58. <p>
  59. If your model was WWAN, remove the simcard (check anyway):<br/>
  60. Uncover those 2 screws at the bottom:<br/>
  61. <img src="../images/x60_security/0000_simcard0.jpg" alt="" /><br/>
  62. SIM card (not present in the picture) is in the marked location:<br/>
  63. <img src="../images/x60_security/0000_simcard1.jpg" alt="" /><br/>
  64. Replacement: USB dongle.
  65. </p>
  66. <p>
  67. Now get into the motherboard.
  68. </p>
  69. <p>
  70. Remove those screws:<br/>
  71. <img src="../images/x60_security/0000.jpg" alt="" />
  72. </p>
  73. <p>
  74. Push the keyboard forward (carefully):<br/>
  75. <img src="../images/x60_security/0001.jpg" alt="" />
  76. </p>
  77. <p>
  78. Lift the keyboard up and disconnect it from the board:<br/>
  79. <img src="../images/x60_security/0002.jpg" alt="" />
  80. </p>
  81. <p>
  82. Grab the right-hand side of the chassis and force it off (gently) and pry up the rest of the chassis:<br/>
  83. <img src="../images/x60_security/0003.jpg" alt="" />
  84. </p>
  85. <p>
  86. You should now have this:<br/>
  87. <img src="../images/x60_security/0004.jpg" alt="" />
  88. </p>
  89. <p>
  90. The following is a summary of what you will remove (already done to this system):<br/>
  91. <img src="../images/x60_security/0001_overview.jpg" alt="" /><br/>
  92. Note: the blue lines represent antenna cables and modem cables. You don't need to remove these, but you can if you want
  93. (to make it tidier after removing other parts). I removed the antenna wires, the modem jack, the modem cable and
  94. also (on another model) a device inside the part where the wwan antenna goes (wasn't sure what it was, but I knew it wasn't needed). <b>This is optional</b>
  95. </p>
  96. <p>
  97. Remove the microphone (can desolder it, but you can also easily pull it off with you hands). Already removed here:<br/>
  98. <img src="../images/x60_security/0001_microphone.jpg" alt="" /><br/>
  99. <b>Rationale:</b><br/>
  100. Another reason to remove the microphone: If your computer gets<a href="#ref1">[1]</a> compromised, it can
  101. record what you say, and use it to receive data from nearby devices if
  102. they're compromised too. Also, we do not know what the built-in microcode (in the CPU) is doing; it could theoretically
  103. be programmed to accept remote commands from some speaker somewhere (remote security hole). <b>In other words,
  104. the system could already be compromised from the factory.</b>
  105. </p>
  106. <p>
  107. Remove the modem:<br/>
  108. <img src="../images/x60_security/0001_modem.jpg" alt="" /><br/>
  109. (useless, obsolete device)
  110. </p>
  111. <p>
  112. Remove the speaker:<br/>
  113. <img src="../images/x60_security/0001_speaker.jpg" alt="" /><br/>
  114. Reason: combined with the microphone issue, this could be used to leak data.<br/>
  115. If your computer gets<a href="#ref1">[1]</a> compromised, it can be used to
  116. transmit data to nearby compromised devices. It's unknown if it can be
  117. turned into a microphone<a href="#ref2">[2]</a>.<br/>
  118. Replacement: headphones/speakers (line-out) or external DAC (USB).
  119. </p>
  120. <p>
  121. Remove the wlan (also remove wwan if you have it):<br/>
  122. <img src="../images/x60_security/0001_wlan_wwan.jpg" alt="" /><br/>
  123. Reason: has direct (and very fast) memory access, and could (theoretically) leak data over a side-channel.<br/>
  124. <b>Wifi:</b> The ath5k/ath9k cards might not have firmware at all. They might safe but could have
  125. access to the computer's RAM trough DMA. If people have an intel
  126. card(most X60s come with Intel wifi by default, until you change it),then that card runs
  127. a non-free firwamre and has access to the computer's RAM trough DMA! So
  128. the risk-level is very high.<br/>
  129. <b>Wwan (3g modem):</b> They run proprietary software! It's like AMT but over the GSM network which is
  130. probably even worse.<br/>
  131. Replacement: external USB wifi dongle. (or USB wwan/3g dongle; note, this has all the same privacy issues as mobile phones. wwan not recommended).
  132. </p>
  133. <h2>
  134. Not covered yet:
  135. </h2>
  136. <ul>
  137. <li>Disable cardbus (has fast/direct memory access)</li>
  138. <li>Disable firewire (has fast/direct memory access)</li>
  139. <li>Disable flashing the ethernet firmware</li>
  140. <li>Disable SPI flash writes (can be re-enabled by unsoldering two parts)</li>
  141. <li>Disable use of xrandr/edid on external monitor (cut 2 pins on VGA)</li>
  142. <li>Disable docking station (might be possible to do it in software, in coreboot upstream as a Kconfig option)</li>
  143. </ul>
  144. <p>
  145. Go to <a href="http://media.ccc.de/browse/congress/2013/30C3_-_5529_-_en_-_saal_2_-_201312271830_-_hardening_hardware_and_choosing_a_goodbios_-_peter_stuge.html">http://media.ccc.de/browse/congress/2013/30C3_-_5529_-_en_-_saal_2_-_201312271830_-_hardening_hardware_and_choosing_a_goodbios_-_peter_stuge.html</a>
  146. or directly to the video: <a href="http://mirror.netcologne.de/CCC/congress/2013/webm/30c3-5529-en-Hardening_hardware_and_choosing_a_goodBIOS_webm.webm">http://mirror.netcologne.de/CCC/congress/2013/webm/30c3-5529-en-Hardening_hardware_and_choosing_a_goodBIOS_webm.webm</a>.
  147. </p>
  148. <p>
  149. A lot of this tutorial is based on that video. Look towards the second half of the video to see how to do the above.
  150. </p>
  151. <h2>
  152. Also not covered yet:
  153. </h2>
  154. <ul>
  155. <li>
  156. Intrusion detection: randomized seal on screws<br/>
  157. Just put nail polish with lot of glider on the important screws, take
  158. some good pictures. Keep the pictueres and make sure of their integrity.
  159. Compare the nail polish with the pictures before powering on the laptop.
  160. </li>
  161. <li>
  162. Tips about preventing/mitigating risk of cold boot attack.
  163. <ul>
  164. <li>soldered RAM?</li>
  165. <li>seal RAM door shut (possibly modified lower chassis) so that system has to be disassembled (which has to go through the nail polish)</li>
  166. <li>wipe all RAM at boot/power-off/power-on? (patch in coreboot upstream?)</li>
  167. <li>ask gnutoo about fallback patches (counts number of boots)</li>
  168. </ul>
  169. </li>
  170. <li>
  171. General tips/advice and web links showing how to detect physical intrusions.
  172. </li>
  173. <li>
  174. For example: <a href="http://cs.tau.ac.il/~tromer/acoustic/">http://cs.tau.ac.il/~tromer/acoustic/</a>
  175. or <a href="http://cyber.bgu.ac.il/content/how-leak-sensitive-data-isolated-computer-air-gap-near-mobile-phone-airhopper">http://cyber.bgu.ac.il/content/how-leak-sensitive-data-isolated-computer-air-gap-near-mobile-phone-airhopper</a>.
  176. </li>
  177. <li>
  178. <a href="https://en.wikipedia.org/wiki/Tempest_%28codename%29">https://en.wikipedia.org/wiki/Tempest_%28codename%29</a>
  179. </li>
  180. <li>
  181. https://gitorious.org/gnutoo-for-coreboot/grub-assemble/source/a61f636797777a742f65f4c9c58032aa6a9b23c3:
  182. </li>
  183. </ul>
  184. </div>
  185. <div class="section">
  186. <h1>
  187. Extra notes
  188. </h1>
  189. <p>
  190. EC: Cannot be removed but can be mitigated: it contains non-free
  191. non-loadable code, but it has no access to the computer's RAM.
  192. It has access to the on-switch of the wifi, bluetooth, modem and some
  193. other power management features. The issue is that it has access to the
  194. keyboard, however if the software security howto <b>(not yet written)</b> is followed correctly,
  195. it won't be able to leak data to a local attacker. It has no network
  196. access but it may still be able to leak data remotely, but that
  197. requires someone to be nearby to recover the data with the help of an
  198. SDR and some directional antennas<a href="#ref3">[3]</a>.
  199. </p>
  200. <p>
  201. <a href="http://www.coreboot.org/Intel_82573_Ethernet_controller">Intel 82573 Ethernet controller</a>
  202. on the X60 seems safe, according to Denis.
  203. </p>
  204. <div class="subsection">
  205. <h2>
  206. Risk level
  207. </h2>
  208. <ul>
  209. <li>Modem (3g/wwan): highest</li>
  210. <li>Intel wifi: Near highest</li>
  211. <li>Atheros PCI wifi: unknown, but lower than intel wifi.</li>
  212. <li>Microphone: only problematic if the computer gets compromised.</li>
  213. <li>Speakers: only problematic if the computer gets compromised.</li>
  214. <li>EC: can be mitigated if following the guide on software security.</li>
  215. </ul>
  216. </div>
  217. </div>
  218. <div class="section">
  219. <h1>
  220. Further reading material (software security)
  221. </h1>
  222. <ul>
  223. <li><a href="../gnulinux/encrypted_trisquel.html">Installing Trisquel GNU/Linux with full disk encryption (including /boot)</a></li>
  224. <li><a href="../gnulinux/encrypted_parabola.html">Installing Parabola GNU/Linux with full disk encryption (including /boot)</a></li>
  225. <li><a href="dock.html">Notes about DMA access and the docking station</a></li>
  226. </ul>
  227. </div>
  228. <div class="section">
  229. <h1>
  230. References
  231. </h1>
  232. <div class="subsection">
  233. <h2 id="ref1">[1] physical access</h2>
  234. <p>
  235. Explain that black hats, TAO, and so on might use a 0day to get in,
  236. and explain that in this case it mitigates what the attacker can do.
  237. Also the TAO do some evaluation before launching an attack: they take
  238. the probability of beeing caught into account, along with the kind of
  239. target. A 0day costs a lot of money, I heard that it was from 100000$
  240. to 400000$, some other websites had prices 10 times lower but that
  241. but it was probably a typo. So if people increase their security it
  242. makes it more risky and more costly to attack people.
  243. </p>
  244. </div>
  245. <div class="subsection">
  246. <h2 id="ref2">[2] microphone</h2>
  247. <p>
  248. It's possible to turn headphones into a microphone, you could try
  249. yourself, however they don't record loud at all. Also intel cards have
  250. the capability to change a connector's function, for instance the
  251. microphone jack can now become a headphone plug, that's called
  252. retasking. There is some support for it in GNU/Linux but it's not very
  253. well known.
  254. </p>
  255. </div>
  256. <div class="subsection">
  257. <h2 id="ref3">[3] Video (CCC)</h2>
  258. <p>
  259. 30c3-5356-en-Firmware_Fat_Camp_webm.webm from the 30th CCC. While
  260. their demo is experimental(their hardware also got damaged during the
  261. transport), the spies probably already have that since a long time.
  262. <a href="http://berlin.ftp.media.ccc.de/congress/2013/webm/30c3-5356-en-Firmware_Fat_Camp_webm.webm">http://berlin.ftp.media.ccc.de/congress/2013/webm/30c3-5356-en-Firmware_Fat_Camp_webm.webm</a>
  263. </p>
  264. </div>
  265. </div>
  266. <div class="section">
  267. <p>
  268. Copyright &copy; 2014, 2015 Francis Rowe &lt;info@gluglug.org.uk&gt;<br/>
  269. Permission is granted to copy, distribute and/or modify this document
  270. under the terms of the GNU Free Documentation License, Version 1.3
  271. or any later version published by the Free Software Foundation;
  272. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
  273. A copy of the license can be found at <a href="../gfdl-1.3.txt">../gfdl-1.3.txt</a>
  274. </p>
  275. <p>
  276. Updated versions of the license (when available) can be found at
  277. <a href="https://www.gnu.org/licenses/licenses.html">https://www.gnu.org/licenses/licenses.html</a>
  278. </p>
  279. <p>
  280. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
  281. EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
  282. AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
  283. ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
  284. IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
  285. WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
  286. PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
  287. ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
  288. KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
  289. ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
  290. </p>
  291. <p>
  292. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
  293. TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
  294. NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
  295. INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
  296. COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
  297. USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
  298. ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
  299. DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
  300. IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
  301. </p>
  302. <p>
  303. The disclaimer of warranties and limitation of liability provided
  304. above shall be interpreted in a manner that, to the extent
  305. possible, most closely approximates an absolute disclaimer and
  306. waiver of all liability.
  307. </p>
  308. </div>
  309. </body>
  310. </html>