lvaccaro / truecrack

TrueCrack is a brute-force password cracker for TrueCrypt (Copyrigth) volumes. It works on Linux and it is optimized for Nvidia Cuda technology.
GNU General Public License v3.0
155 stars 58 forks source link

core dump #19

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, 
i encounter problems when running TrueCrack in GPU-Mode on an NVidia GTX 660. I 
followed your previoud posted fix since cuda version 5.0 doesn't support the 
attribute global in the signature of the prototype of the kernel function. But 
nevertheless I run into a core dump:

What steps will reproduce the problem?
Running Truecrack using GPU using a blocksize > 1 and a wordfile
calculon@calculon:$/home/calculon/truecrack/truecrack -t 
/home/calculon/BigGuess/Test.sec -w 
/home/calculon/BigGuess/guessresult.Test.txt -b 1024

What is the expected output? What do you see instead?

Not Found password for volume "/home/calculon/BigGuess/Test.sec"
Try "20008" words.
*** glibc detected *** /home/calculon/truecrack/truecrack: double free or 
corruption (!prev): 0x094821d8 ***
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x75ee2)[0xb75c2ee2]
/home/calculon/truecrack/truecrack[0x8049e6e]
/home/calculon/truecrack/truecrack[0x804a7e6]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0xb75664d3]
/home/calculon/truecrack/truecrack[0x8048aa1]
======= Memory map: ========
08048000-08172000 r-xp 00000000 08:01 2883948    
/home/calculon/truecrack/truecrack
08172000-08173000 r--p 00129000 08:01 2883948    
/home/calculon/truecrack/truecrack
08173000-08174000 rw-p 0012a000 08:01 2883948    
/home/calculon/truecrack/truecrack
08174000-08179000 rw-p 00000000 00:00 0
09482000-095be000 rw-p 00000000 00:00 0          [heap]
b4dda000-b4fe1000 rw-p 00000000 00:00 0
b529c000-b529e000 rw-p 00000000 00:00 0
b529e000-b53a9000 rw-s 31807000 00:05 9996       /dev/nvidia0
b53a9000-b54a9000 rw-s 25e03000 00:05 9996       /dev/nvidia0
b54a9000-b55a9000 rw-s 260a7000 00:05 9996       /dev/nvidia0
b55a9000-b56a9000 rw-s 00000000 00:04 20856      /dev/zero (deleted)
b56a9000-b57a9000 rw-s 26248000 00:05 9996       /dev/nvidia0
b57a9000-b58a9000 rw-s 00000000 00:04 20855      /dev/zero (deleted)
b58a9000-b58aa000 rw-s efd60000 00:05 9996       /dev/nvidia0
b58aa000-b58ab000 rw-s 26243000 00:05 9996       /dev/nvidia0
b58ab000-b5cad000 rw-s 30a29000 00:05 9996       /dev/nvidia0
b5cad000-b60af000 rw-s 31ec6000 00:05 9996       /dev/nvidia0
b60af000-b60b0000 ---p 00000000 00:00 0
b60b0000-b68b0000 rwxp 00000000 00:00 0
b68b0000-b69b0000 rw-s 00000000 00:04 20851      /dev/zero (deleted)
b69b0000-b6a81000 rw-p 00000000 00:00 0
b6a81000-b6a95000 r-xp 00000000 08:01 3277838    
/lib/i386-linux-gnu/libz.so.1.2.3.4
b6a95000-b6a96000 r--p 00013000 08:01 3277838    
/lib/i386-linux-gnu/libz.so.1.2.3.4
b6a96000-b6a97000 rw-p 00014000 08:01 3277838    
/lib/i386-linux-gnu/libz.so.1.2.3.4
b6a97000-b73ac000 r-xp 00000000 08:01 11936161   /usr/lib/libcuda.so.304.54
b73ac000-b7402000 rw-p 00914000 08:01 11936161   /usr/lib/libcuda.so.304.54
b7402000-b742a000 rw-p 00000000 00:00 0
b742a000-b7446000 r-xp 00000000 08:01 3277748    
/lib/i386-linux-gnu/libgcc_s.so.1
b7446000-b7447000 r--p 0001b000 08:01 3277748    
/lib/i386-linux-gnu/libgcc_s.so.1
b7447000-b7448000 rw-p 0001c000 08:01 3277748    
/lib/i386-linux-gnu/libgcc_s.so.1
b7448000-b7520000 r-xp 00000000 08:01 11930965   
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
b7520000-b7521000 ---p 000d8000 08:01 11930965   
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
b7521000-b7525000 r--p 000d8000 08:01 11930965   
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
b7525000-b7526000 rw-p 000dc000 08:01 11930965   
/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16
b7526000-b752d000 rw-p 00000000 00:00 0
b752d000-b7544000 r-xp 00000000 08:01 3281058    
/lib/i386-linux-gnu/libpthread-2.15.so
b7544000-b7545000 r--p 00016000 08:01 3281058    
/lib/i386-linux-gnu/libpthread-2.15.so
b7545000-b7546000 rw-p 00017000 08:01 3281058    
/lib/i386-linux-gnu/libpthread-2.15.so
b7546000-b7548000 rw-p 00000000 00:00 0
b7548000-b754b000 r-xp 00000000 08:01 3281064    
/lib/i386-linux-gnu/libdl-2.15.so
b754b000-b754c000 r--p 00002000 08:01 3281064    
/lib/i386-linux-gnu/libdl-2.15.so
b754c000-b754d000 rw-p 00003000 08:01 3281064    
/lib/i386-linux-gnu/libdl-2.15.so
b754d000-b76f0000 r-xp 00000000 08:01 3277739    
/lib/i386-linux-gnu/libc-2.15.so
b76f0000-b76f1000 ---p 001a3000 08:01 3277739    
/lib/i386-linux-gnu/libc-2.15.so
b76f1000-b76f3000 r--p 001a3000 08:01 3277739    
/lib/i386-linux-gnu/libc-2.15.so
b76f3000-b76f4000 rw-p 001a5000 08:01 3277739    
/lib/i386-linux-gnu/libc-2.15.so
b76f4000-b76f8000 rw-p 00000000 00:00 0
b76f8000-b7722000 r-xp 00000000 08:01 3281060    
/lib/i386-linux-gnu/libm-2.15.so
b7722000-b7723000 r--p 00029000 08:01 3281060    
/lib/i386-linux-gnu/libm-2.15.so
b7723000-b7724000 rw-p 0002a000 08:01 3281060    
/lib/i386-linux-gnu/libm-2.15.so
b7734000-b7735000 rw-s efd60000 00:05 9996       /dev/nvidia0
b7735000-b7736000 rw-s 30432000 00:05 9996       /dev/nvidia0
b7736000-b7737000 r--s f6009000 00:05 9996       /dev/nvidia0
b7737000-b7795000 r-xp 00000000 08:01 11937927   
/usr/local/cuda-5.0/lib/libcudart.so.5.0.35
b7795000-b7796000 r--p 0005d000 08:01 11937927   
/usr/local/cuda-5.0/lib/libcudart.so.5.0.35
b7796000-b7797000 rw-p 0005e000 08:01 11937927   
/usr/local/cuda-5.0/lib/libcudart.so.5.0.35
b7797000-b7799000 rw-p 00000000 00:00 0
b7799000-b779a000 r-xp 00000000 00:00 0          [vdso]
b779a000-b77ba000 r-xp 00000000 08:01 3281061    /lib/i386-linux-gnu/ld-2.15.so
b77ba000-b77bb000 r--p 0001f000 08:01 3281061    /lib/i386-linux-gnu/ld-2.15.so
b77bb000-b77bc000 rw-p 00020000 08:01 3281061    /lib/i386-linux-gnu/ld-2.15.so
bfd19000-bfd39000 rwxp 00000000 00:00 0          [stack]
bfd39000-bfd3a000 rw-p 00000000 00:00 0
Abgebrochen (Speicherabzug geschrieben)

What version of the product are you using? On what operating system?
 - Ubuntu 12.04 32bit
 - CUDA 5.0 for Ubuntu 11.10

What additional information can I provide?

Thanks for your efforts. Nice work by the way!

Cheers,
Toby

Original issue reported on code.google.com by tobias.w...@gmail.com on 5 Jan 2013 at 5:07

GoogleCodeExporter commented 9 years ago
mmh.. I think to have fixed the problem in new release... can you try the new 
version of TrueCrack 2.0?

Original comment by luck87 on 14 Jan 2013 at 12:51

GoogleCodeExporter commented 9 years ago
How is TrueCrack v2 work? I've downloaded v1 and v2, and then overwrite v2 to 
the v1 folder, then run make GPU=true but it still have the same error like v1. 
If run make from v2 folder, the notice is: No targets specified and no makefile 
found.  Stop.

Original comment by rebel....@gmail.com on 14 Jan 2013 at 9:21

GoogleCodeExporter commented 9 years ago
TrueCrack version 2.0 has a different compilation procedure. It is described in 
the homepage and in the README file.

sh autogen.sh
./configure
make
sudo make install

Original comment by luck87 on 14 Jan 2013 at 9:24

GoogleCodeExporter commented 9 years ago
autogen.sh: 5: aclocal: not found
Why is it?

Original comment by rebel....@gmail.com on 14 Jan 2013 at 9:46

GoogleCodeExporter commented 9 years ago
Fixed! aclocal is a software to generate the configure file from autotools. Now 
it is not necessary run: autogen.sh
You need only start the configure procedure: ./configure

Original comment by luck87 on 14 Jan 2013 at 9:53

GoogleCodeExporter commented 9 years ago
After run ./configure, make is:
make  all-recursive
make[1]: Entering directory `/home/user/Desktop/truecrack_v20/truecrack'
Making all in src
make[2]: Entering directory `/home/user/Desktop/truecrack_v20/truecrack/src'
cat Cuda/CudaCore.cu > Cuda.cu 
cat Cuda/CudaPkcs5.cu >> Cuda.cu
cat Cuda/CudaRmd160.cu >> Cuda.cu
cat Cuda/CudaAes.cu >> Cuda.cu
cat Cuda/CudaXts.cu >> Cuda.cu
nvcc -c Cuda.cu -I./Common/ -I./Crypto/ -I./Cuda/ -I./Main/ -I./ -lm -O3 
-arch=sm_30 -ftz=true -use_fast_math -D_GPU_ -gencode 
arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode 
arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 --opencc-options 
-OPT:Olimit=0  -o Cuda.o
/bin/bash: nvcc: command not found
make[2]: *** [Cuda.o] Error 127
make[2]: Leaving directory `/home/user/Desktop/truecrack_v20/truecrack/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/Desktop/truecrack_v20/truecrack'
make: *** [all] Error 2

Original comment by rebel....@gmail.com on 15 Jan 2013 at 2:09

GoogleCodeExporter commented 9 years ago
NVCC is the standard cuda compiler. It is included in your Cuda toolkit.
If you follow the cuda instructions, when you finish to install the cuda 
toolkit, you must add the cuda binary directory (default 
/usr/local/cuda-5.0/bin ) into your PATH as the follow: export 
PATH=$PATH:/usr/local/cuda-5.0/bin
or you can append the command to your .bashrc file. 
(if the directory is different you can specify the compilation option: 
--with-cuda=PATH )

Original comment by luck87 on 15 Jan 2013 at 2:24

GoogleCodeExporter commented 9 years ago
I've done it before

Original comment by rebel....@gmail.com on 15 Jan 2013 at 2:28

GoogleCodeExporter commented 9 years ago
Here is my .bashrc file
export CUDA_HOME=/usr/local/cuda-5.0
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64

PATH=${CUDA_HOME}/bin:${PATH}
export PATH

Original comment by rebel....@gmail.com on 15 Jan 2013 at 2:31

GoogleCodeExporter commented 9 years ago
I think that the last line should be ${PATH}. However my .bashrc file is:
PATH=/usr/local/cuda-5.0/bin:$PATH
LD_LIBRARY_PATH=/usr/local/cuda-5.0/lib:$LD_LIBRARY_PATH

Original comment by luck87 on 15 Jan 2013 at 2:37

GoogleCodeExporter commented 9 years ago
Fixed, i'm using another user so the Path is not effect.
But now very much warning when making

Original comment by rebel....@gmail.com on 15 Jan 2013 at 2:43

GoogleCodeExporter commented 9 years ago
./Cuda/CudaAeskey.cu(186): warning: a __host__ function("aes_encrypt_key256") 
redeclared with __device__, hence treated as a __host__ __device__ function

./Cuda/CudaAeskey.cu(509): warning: a __host__ function("aes_decrypt_key256") 
redeclared with __device__, hence treated as a __host__ __device__ function

./Cuda/CudaAescrypt.cu(113): warning: a __host__ function("aes_encrypt") 
redeclared with __device__, hence treated as a __host__ __device__ function

./Cuda/CudaAescrypt.cu(250): warning: a __host__ function("aes_decrypt") 
redeclared with __device__, hence treated as a __host__ __device__ function

Cuda.cu(1477): warning: a __host__ function("cuda_Xts") redeclared with 
__device__, hence treated as a __host__ __device__ function

./Cuda/CudaAeskey.cu(186): warning: a __host__ function("aes_encrypt_key256") 
redeclared with __device__, hence treated as a __host__ __device__ function

./Cuda/CudaAeskey.cu(509): warning: a __host__ function("aes_decrypt_key256") 
redeclared with __device__, hence treated as a __host__ __device__ function

./Cuda/CudaAescrypt.cu(113): warning: a __host__ function("aes_encrypt") 
redeclared with __device__, hence treated as a __host__ __device__ function

./Cuda/CudaAescrypt.cu(250): warning: a __host__ function("aes_decrypt") 
redeclared with __device__, hence treated as a __host__ __device__ function

Cuda.cu(1477): warning: a __host__ function("cuda_Xts") redeclared with 
__device__, hence treated as a __host__ __device__ function

./Cuda/CudaAeskey.cu(186): warning: a __host__ function("aes_encrypt_key256") 
redeclared with __device__, hence treated as a __host__ __device__ function

./Cuda/CudaAeskey.cu(509): warning: a __host__ function("aes_decrypt_key256") 
redeclared with __device__, hence treated as a __host__ __device__ function

./Cuda/CudaAescrypt.cu(113): warning: a __host__ function("aes_encrypt") 
redeclared with __device__, hence treated as a __host__ __device__ function

./Cuda/CudaAescrypt.cu(250): warning: a __host__ function("aes_decrypt") 
redeclared with __device__, hence treated as a __host__ __device__ function

Cuda.cu(1477): warning: a __host__ function("cuda_Xts") redeclared with 
__device__, hence treated as a __host__ __device__ function

./Cuda/CudaAeskey.cu(186): warning: a __host__ function("aes_encrypt_key256") 
redeclared with __device__, hence treated as a __host__ __device__ function

./Cuda/CudaAeskey.cu(509): warning: a __host__ function("aes_decrypt_key256") 
redeclared with __device__, hence treated as a __host__ __device__ function

./Cuda/CudaAescrypt.cu(113): warning: a __host__ function("aes_encrypt") 
redeclared with __device__, hence treated as a __host__ __device__ function

./Cuda/CudaAescrypt.cu(250): warning: a __host__ function("aes_decrypt") 
redeclared with __device__, hence treated as a __host__ __device__ function

Cuda.cu(1477): warning: a __host__ function("cuda_Xts") redeclared with 
__device__, hence treated as a __host__ __device__ function

./Cuda.cu(1469): Warning: Cannot tell what pointer points to, assuming global 
memory space
./Cuda.cu(417): Warning: Cannot tell what pointer points to, assuming global 
memory space
./Cuda.cu(424): Warning: Cannot tell what pointer points to, assuming global 
memory space
./Cuda.cu(417): Warning: Cannot tell what pointer points to, assuming global 
memory space
./Cuda.cu(424): Warning: Cannot tell what pointer points to, assuming global 
memory space
./Cuda.cu(1469): Warning: Cannot tell what pointer points to, assuming global 
memory space

Still waiting, not finish yet

Original comment by rebel....@gmail.com on 15 Jan 2013 at 2:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yeah! It takes a lots of time because it generates the binary code for the 
different cuda architectures. So when you lunch TrueCrack the code execution 
will be optimized for the cuda architecture of your boards ;-) This feature 
provides high performance and reduces the execution errors due to the version 
of cuda.

Original comment by luck87 on 15 Jan 2013 at 2:51

GoogleCodeExporter commented 9 years ago
Thanks a lot. It's done.
Now i'm going to test.

Found password for volume "/home/user/Desktop/MyVolume" in the charset 
"abcdefghijklmnopqrstuvwxyz0123456789" of max length 9
password: aaaaaaa - length: 8

But, it's not my password

Original comment by rebel....@gmail.com on 15 Jan 2013 at 3:16

GoogleCodeExporter commented 9 years ago
oh my god! one moment that I fix

Original comment by luck87 on 15 Jan 2013 at 3:32

GoogleCodeExporter commented 9 years ago
ok.. try now

Original comment by luck87 on 15 Jan 2013 at 3:56

GoogleCodeExporter commented 9 years ago
The same result

Found password for volume "/home/user/Desktop/MyVolume" in the charset 
"abcdefghijklmnopqrstuvwxyz0123456789" of max length 9
password: aaaaaaa - length: 8

Original comment by rebel....@gmail.com on 15 Jan 2013 at 4:12

GoogleCodeExporter commented 9 years ago
ok.. it works on the svn version.. then, I have fixed some compilation warning. 

Original comment by luck87 on 17 Jan 2013 at 12:42

GoogleCodeExporter commented 9 years ago
Is it fixed in v2.1?

Original comment by rebel....@gmail.com on 17 Jan 2013 at 1:54

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Tested v2.1 and result:

16367 result : NOT DEFINED
16368 result : NOT DEFINED
16369 result : NOT DEFINED
16370 result : NOT DEFINED
16371 result : NOT DEFINED
16372 result : NOT DEFINED
16373 result : NOT DEFINED
16374 result : NOT DEFINED
16375 result : NOT DEFINED
16376 result : NOT DEFINED
16377 result : NOT DEFINED
16378 result : NOT DEFINED
16379 result : NOT DEFINED
16380 result : NOT DEFINED
16381 result : NOT DEFINED
16382 result : NOT DEFINED
16383 result : NOT DEFINED
Found password for volume "/home/user/Desktop/MyVolume" in the charset 
"abcdefghijklmnopqrstuvwxyz0123456789" of max length 9
password: aaaaaaaa - length: 8

Original comment by rebel....@gmail.com on 17 Jan 2013 at 2:12

GoogleCodeExporter commented 9 years ago
OK... try now with the svn version or "truecrack version 2 (stable)" in the 
download page.

Original comment by luck87 on 17 Jan 2013 at 10:03

GoogleCodeExporter commented 9 years ago
Hi,
finally tried the new version.

I still get errors when using a wordfile containing Strings > 30 chars:
It says
"->unspecified launch failure in Cuda.cu at line 300
Speicherzugriffsfehler (Speicherabzug geschrieben)"

But I have a problem using words < 30 chars as well:
It does not find the correct password! The list contains the right password but 
it gets skipped saying "NO MATCH"!

I use the following configuration:
Driver: Linux-x86-310.19
Cuda: cuda_5.0.35_linux_32_ubuntu11.10-1.run
Truecrack 2.1

What is the max-size of words I should use? 
Why is he skipping the correct password, even if it is only 9 chars long?

Original comment by tobias.w...@gmail.com on 17 Jan 2013 at 11:00

GoogleCodeExporter commented 9 years ago
I did not see the svn folder in truecrack version 2 stable.
And the result is same with previous version.

16369 result : NOT DEFINED
16370 result : NOT DEFINED
16371 result : NOT DEFINED
16372 result : NOT DEFINED
16373 result : NOT DEFINED
16374 result : NOT DEFINED
16375 result : NOT DEFINED
16376 result : NOT DEFINED
16377 result : NOT DEFINED
16378 result : NOT DEFINED
16379 result : NOT DEFINED
16380 result : NOT DEFINED
16381 result : NOT DEFINED
16382 result : NOT DEFINED
16383 result : NOT DEFINED
Found password for volume "/home/user/Desktop/MyVolume" in the charset 
"abcdefghijklmnopqrstuvwxyz0123456789" of max length 9
password: aaaaaaaa - length: 8

Original comment by rebel....@gmail.com on 18 Jan 2013 at 2:39

GoogleCodeExporter commented 9 years ago
" ->unspecified launch failure in Cuda.cu at line 300 "
" 16370 result : NOT DEFINED "
Both of them are related of Cuda 5.0 toolkit. TrueCrack consumes a lots of 
resources and often the board doesn't support this consumption. Timeout 
Detection and Recovery(TDR) mechanism prevents processes from hogging the GPU 
and rendering the system display unresponsive or denying other processes a fair 
share of the GPU.
On Windows there are some ways to disable, on Linux I suggest to unplug your 
monitor cable (in order to disable xorg and framebuffer). In my tests, the 
better solution was to use the computer on remote with ssh.

To obtain more information about the errors try the command: 
 cuda-checkmem ./truecrack <options>

PLEASE: try to use the "truecrack_v2.tar.gz" release or to download from the 
svn( it is the same sources of truecrack_v2.tar.gz)

Original comment by luck87 on 18 Jan 2013 at 2:29

GoogleCodeExporter commented 9 years ago
27535 result : NOT DEFINED
27536 result : NOT DEFINED
27537 result : NOT DEFINED
27538 result : NOT DEFINED
Not Found password for volume "/home/user/Desktop/MyVolume"
Try "27538" words.

I used password 5 characters and the result is not found.

Original comment by rebel....@gmail.com on 22 Jan 2013 at 7:34

GoogleCodeExporter commented 9 years ago
The result above when i ran truecrack from /usr/local/bin
If ran from src
user@user-Inspiron-660s:~/Desktop/truecrack_v2/truecrack/src$ ./truecrack -t 
/home/user/Desktop/MyVolume -c abcdefghijklmnopqrstuvwxyz0123456789 -m 6 -v

...
4086 result : NOT DEFINED
4087 result : NOT DEFINED
4088 result : NOT DEFINED
4089 result : NOT DEFINED
4090 result : NOT DEFINED
4091 result : NOT DEFINED
4092 result : NOT DEFINED
4093 result : NOT DEFINED
4094 result : NOT DEFINED
4095 result : NOT DEFINED
Found password for volume "/home/rebel/Desktop/5kytu" in the charset 
"abcdefghijklmnopqrstuvwxyz0123456789" of max length 7
password: aaaaaa - length: 6

Original comment by rebel....@gmail.com on 22 Jan 2013 at 7:47

GoogleCodeExporter commented 9 years ago
"NOT DEFINED" is the message when the gpu doesn't launch correctly the cuda 
kernel function. TrueCrack can saturate the gpu board and the system doesn't 
allow this type of consumption. Try to turnoff the xorg graphic server, and 
disable the framebuffer. A easy solution is to unplug the monitor cable and 
make a remote access to the machine with ssh.

Original comment by luck87 on 23 Jan 2013 at 9:00

GoogleCodeExporter commented 9 years ago
the latest version (v2.9) available on svn repository defines the compilation 
arguments for a generic board. In src/Makefile.am, it is possible to define the 
flags for generating code for a specific cuda architecture with the option 
"-gencode". For example: -gencode arch=compute_30,code=sm_30 for cuda 
architecture 3.0

Original comment by luck87 on 4 Feb 2013 at 10:52

GoogleCodeExporter commented 9 years ago
I can not see the link to download v2.9??

Original comment by rebel....@gmail.com on 19 Feb 2013 at 7:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have a similar issue when running on CPU. Seems not to support dictionary 
passwords longer than 30 chars. 

Original comment by yoav.avi...@gmail.com on 27 Nov 2013 at 10:21