Skip to main content

A few more details regarding the peristent BIOS infection

If you were lucky enough to attend this year's CanSecWest conference than you probably sat through Anibal Sacco and Alfredo Ortega's talk on the BIOS infection, and how this would persist even through a hard-drive wipe / operating system reinstall. These guys are extremely bright and are pushing hard at the edge of security research.

The slideshow published by Core Security, provides the overview, which I'll summarize here with what I can remember of the technology and tools used to enable the hack shown at the conference.

First is getting a copy of a BIOS to hack. There are two options, and one which made the researcher's lives easier, VMware supplies both a generic "virtual" BIOS and a debugger which makes testing and developing the patches easier. A generic tool also exists which they have created to retrive, modify and reflash the BIOS based on previous work by pinczakko.

The second thing talked about is the structure of the BIOS which gets executed by the CPU when the computer first boots, and the operating system has not yet loaded. The whole point of describing this structure is that BIOS structure differ between different manufacturers and models of motherboards, and these differences make it difficult to predict where to make certain changes. The researchers found that almost all modern BIOS versions however use the identical decompression utility used to expand other pieces of code in the BIOS for devices such as video cards, north and south bridges, etc. This code is easy to find using pattern matching in the BIOS. Once this section of code is found, it can be patched with a different decompression utility, making the hack possible. The other cool thing, if I'm not mistaken, about the decompression utility is that it is OS independent meaning that it will run on multiple CPU architectures (x86, AMD64, etc).

One of the key features of the BIOS is having access to the computer's hardware before the operating system, which makes doing things like patching hard disk bytes possible. Once just has to know what to search for (password files, ini files, etc) and changes can be made directly.

They also hint at being able to do other things with the code, like utilizing, accessing, modifying other devices which are interfaced with at boot time (video, ethernet, RAID, etc). This is cool because one of the things that loads in most modern BIOS is netboot or Preboot Execution Environment (PXE). Imagine that as the PC boots that a network stack is enabled, a malicious site is contacted for updated code, and additional hacks performed as desired, seems like the ultimate, very-hard to detect rootkit.

Even more concerning would be the creation of BIOS resident blue-pill type hypervisor.

UPDATE: Alfredo has informed me that the did not develop CoreBoot, they use the great opensource tools found here. Core Security developed their own toolset for these tasks CoreBoot. This project contains the code necessary to flash, patch and calculate the right checksums for the BIOS to work properly. They have not posted this on their public site, and am not sure if they intend to.

*Very cool stuff indeed.*

Comments

Mark Linton said…
Oh, one more thing Alfredo also mentioned that there is an easy way to prevent infection - by hardware shorting two of the pins. Time to get out the tinfoil hat and soldering kit!
Alfredo said…
Excellent review of our Talk, I'm glad that you liked it! Only want to point out that Core Security didn't develop CoreBoot, it's just an unfortunate name coincidence :) Coreboot is a great opensource project on it's own.

Popular posts from this blog

Local Classified Penny Auction Scam

While there are a lot of new posts regarding the new ways to exploit people using novel techniques and 0day exploits, there continues to be a rash of tried and true methods of coercion.  I want to just walk through a simple example and reflect on how effective these methods continue to be. Many people turn toward online classified sites to buy and sell items online.  This example starts with kijiji.ca which even I've used on occasion to find used electronics and other items.  Doing a search on the site for a " Samsung Galaxy Note 2 " returns a posting from today with someone selling one for an unreasonably priced unit. $125 for a $500 phone?, but what if it's for real?  No harm in just asking some simple questions.  Email sent with some obvious questions regarding the condition and location. About an hour passes before I get a response from what appears to be a legit seller. Notice no answer to the questions I asked, but a friendly pointer at where th

Announcing new team member - Benoit Desforges

I'm very pleased to announce that we've added another significant resource to our team.  Our new advisor Benoît Desforges brings international experience and a fresh perspective on information risk management. Prior to joining, Benoît worked for KPMG's advisory group, he holds several professional designations including CISSP, CISA, GCIH, and GAWN.  When he's not teaching advanced networking courses for a local university, Benoît enjoys travel and time with his family. Benoît will be providing our clients with security advice and building out a number of new and improved professional service offerings.  He'll also be regular contributor to our blog.  Congratulations Benoît!

Touch ID - Distributed Fingerprint Lookup

All the press regarding the new Touch ID fingerprint biometric on Apple's new iPhone has brought some insight into how to misuse this service.  Most of the critics have focused on circumventing the device to gain access or Apple deciding to share the data with the Government. One interesting perspective that I haven't seen covered yet is if the system could be used as a distributed matching system for existing fingerprint image systems.  In an over simplified view of the process, a law enforcement agency can take an acquired fingerprint and search for patterns in the database of collected prints and spit out possible matches. Although Apple states that an API won't be available for apps, it is conceivable that such an interface might exist, and provide the ability to take an acquired print (either from the iPhone hardware or from software) and check it for validity against the stored print. There are some limits to this, as there is likely only going to be one prin