Taking Ownership of the Trusted Platform Module Chip on Intel Macs
I have been following the works of Trusted Computing Group (TCG) since their inception. The body, successor to the Trusted Computing Platform Alliance started by such giants as Hewlett-Packard, IBM, Intel and Microsoft, has a goal to develop vendor-neutral standard specifications for trusted computing. TCG is quite present on all the major information security conferences around the globe, so I had an opportunity to attend to some of their lectures and check out the actual trusted platforms (hardware devices with TPM chips) in test environments.
What is a TPM chip
The TPM is a microcontroller that stores keys, passwords and digital certificates. It’s typically affixed to the motherboard of a PC. The nature of this silicon ensures that the information stored there is made more secure from external software attack and physical theft. Security processes, such as digital signature and key exchange, are protected through the secure TCG subsystem.
Access to data and secrets in a platform could be denied if the boot sequence is not as expected. Critical applications and capabilities such as secure email, secure web access and local protection of data are thereby made much more secure. TPM capabilities also can be integrated into other components in a system.
Apple and TPM
If you bought your Mac between May and October of 2006, you most probably have a TPM chip. The chip in question was Infineon TPM, module SLB 9635 TT 1. It looks like Apple had plans to use the trusted platform possibilities, but while the chip was present, Apple did not use it at all. Therefore, computers released after October 2006 do not contain an onboard Infineon TPM. As Trusted Computing Group is seeing an upscale adoption rate of their technology, TPM will most probably be back inside Apple hardware in the future.
Benefits for the users
Amit Singh, author of the “Mac OS X Internals: A Systems Approach” wrote a whole chapter about trusted computing for Mac OS X. Besides this, he released Mac driver and daemon that will be used later in this article.
While the TPM chip is not used by any of the Apple software products, that doesn’t mean that developers cannot use it for the specific purposes of their applications. While it is not the best idea to target just the computers that have TPM chips, this “perfect” customizations can be used in some organizations for instance running just the TPM-enabled Macs. Singh notes that developers could use the TPM from within their own applicatons to:
- Create private/public key pairs such that the private key never leaves the TPM in clear form and because of it the private key cannot be stolen.
- Sign data without the private key ever leaving the chip
- Encrypt data such that it can only be decrypted on the physical machine it was encrypted on
- In protocols such as SSL that use key exchange, employ the TPM for a much better guarantee regarding the identities involved.
Testing the existence of TPM chip
For the purpose of testing your computer for existence of the TPM chip we will need to use a command line utility ioreg which displays the I/O Kit registry. Starting the utility without any particular switches, we can just filter the output while grepping for TPM. The result shows that TPM is present on my MacBook notebook:
Tools of the trade
For the purpose of mangling with the TPM chip, we need to use the following:
Mac application released in mid June 2007 that can be used to setup and take ownership of your TPM. The software package is provided by the fine folks at Comet Way, which recently noted their plans to release a simple file encryption utility for your TPM Mac.
Important: TPM Setup is an Intel binary, therefor can be used just on Intel Macs. If you are into playing with TPM on non Intel Macs, checkout the references located at the end of this article.
TPM Setup can be downloaded from:
1) Comet Way:
2) Help Net Security:
OSXBookTPM.kext and tcsd
These are Amit Singh’s kernel extension and the daemon needed for the whole TPM experience. These files were released under GPLv2, so the guys at Comet Way are redistributing them within the TPM Setup package. Bottom line, all the applications you will need are located in the same archive linked in the previous paragraph.
There are is a disclaimers the developers provided with the TPM Setup application. The software is provided as a demo and should be used on your own risk. From the technical perspective the only troublesome thing you can create is to setup and then forget the TPM password which could be a bad thing. You will also need to be at least a bit familiar with the UNIX Shell, but following the graphics from this article should be just enough.
Let’s take the ownership of the TPM chip
As you could see from the first screenshot, TPM is enabled and activated. The only thing still needed is to take the ownership of it. This means that we need to setup two passwords: one for the TPM chip itself and the other one for the Storage Root Key (SRK).
TPM Setup can also reset a TPM by clearing it, enabling and activating it, and allowing the user to take ownership of the TPM. In this case two reboots will be required, once after clearing the TPM, and once again after enabling and activating it.
In our case of a “clean TPM”, we won’t need any reboots and the only interaction is entering two sets of passwords (can be identical). Before this, we need to use the Terminal and start the Amit Singh’s tcsd daemon and load the TPM kernel extension:
As mentioned earlier, the support directory of the TPM Setup contains all the needed scripts, kernel extension and the daemon. Let’s start the daemon with the tpmInit script:
The script needs administrative privilleges so the appropriate password needs to be entered. As you can see from the screenshot, kernel extension is successfully loaded and the daemon is started. Do leave this terminal window open and if you want to kill the daemon hit the Ctrl+C key combination.
Now when the daemon is started, we can open the TPM Setup application and take the ownership of the TPM chip. If because of some reason you didn’t start the daemon or the start was unsuccessful, the following window will say that you should start the process again. In our case, everything is just fine:
Time to enter the user and SRK passwords:
Final phase: TPM is operational, activated, enabled and owned:
For stopping the daemon just kill the process and for removing the extension and tmp files use the tmpCleanup script:
The whole procedure covered throughout this article is not at all “mainstream”, so TPM will currently be of use to an extremely limited number of users. Soon Comet Way will release the mentioned file encryption utility and there is always a need for enhancing the state of security on your Mac.
- TPM Setup homepage