intreasting article about the program "truecrypt"

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 ■■■■■ 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 ■■■■■ 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.

* Accessdata DNA

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:

* autoitscript
* java based application also availible here

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:\■■■■■\TrueCrypt.exe /q background /s /p "’ & $pw & ‘" /e /m ro /m rm /v “c:\■■■■■\■■■■■.ENC”’ )
Next

for $two = 0 to 93
for $one = 0 to 93
$pw = $Array[$one]
$pw &= $Array[$two]
Run(@COMSPEC & " /c " & ‘C:\■■■■■\TrueCrypt.exe /q background /s /p "’ & $pw & ‘" /e /m ro /m rm /v “c:\■■■■■\■■■■■.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:\■■■■■\TrueCrypt.exe /q background /s /p "’ & $pw & ‘" /e /m ro /m rm /v “c:\■■■■■\■■■■■.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:\■■■■■\TrueCrypt.exe /q background /s /p "’ & $pw & ‘" /e /m ro /m rm /v “c:\■■■■■\■■■■■.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:\■■■■■\TrueCrypt.exe /q background /s /p "’ & $pw & ‘" /e /m ro /m rm /v “c:\■■■■■\■■■■■.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:\■■■■■\TrueCrypt.exe /q background /s /p "’ & $pw & ‘" /e /m ro /m rm /v “c:\■■■■■\■■■■■.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:\■■■■■\TrueCrypt.exe /q background /s /p "’ & $pw & ‘" /e /m ro /m rm /v “c:\■■■■■\■■■■■.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:\■■■■■\TrueCrypt.exe /q background /s /p "’ & $pw & ‘" /e /m ro /m rm /v “c:\■■■■■\■■■■■.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.

* http://blog.bjrn.se/2008/01/truecrypt-explained.html
* http://blog.bjrn.se/2008/02/truecrypt-explained-truecrypt-5-update.html
* http://www.rbgrn.net/blog/2007/09/how-to-write-a-brute-force-password-cracker.html
* http://www.cpushare.com/

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.

Proof would be in demonstration. It would be a surprise to most crypto experts.

Truecrypt has very good encryption and with a long key, even with extremely fast computers and the best software, success seems quite unlikely.