e-ago / bitcracker

BitCracker is the first open source password cracking tool for memory units encrypted with BitLocker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

run_tests.sh ... Password not found!

turbofiesta opened this issue · comments

Now i try BitCracker on different system.

nvidia-smi

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.48                 Driver Version: 390.48                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 970     Off  | 00000000:05:00.0  On |                  N/A |
| 41%   44C    P8    17W / 160W |    452MiB /  4041MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85

I changed Makefiles to:

Makefile file "src-CUDA"

bitcracker_cuda:
	nvcc -gencode arch=compute_52,code=sm_52 -Xptxas -v -o bitcracker_cuda main.cu cuda_attack.cu utils.cu w_blocks.cu

clean:
	rm -rf *.o
	rm -rf ../build/bitcracker_cuda

Makefile file "src_OpenCL"

#!/bin/bash

FLAGS=-Wextra
NVIDIA_INCLUDE=-I/usr/local/cuda/include -L/usr/local/cuda/lib64
COMMON_INCLUDE=-I/usr/include -L/usr/lib64 -L/usr/lib
MAKE_INCLUDE=$(COMMON_INCLUDE) $(NVIDIA_INCLUDE) -cl-std=CL1.2 -O3

all:
	gcc -I/usr/include -L/usr/lib64 -L/usr/lib -I/usr/local/cuda-9.2/include -L/usr/local/cuda-9.2/lib64 -Wextra -o bitcracker_opencl main.c opencl_attack.c utils.c w_blocks.c -lOpenCL
#	clang -framework OpenCL -o bitcracker_opencl main.c opencl_attack.c utils.c w_blocks.c


clean:
	rm -rf *.o
	rm -rf bitcracker_opencl

Then I build Bitcracker and run the tests.
./run_tests.sh
and I get message "Password not found" in all tests

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

Compute capability: 5.2
Clock rate: 1215500
Clock rate: 1216 MHz (1.22 GHz)
Memory Clock Rate (KHz): 3505000
Memory Bus Width (bits): 256
Peak Memory Bandwidth (GB/s): 224.320000
Device copy overlap: Enabled
Async memory engine count: 2
Concurrent kernels: 1
Kernel execition timeout: Enabled
Total global mem:  4238016512 bytes
Free memory: 3596484608 bytes
Texture Alignment:  512
Multiprocessor count:  13
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/imgWin8_user_password.txt"
$bitlocker$0$16$0a8b9d0655d3900e9f67280adc27b5d7$1048576$12$b0599ad6c6a1cf0103000000$60$c16658f54140b3d90be6de9e03b1fe90033a2c7df7127bcd16cb013cf778c12072142c484c9c291a496fc0ebd8c21c33b595a9c1587acfc6d8bb9663


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

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

CUDA Kernel execution:
	Effective passwords: 16
	Passwords Range:
		abcdefshhf
		.....
		blablablablabla
	Time: 8.626421 sec
	Passwords x second:     1.85 pw/sec


================================================
CUDA attack completed
Passwords evaluated: 16
Password not found!
================================================

commented

That's weird, you have a Maxwell GPU (and correctly compiled the code with cc5.2).
I tried BitCracker on several GPUs and systems and it never gave me such type of error.
Can you try again removing the kernel execution timeout? Usually it happens when using your GPU concurrently with a graphical application (that could be, for example, you desktop manager). Are you under Linux or Windows?

I use Ubuntu 18.04.1 LTS.
I try to use Bitcracker on TTY mode (CTRL+ALT+F3) because normal desktop mode becomes frozen when i run Bitcracker attack. (I can move mouse cursor, but all view is stuck).
You mean "Can you try again removing the kernel execution timeout?" I do it like here -
https://stackoverflow.com/questions/15833261/how-to-disable-or-change-the-timeout-limit-for-the-gpu-under-linux ?

commented

That's weird, this is the first time this kind of issue arises. Add the -G option in the src_CUDAMakefile , rebuild and then try this cuda-memcheck ./build/bitcracker_cuda -f ./test_hash/imgWin8_user_password.txt -d ./Dictionary/user_passwords.txt -t 1 -b 1 -g 0 -u

System:

Ubuntu 18.04.1 LTS
Intel® Core™ i7-2600K CPU @ 3.40GHz × 8
GeForce GTX 760/PCIe/SSE2
NVIDIA-Driver Version: 390.48 
Cuda compilation tools, release 9.1, V9.1.85

src_CUDA (Makefile) build log:

====== Build BitCracker CUDA version ======
rm -rf *.o
rm -rf ../build/bitcracker_cuda
nvcc -G -gencode arch=compute_30,code=sm_30 -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_30'
ptxas info    : Function properties for _Z20decrypt_vmk_with_maciPiPhS0_S0_S0_S0_iiiijjjji
    13232 bytes stack frame, 1024 bytes spill stores, 1612 bytes spill loads
ptxas info    : Used 63 registers, 13384 bytes cumulative stack size, 420 bytes cmem[0], 8 bytes cmem[2], 2 textures
ptxas info    : Function properties for _Z7encryptjjjjjjjjjjjjPjS_S_S_
    152 bytes stack frame, 152 bytes spill stores, 184 bytes spill loads
ptxas info    : Function properties for _ZN4dim3C2Ejjj
    16 bytes stack frame, 16 bytes spill stores, 16 bytes spill loads
ptxas info    : Function properties for _ZN4dim3C1Ejjj
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Compiling entry function '_Z11decrypt_vmkiPiPhS0_iiiiijjjji' for 'sm_30'
ptxas info    : Function properties for _Z11decrypt_vmkiPiPhS0_iiiiijjjji
    15920 bytes stack frame, 6488 bytes spill stores, 8880 bytes spill loads
ptxas info    : Used 63 registers, 15920 bytes cumulative stack size, 420 bytes cmem[0], 8 bytes cmem[2], 2 textures
ptxas info    : Function properties for __byte_perm
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : 0 bytes gmem, 12584 bytes cmem[3]
ptxas info    : 0 bytes gmem, 12584 bytes cmem[3]
ptxas info    : Function properties for _ZN4dim3C1Ejjj
    0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Function properties for _ZN4dim3C2Ejjj
    16 bytes stack frame, 16 bytes spill stores, 16 bytes spill loads
ptxas info    : Compiling entry function '_Z16w_block_evaluatePhiS_Pj' for 'sm_30'
ptxas info    : Function properties for _Z16w_block_evaluatePhiS_Pj
    64 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 21 registers, 64 bytes cumulative stack size, 352 bytes cmem[0]

When I run
sudo cuda-memcheck ./build/bitcracker_cuda -f ./test_hash/imgWin8_user_password.txt -d ./Dictionary/user_passwords.txt -t 1 -b 1 -g 0 -u
computer get stuck on:

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

I was waiting about 5 minutes, but nothing....
I tried different position of -G option:

nvcc -gencode arch=compute_30,code=sm_30 -G -Xptxas -v -o bitcracker_cuda main.cu cuda_attack.cu utils.cu w_blocks.cu
nvcc -gencode arch=compute_30,code=sm_30 -Xptxas -v -o bitcracker_cuda main.cu cuda_attack.cu utils.cu w_blocks.cu -G

result is same, terminal and all view stuck...
I tried rebuild without -G option and run cuda-memcheck:

========= CUDA-MEMCHECK

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


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

Compute capability: 3.0
Clock rate: 1032500
Clock rate: 1032 MHz (1.03 GHz)
Memory Clock Rate (KHz): 3004000
Memory Bus Width (bits): 256
Peak Memory Bandwidth (GB/s): 192.256000
Device copy overlap: Enabled
Async memory engine count: 1
Concurrent kernels: 1
Kernel execition timeout: Disabled
Total global mem:  2096693248 bytes
Free memory: 1800339456 bytes
Texture Alignment:  512
Multiprocessor count:  6
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/imgWin8_user_password.txt"
$bitlocker$0$16$0a8b9d0655d3900e9f67280adc27b5d7$1048576$12$b0599ad6c6a1cf0103000000$60$c16658f54140b3d90be6de9e03b1fe90033a2c7df7127bcd16cb013cf778c12072142c484c9c291a496fc0ebd8c21c33b595a9c1587acfc6d8bb9663


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

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

CUDA Kernel execution:
	Effective passwords: 16
	Passwords Range:
		abcdefshhf
		.....
		blablablablabla
	Time: 30.518078 sec
	Passwords x second:     0.52 pw/sec


================================================
CUDA attack completed
Passwords evaluated: 16
Password not found!
================================================


========= ERROR SUMMARY: 0 errors

I tried different computer.
System:

Ubuntu 18.04.1 LTS
Intel® Core™ i7-5930K CPU @ 3.50GHz × 12 
GeForce GTX 970/PCIe/SSE2
NVIDIA-Driver Version: 390.48 
Cuda compilation tools, release 9.1, V9.1.85

When I rebuild with -G option and run:
sudo cuda-memcheck ./build/bitcracker_cuda -f ./test_hash/imgWin8_user_password.txt -d ./Dictionary/user_passwords.txt -t 1 -b 1 -g 0 -u
computer get stuck on:

====================================
Attack
====================================
commented

It should not get stuck with the -G option... it should only take more time to execute! Please redo these tests with the GPU GeForce GTX 970 because GPU GeForce GTX 760 is too old

I redo tests with Geforce GTX 970 in GUI mode. And I was waiting about an hour, but nothing... stuck on "Attack". Then I tried on TTY mode, result was the same... (In TTY mode I can press Ctrl + C and stop process, in GUI I can only reboot PC).

Maybe problem in OS, Driver, Cuda version?
Maybe you can recommend OS, Nvidia driver and Cuda Tool-Kit version ? I can try to install and redo tests ?

Finally the Bitcracker started to work! Found tests passwords.
I install Kali Linux 2018.3, nvidia driver 390.87 and Cuda-toolkit 9.1.85. (GPU - nvidia Gefroce GTX 760)
but I still do not understand why Bitcracker did not work on Ubuntu 18.04.1

commented

Great to hear you were able to run bitcracker. Thanks for the suggestion, I’ll double check if there is any issue related to Ubuntu 18