Discussion:
[john-users] OpenCL on Windows
timajus .
2018-03-29 18:30:52 UTC
Permalink
Hello all,
this is tim from italy. I've cloned the github repository in my cygwin64,
i've made symbolic links to the opencl libs and includes respectively to
/usr/local/lib and /usr/local/include, then i've issued the following
configure command

./configure LDFLAGS=-L/usr/local/lib CFLAGS="-O2 -I/usr/local/include"

Configured for building John the Ripper jumbo:

Target CPU ................................. x86_64 AVX2, 64-bit LE
AES-NI support ............................. run-time detection
Target OS .................................. cygwin
Cross compiling ............................ no
Legacy arch header ......................... x86-64.h

Optional libraries/features found:
Memory map (share/page large files) ........ yes
Fork support ............................... yes
OpenMP support ............................. yes (not for fast formats)
OpenCL support ............................. yes
Generic crypt(3) format .................... yes
libgmp (PRINCE mode and faster SRP formats) yes
128-bit integer (faster PRINCE mode) ....... yes
libz (pkzip format, gpg2john) .............. yes
libbz2 (gpg2john extra decompression logic) yes
libpcap (vncpcap2john and SIPdump) ......... no
librexgen (regex cracking mode) ............ no
OpenMPI support (default disabled) ......... no
ZTEX USB-FPGA module 1.15y support ......... no

Install missing libraries to get any needed features that were omitted.

Configure finished. Now "make -s clean && make -sj4" to compile.

then i've started the build process:

- make -s clean && make -sj4

No issue found during the build.

$ make -s clean && make -sj4
ar: creazione di aes.a
ar: creazione di secp256k1.a

Make process completed.



$ ../run/john --list=build-info
Version: 1.8.0.13-jumbo-1-bleeding-e4e157178 2018-03-28 15:23:20 +0200
Build: cygwin 64-bit x86_64 AVX2 AC OMP
SIMD: AVX2, interleaving: MD4:3 MD5:3 SHA1:1 SHA256:1 SHA512:1
CPU tests: AVX2
$JOHN is ../run/
Format interface version: 14
Max. number of reported tunable costs: 4
Rec file version: REC4
Charset file version: CHR3
CHARSET_MIN: 1 (0x01)
CHARSET_MAX: 255 (0xff)
CHARSET_LENGTH: 24
SALT_HASH_SIZE: 1048576
Max. Markov mode level: 400
Max. Markov mode password length: 30
gcc version: 6.4.0
OpenCL headers version: 2.1
Crypto library: OpenSSL
OpenSSL library version: 0100020bf (loaded: 0100020ef)
OpenSSL 1.0.2k 26 Jan 2017 (loaded: OpenSSL 1.0.2n 7 Dec 2017)
GMP library version: 6.1.2
File locking: fcntl()
fseek(): fseek
ftell(): ftell
fopen(): fopen
memmem(): System's


BUT when i try to run john with opencl format i get an error.

I've issued the following command (from the src directory):

$ ../run/john --wordlist=../run/wl.txt --format=descrypt-opencl
../run/hashes.txt --verbosity=5 --devices=0

and this is the result. (My device is a NVIDIA GeForce GTX 1050 Ti with
CUDA)

initUnicode(UNICODE, UTF-8/ISO-8859-1)
UTF-8 -> UTF-8 -> UTF-8
Device 0: GeForce GTX 1050 Ti
Using default input encoding: UTF-8
Loaded 20 password hashes with 19 different salts (descrypt-opencl,
traditional crypt(3) [DES OpenCL])
Remaining 19 password hashes with 18 different salts
Loaded 6 hashes with 4 different salts to test db from test vectors
Options used: -I ../run/kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=388 -DDEV_VER_MINOR=19 -D_OPENCL_COMPILER
$JOHN/kernels/DES_bs_hash_checking_kernel.cl
Options used: -I ../run/kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=388 -DDEV_VER_MINOR=19 -D_OPENCL_COMPILER -D ITER_COUNT=1
-D MASK_ENABLED=0 -D LOC_0=-1 -D LOC_1=-1 -D LOC_2=-1 -D LOC_3=-1 -D
IS_STATIC_GPU_MASK=0 -D CONST_CACHE_SIZE=65536
$JOHN/kernels/DES_bs_finalize_keys_kernel.cl
Options used: -I ../run/kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=388 -DDEV_VER_MINOR=19 -D_OPENCL_COMPILER -D
WORK_GROUP_SIZE=0 -D index0=31 -D index1=16 -D index2=17 -D index3=18 -D
index4=3 -D index5=4 -D index6=3 -D index7=20 -D index8=21 -D index9=22 -D
index10=7 -D index11=8 -D index24=15 -D index25=0 -D index26=1 -D index27=2
-D index28=19 -D index29=20 -D index30=19 -D index31=4 -D index32=5 -D
index33=6 -D index34=23 -D index35=24 -D index48=63 -D index49=48 -D
index50=49 -D index51=50 -D index52=35 -D index53=36 -D index54=35 -D
index55=52 -D index56=53 -D index57=54 -D index58=39 -D index59=40 -D
index72=47 -D index73=32 -D index74=33 -D index75=34 -D index76=51 -D
index77=52 -D index78=51 -D index79=36 -D index80=37 -D index81=38 -D
index82=55 -D index83=56 $JOHN/kernels/DES_bs_kernel_h.cl
Salt compiled from Source:910
GWS: 1048576, LWS: 128
Salt compiled from Binary:910
Salt compiled from Binary:2275
Salt compiled from Binary:990
Salt compiled from Binary:0
Updated internal tables and buffers for salt 910.
Updated internal tables and buffers for salt 2275.
Updated internal tables and buffers for salt 990.
Updated internal tables and buffers for salt 0.
Note: This format may be a lot faster with --mask acceleration (see
doc/MASK).
Options used: -I ../run/kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=388 -DDEV_VER_MINOR=19 -D_OPENCL_COMPILER
$JOHN/kernels/DES_bs_hash_checking_kernel.cl
Options used: -I ../run/kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=388 -DDEV_VER_MINOR=19 -D_OPENCL_COMPILER -D ITER_COUNT=1
-D MASK_ENABLED=0 -D LOC_0=-1 -D LOC_1=-1 -D LOC_2=-1 -D LOC_3=-1 -D
IS_STATIC_GPU_MASK=0 -D CONST_CACHE_SIZE=65536
$JOHN/kernels/DES_bs_finalize_keys_kernel.cl
Note: building per-salt kernels. This takes e.g. 2 hours for 4096 salts.
Salt compiled from Binary:258
Salt compiled from Binary:517
Alarm clock

$ echo $?
142


These are messages in cygwin64.



The output from windows powershell for the same test:

PS D:\CUDA\jtr\src> ..\run\john.exe --wordlist=..\run\wl.txt
--format=descrypt-opencl ..\run\hashes.txt --verbosity=5
initUnicode(UNICODE, UTF-8/ISO-8859-1)
UTF-8 -> UTF-8 -> UTF-8
Device 0: GeForce GTX 1050 Ti
Using default input encoding: UTF-8
Loaded 20 password hashes with 19 different salts (descrypt-opencl,
traditional crypt(3) [DES OpenCL])
Remaining 19 password hashes with 18 different salts
Loaded 6 hashes with 4 different salts to test db from test vectors
Options used: -I /run/kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=388 -DDEV_VER_MINOR=19 -D_OPENCL_COMPILER
$JOHN/kernels/DES_bs_hash_checking_kernel.cl
Build log:
ptxas info : 0 bytes gmem
ptxas info : Compiling entry function 'DES_bs_cmp' for 'sm_61'
ptxas info : Function properties for DES_bs_cmp
ptxas . 0 bytes stack frame, 0 bytes spill stores, 0 bytes
spill loads
ptxas info : Used 141 registers, 392 bytes cmem[0], 48 bytes cmem[2]
ptxas info : Compiling entry function 'DES_bs_cmp_high' for 'sm_61'
ptxas info : Function properties for DES_bs_cmp_high
ptxas . 256 bytes stack frame, 0 bytes spill stores, 0 bytes
spill loads
ptxas info : Used 32 registers, 392 bytes cmem[0], 48 bytes cmem[2]
Options used: -I /run/kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=388 -DDEV_VER_MINOR=19 -D_OPENCL_COMPILER -D ITER_COUNT=1
-D MASK_ENABLED=0 -D LOC_0=-1 -D LOC_1=-1 -D LOC_2=-1 -D LOC_3=-1 -D
IS_STATIC_GPU_MASK=0 -D CONST_CACHE_SIZE=65536
$JOHN/kernels/DES_bs_finalize_keys_kernel.cl
Build log:
ptxas info : 0 bytes gmem
ptxas info : Compiling entry function 'DES_bs_finalize_keys' for 'sm_61'
ptxas info : Function properties for DES_bs_finalize_keys
ptxas . 0 bytes stack frame, 0 bytes spill stores, 0 bytes
spill loads
ptxas info : Used 29 registers, 352 bytes cmem[0], 32 bytes cmem[2]
Options used: -I /run/kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=388 -DDEV_VER_MINOR=19 -D_OPENCL_COMPILER -D
WORK_GROUP_SIZE=0 -D index0=31 -D index1=16 -D index2=17 -D index3=18 -D
index4=3 -D index5=4 -D index6=3 -D index7=20 -D index8=21 -D index9=22 -D
index10=7 -D index11=8 -D index24=15 -D index25=0 -D index26=1 -D index27=2
-D index28=19 -D index29=20 -D index30=19 -D index31=4 -D index32=5 -D
index33=6 -D index34=23 -D index35=24 -D index48=63 -D index49=48 -D
index50=49 -D index51=50 -D index52=35 -D index53=36 -D index54=35 -D
index55=52 -D index56=53 -D index57=54 -D index58=39 -D index59=40 -D
index72=47 -D index73=32 -D index74=33 -D index75=34 -D index76=51 -D
index77=52 -D index78=51 -D index79=36 -D index80=37 -D index81=38 -D
index82=55 -D index83=56 $JOHN/kernels/DES_bs_kernel_h.cl
Build log:
ptxas info : 0 bytes gmem
ptxas info : Compiling entry function 'DES_bs_25' for 'sm_61'
ptxas info : Function properties for DES_bs_25
ptxas . 0 bytes stack frame, 0 bytes spill stores, 0 bytes
spill loads
ptxas info : Used 235 registers, 344 bytes cmem[0]
Salt compiled from Source:910
GWS: 1048576, LWS: 128
Salt compiled from Binary:910
Salt compiled from Binary:2275
Salt compiled from Binary:990
Salt compiled from Binary:0
Updated internal tables and buffers for salt 910.
Updated internal tables and buffers for salt 2275.
Updated internal tables and buffers for salt 990.
Updated internal tables and buffers for salt 0.
Note: This format may be a lot faster with --mask acceleration (see
doc/MASK).
Options used: -I /run/kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=388 -DDEV_VER_MINOR=19 -D_OPENCL_COMPILER
$JOHN/kernels/DES_bs_hash_checking_kernel.cl
Options used: -I /run/kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=388 -DDEV_VER_MINOR=19 -D_OPENCL_COMPILER -D ITER_COUNT=1
-D MASK_ENABLED=0 -D LOC_0=-1 -D LOC_1=-1 -D LOC_2=-1 -D LOC_3=-1 -D
IS_STATIC_GPU_MASK=0 -D CONST_CACHE_SIZE=65536
$JOHN/kernels/DES_bs_finalize_keys_kernel.cl
Note: building per-salt kernels. This takes e.g. 2 hours for 4096 salts.
Salt compiled from Binary:258
Salt compiled from Binary:517

here you can find both files i've used for test:
https://anonym.to/?http://www37.zippyshare.com/v/VjI6zmRA/file.html

Could you please help me out?

Thank you very much in advance.
Solar Designer
2018-03-31 19:55:38 UTC
Permalink
Hello Tim,

I was hoping someone else would reply, but since no one did yet let me
Post by timajus .
this is tim from italy. I've cloned the github repository in my cygwin64,
i've made symbolic links to the opencl libs and includes respectively to
/usr/local/lib and /usr/local/include, then i've issued the following
configure command
The way you've built JtR looks right to me.
Post by timajus .
$ ../run/john --wordlist=../run/wl.txt --format=descrypt-opencl
../run/hashes.txt --verbosity=5 --devices=0
and this is the result. (My device is a NVIDIA GeForce GTX 1050 Ti with
CUDA)
[...]
Post by timajus .
Note: building per-salt kernels. This takes e.g. 2 hours for 4096 salts.
Salt compiled from Binary:258
Salt compiled from Binary:517
Alarm clock
$ echo $?
142
This looks like an incompatibility of our code with Cygwin, and in
particular I suspect the uses of the alarm timer in bt.c, which is
probably invoked by a call to create_perfect_hash_table() from
opencl_DES_bs_plug.c. You may try to comment out or delete the
"alarm(3);" line in bt.c (currently line 396). Does this help?

You may also try cracking hashes of another type, just to make sure the
problem is specific to formats that make use of bt.c. For example,
download the "3107 of Unix crypt(3) hashes (4 flavors, plus bigcrypt for
length 9+) and corresponding plaintext passwords" file from here:

http://openwall.info/wiki/john/sample-hashes#Sample-password-hash-files

"gzip -d" it and use the "--format=md5crypt-opencl" option on it.

If/once you do get descrypt-opencl working, you'll also want to use
"mask mode" (the "--mask" option, possibly along with another cracking
mode, referring to that other mode's partial candidate passwords with
"?w" in the mask), or the performance would be poor. That's because
descrypt with few different salts is fast enough that candidate
passwords should be generated at least partially on the GPU, and we're
only able to do that with mask.

I hope this helps, and I hope a jumbo developer will look into the issue
with alarm.

Alexander
magnum
2018-03-31 20:05:00 UTC
Permalink
Post by Solar Designer
I was hoping someone else would reply, but since no one did yet let me
I didn't really have a good idea and I don't touch Windows...
Post by Solar Designer
Post by timajus .
Alarm clock
$ echo $?
142
This looks like an incompatibility of our code with Cygwin, and in
particular I suspect the uses of the alarm timer in bt.c, which is
probably invoked by a call to create_perfect_hash_table() from
opencl_DES_bs_plug.c. You may try to comment out or delete the
"alarm(3);" line in bt.c (currently line 396).
...but this sounds totally plausible! I will have look at that soon.

magnum
timajus .
2018-04-01 07:52:48 UTC
Permalink
First of all Happy Easter to both of you and thanks for the help.
@Solar:

Tried with your list and md5crypt: all good!

$ ./john.exe --format=md5crypt-opencl pw-fake-unix
Device 2: GeForce GTX 1050 Ti
Using default input encoding: UTF-8
Loaded 3107 password hashes with 3107 different salts (md5crypt-opencl,
crypt(3) $1$ [MD5 OpenCL])
Press 'q' or Ctrl-C to abort, almost any other key for status
ChangeMe (u1530-md5)
badger (u540-md5)
phantom (u312-md5)
Thunder (u1626-md5)
samIam (u2618-md5)
donkey (u2999-md5)
honda1 (u2162-md5)
thrasher (u2789-md5)
...
3107g 0:00:00:18 DONE 3/3 (2018-04-01 09:42) 165.1g/s 196551p/s 203212c/s
203212C/s lykump3..nigls
Use the "--show" option to display all of the cracked passwords reliably
Session completed

Then

I've commented out the alarm(3) in bt.c , make -s clean && make -sj4 again,
started but no difference


$ ./john.exe --format=descrypt-opencl hashes.txt --verbosity=5
initUnicode(UNICODE, UTF-8/ISO-8859-1)
UTF-8 -> UTF-8 -> UTF-8
Device 2: GeForce GTX 1050 Ti
Using default input encoding: UTF-8
Loaded 627482 password hashes with 256 different salts (descrypt-opencl,
traditional crypt(3) [DES OpenCL])
Loaded 6 hashes with 4 different salts to test db from test vectors
Options used: -I ./kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=391 -DDEV_VER_MINOR=35 -D_OPENCL_COMPILER
$JOHN/kernels/DES_bs_hash_checking_kernel.cl
Build log:
ptxas info : 0 bytes gmem
ptxas info : Compiling entry function 'DES_bs_cmp' for 'sm_61'
ptxas info : Function properties for DES_bs_cmp
ptxas . 0 bytes stack frame, 0 bytes spill stores, 0 bytes
spill loads
ptxas info : Used 141 registers, 392 bytes cmem[0], 48 bytes cmem[2]
ptxas info : Compiling entry function 'DES_bs_cmp_high' for 'sm_61'
ptxas info : Function properties for DES_bs_cmp_high
ptxas . 256 bytes stack frame, 0 bytes spill stores, 0 bytes
spill loads
ptxas info : Used 32 registers, 392 bytes cmem[0], 48 bytes cmem[2]
Options used: -I ./kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=391 -DDEV_VER_MINOR=35 -D_OPENCL_COMPILER -D ITER_COUNT=1
-D MASK_ENABLED=0 -D LOC_0=-1 -D LOC_1=-1 -D LOC_2=-1 -D LOC_3=-1 -D
IS_STATIC_GPU_MASK=0 -D CONST_CACHE_SIZE=65536
$JOHN/kernels/DES_bs_finalize_keys_kernel.cl
Build log:
ptxas info : 0 bytes gmem
ptxas info : Compiling entry function 'DES_bs_finalize_keys' for 'sm_61'
ptxas info : Function properties for DES_bs_finalize_keys
ptxas . 0 bytes stack frame, 0 bytes spill stores, 0 bytes
spill loads
ptxas info : Used 32 registers, 352 bytes cmem[0], 24 bytes cmem[2]
Options used: -I ./kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=391 -DDEV_VER_MINOR=35 -D_OPENCL_COMPILER -D
WORK_GROUP_SIZE=0 -D index0=31 -D index1=16 -D index2=17 -D index3=18 -D
index4=3 -D index5=4 -D index6=3 -D index7=20 -D index8=21 -D index9=22 -D
index10=7 -D index11=8 -D index24=15 -D index25=0 -D index26=1 -D index27=2
-D index28=19 -D index29=20 -D index30=19 -D index31=4 -D index32=5 -D
index33=6 -D index34=23 -D index35=24 -D index48=63 -D index49=48 -D
index50=49 -D index51=50 -D index52=35 -D index53=36 -D index54=35 -D
index55=52 -D index56=53 -D index57=54 -D index58=39 -D index59=40 -D
index72=47 -D index73=32 -D index74=33 -D index75=34 -D index76=51 -D
index77=52 -D index78=51 -D index79=36 -D index80=37 -D index81=38 -D
index82=55 -D index83=56 $JOHN/kernels/DES_bs_kernel_h.cl
Build log:
ptxas info : 0 bytes gmem
ptxas info : Compiling entry function 'DES_bs_25' for 'sm_61'
ptxas info : Function properties for DES_bs_25
ptxas . 0 bytes stack frame, 0 bytes spill stores, 0 bytes
spill loads
ptxas info : Used 236 registers, 344 bytes cmem[0]
Salt compiled from Source:910
GWS: 1048576, LWS: 128
Salt compiled from Binary:910
Salt compiled from Binary:2275
Salt compiled from Binary:990
Salt compiled from Binary:0
Updated internal tables and buffers for salt 910.
Updated internal tables and buffers for salt 2275.
Updated internal tables and buffers for salt 990.
Updated internal tables and buffers for salt 0.
Note: This format may be a lot faster with --mask acceleration (see
doc/MASK).
Options used: -I ./kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=391 -DDEV_VER_MINOR=35 -D_OPENCL_COMPILER
$JOHN/kernels/DES_bs_hash_checking_kernel.cl
Options used: -I ./kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=391 -DDEV_VER_MINOR=35 -D_OPENCL_COMPILER -D ITER_COUNT=1
-D MASK_ENABLED=0 -D LOC_0=-1 -D LOC_1=-1 -D LOC_2=-1 -D LOC_3=-1 -D
IS_STATIC_GPU_MASK=0 -D CONST_CACHE_SIZE=65536
$JOHN/kernels/DES_bs_finalize_keys_kernel.cl
Note: building per-salt kernels. This takes e.g. 2 hours for 4096 salts.
Salt compiled from Binary:258
Salt compiled from Binary:514
Alarm clock

Hope magnum would have some spare time to investigate.

Thank you again!
Tim
Post by magnum
Post by Solar Designer
I was hoping someone else would reply, but since no one did yet let me
I didn't really have a good idea and I don't touch Windows...
Post by Solar Designer
Post by timajus .
Alarm clock
$ echo $?
142
This looks like an incompatibility of our code with Cygwin, and in
particular I suspect the uses of the alarm timer in bt.c, which is
probably invoked by a call to create_perfect_hash_table() from
opencl_DES_bs_plug.c. You may try to comment out or delete the
"alarm(3);" line in bt.c (currently line 396).
...but this sounds totally plausible! I will have look at that soon.
magnum
timajus .
2018-04-01 07:59:24 UTC
Permalink
i've tried also with gdb (maybe those test could help magnum...at least i
hope so)

$ gdb john.exe
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from john.exe...done.
(gdb) run --format=descrypt-opencl hashes.txt
Starting program: /home/Angelo/jtest/run/john.exe --format=descrypt-opencl
hashes.txt
[New Thread 1668.0x21ec]
[New Thread 1668.0xa90]
[New Thread 1668.0x1348]
[New Thread 1668.0x1fe4]
[New Thread 1668.0xe8]
warning: 0684) CheckProcessInRegistry: Got include list but no match was
found.
warning: 0684) IsProcessAllowed(D:\cygwin64\home\Angelo\jtest\run\john.exe)
(80004005)
warning: 0684) DllMain(ProcDetach) [OK]
warning: 0684) DSound_Unhook
warning: 0684) MCIWave_Unhook
warning: 0684) AudioClient_Unhook
warning: 0684) CAudioStreamMgr::Shutdown
[New Thread 1668.0x3008]
[New Thread 1668.0x2f74]
[New Thread 1668.0x2cf0]
[New Thread 1668.0xf1c]
[New Thread 1668.0x2cd0]
[New Thread 1668.0x2cc]
[New Thread 1668.0x1fa8]
[New Thread 1668.0xf88]
[New Thread 1668.0x1fdc]
Device 2: GeForce GTX 1050 Ti
Using default input encoding: UTF-8
Loaded 627482 password hashes with 256 different salts (descrypt-opencl,
traditional crypt(3) [DES OpenCL])
[New Thread 1668.0xf18]
[New Thread 1668.0x3360]
[New Thread 1668.0xb5c]
[New Thread 1668.0x192c]
[New Thread 1668.0x2e18]
[New Thread 1668.0x2758]
[New Thread 1668.0x604]
Options used: -I /home/Angelo/jtest/run/kernels -cl-mad-enable -DSM_MAJOR=6
-DSM_MINOR=1 -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=391 -DDEV_VER_MINOR=35 -D_OPENCL_COMPILER
$JOHN/kernels/DES_bs_hash_checking_kernel.cl
Build log: <kernel>:9:10: fatal error: 'opencl_DES_kernel_params.h' file
not found
#include "opencl_DES_kernel_params.h"
^

Error -11 building kernel $JOHN/kernels/DES_bs_hash_checking_kernel.cl.
DEVICE_INFO=524306
OpenCL CL_BUILD_PROGRAM_FAILURE (-11) error in opencl_common.c:1168 -
clBuildProgram failed.
[Thread 1668.0x2e18 exited with code 1]
[Thread 1668.0x2cc exited with code 1]
[Thread 1668.0x604 exited with code 1]
[Thread 1668.0xf88 exited with code 1]
[Thread 1668.0x1fa8 exited with code 1]
[Thread 1668.0x192c exited with code 1]
[Thread 1668.0xf1c exited with code 1]
[Thread 1668.0xf18 exited with code 1]
[Thread 1668.0x1348 exited with code 1]
[Thread 1668.0xa90 exited with code 1]
[Thread 1668.0x3360 exited with code 1]
[Thread 1668.0x2758 exited with code 1]
[Thread 1668.0xb5c exited with code 1]
[Thread 1668.0x1fdc exited with code 1]
[Thread 1668.0x2cf0 exited with code 1]
[Thread 1668.0x2cd0 exited with code 1]
[Thread 1668.0x3008 exited with code 1]
[Thread 1668.0x1fe4 exited with code 1]
[Thread 1668.0x2f74 exited with code 1]
[Inferior 1 (process 1668) exited with code 01]


So i've changed dir to /run/kernels as someone in your wiki suggested and
i've run again, no more no such file found but the same error occurs:

$***@devpc ~/jtest/run/kernels
$ gdb ../john.exe
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ../john.exe...done.
(gdb) --format=descrypt-opencl ../hashes.txt
Undefined command: "--format". Try "help".
(gdb) run ù--format=descrypt-opencl ../hashes.txt
Starting program: /home/Angelo/jtest/run/john.exe ù--format=descrypt-opencl
../hashes.txt
[New Thread 9808.0x2b2c]
[New Thread 9808.0x2c5c]
[New Thread 9808.0x134c]
[New Thread 9808.0x9ac]
[New Thread 9808.0x24b0]
stat: ù--format=descrypt-opencl: No such file or directory
[Thread 9808.0x134c exited with code 1]
[Thread 9808.0x9ac exited with code 1]
[Thread 9808.0x2c5c exited with code 1]
[Inferior 1 (process 9808) exited with code 01]
(gdb) run --format=descrypt-opencl ../hashes.txt
Starting program: /home/Angelo/jtest/run/john.exe --format=descrypt-opencl
../hashes.txt
[New Thread 4644.0x2358]
[New Thread 4644.0x1640]
[New Thread 4644.0x17fc]
[New Thread 4644.0x2c70]
[New Thread 4644.0xe0c]
warning: 1224) CheckProcessInRegistry: Got include list but no match was
found.
warning: 1224) IsProcessAllowed(D:\cygwin64\home\Angelo\jtest\run\john.exe)
(80004005)
warning: 1224) DllMain(ProcDetach) [OK]
warning: 1224) DSound_Unhook
warning: 1224) MCIWave_Unhook
warning: 1224) AudioClient_Unhook
warning: 1224) CAudioStreamMgr::Shutdown
[New Thread 4644.0x2a94]
[New Thread 4644.0x2dc8]
[New Thread 4644.0x24a8]
[New Thread 4644.0x1bf4]
[New Thread 4644.0x1f80]
[New Thread 4644.0x2d44]
[New Thread 4644.0x1a8c]
[New Thread 4644.0xd8c]
[New Thread 4644.0x2b98]
Device 2: GeForce GTX 1050 Ti
Using default input encoding: UTF-8
Loaded 627482 password hashes with 256 different salts (descrypt-opencl,
traditional crypt(3) [DES OpenCL])
[New Thread 4644.0x1d98]
[New Thread 4644.0x2004]
[New Thread 4644.0x934]
[New Thread 4644.0x1e18]
[New Thread 4644.0x1c08]
[New Thread 4644.0x291c]
[New Thread 4644.0x2100]
[New Thread 4644.0x6d4]
Note: This format may be a lot faster with --mask acceleration (see
doc/MASK).
Note: building per-salt kernels. This takes e.g. 2 hours for 4096 salts.
[Thread 4644.0x24a8 exited with code 3584]
[Thread 4644.0xd8c exited with code 3584]
[Thread 4644.0x6d4 exited with code 3584]
[Thread 4644.0x1e18 exited with code 3584]
[Thread 4644.0x2100 exited with code 3584]
[Thread 4644.0x2a94 exited with code 3584]
[Thread 4644.0x2d44 exited with code 3584]
[Thread 4644.0x934 exited with code 3584]
[Thread 4644.0x291c exited with code 3584]
[Thread 4644.0x1640 exited with code 3584]
[Thread 4644.0x2004 exited with code 3584]
[Thread 4644.0x1bf4 exited with code 3584]
[Thread 4644.0x2c70 exited with code 3584]
[Thread 4644.0x2b98 exited with code 3584]
[Thread 4644.0x2dc8 exited with code 3584]
[Thread 4644.0x17fc exited with code 3584]
[Thread 4644.0x1a8c exited with code 3584]
[Thread 4644.0x1f80 exited with code 3584]
[Thread 4644.0x1c08 exited with code 3584]
[Thread 4644.0x1d98 exited with code 3584]
[Inferior 1 (process 4644) exited with code 07000]
Post by timajus .
First of all Happy Easter to both of you and thanks for the help.
Tried with your list and md5crypt: all good!
$ ./john.exe --format=md5crypt-opencl pw-fake-unix
Device 2: GeForce GTX 1050 Ti
Using default input encoding: UTF-8
Loaded 3107 password hashes with 3107 different salts (md5crypt-opencl,
crypt(3) $1$ [MD5 OpenCL])
Press 'q' or Ctrl-C to abort, almost any other key for status
ChangeMe (u1530-md5)
badger (u540-md5)
phantom (u312-md5)
Thunder (u1626-md5)
samIam (u2618-md5)
donkey (u2999-md5)
honda1 (u2162-md5)
thrasher (u2789-md5)
...
3107g 0:00:00:18 DONE 3/3 (2018-04-01 09:42) 165.1g/s 196551p/s 203212c/s
203212C/s lykump3..nigls
Use the "--show" option to display all of the cracked passwords reliably
Session completed
Then
I've commented out the alarm(3) in bt.c , make -s clean && make -sj4
again, started but no difference
$ ./john.exe --format=descrypt-opencl hashes.txt --verbosity=5
initUnicode(UNICODE, UTF-8/ISO-8859-1)
UTF-8 -> UTF-8 -> UTF-8
Device 2: GeForce GTX 1050 Ti
Using default input encoding: UTF-8
Loaded 627482 password hashes with 256 different salts (descrypt-opencl,
traditional crypt(3) [DES OpenCL])
Loaded 6 hashes with 4 different salts to test db from test vectors
Options used: -I ./kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=391 -DDEV_VER_MINOR=35 -D_OPENCL_COMPILER
$JOHN/kernels/DES_bs_hash_checking_kernel.cl
ptxas info : 0 bytes gmem
ptxas info : Compiling entry function 'DES_bs_cmp' for 'sm_61'
ptxas info : Function properties for DES_bs_cmp
ptxas . 0 bytes stack frame, 0 bytes spill stores, 0 bytes
spill loads
ptxas info : Used 141 registers, 392 bytes cmem[0], 48 bytes cmem[2]
ptxas info : Compiling entry function 'DES_bs_cmp_high' for 'sm_61'
ptxas info : Function properties for DES_bs_cmp_high
ptxas . 256 bytes stack frame, 0 bytes spill stores, 0 bytes
spill loads
ptxas info : Used 32 registers, 392 bytes cmem[0], 48 bytes cmem[2]
Options used: -I ./kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=391 -DDEV_VER_MINOR=35 -D_OPENCL_COMPILER -D ITER_COUNT=1
-D MASK_ENABLED=0 -D LOC_0=-1 -D LOC_1=-1 -D LOC_2=-1 -D LOC_3=-1 -D
IS_STATIC_GPU_MASK=0 -D CONST_CACHE_SIZE=65536
$JOHN/kernels/DES_bs_finalize_keys_kernel.cl
ptxas info : 0 bytes gmem
ptxas info : Compiling entry function 'DES_bs_finalize_keys' for 'sm_61'
ptxas info : Function properties for DES_bs_finalize_keys
ptxas . 0 bytes stack frame, 0 bytes spill stores, 0 bytes
spill loads
ptxas info : Used 32 registers, 352 bytes cmem[0], 24 bytes cmem[2]
Options used: -I ./kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=391 -DDEV_VER_MINOR=35 -D_OPENCL_COMPILER -D
WORK_GROUP_SIZE=0 -D index0=31 -D index1=16 -D index2=17 -D index3=18 -D
index4=3 -D index5=4 -D index6=3 -D index7=20 -D index8=21 -D index9=22 -D
index10=7 -D index11=8 -D index24=15 -D index25=0 -D index26=1 -D index27=2
-D index28=19 -D index29=20 -D index30=19 -D index31=4 -D index32=5 -D
index33=6 -D index34=23 -D index35=24 -D index48=63 -D index49=48 -D
index50=49 -D index51=50 -D index52=35 -D index53=36 -D index54=35 -D
index55=52 -D index56=53 -D index57=54 -D index58=39 -D index59=40 -D
index72=47 -D index73=32 -D index74=33 -D index75=34 -D index76=51 -D
index77=52 -D index78=51 -D index79=36 -D index80=37 -D index81=38 -D
index82=55 -D index83=56 $JOHN/kernels/DES_bs_kernel_h.cl
ptxas info : 0 bytes gmem
ptxas info : Compiling entry function 'DES_bs_25' for 'sm_61'
ptxas info : Function properties for DES_bs_25
ptxas . 0 bytes stack frame, 0 bytes spill stores, 0 bytes
spill loads
ptxas info : Used 236 registers, 344 bytes cmem[0]
Salt compiled from Source:910
GWS: 1048576, LWS: 128
Salt compiled from Binary:910
Salt compiled from Binary:2275
Salt compiled from Binary:990
Salt compiled from Binary:0
Updated internal tables and buffers for salt 910.
Updated internal tables and buffers for salt 2275.
Updated internal tables and buffers for salt 990.
Updated internal tables and buffers for salt 0.
Note: This format may be a lot faster with --mask acceleration (see
doc/MASK).
Options used: -I ./kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=391 -DDEV_VER_MINOR=35 -D_OPENCL_COMPILER
$JOHN/kernels/DES_bs_hash_checking_kernel.cl
Options used: -I ./kernels -cl-mad-enable -DSM_MAJOR=6 -DSM_MINOR=1
-cl-nv-verbose -D__GPU__ -DDEVICE_INFO=524306 -DSIZEOF_SIZE_T=8
-DDEV_VER_MAJOR=391 -DDEV_VER_MINOR=35 -D_OPENCL_COMPILER -D ITER_COUNT=1
-D MASK_ENABLED=0 -D LOC_0=-1 -D LOC_1=-1 -D LOC_2=-1 -D LOC_3=-1 -D
IS_STATIC_GPU_MASK=0 -D CONST_CACHE_SIZE=65536
$JOHN/kernels/DES_bs_finalize_keys_kernel.cl
Note: building per-salt kernels. This takes e.g. 2 hours for 4096 salts.
Salt compiled from Binary:258
Salt compiled from Binary:514
Alarm clock
Hope magnum would have some spare time to investigate.
Thank you again!
Tim
Post by magnum
Post by Solar Designer
I was hoping someone else would reply, but since no one did yet let me
I didn't really have a good idea and I don't touch Windows...
Post by Solar Designer
Post by timajus .
Alarm clock
$ echo $?
142
This looks like an incompatibility of our code with Cygwin, and in
particular I suspect the uses of the alarm timer in bt.c, which is
probably invoked by a call to create_perfect_hash_table() from
opencl_DES_bs_plug.c. You may try to comment out or delete the
"alarm(3);" line in bt.c (currently line 396).
...but this sounds totally plausible! I will have look at that soon.
magnum
magnum
2018-04-01 11:13:11 UTC
Permalink
Post by timajus .
i've tried also with gdb (maybe those test could help magnum...at least i
hope so)
(...)
So i've changed dir to /run/kernels as someone in your wiki suggested and
(...)
$ gdb ../john.exe
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
<http://www.gnu.org/software/gdb/bugs/>.
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ../john.exe...done.
(gdb) --format=descrypt-opencl ../hashes.txt
Undefined command: "--format". Try "help".
(gdb) run ù--format=descrypt-opencl ../hashes.txt
Starting program: /home/Angelo/jtest/run/john.exe ù--format=descrypt-opencl
../hashes.txt
[New Thread 9808.0x2b2c]
[New Thread 9808.0x2c5c]
[New Thread 9808.0x134c]
[New Thread 9808.0x9ac]
[New Thread 9808.0x24b0]
stat: ù--format=descrypt-opencl: No such file or directory
A spurious character ruined that run, please try again!

If you have a GitHub account you may add info to
https://github.com/magnumripper/JohnTheRipper/issues/3226 instead of here.

magnum
timajus .
2018-04-01 14:04:19 UTC
Permalink
Hello magnum,
thanks for having time to read. i've investigated a bit and found where the
Alarm clock is raised.

Added info @ github.
Thanks
Post by magnum
Post by timajus .
i've tried also with gdb (maybe those test could help magnum...at least i
hope so)
(...)
So i've changed dir to /run/kernels as someone in your wiki suggested and
(...)
$ gdb ../john.exe
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.h
tml
Post by timajus .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
<http://www.gnu.org/software/gdb/bugs/>.
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ../john.exe...done.
(gdb) --format=descrypt-opencl ../hashes.txt
Undefined command: "--format". Try "help".
(gdb) run ù--format=descrypt-opencl ../hashes.txt
Starting program: /home/Angelo/jtest/run/john.exe
ù--format=descrypt-opencl
../hashes.txt
[New Thread 9808.0x2b2c]
[New Thread 9808.0x2c5c]
[New Thread 9808.0x134c]
[New Thread 9808.0x9ac]
[New Thread 9808.0x24b0]
stat: ù--format=descrypt-opencl: No such file or directory
A spurious character ruined that run, please try again!
If you have a GitHub account you may add info to
https://github.com/magnumripper/JohnTheRipper/issues/3226 instead of here.
magnum
timajus .
2018-04-03 13:23:05 UTC
Permalink
Thank you very much @magnum and @Solar for the support. The problem is now
fixed in current git and all is good! Thanks again!
Post by timajus .
Hello magnum,
thanks for having time to read. i've investigated a bit and found where
the Alarm clock is raised.
Thanks
Post by magnum
Post by timajus .
i've tried also with gdb (maybe those test could help magnum...at least i
hope so)
(...)
So i've changed dir to /run/kernels as someone in your wiki suggested and
(...)
$ gdb ../john.exe
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html
Post by timajus .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
<http://www.gnu.org/software/gdb/bugs/>.
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ../john.exe...done.
(gdb) --format=descrypt-opencl ../hashes.txt
Undefined command: "--format". Try "help".
(gdb) run ù--format=descrypt-opencl ../hashes.txt
Starting program: /home/Angelo/jtest/run/john.exe
ù--format=descrypt-opencl
../hashes.txt
[New Thread 9808.0x2b2c]
[New Thread 9808.0x2c5c]
[New Thread 9808.0x134c]
[New Thread 9808.0x9ac]
[New Thread 9808.0x24b0]
stat: ù--format=descrypt-opencl: No such file or directory
A spurious character ruined that run, please try again!
If you have a GitHub account you may add info to
https://github.com/magnumripper/JohnTheRipper/issues/3226 instead of here.
magnum
Loading...