TrueCrypt batch: BruteForce files
I encrypt my HDD with TrueCrypt since I want to protect my work and documents from unauthorized access. I used a keyfile on a SanDisk Cruzer Micro usb stick.
Unfortunately this stick died suddenly (now it’s some months ago) - I knew that somewhere I still had the file on another HDD, but I did not remember any more which file exactly it was, ’cause I also renamed on the USB stick. I bought a second USB stick and changed the flash IC, but with no success, since it was a little bit different USB stick. So I put all files inside the TrueCrypt that could be possible. I did not know that TrueCrypt takes only the first MiB of every file and sum them. I thought it just trys all files. After a week I noticed this and created a small batchfile that helps to find the right keyfile.
I put it here, just if someone has a similiar problem
File bruteforce.bat (started from commandline):
@echo off
for %%x IN (*.*) do CALL check.bat “%%x”
File check.bat
TrueCrypt.exe /v \Device\Harddisk0\Partition2 /l d: /b /k %1 /q /s
if errorlevel 1 goto error
echo key found: %1
pause
:error
echo key %1 wrong
One of my HDDs was still mounted, but I didn’t find a way to get the key from it
I also bugged the people from TrueCrypt Forums with that problem - they had some good ideas for the future. This and the full story can be found there: http://forums.truecrypt.org/viewtopic.php?t=8961