Truecrypt, a variety of bruteforcing options

A lot of people ask the question: How can I recover my truecrypt password? Others ask the question: How can I crack a truecrypt container? So out of curiousity I went on a little investigation to know what the current tools are to bruteforce a truecrypt container. So here is a small compilation of the methods I’ve found to bruteforce a truecrypt container.

First of all, if the user using truecrypt is security aware it will be IMPOSSIBLE(for the moment) to bruteforce the password/key of a truecrypt container. At least normal people will not be able to bruteforce 20+ character passwords or a 2KB random file used as keyfile. I say normal people because the (old article) USA secret service seems to be building it’s own bruteforcing botnet. According to this article:

Ultimately, the agency hopes to build the network out across all 22 federal agencies that comprise the Department of Homeland Security: It currently holds a license to deploy the network out to 100,000 systems

Pretty scary huh? Just to be a little more paranoid imagine the nsa joining them and well…I assume 8 characters passwords is a laugh for them on the other hand I also think that 20+ character passwords will be out of reach even for them. The article dates from 2006, so I imagine they have it working by now, for example in this article they state the following:

Months later, Aragon’s lawyer gave him some bad news. The Secret Service had cracked Butler’s crypto and knew more about the hacker than Aragon did -

We will just never know if the USA secret service used bruteforcing power to crack the crypto or if they abused possible crypto errors. For example truecrypt seems to suffer from a few glitches/errors/vulnerabilities like the ones mentioned here. I have no clue how true the vulnerabilities claims are and if they have been fixed in the meanwhile. So why is this relevant? Just to make  sure that everyone who uses truecrypt or any other kind of encryption software uses passwords/pass phrases with more then 20 characters and not easily guessable. Also to make sure that everyone who uses cryptographic software to protect his/her privacy stays informed about possible vulnerabilities that their product could contain and update it or use a work around.

Let’s see the first product capable of bruteforcing truecrypt containers.

If you google around you will see that if I’m not mistaken they also have specialized hardware modules which will speed up the cracking part. It will cost you money but in the end if you manage to link up enough computer it will be worth it.

I imagine that most people asking questions on how to bruteforce truecrypt containers will not have or are not willing to spend the amount of money needed to get DNA up and running. So here is another solution.

The solution explained over here  http://www.elitehackers.info/forums/showthread.php?t=11568&page=2 which actually explains two solutions:

The first one uses a third party application to speed up the manual process and actually uses the truecrypt program to bruteforce the container. Here is the script posted on the forum I linked, just in case the post gets removed someday.


dim $one, $two, $three, $four, $five, $six, $seven, $eight, $pw
dim $Array[94]
$Array[0]="a"
$Array[1]="b"
$Array[2]="c"
$Array[3]="d"
$Array[4]="e"
$Array[5]="f"
$Array[6]="g"
$Array[7]="h"
$Array[8]="i"
$Array[9]="j"
$Array[10]="k"
$Array[11]="l"
$Array[12]="m"
$Array[13]="n"
$Array[14]="o"
$Array[15]="p"
$Array[16]="q"
$Array[17]="r"
$Array[18]="s"
$Array[19]="t"
$Array[20]="u"
$Array[21]="v"
$Array[22]="w"
$Array[23]="x"
$Array[24]="y"
$Array[25]="z"
$Array[26]="A"
$Array[27]="B"
$Array[28]="C"
$Array[29]="D"
$Array[30]="E"
$Array[31]="F"
$Array[32]="G"
$Array[33]="H"
$Array[34]="I"
$Array[35]="J"
$Array[36]="K"
$Array[37]="L"
$Array[38]="M"
$Array[39]="N"
$Array[40]="O"
$Array[41]="P"
$Array[42]="Q"
$Array[43]="R"
$Array[44]="S"
$Array[45]="T"
$Array[46]="U"
$Array[47]="V"
$Array[48]="W"
$Array[49]="X"
$Array[50]="Y"
$Array[51]="Z"
$Array[52]="!"
$Array[53]="@"
$Array[54]="#"
$Array[55]="$"
$Array[56]="%"
$Array[57]="^"
$Array[58]="&"
$Array[59]="*"
$Array[60]="("
$Array[61]=")"
$Array[62]="_"
$Array[63]="+"
$Array[64]="~"
$Array[65]="`"
$Array[66]="1"
$Array[67]="2"
$Array[68]="3"
$Array[69]="4"
$Array[70]="5"
$Array[71]="6"
$Array[72]="7"
$Array[73]="8"
$Array[74]="9"
$Array[75]="0"
$Array[76]="-"
$Array[77]="="
$Array[78]="["
$Array[79]="]"
$Array[80]="\"
$Array[81]="{"
$Array[82]="}"
$Array[83]="|"
$Array[84]=";"
$Array[85]=":"
$Array[86]="'"
$Array[87]=""""
$Array[88]=","
$Array[89]="<"
$Array[90]="."
$Array[91]=">"
$Array[92]="/"
$Array[93]="?"

;Start brute Force
For $one = 0 to 93
$pw = $Array[$one]
Run(@COMSPEC & " /c " & 'C:\fubar\TrueCrypt.exe /q background /s /p "' & $pw & '" /e /m ro /m rm /v "c:\fubar\fubar.ENC"' )
Next

for $two = 0 to 93
for $one = 0 to 93
$pw = $Array[$one]
$pw &= $Array[$two]
Run(@COMSPEC & " /c " & 'C:\fubar\TrueCrypt.exe /q background /s /p "' & $pw & '" /e /m ro /m rm /v "c:\fubar\fubar.ENC"' )
Next
Next

for $three = 0 to 93
for $two = 0 to 93
for $one = 0 to 93
$pw = $Array[$one]
$pw &= $Array[$two]
$pw &= $Array[$three]
Run(@COMSPEC & " /c " & 'C:\fubar\TrueCrypt.exe /q background /s /p "' & $pw & '" /e /m ro /m rm /v "c:\fubar\fubar.ENC"' )
Next
Next
Next

for $four = 0 to 93
for $three = 0 to 93
for $two = 0 to 93
for $one = 0 to 93
$pw = $Array[$one]
$pw &= $Array[$two]
$pw &= $Array[$three]
$pw &= $Array[$four]
Run(@COMSPEC & " /c " & 'C:\fubar\TrueCrypt.exe /q background /s /p "' & $pw & '" /e /m ro /m rm /v "c:\fubar\fubar.ENC"' )
Next
Next
Next
Next

for $five = 0 to 93
for $four = 0 to 93
for $three = 0 to 93
for $two = 0 to 93
for $one = 0 to 93
$pw = $Array[$one]
$pw &= $Array[$two]
$pw &= $Array[$three]
$pw &= $Array[$four]
$pw &= $Array[$five]
Run(@COMSPEC & " /c " & 'C:\fubar\TrueCrypt.exe /q background /s /p "' & $pw & '" /e /m ro /m rm /v "c:\fubar\fubar.ENC"' )
Next
Next
Next
Next
Next

FOR $six = 0 to 93
for $five = 0 to 93
for $four = 0 to 93
for $three = 0 to 93
for $two = 0 to 93
for $one = 0 to 93
$pw = $Array[$one]
$pw &= $Array[$two]
$pw &= $Array[$three]
$pw &= $Array[$four]
$pw &= $Array[$five]
$pw &= $Array[$six]
Run(@COMSPEC & " /c " & 'C:\fubar\TrueCrypt.exe /q background /s /p "' & $pw & '" /e /m ro /m rm /v "c:\fubar\fubar.ENC"' )
Next
Next
Next
Next
Next
Next

for $seven = 0 to 93
FOR $six = 0 to 93
for $five = 0 to 93
for $four = 0 to 93
for $three = 0 to 93
for $two = 0 to 93
for $one = 0 to 93
$pw = $Array[$one]
$pw &= $Array[$two]
$pw &= $Array[$three]
$pw &= $Array[$four]
$pw &= $Array[$five]
$pw &= $Array[$six]
$pw &= $Array[$seven]
Run(@COMSPEC & " /c " & 'C:\fubar\TrueCrypt.exe /q background /s /p "' & $pw & '" /e /m ro /m rm /v "c:\fubar\fubar.ENC"' )
Next
Next
Next
Next
Next
Next
Next

for $eight = 0 to 93
for $seven = 0 to 93
FOR $six = 0 to 93
for $five = 0 to 93
for $four = 0 to 93
for $three = 0 to 93
for $two = 0 to 93
for $one = 0 to 93
$pw = $Array[$one]
$pw &= $Array[$two]
$pw &= $Array[$three]
$pw &= $Array[$four]
$pw &= $Array[$five]
$pw &= $Array[$six]
$pw &= $Array[$seven]
$pw &= $Array[$eight]
Run(@COMSPEC & " /c " & 'C:\fubar\TrueCrypt.exe /q background /s /p "' & $pw & '" /e /m ro /m rm /v "c:\fubar\fubar.ENC"' )
Next
Next
Next
Next
Next
Next
Next
Next

The second solution seems to be a java application coded for linux which also use the truecrypt program to bruteforce the container. Both solutions take time and are not easily expandable to so that the bruteforcing work could be speed up.

One of the last and imo most flexible solutions in my search for current truecrypt bruteforcers where the following articles and websites I found.

All of the above are imo the essential building blocks to build a truecrypt bruteforce application or a truecrypt distributed bruteforce application. Just in case the sites go down you can download a zip with all the sources here, I still need to fix a http server for this kind of stuff so for the moment beeing rapidshare is the choice. The best part is that the code presented in the blog which explains truecrypt works!! Reason I’m so excited about that is because often enough when I download example/poc sourcecode it just doesn’t work and it needs minor changes. For the curious ones here is the output from a small test I run with the sourcecode on a truecrypt volume(I only tested the truecrypt5 source):

Progress: Is this a normal volume?
Progress: Trying SHA-512
Progress: …['Rijndael']
Progress: …['Serpent']
Progress: …['Twofish']
Progress: …['Twofish', 'Rijndael']
Progress: …['Serpent', 'Twofish', 'Rijndael']
Progress: …['Rijndael', 'Serpent']
Progress: …['Rijndael', 'Twofish', 'Serpent']
Progress: …['Serpent', 'Twofish']
Progress: Trying RIPEMD-160
Progress: …['Rijndael']
Progress: …['Serpent']
Progress: …['Twofish']
Progress: …['Twofish', 'Rijndael']
Progress: …['Serpent', 'Twofish', 'Rijndael']
Progress: …['Rijndael', 'Serpent']
Progress: …['Rijndael', 'Twofish', 'Serpent']
Progress: …['Serpent', 'Twofish']
Progress: Trying Whirlpool
Progress: …['Rijndael']
Progress: …['Serpent']
Progress: …['Twofish']
Progress: …['Twofish', 'Rijndael']
Progress: …['Serpent', 'Twofish', 'Rijndael']
Progress: …['Rijndael', 'Serpent']
Progress: …['Rijndael', 'Twofish', 'Serpent']
Progress: Success!

Some of you might argue that using a scripting language for a bruteforcing purpose is just plain stupid. I’d have to agree with that. So that’s why the last option is to write your own bruteforcer in C or asm or modify the truecrypt sourcecode.  But for the ones in need of a quick client to recover their password the above solutions should work just fine, assuming you still remember certain parts of the password and thereby reducing the keyspace from millions to like a few thousand options.

If anyone has found more nice tools or sourcecodes or has got nice ideas please share, it’s always fun to learn about new things.

21 Responses to “Truecrypt, a variety of bruteforcing options”

  1. I wonder what sort of damage could be done if someone malicious were able to gain access to a machine on a federal botnet?

    I can see it now… “Hacker gains access to secret service botnet, uses botnet to brute force password dumps from top secret NSA computer systems.”

  2. I have truecrypt and I was using it a while back to store some data. I haven’t used it in a while and was wondering, I know the password, at least all the characters, and I still have the keyfile I used, but is there a quicker way to get back to my files? I feel silly that I forgot how I wrote my password, but I need some help.

  3. diablohorn Says:

    Well afaik bruteforcing the password is the only method. You could try out a few of the methods I mentioned. Seeing as you know the characters it should be doable depending on the length of your password. Good luck with the bruteforce approach.

  4. diablohorn, The link to TC brute building blocks ziparchiv is dead. Can you please renew it.

    Would be very appreciate.

  5. diablohorn Says:

    The link has been renewed :)

  6. eh. really like it

  7. When it comes to random passwords, in my opinion the whole rule of 20+ characters is quite the myth. For example: if you use a 10 character random password comprised of letters and digits (and the attacker knows you didn’t use anything else!), you might have to try up to 62^10 = 839,299,365,868,340,224 passwords. At 500,000 passwords per second (an extraordinary rate when it comes to decrypting AES containers) this would take more than 53,228 years. At 15 characters we exceed 48,763,933,596,446 years. Good look with optimization, maybe you manage to crack password one billion times faster than estimated here – it just wouldn’t make any differende whatsoever (at least in the second example) ;)

    Seriously now, with a good password it is much simpler to attack the crytographic key itself instead of the password. Fortunatlely it might still take several centuries. The trick is to avoid any password vulnerable to a dictionary attack (like “house”), even if it’s a modified attack (like “myhouse” or “house05″).

  8. Yak2009 Says:

    Great article for those who know something about programming. But for someone who is very limited in programming experience (Ok practically none except for some VBA in MS Excel), is still a bit complex for trying to modify program for my personal situation. Like so many other people, I know the approx length of PW and have a list of the possible missing phrases and characters but have yet to be able to understand how to get one of these ‘codes’ to work.

  9. I’m in the same boat. I know it’s 9 char password, and I know the 11 possible chars that I used, but the precise combination is lost to me.

    Any help for a newb?

  10. All i can say is good luck bruteforcing it. You will spend years brute forcing it with a regular home based pc, even if you knew most of the password.

  11. @dezrah there are scripts out there to help build dictionaries for brute forcing. You could modify one of these to only use the 11 letters, and generate all possible 9 character combinations. This would make things much faster. If you know you could have only used each letter at most say 3 times, you can reduce the number of possibilities further.

  12. I found your information informative, but not very useful. I tried the script mentioned with the autoit program and could not get it to work. Searching through the autoit forums found that the guy that wrote it (the real author) was asking about how to get it to run and ditched it because it was flawed. I could not get my BT4 running on my VMWare Fusion and did not have a thumbdrive handy, so I went with a VMWare Windows solution. I found a program called true.crypt.brute that runs dictionary attacks against truecrypt containers. It can be found at securityvision.ch/download.php. I had to create a custom dictionary because my problem was as follows: I got paranoid and put a bunch of personal files into one giant container (20gb), and used 4 or 5 strong passwords (that I routinely use) to generate a super-password. Unfortunately I forgot to write the awesome password down, so I didn’t know the order the smaller passwords were in. In my own defense I was on some powerful painkillers at the time, but that is another story. I needed an automated way to find the password. So…after much searching came to the brute forcer mentioned. I did some more searching for the dictionary fix, and came up with using Excels and a macro, which can be found by “googling” google answers phrase permutation. With these two tools I have generated over 12k possibilities. Unfortunately the brute forcer takes approximately .5 seconds per try. When it is completed it will pop up with the correct password…I’ll let you know when it finishes. I would guess that all of this research took 12 hours or so. I did find some other useful, easy to use tools in my search, including a great password generator (unfortunately it will only mix 2 deep vice the 4-5 I needed). It is called s-wordlist tool, though I don’t remember where I found it. It was written by “beda” and has a link in it, “beda.securiboxDOTnet”. I could not find it in 5 min and am done researching, but it is a great dictionary creation tool with more options than I found anywhere else.

  13. So after running overnight the password was waiting for me on my desktop. Definitely a solution that works, at least in my example; turned out my password was a combination I would never have thought of. I ran a word list that had 14k possibilities, using Excels to combine 7? passwords 4 deep into every possible combination (always 4 deep). If you are reading this then good luck and keep your passwords strong and write them down somewhere…my “super password” was 40 characters long…without knowing what made it up I think I would have needed a Cray or something to get it done, and then I probably would have had to wait a few years.

  14. This is interesting information. I’m glad you found your password. It will always be worth a shot if some information is known about the password.

  15. Christoph Says:

    @dezrah: You’re chances are actually pretty good to crack the password. Assuming you have an alphabet of 11 characters and a 9 character password. If you did not use duplicates, you have about 20 million combinations.

    If you did use multiples, your search space is 285 billion. However, again assuming that you would not use a word like fffffffff (e.g. limit to max. character reuse of 2) you might end up with something like more manageable like in the lower hundred millions or so ;-)

  16. Saiketsu Says:

    James, i’m gald to see that someone used the same method than me to create a super-password, then lost it and recovered it with a BF. I’m going to try your method. Thanks ! :)

  17. The link above to the zip is dead (rapid share). says been removed?

  18. diablohorn Says:

    here is a new link and the link above has been adjusted:

    http://diablohorn.tbhost.eu/distribute/truecrypt_brute_building_blocks.zip

  19. Thanks for the info Diablohorn & James, i changed my password while drunk and now dont remember it :( i usually use a combo of about 3-4 diff words out of 10 or so that are personal to me so am hoping the excel and macro method will help me out, again thanks for sharing your info

  20. Hi guys,

    could you tell me how to use that software now exactly concerning the word file. do i just have to copy and paste it?

    more important: how can i edit or modify it in such way that there are just some letters left which habe to be combined to brute force the correct password? i wanna reduce it to the letters i’m sure that they are the right one, i just lost the sequence…

    Cheers!!!

  21. LiquidMK Says:

    Wow, [b]james[/b] described really magic algorithm of forgotten password recovery! I’d made dictionary with Excel macro and with true.crypt.brute it took just about 5 minutes to recover my data! )
    I’m happy!!!

Leave a Reply