-2

I was exploiting a web application for my lab and I found these hashes

B8qE6WbhBO1F53Cjj+O42TbczyFFqrWpG+BcfS70piQQiI2yASVRfhBiLRtIEU7PxdprFtkzDVLeVxfL7z5vTQ==

8NxO3RXifKUPNw9f7jjp9T6TA8UePPK5jn6QdoPTgEkOElVdNSAG8xp2Y/xJJ/dlCcOLxaYIEbE0n/1onvyAlA==

I have read the answers that we can't identify a hash type because of randomness but I wanted to know if it is possible to guess based on some properties, on the first look this looks like base 64 encoding(because of padding and + and / signs) but its some binary data if I decode it. So if it is a hash why is it base 64 encoded and if decoded why is it binary data and not some hash

I am very confused

1 Answers1

1

Hash functions operate on, and return, binary data. You are accustomed to seeing hashes in hex format I assume. This is simply to make the binary data readable. Another commonly used format is base64, like your hashes above.

The reason you get binary data when decoding is because the result of hashing is binary data. Likewise, decoding hex or base64 will always give binary data. Always. It may be the case that the decoded binary data is a perfect UTF8 string, but it is still binary data.

Additionally, note that when decoding the base64, the length of the binary data is 64 bytes. This means it is possible, but by no means definite, that the hashes are SHA512 hashes.

Luke Joshua Park
  • 9,527
  • 5
  • 27
  • 44