Skip to content
0:00 / 0:00

#thinkpad#firmware#bios

My personal fight against the modern laptop

linux conf au 2017 - Hobart, Australia

5.5K subscribers • 4 videos on Hallway

YouTube
  • Recommended by 3 people: 2 on Hacker News and 1 on Lobsters.
  • Presented by Hamish Coleman

Intermediate. Assumes working knowledge.

120K views9 years ago3 recommendations

SecuritySystems programmingReverse engineeringEmbedded systemsLinux

Hamish Coleman explains how he reverse engineered the keyboard controller in a Lenovo ThinkPad to flash it with custom firmware.

Hamish Coleman linux.conf.au/schedule/presentation/48/ In this talk, I will take you through the tools and techniques I used to reverse engineer the keyboard controller in my Thinkpad laptop and re-flash it with custom firmware. This will cover how the Thinkpad range of laptops have tried to secure their firmware from unauthorised changes. Finally, I will present my ongoing work to reverse engineer the protocol used between the BIOS and the vendor's flash update tool (which included writing a custom virtual machine to emulate a minimal laptop). I was driven to start this project when I realised that the laptops currently on sale just did not meet my requirements. Even the durable Thinkpad laptops I have preferred in the past are being dumbed down. Eventually, I will need a new laptop - and with the current offerings, I just do not want anything I can purchase off the shelf. I knew I was not going to be able to build my own laptop from scratch (and having discounted all the current free/open laptop offerings) so I started looking at what I could hack together. To keep the project achievable, I reduced my laptop gripes as far as I could and focused on just the keyboard - asking the question: "Can I shoehorn an older keyboard in a modern laptop?" Eventually answering it with "yes, sometimes." It turned out to be easily possible to physically replace the keyboard on any of the Thinkpads in the xx30 series with one from the xx20 series. I was stalled with a half-working keyboard until early 2016 when Zmatt published how he unlocked his laptop. The firmware changes needed were bundled up into a complete build system which others have used to replicate the keyboard replacement. However, with both these laptop series' being several years old now, I am still looking at forward porting this to a newer laptop - which has led me to research the hardware and firmware design there. I will also take the audience through my current knowledge of how the vendor's protocol to tell the BIOS to write a new image to flash works. Now that it is possible to write new code for the embedded controller and to install it and run it - I wanted to know how secure this was (or wasn't) separate to simply "fixing" the keyboard. I have written a custom virtualisation tool to host the vendors "dosflash" program and capture the protocol it uses to request that the BIOS write a new image to flash. It is my hope that others will be inspired to look closer at their hardware and to give them both some tools and the confidence that it is possible to "fix" the way that consumer hardware works.

Why it's here

3 people recommend this

What people say. Recommended as an engaging case study in reverse engineering laptop firmware and embedded controllers.

pushcxon Lobsters • Recommends

My personal fight against the modern laptop keyboard and firmware lockouts

josteinkon Hacker News • Recommends

On “Iaito – A Qt and C++ GUI for radare2 reverse engineering framework”

For those who might want a somewhat indirect introduction to radare... Here's something from Linuxconf.au and hacking Thinkpads: link to this video

Klinkyon Hacker News • Recommends

On “How I Fixed a 10-Year-Old Guitar Hero Bug Without the Source Code [video]”

I found this video on hacking old Thinkpad keyboards onto new Thinkpad models interesting. Required a lot of reverse engineering due to how the firmware in the Thinkpad maps keys: link to this video

RavSSon Hacker News • Mentions

On “I maintain a 17 year old ThinkPad”

…st completely random executables or code from strange places. You can manually recreate the process of building a patch for the embedded controller instead of just following instructions: link . Here's the presentation by the author himself at linux.conf.au (what used to be the biggest local Linux conference for those of us in Australia and NZ): link to this video . This is of course not supported by Lenovo. Unlocking the BIOS is definitely more like what you described. It's the price to pay for freely playing around with processor power limits, getting AES-NI instruction set support, etc. I have not checked since 2019, so there might be a clearer way.…