e-ago / bitcracker

BitCracker is the first open source password cracking tool for memory units encrypted with BitLocker
GNU General Public License v2.0
811 stars 188 forks source link

Error on cuda_attack.cu on line 210 (ubuntu) and line 66 (fedora) #7

Closed mloog closed 6 years ago

mloog commented 6 years ago

Hi! I am using ubuntu 15 with GCC 4.9 and cuda 7.5. Card is GeForce GTX 780. And constantly I get same error when running run_test.sh. When I was using fedora then it was on cuda_attack.cu line 66 and with ubuntu on line 210. What can I try to fix it?

e-ago commented 6 years ago

Please, send me the build log and the error log using the latest version of source files

mloog commented 6 years ago

Hi

I didn*t find logs so i copied straight from terminal, if that helps.

On Mon, Aug 27, 2018 at 5:27 PM e-ago notifications@github.com wrote:

Please, send me the build log and the error log using the latest version of source files

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/e-ago/bitcracker/issues/7#issuecomment-416244821, or mute the thread https://github.com/notifications/unsubscribe-auth/AYebHWNC73HMpgxQzUIe-CGZS9c2FEtuks5uVAG5gaJpZM4WNxpd .

e-ago commented 6 years ago

Yes the log from the terminal but I can’t see any log copied in your comment

mloog commented 6 years ago

Build So called log :

ekei@MurdjaPinu:~/bitcracker-master$ sh build.sh

====== Build BitCracker Hash Extractor ====== rm -rf *.o rm -rf ../build/bitcracker_hash gcc bitcracker_hash.c -o bitcracker_hash

====== Build BitCracker Recovery Password generator ====== rm -rf *.o rm -rf ../build/bitcracker_rpgen gcc bitcracker_rpgen.c -o bitcracker_rpgen

====== Build BitCracker CUDA version ====== rm -rf *.o rm -rf ../build/bitcracker_cuda nvcc -gencode arch=compute_35,code=sm_35 -Xptxas -v -o bitcracker_cuda main.cu cuda_attack.cu utils.cu w_blocks.cu ptxas info : 0 bytes gmem, 12584 bytes cmem[3] ptxas info : 0 bytes gmem, 12584 bytes cmem[3] ptxas info : Compiling entry function '_Z20decrypt_vmk_with_maciPiPhS0_S0_S0_S0_iiiijjjji' for 'sm_35' ptxas info : Function properties for _Z20decrypt_vmk_with_maciPiPhS0_S0_S0_S0_iiiijjjji 288 bytes stack frame, 520 bytes spill stores, 600 bytes spill loads ptxas info : Used 64 registers, 420 bytes cmem[0], 8 bytes cmem[2], 2 textures ptxas info : Compiling entry function '_Z11decrypt_vmkiPiPhS0_iiiiijjjji' for 'sm_35' ptxas info : Function properties for _Z11decrypt_vmkiPiPhS0_iiiiijjjji 24 bytes stack frame, 68 bytes spill stores, 68 bytes spill loads ptxas info : Used 64 registers, 400 bytes cmem[0], 12 bytes cmem[2], 2 textures ptxas info : 0 bytes gmem, 12584 bytes cmem[3] ptxas info : 0 bytes gmem, 12584 bytes cmem[3] ptxas info : Compiling entry function '_Z16w_block_evaluatePhiS_Pj' for 'sm_35' ptxas info : Function properties for _Z16w_block_evaluatePhiS_Pj 0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 64 registers, 352 bytes cmem[0], 4 bytes cmem[2]

====== Build BitCracker OpenCL version ====== rm -rf .o rm -rf bitcracker_opencl gcc -I/usr/include -L/usr/lib64 -L/usr/lib -I/usr/local/cuda-7.5/include -L/usr/local/cuda-7.5/lib64 --std=c11 -O3 -Wextra -o bitcracker_opencl main.c opencl_attack.c utils.c w_blocks.c -lOpenCL main.c: In function ‘checkDeviceStatistics’: main.c:102:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < platformCount; i++) ^ main.c:111:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (j = 0; j < deviceCount; j++) ^ main.c:151:2: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘cl_ulong’ [-Wformat=] printf("Max Global Memory Size: %lld\n", maxAllocSize); ^ main.c:155:2: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘cl_ulong’ [-Wformat=] printf("Max Global Memory Alloc Size: %lld\n", maxAllocSize); ^ main.c:159:2: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘cl_ulong’ [-Wformat=] printf("Max Const Memory Buffer Size: %lld\n", maxConstBufSize); ^ opencl_attack.c: In function ‘opencl_attack’: opencl_attack.c:281:18: warning: ‘d_computeMacIV’ may be used uninitialized in this function [-Wmaybe-uninitialized] ciErr1 = clEnqueueWriteBuffer(cqCommandQueue, d_computeMacIV, CL_TRUE, 0, IV_SIZEsizeof(char), computeMacIV, 0, NULL, NULL); ^ opencl_attack.c:278:18: warning: ‘d_macIV’ may be used uninitialized in this function [-Wmaybe-uninitialized] ciErr1 = clEnqueueWriteBuffer(cqCommandQueue, d_macIV, CL_TRUE, 0, IV_SIZE*sizeof(char), macIV, 0, NULL, NULL); ^ utils.c: In function ‘parse_data’: utils.c:105:2: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(hash, INPUT_HASH_SIZE, fphash); ^ utils.c:214:3: warning: ‘fphash’ may be used uninitialized in this function [-Wmaybe-uninitialized] fclose(fphash); ^ w_blocks.c: In function ‘w_block_precomputed’: w_blocks.c:160:21: warning: ‘ckKernelWBlocks’ may be used uninitialized in this function [-Wmaybe-uninitialized] if(ckKernelWBlocks)clReleaseKernel(ckKernelWBlocks); ^ w_blocks.c:161:18: warning: ‘cpProgram’ may be used uninitialized in this function [-Wmaybe-uninitialized] if(cpProgram)clReleaseProgram(cpProgram); ^

====== Executables in build directory ======

And Run_test Log

---------> BitCracker: BitLocker password cracking tool <---------

==================================== Selected device: GPU GeForce GTX 780 (ID: 0)

Compute capability: 3.5 Clock rate: 1006000 Clock rate: 1006 MHz (1.01 GHz) Memory Clock Rate (KHz): 3004000 Memory Bus Width (bits): 384 Peak Memory Bandwidth (GB/s): 288.384000 Device copy overlap: Enabled Async memory engine count: 1 Concurrent kernels: 1 Kernel execition timeout: Enabled Total global mem: 3220897792 bytes Free memory: 2917834752 bytes Texture Alignment: 512 Multiprocessor count: 12 Shared mem per mp: 49152 Registers per mp: 65536 Threads in warp: 32 Max threads per block: 1024 Max thread dimensions: (1024, 1024, 64) Max grid dimensions: (2147483647, 65535, 65535)

For this session, BitCracker requires at least 268566528 bytes of memory

==================================== Retrieving Info

Reading hash file "./test_hash/imgWin10NotCompatLong_recovery_password.txt" $bitlocker$2$16$775d3b4a49a3cd13914a3839e279cb15$1048576$12$304e22c96802d40106000000$60$de445eaa60675a42608669a7abbbdf05a36ce970c91b256845750c3cc96b684a4fa859592b90764f78bf9dd0c9f48a52f24d2110faa785659a54175a

==================================== Attack

Type of attack: Recovery Password CUDA Threads: 256 CUDA Blocks: 1 Psw per thread: 1 Max Psw per kernel: 256 Dictionary: ./Dictionary/recovery_passwords.txt Strict Check (-s): No MAC Comparison (-m): Yes

Cuda error in file 'cuda_attack.cu' in line 211 : the launch timed out and was terminated.

On Tue, Aug 28, 2018 at 1:36 PM e-ago notifications@github.com wrote:

I can’t see any log

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/e-ago/bitcracker/issues/7#issuecomment-416535411, or mute the thread https://github.com/notifications/unsubscribe-auth/AYebHbXGYy53mUuIbzWfgdsK91p4tCbpks5uVR05gaJpZM4WNxpd .

e-ago commented 6 years ago

You have a GeForce GTX 780 (Kepler arch) so sm_35 it's ok. The problem is that you enabled the timeout on your GPU: Kernel execition timeout: Enabled. (Ops... there a typo in the BitCracker log) It should be Disabled. On a Kepler, the minimum required time is 30 seconds.

Probably you have the timeout enabled because the GPU is handling an active display. Try running bitcracker without your display manager (should be lightdm) in non-graphical mode (shortcut should be ctrl+alt+f2)

mloog commented 6 years ago

It’s alive!! Ty very much!

Sent from my iPhone

On 28 Aug 2018, at 15:48, e-ago notifications@github.com wrote:

You have a GeForce GTX 780 (Kepler arch) so sm_35 it's ok. The problem is that you enabled the timeout on your GPU: Kernel execition timeout: Enabled. (Ops... there a typo in the BitCracker log) It should be Disabled. On a Kepler, the minimum required time is 30 seconds.

The timeout could be enabled because the GPU is handling an active display. Try running bitcracker without your display manager (should be lightdm) in non-graphical mode (shortcut should be ctrl+alt+f2)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

e-ago commented 6 years ago

So now it works, great! I’ll close this issue