Converting Salt to HEX?
#1
Hello Friends, 

Can someone point me in the direction of info relating to converting Salts to HEX?

I have a few databases that contain salts with special characters such as ":" and I would like to convert them to HEX, for input into Hashcat. I'm ultimately trying to navigate away from all the mess associated with ":" and other mistaken delimiters. I have been trying find info on the wiki with no luck. 
I did learn about the output formats, which seems helpful to convert the plain to HEX, but I didnt see one that works for outputting HEX salts?
I also looked into the "--hex-salt" flag, but if I'm correct, that is for salts that have already been converted (that's how it worked for me anyway).
I was able to find a function in Notepad++ that converts the ASCI salts into HEX, but not on a mass level, I'd have to go line by line. 
There must be a python script out there that someone has written for this right? What am i missing?

Thanks for any insight, and sorry for any headaches!

-foxx
Reply
#2
Hashcat already natively supports delimiters within salts, however, if you really want to hex your salts, I made a quick and dirty Python3 script for ya.
https://github.com/PenguinKeeper7/Helpfu...hexSalt.py

> cat hashes.txt
Hash:Salt
Hash2:Sa:lt2
Hash3:Sa:l:t3

> python3 hexSalt.py hashes.txt outfile.txt

> cat outfile.txt
Hash:53616c74
Hash2:53613a6c7432
Hash3:53613a6c3a7433
Reply
#3
(04-30-2021, 02:33 AM)penguinkeeper Wrote: Hashcat already natively supports delimiters within salts, however, if you really want to hex your salts, I made a quick and dirty Python3 script for ya.
https://github.com/PenguinKeeper7/Helpfu...hexSalt.py

> cat hashes.txt
Hash:Salt
Hash2:Sa:lt2
Hash3:Sa:l:t3

> python3 hexSalt.py hashes.txt outfile.txt

> cat outfile.txt
Hash:53616c74
Hash2:53613a6c7432
Hash3:53613a6c3a7433

Wow, thank you, I will definitely put this script to good use! Very much appreciated. 

Could you maybe clarify some of my confusion about the "--hex-salt" command? As you mentioned, since hashcat already supports delimiters within salts, why would someone find the  "--hex-salt" flag useful? At some point the "--hex-salt" flag must have been created because salts were "hexed" at some point right? Or was it created just in case a database stores salts in hex?

Thanks for your patience and any insight, I realize this may be a very noob level question.
Reply