newbie needs help with special characters
#1
Hello everyone,

I'm new to hashcat and I'm using it for solving a geocaching riddle. I'm using HashcatGUI and I have no problems in decrypting the hashes of letters and numbers and the standard special characters. The usage of the mask is no problem, as long as I can go with ?l, ?d,?s.

But I need to add the degree sign "°" (example N50° 20.123 E10° 30.456) and I cannot get it done. I've tried to add it to a hcchr-file in Charset2 and then use ?2, but it didn't work. I'm quite sure it's a stupid question and a very easy thing for a hashcat-veteran, but maybe you give me a hint what to do. Thanks a lot.
Reply
#2
well, that character is (depending on the encoding etc, but most likely) a multi-byte character (see https://en.wikipedia.org/wiki/Degree_symbol and https://www.utf8-chartable.de/ etc).

in utf8, I think your specific character is 0xc2b0 (see c2 b0 in that utf8-chartable). That means that hashcat needs to crack it as 2 separate characters/bytes.

you can use them directly in a mask with --hex-charset e.g. hashcat -m 0 -a 3 -w 3 -O hashes.txt ?d?d?d?dc2b0?d?d?d

but this means you need to know the exact position of both bytes (the first is 0xc2 , followed by the second one 0xb0).

Alternatively, you could also use hcmask files and have several mask within the hashcat mask file with different positions of both 0xc2 followed by 0xb0


Of course, there is also the possibility that a slightly different char and different encoding is used, but I guess 0xc2b0 and utf-8 encoding is the most educated and best guess. I hope this explains what the challenge and "problem" with multi-byte characters could be when using mask attacks etc

btw: even if you use --custom-charset1 to --custom-charset4 (or short -1 to -4), you need to add both/two chars to your mastk, e.g. --hex-charset --custom-charset3 c2b0 hash.txt ?d?d?d?3?3?d?d?d
(note that there are 2 positions, twice ?3 , in that specific mask, because the char itself is a multi-byte character). I hope this explains why your attempt with a custom charset didn't work with a single byte usage within the mask
Reply
#3
wow phil, thanks a lot for the long and detailed answer. now i have an idea how to proceed and will try it out soon.
Reply