Defeating a Laptop's BIOS Password
github.com
github.com
Probably one of the coolest things I've done as a teenager.
And I only had one working, locked laptop and a broken one. The whole endeavour was mostly to inherit my father's laptop than to recover any data. What I did with my father's data is probably a story for another time.
BIOS passwords are indeed a complete joke as means to secure access. There are a bunch of vendors out there who moved the authentication off from the BIOS/CPU to the KBC (keyboard controller) - Toshiba and Lenovo are among them. Still, it's ludicrously easy to circumvent these.
[0] https://dogber1.blogspot.com/2009/05/table-of-reverse-engine...
Works for straightforward ones like most Lenovo, but not for weirdos like Toshiba. Sometimes I see lots of Toshiba office laptops with locked BIOS waiting to be recycled as the result.
For newer ThinkPads, there is a method to replace the LenovoTranslateService EFI module with a modified version that passes control to another module, which in turn removes the password. This is supposed to be a paid solution (the module will ask for a code that has to be purchased) but apparently there is a "workaround" for that too.
I might not be up to date as I had no need for any of these and my most recent ThinkPad is an X220 but it's safe to say there is always going to be some solution without having to resort to motherboard replacement.
Forever after, on bootup, "Warning! Case has been opened!" would flash up on the screen. I assumed that was for warranty purposes, but our IT department was certified for repairs so it didn't really matter.
It's also unusual that discharging the CMOS removed the boot password. It shouldn't do that. I also worked on similar desktops (they were IBM desktops from before they were spun off) and they didn't have this problem that I can recall. Very few systems had boot passwords, however.
I'm certain that the BIOS passwords didn't clear this way, however, because we had a few systems that had old passwords that nobody knew. Instead, we had a copy of the tech software used to program the BIOS. You had to boot that program and use it to clear the password. HP had a similar program, but that stopped working around 2010 when the computers started to ship with a TPM and you could no longer just clear the content.
That's actually the official way to reset the password for a number of systems. [0][1][2]
[0] https://www.dell.com/support/article/au/en/aubsd1/sln170684/...
[1] https://forums.lenovo.com/t5/ThinkStation-Workstations/How-d...
[2] https://h30434.www3.hp.com/t5/Desktop-Boot-and-Lockup/how-to...
Can I obtain this somehow? I have a business grade HP laptop from 2006 (nw8440 I think) and I forgot my BIOS setup password. I need to enable the NX bit to upgrade from win7 to win10! Removing the CMOS battery overnight (and all other power) did not help.
1. Power off.
2. Hold the Windows, Up arrow and Down arrow keys all at the same time. Only then hit the power button to start.
3. Release all buttons and press F10.
4. You should see something about "SMC Command" starting.
5. Press File, press "Reset BIOS security defaults" or similar.
The only way to get the SMC.bin file, that I know of, is directly from HP Business Support.
Is that true even for the T2 Macs and such?
They start this way because at initial reset none of the required data structures for protected mode operation (page tables, GDT, IDT, etc.) are present. So the CPU starts up as a very fast 8086 who's purpose is to setup just enough page tables, a GDT, an IDT, etc. to be able to switch into protected mode and continue system bootstrap.
https://support.apple.com/guide/security/uefi-firmware-overv...
[0] https://youtu.be/3byNNUReyvE
[1] https://www.blackhat.com/us-19/briefings/schedule/#behind-th...
https://docs.microsoft.com/en-us/windows-hardware/manufactur...
Normally the CPU talks to the PCH and the PCH via SPI to a Flash ROM. The CPU has a BOOTROM which can cryptographically verify code blocks, the PCH has a CPU that can do the same, and the firmware has signed code blocks. It starts out with the CPU reading an authenticated code block which contains further code to verify other blocks.
Problem is that you still read SPI Flash which can be modified out of band, so after the CPU ROM reads the ACB it continues reading code which can be altered and if the UEFI firmware is set to 'verify but don't stop running' mode, you can modify all you want and it will work. On the other hand, if it is configured that way but a bit flip happens you can't boot anymore and can repair either. Apple's solution was to get rid of that completely and just emulate that SPI Flash from the T2 chip. The T2 is a complete SoC running an OS and has a secure enclave. Because it doesn't have to support 1980's Intel architecture they had a lot more freedom in designing security from the start, something Intel can't do unless they can break with backwards compatibility.
Found the former owner of the laptop where the board came from thanks to the corporate/user name displayed on the password prompt. It was a small IT company.
Contacted them on LinkedIn asking for the password and detailing the situation. Didn't get the password, but the CEO/owner of the company certainly had a surprise.
Turned out one of their guys was selling parts from their laptops/hardware without permission.
Suddenly, the seller on eBay found the message feature and wrote to me, saying I got them in trouble. Shouldn't have ghosted me, then? Just a "sorry, didn't know it had one" and I would've just proceeded to replace the BIOS chip, which was my plan B and it's what I ended up doing.
I guess if you have access to it, you could force boot from a malicious USB stick, or the network, that would simulate the disk decryption prompt.
I guess you could also remove security measures that your company put in place to e.g. prevent the usage of USB to prevention information leak.
Securing the bios is necessary.
If requisite credentials or remote attestation is sealed against a certain measurement value it should protect the system.
[0]: https://trustedcomputinggroup.org/wp-content/uploads/TCG-EFI...
Sure, they are still not encrypted in any meaningful sense by default, but the barrier to entry is quite far removed by not requiring a long process to enable it. A process which sometimes would require reinstallation, something an average person would likely not bother with.
While installing macOS Catalina the user gets prompted to activate this encryption, providing the system has a disk that supports that kind of full disk encryption I mentioned above.
Edit: A more precise question would be: What is the analogy to Secure Boot and the hardware being locked on a Macbook?
The only additional complication might be the T2 chip in the same way that TPMs might be an additional issue in other business laptops.
Any SPI flash programmer should work though. The protocol is simple enough that you could even implement it with an arduino if you really needed too.
I really wanted to be a laptop from someone on vacation and that at his come back finds this post instead of the laptop xD
I get that this is kind of content marketing for their engineering department, but damn if they could've prooooobably spent that money on something with more impact
This is the cheapest way of recruiting people in their target field. I have a strong interest in reverse engineering and actually checked out their jobs page. Too bad they are in San Diego.