Expected bcrypt input format and terminal input
#4
(10-02-2022, 02:24 PM)b8vr Wrote: If you put the hash inside quotes, you would be fine doing this in commandline:

hashcat -m 3200 -a 0 -O "$2a$05$LhayLxezLhK1LhWvKxCyLOj0j1u.Kj0jZ0pEmm134uzrQlFvQJLF6" ./wordlist

A correct formatted bcrypt does not contain Confusedomething; in the end, so remove that. That's why you get separator unmatched. So everything after the first : should be removed, including the : itself.

If you want to try with the exact password, you can do

hashcat -m 3200 -a 3 "$2a$05$LhayLxezLhK1LhWvKxCyLOj0j1u.Kj0jZ0pEmm134uzrQlFvQJLF6" password

If you want to try with a list of words with size limits, you can use an inline rule like this:

hashcat -m 3200 -a 0 "$2a$05$LhayLxezLhK1LhWvKxCyLOj0j1u.Kj0jZ0pEmm134uzrQlFvQJLF6" ./wordlist -j >8

where >8 means try words greater than 8 chars. Be aware that sizes are given as 0-9 and a-z if bigger than 9.

See also hashcat --help
You should ever put the hash value in a single quote not in double quote, because on Linux/Bash/Zsh everything that starts with dollar sign like $2a,$05 or $Lh... is a name for local variable. And if it's not defined, it will be empty. Just try it out with: echo "$2a$05$LhayLxezLhK1LhWvKxCyLOj0j1u.Kj0jZ0pEmm134uzrQlFvQJLF6" and you will get ... 'a.Kj0jZ0pEmm134uzrQlFvQJLF6'
In double quoted strings, the local variables will be replaced with their value, in contrast to single quoted strings, where they will not be replaced. Quick test: 1='double quote'; echo "$1" vs 1=''single quote'; echo '$1'
Reply


Messages In This Thread
RE: Expected bcrypt input format and terminal input - by dfns - 10-02-2022, 08:37 PM