0

I have created a custom dynamic hash function comprised of a series of different existing hash functions chained together. I'll spare you the exact details because it's for a class assignment.

I've created a dynamic hash function in a John the Ripper (1.9.0-jumbo-1-win64) .conf file. I labeled it 'dynamic_2015' like so

[List.Generic:dynamic_2015]
Expression=Jack's Crazy Hash
Func=DynamicFunc__clean_input
...

My dynamic function has no syntax errors (seen because I can run .\john.exe --list=subformats no problem). It shows up as it's own dynamic function: UserFormat = dynamic_2015 type = dynamic_2015: Jack's Crazy Hash

I've been searching around for hours for the correct way to now actually use my dynamic function, or any dynamic function for that matter. I know this might sound like a stupid question, but every resource I have found seems to be outdated, because all suggestions don't allow me to even choose an already existing dynamic hash function. Any help is greatly appreciated!

Here is a sample password and corresponding hashed password:

d99f2d9017739aee0c12ac7812b748c7e67c7165a008310f659ae790df048299196fbab9ffc722000fdcd69c02b6b2f864349539152f651fa65850ab20039032:adam

Here are some of the commands I've tried:

PS C:\Users\Jack\Downloads\john-1.9.0-jumbo-1-win64\run> cat custompass.txt
jack:$dynamic_2015$d99f2d9017739aee0c12ac7812b748c7e67c7165a008310f659ae790df048299196fbab9ffc722000fdcd69c02b6b2f864349539152f651fa65850ab20039032

PS C:\Users\Jack\Downloads\john-1.9.0-jumbo-1-win64\run> .\john.exe --format=dynamic --subformat=dynamic_2015 custompass.txt
Error, Invalid signature line trying to link to dynamic format.
Original format=as400-ssha1
Signature line=$dynamic_1590$4C106E52CA196986E1C52C7FCD02AF046B76C73C$HEX$0052004f00420020002000200020002000200020

PS C:\Users\Jack\Downloads\john-1.9.0-jumbo-1-win64\run> .\john.exe --subformat=dynamic_2015 custompass.txt
Using default input encoding: UTF-8
No password hashes loaded (see FAQ)

PS C:\Users\Jack\Downloads\john-1.9.0-jumbo-1-win64\run> cat custompass.txt
jack:d99f2d9017739aee0c12ac7812b748c7e67c7165a008310f659ae790df048299196fbab9ffc722000fdcd69c02b6b2f864349539152f651fa65850ab20039032

PS C:\Users\Jack\Downloads\john-1.9.0-jumbo-1-win64\run> .\john.exe --subformat=dynamic_2015 custompass.txt
Warning: detected hash type "leet", but the string is also recognized as "Raw-SHA512"
Use the "--format=Raw-SHA512" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "Raw-Blake2"
Use the "--format=Raw-Blake2" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "Raw-Keccak"
Use the "--format=Raw-Keccak" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "Raw-SHA3"
Use the "--format=Raw-SHA3" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "skein-512"
Use the "--format=skein-512" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "Stribog-512"
Use the "--format=Stribog-512" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "whirlpool"
Use the "--format=whirlpool" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "whirlpool0"
Use the "--format=whirlpool0" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "whirlpool1"
Use the "--format=whirlpool1" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "raw-SHA512-free-opencl"
Use the "--format=raw-SHA512-free-opencl" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "raw-SHA512-opencl"
Use the "--format=raw-SHA512-opencl" option to force loading these as that type instead
Using default input encoding: UTF-8
Loaded 1 password hash (leet [SHA-512(256/256 AVX2 4x) + Whirlpool(OpenSSL/64)])
Will run 20 OpenMP threads
Proceeding with single, rules:Single
Press 'q' or Ctrl-C to abort, almost any other key for status
Warning: Only 62 candidates buffered for the current salt, minimum 80 needed for performance.
Warning: Only 71 candidates buffered for the current salt, minimum 80 needed for performance.
Almost done: Processing the remaining buffered candidate passwords, if any.
Warning: Only 56 candidates buffered for the current salt, minimum 80 needed for performance.
Proceeding with wordlist:/run/password.lst, rules:Wordlist
Proceeding with incremental:ASCII
0g 0:00:00:08  3/3 0g/s 265078p/s 265078c/s 265078C/s cytans..boyotena
Session aborted

As you can see, I tried two different formats for the password file. The very last command got as far as to recognize the password but then decided to ignore my subformat=dynamic_2015 and attempt some other hash function. This behavior stays the same for any other dynamic function that exists.

PS C:\Users\Jack\Downloads\john-1.9.0-jumbo-1-win64\run> .\john.exe --subformat=dynamic_1 custompass.txt
Warning: detected hash type "leet", but the string is also recognized as "Raw-SHA512"
Use the "--format=Raw-SHA512" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "Raw-Blake2"
Use the "--format=Raw-Blake2" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "Raw-Keccak"
Use the "--format=Raw-Keccak" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "Raw-SHA3"
Use the "--format=Raw-SHA3" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "skein-512"
Use the "--format=skein-512" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "Stribog-512"
Use the "--format=Stribog-512" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "whirlpool"
Use the "--format=whirlpool" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "whirlpool0"
Use the "--format=whirlpool0" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "whirlpool1"
Use the "--format=whirlpool1" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "raw-SHA512-free-opencl"
Use the "--format=raw-SHA512-free-opencl" option to force loading these as that type instead
Warning: detected hash type "leet", but the string is also recognized as "raw-SHA512-opencl"
Use the "--format=raw-SHA512-opencl" option to force loading these as that type instead
Using default input encoding: UTF-8
Loaded 1 password hash (leet [SHA-512(256/256 AVX2 4x) + Whirlpool(OpenSSL/64)])
Will run 20 OpenMP threads
Proceeding with single, rules:Single
Press 'q' or Ctrl-C to abort, almost any other key for status
Warning: Only 62 candidates buffered for the current salt, minimum 80 needed for performance.
Warning: Only 71 candidates buffered for the current salt, minimum 80 needed for performance.
Almost done: Processing the remaining buffered candidate passwords, if any.
Warning: Only 56 candidates buffered for the current salt, minimum 80 needed for performance.
Proceeding with wordlist:/run/password.lst, rules:Wordlist
Proceeding with incremental:ASCII
0g 0:00:00:05  3/3 0g/s 28814p/s 28814c/s 28814C/s 123456
Session aborted

Adding more commands tried (both 1500 and 2015 do not try to hash passwords)

PS C:\Users\Jack\Downloads\john-1.9.0-jumbo-1-win64\run> .\john.exe --format=dynamic_1500 custompass.txt
Unknown ciphertext format name requested
PS C:\Users\Jack\Downloads\john-1.9.0-jumbo-1-win64\run> .\john.exe --format=dynamic_2015 custompass.txt
Using default input encoding: UTF-8
No password hashes loaded (see FAQ)

To summarize in one question: how do I force John to use my dynamic function, or any dynamic function?

  • Can confirm that I tried it, didn't work. – Jack F. Nov 5 '19 at 20:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.