Releasing our in-depth Security Analysis of TrueCrypt

Over the timeframe of about six months, together with other colleagues from Fraunhofer SIT, our group has performed a comprehensive security analysis of the encryption software TrueCrypt. The study was conducted for the German Federal Office for Information Security (BSI), who is releasing the report today on its website. (English version here.)

In June 2014, the open-source disk-encryption solution TrueCrypt was abandoned by its anonymous developers, while at the same time hinting the many users of the solution at potential vulnerabilities. On behalf of the BSI, we examined TrueCrypt for vulnerabilities, both conceptually and on the level of program code. As part of this task, we also considered and reviewed the results of previous security assessments.

On previously reported vulnerabilities in the driver component

Our general conclusion is that TrueCrypt is safer than previous examinations suggest. About a month ago, for instance, Google’s Project Zero had discovered two previously unknown vulnerabilities in TrueCrypt, one of them classified as critical. The error allows such malicious code that already has access to the running computer system to acquire expanded system rights. The vulnerability should be fixed, as privilege escalation opens the door for other attacks. But similar problems could arise with any kernel-level driver. Importantly, the problem found does not provide an attacker simplified access to encrypted data. To exploit the vulnerability, the attacker would have to have far-reaching access to the system anyway, for example, via a Trojan Horse or some other form of remote or direct access.

It does not seem apparent to many people that TrueCrypt is inherently not suitable to protect encrypted data against attackers who can repeatedly access the running system. This is because when a TrueCrypt volume is mounted its data is generally accessible through the file system, and with repeated access one can install key loggers etc. to get hold of the key material in many situations. Only when unmounted, and no key is kept in memory, can a TrueCrypt volume really be secure. In result, TrueCrypt provides good protection mostly when storing encrypted data offline. If keeping a backup stored offline on a hard drive, for example, or keeping encrypted data on a USB flash drive to be sent via a human carrier, then this can be considered relatively secure.

On buffer overflows reported by OCAP

The Open Crypto Audit Project (OCAP) has carefully examined TrueCrypt in the past. We have analyzed the report and also conducted a brief email exchange with the people behind OCAP. We examined closely a number of buffer overflows their study had revealed. Using the usage of static-analysis tools such as the KLEE virtual machine we were able to prove, though, that these buffer overflows cannot actually occur at runtime, and thus cannot possibly be exploited. It’s great to see that tools such as KLEE can nowadays cope with such practical problems – a manual analysis would have been too complicated since many complex path conditions needed to be considered.

Weak retrieval of random numbers

If you look more closely at our report you will see that we did find some weaknesses in the way TrueCrypt retrieves the random numbers it uses for encryption. With a lack of randomness, an attacker can theoretically guess your encryption key more easily. This problem only occurs in non-interactive mode, though, or when using certain access-control policies on Windows. In result, it is unlikely that this problem has actually affected users in he wild. The problem is that if volumes were created with a weak key then afterwards there is no way to tell. To be on the safe side it would therefore be advisable to re-encrypt volumes with a version of TrueCrypt in which this flaw has been fixed.

Conclusion

In conclusion, I would say that the TrueCrypt code base is probably alright for the most parts. The flaws we found were minor, and similar flaws can occur also in any other implementation of cryptographic functions. In that sense TrueCrypt seems not better or worse than its alternatives. Code quality could be improved, though, as there are some places that call for a refactoring and certainly for better documentation. But generally the software does what it was designed for.

Note that the original designers documented all along a threat model stating that TrueCrypt cannot actually properly protect data on a running system. This matches our findings. If such protection is desired, one cannot get around solutions that use smartcards or other hardware-based key storage such that the encryption key can be better kept a secret. Also such systems can be broken, but they raise the bar significantly.

We hope that folks find our report useful. Thanks to everyone who supported our study, in particular to the BSI for funding it! We hope to be able to conduct further similar analyses in the future.

Update: First press coverage

Ars Technica: TrueCrypt is safer than previously reported, detailed analysis concludes
Threatpost: German Government Audits TrueCrypt
Digital Trends: Why TrueCrypt might not be so insecure after all

ZDNet: Fraunhofer-Institut: TrueCrypt ist „nur in sehr seltenen Fällen angreifbar“
MacLife: Truecrypt-Verschlüsselungssoftware sicherer als erwartet

Update: Cloudwards has a nice article about TrueCrypt alternatives

32 thoughts on “Releasing our in-depth Security Analysis of TrueCrypt

  1. Pingback: Evil Zone Groups | German Government Audits TrueCrypt

  2. Pingback: TrueCrypt is safer than previously reported, detailed analysis concludes | Mazdapack

  3. Pingback: TrueCrypt is safer than previously reported, detailed analysis concludes - SOGO Tech News

  4. Pingback: German Government Audits TrueCryptDigital Era | Digital Era

  5. Pingback: TrueCrypt is safer than previously reported, detailed analysis concludes | TheApplePips.com

  6. Pingback: TrueCrypt is safer than previously reported, detailed analysis concludes

  7. Pingback: TrueCrypt is safer than previously reported, detailed analysis concludes • Reliable Tech & IT Blog for Everyone

  8. Pingback: Study Suggests TrueCrypt is Safer Than Previously Reported | Digital Trends

  9. Pingback: TrueCrypt Is Safer Than Previously Reported - Wild+ Hacker News...

  10. Pingback: TrueCrypt is ‘safer than previous examinations suggest,’ according to in-depth study

  11. Pingback: TrueCrypt is safer than previously reported, detailed analysis concludes | Ars Technica

  12. Pingback: Why TrueCrypt might not be so insecure after all

  13. Pingback: TrueCrypt is safer than previously reported, detailed analysis concludes - Techbait Tech News

  14. Pingback: TrueCrypt is safer than previously reported, detailed analysis concludes - Binary Reveux

  15. Pingback: TrueCrypt is safer than previously reported, detailed analysis concludes - #1 Info Portal

  16. Pingback: TrueCrypt is safer than previously reported, detailed analysis concludes | World Updates

  17. Pingback: TrueCrypt is safer than previously reported, detailed analysis concludes Agen Sabung Ayam | My Blog

  18. Pingback: TrueCrypt Safer Than Previously Thought

  19. Pingback: TECNOLOGÍA » TrueCrypt is safer than previously reported, detailed analysis concludes

  20. Pingback: TrueCrypt is safer than previously reported, detailed analysis concludes | Change your style, keep your budget

  21. Pingback: Releasing our in-depth Security Analysis of Tru...

  22. Pingback: Análisis de seguridad a TrueCrypt: Es seguro – Cuidando Tu Negocio

  23. Pingback: Mostly harmless: Berlin boffins bleat post epic TrueCrypt audit feat - Techbait Tech News

  24. Pingback: Why TrueCrypt might not be so insecure after all | App Showcase Wordpress Theme

  25. Pingback: TrueCrypt is safer than previous examinations suggest - Systerity

  26. Pingback: TrueCrypt is safer than previous examinations suggest | OSINFO

  27. Pingback: TrueCrypt漏洞分析:比人们想象的更加安全 | 莹莹之色

  28. Pingback: TrueCrypt is safer than previous examinations suggest | Tailor Technology

  29. Pingback: TrueCrypt audit completed with status-Safe to be usedShanomag | Shanomag

  30. Pingback: Siti Internet Aziendali » TrueCrypt, sicuro nonostante i bug

  31. Pingback: Radioma 143 | Развлекательный IT-подкаст Радиома

  32. Pingback: TrueCrypt is Now safer than previous –

Comments are closed.