[Critical Flaw] Bootkit bypasses TrueCrypt encryption

Discussion in 'privacy technology' started by duk, Jul 30, 2009.

Thread Status:
Not open for further replies.
  1. duk
    Offline

    duk Registered Member

    At the Black Hat security conference, Austrian IT security specialist Peter Kleissner presented a bootkit called Stoned which is capable of bypassing the TrueCrypt partition and system encryption. A bootkit combines a rootkit with the ability to modify a PC's Master Boot Record, enabling the malware to be activated even before the operating system is started.

    Available as source code, Kleissner's bootkit can infect any currently available 32-bit variety of Windows from Windows 2000 to Windows Vista and the Windows 7 release candidate. Stoned injects itself into the Master Boot Record (MBR), a record which remains unencrypted even if the hard disk itself is fully encrypted. During startup, the BIOS first calls the bootkit, which in turn starts the TrueCrypt boot loader. Kleissner says that he neither modified any hooks, nor the boot loader, itself to bypass the TrueCrypt encryption mechanism. The bootkit rather uses a "double forward" to redirect I/O interrupt 13h, which allows it to insert itself between the Windows calls and TrueCrypt. Kleissner tailored the bootkit for TrueCrypt using the freely available TrueCrypt source code.

    Bootkit bypasses hard disk encryption
  2. dantz
    Offline

    dantz Registered Member

    Last edited: Jul 31, 2009
  3. duk
    Offline

    duk Registered Member

    Thanks Dantz, It seems the old MITM attack which is positioned between the BIOS and the TrueCrypt Boot Loader, that will not work without the user's machine type your key before. That is, nothing really new, just a warmed-over news. We all know that nothing is safe if the machine is compromised.
  4. arran
    Offline

    arran Registered Member

    So to sum this up, this will only work if the user types in the password and starts the computer up after the attacker has had physical access?

    Is it possible for an attacker who has physical access to bypass it and start it up straight away with out the user typing in pass word? because from what I read here http://www.stoned-vienna.com/

    Once they get physical access they can wipe clean the master boot including the true crypt software in the master boot and install there own software in master boot. by doing this there wouldn't be any True Crypt Prompt screen asking for the pass word during boot up, so the pc would just start up.
  5. duk
    Offline

    duk Registered Member

    Take a look, now the author of the rootkit posted on his blog a message denouncing the security policy of the TrueCrypt foundation .. owow that is not good! :cautious:

    http://peterkleissner.com/?p=11
  6. dantz
    Offline

    dantz Registered Member

    Your encrypted volume can only be decrypted with the encryption key. When you enter your password it is used to generate the key. There's no way that any bootkit can bypass that process and decrypt the drive on its own. It can, however, launch or install various other types of malware such as keyloggers etc. that could, among other things, capture your password and/or key for later use.

    I doubt if physical access would be required for this attack, as other MBR infectors can already be caught via infected downloads.

    The original "stoned" virus that was created some 20-odd years ago was also an MBR infector. I suppose the author of this malware felt that it was time for a redo.

    (edit) Correction: According to the author's website, physical access is required if you aren't running as admin.
    Last edited: Jul 31, 2009
  7. markoman
    Offline

    markoman Registered Member

    A quick and easy solution to this kind of attack is to wipe the MBR after encrypting the system partition, and ONLY boot from Truecrypt rescue CD (you can make it a USB key with some luck).
  8. Airflow
    Offline

    Airflow Registered Member

    They should implement a slight mbr surveillance and mbr lock up specially for newbies.
    That doesn´t mean anti-malware only measures against tc compromisation.

    Keen.:)

    MBR wipe after? Wipe before or both.

    My suggestion is a little timer that checks for mbr modifications and a sort of fingerprint comparison that tc should create at the beginning of a system ecncryption.
  9. Cutting_Edgetech
    Offline

    Cutting_Edgetech Registered Member

    This only works with decrypting the system partition.. right? Does this affect TrueCrypt Containers?
  10. Airflow
    Offline

    Airflow Registered Member

    Anyone tested the bootkit?
    I took a short look into the exe and could see similar phrases like in tc loader.
    Looks like that it clones truecrypt bootloader intro to catch the password.
    Last edited: Aug 1, 2009
  11. LockBox
    Offline

    LockBox Registered Member

    I'm surprised nobody has mentioned this yet: Peter Kleissner freely admits he would not been able to discover this exploit had the software not been open-source.

    EDIT: This is complete bogus on its face. The system must already be compromised for this to be executed. TrueCrypt is as steady as ever. This is ridiculous that it's even being taken seriously. If a system is compromised, whether it's TrueCrypt, PGP, or anything else, you're already blown. Install a trojan, a keylogger, change the MBR, execute Peter's "bootkit", it doesn't matter as a compromised system is a compromised system. Period.
    Last edited: Aug 1, 2009
  12. Airflow
    Offline

    Airflow Registered Member

    According to this statement there is a non-native or preboot execution possible e.g. usb or dvd. I guess my question to him was obvious so no misunderstandings from his side.
  13. stap0510
    Offline

    stap0510 Registered Member

    I totally agree with Gerard Morentzy.
    This has absolutely nothing to do with TrueCrypt.

    If even slightly applicable to Truecrypt, it is even more applicable to other Full-disk-encryption solutions out there.

    It is a positive note that Truecrypt is open-source, in the contrary to all the FDE-solutions out there who hide behind their proprietary closed-source software.

    I just really felt to mention that here.
  14. LockBox
    Offline

    LockBox Registered Member

    When all is said and done, some of us may, and I stress may, owe Peter an apology. Here is why....

    Who's playing word games and who is not?

    Peter has simply made what some were apparently aware of that TC is, in fact, susceptible to pre-boot MBR modification attacks, and made it easier with Stoned.

    In the beginning, it was my understanding that TC had to be actually running for this program to be executed. Now, after further research, that may not be the case.

    Peter writes in the comments section of his blog. Read this very carefully:

    "You can install any software with Stoned on any computer – even when the hard disk is fully encrypted. That means also if the OS is not running, you can install it to the hard disk using a bootable USB stick or DVD that writes it down. Stoned makes it possible to install “any” software on any computer and giving it full system access rights (and making it “unable” to detect for AVs)."

    This is very different from what I thought in the beginning. I am also not happy with TrueCrypt's response of allowing one thread in the TC forums with a few comments and then closing it with a post that is, in my opinion, misleading. They say this is "nothing new" and other things that make this attack sound silly. They finally end by linking to two points in the TC documentation. One thing is very troubling to me and it's in the second link pointing to documentation concerning "Physical Security." The only thing that I found pertinent to the discussion was is in that second link and says: (and pay attention to the bolded portion)

    "If an attacker can physically access the computer hardware and you use it after the attacker has physically accessed it, then TrueCrypt may become unable to secure data on the computer. This is because the attacker may modify the hardware or attach a malicious hardware component to it (such as a hardware keystroke logger) that will capture the password or encryption key (e.g. when you mount a TrueCrypt volume) or otherwise compromise the security of the computer."

    I've read past that dozens and dozens of times. Of course TC possibly cannot secure data due to the possibility of a hardware keylogger that would grab the TC bootloader password. Fair enough. That's a no-brainer. However, how many of you paid attention to the bolded portion above? I admit to reading right over it many times. But it is concerning to me. I think this is TrueCrypt possibly playing word games. They've basically with the "otherwise compromise," statement given a stock answer to any possible pre-boot attacks. This includes Peter's Stoned.

    If bypassing whole-drive, system encryption is as easy as Peter seems to show with Stoned, why is TrueCrypt's (or at least their forum moderator) response one of outrage? Why link to the "Physical Security" documentation if not to allow that catch-all admission to be read (or hopefully not read)?

    Who's playing the word games? Who's reaction is one of ferocious anger and name calling as opposed to calmly explaining how it is not a threat, if indeed, it is not? It looks like TrueCrypt. Why not explain how it's "nothing to worry about" as opposed to just stating as such and then linking to a statement that basically says there's obviously something to worry about?

    Who's being open and transparent? So far, it's Peter Kleissner.

    I'm still looking at all this very hard and right now, I'm not happy with what I see and retract, at least for now, my edited comment several posts back.

    TrueCrypt: The ball is in your court.
  15. Airflow
    Offline

    Airflow Registered Member

    They should make a extra paragraph for hardware keyloggers and pci devices because that is a whole different story. We are talking here about software based preboot/mbr attacks.

    Christian gave a good answer in toasters blog:
    Only countermeasure always boot from cd, this option could be implemented in tc 6.3 leaving mbr alone and doing a cd-only boot option.
  16. stap0510
    Offline

    stap0510 Registered Member

    I think a great addition would be to do some sort of integrity-check from within TC's encypted systemdrive.
    I was thinking more in the line of something like HMAC's.

    A boot-CD is indeed a good option, or even creating a bootable USB-stick from TC's console would be the best and most user-friendly to have in a new version.
  17. Justin Troutman
    Offline

    Justin Troutman Cryptography Expert

    Admittedly, I haven't looked into this at all, but HMACs and CMACs would be great, cryptographically, assuming proper key management. Of course, in regards to disk encryption itself, MACs introduce overhead that's often unbearable, which is where narrow-block and wide-block modes come into play -- the former of which it uses, but the latter of which it should consider. But that's all a different story.

    What did you have in mind?
  18. SafetyFirst
    Offline

    SafetyFirst Registered Member

    Is it only TrueCrypt that is in danger or is other FDE software (like PGP) vulnerable too?
  19. stap0510
    Offline

    stap0510 Registered Member


    You would expect it to be, right?
    I'm interested in Justin's answer on this.
  20. SafetyFirst
    Offline

    SafetyFirst Registered Member

  21. Jeroen1000
    Offline

    Jeroen1000 Registered Member

    Exellent find SafetyFirst. I did expect it to be vulnerable too but now we know this is not the case.
  22. caspian
    Offline

    caspian Registered Member

    So can this Malware be used to bust into a truecrypt file? Or just TrueCrypt whole disk encryption?
  23. stap0510
    Offline

    stap0510 Registered Member

    Caspian,

    Apparently, seeing all the respones, it looks like it is pointed only, and works only, for TrueCrypt.
    They made it works only for Truecrypt, and you'll anotther piece of code to also make it work for other WDE-solutions.
    But from what I've read from PGP's blog it would also count for other WDE-solutions, except PGP, by their own words, and WDE-solutions that work on a mac.
    I'm interested how PGP has managed to protect the MBR itself.
    That would be a nice feature for an upcoming Truecrypt-version.

    Didn't Vista and Windows 7 have a proper protection for this kind of stuff against MBR-modifications because of UAC.?
  24. dantz
    Offline

    dantz Registered Member

    The linked article is a little bit misleading. The author states that PGP-WDE contains a clever feature that protects the MBR from being overwritten, and he goes on to say that this feature makes PGP-WDE systems immune from MBR-based malware.

    However, he fails to mention that a feature of this type can only function while Windows is running and the appropriate PGP driver is loaded. It can't possibly defend against a person with physical access who boots the system from external media.

    TrueCrypt does not provide anti-malware features. The expectation is that users will take appropriate measures to protect their own systems by installing protective software or hardware such as firewalls, antivirus programs, etc. Numerous antimalware programs already offer MBR protection (and in fact, even running as Limited User will do this), but of course the system has to be running for this type of protection to function. If someone has physical access and they can boot to external media then they are capable of loading whatever they want into the MBR or elsewhere on the drive, even to a system with PGP-WDE installed.

    edit: Removed direct quotation to avoid copyright infringement
    Last edited: Aug 24, 2009
  25. dantz
    Offline

    dantz Registered Member

    It can't directly "bust into" a user's encrypted data. However, it could probably install malware that can capture a user's password and/or encryption key.
Thread Status:
Not open for further replies.