5 ms·
The hash is merely a CRC32; exactly this one (polynomial 0x77073096, code is wrong) https://web.mit.edu/freebsd/head/sys/libkern/crc32.c https://web.mit.edu/fr
by SideQuark 2y ago
The hash is merely a CRC32; exactly this one (polynomial 0x77073096, code is wrong)
https://web.mit.edu/freebsd/head/sys/libkern/crc32.c https://web.mit.edu/freebsd/head/sys/libkern/crc32.c
(The decoded ints in the post are the constants in this CRC32).
Knowing it's a CRC32 and knowing the polynomial allows inverting the answers in log time instead of exponential time by exploiting the modular math of the polynomial rings.
- byteknight 2y agoI know some of these words!
- Thaxll 2y agoIt means that using bruteforce to find all the values would be much faster.
- dankwizard 2y agoBut OP did Brute Force?
- bbayles 2y agoThanks! I didn't clock that - should have looked at the decrypted values!
- mirthflat83 2y agoDo you have any tips on knowing how the value is a result of CRC32 and/or the polynomial/initial value used?
- 15155 2y agoLooking in the binary for the polynomial and knowing what the common ones are from experience is an easy way. Normally, the polynomial is going to be found right next to a loop that is ingesting bytes incrementally.
- SideQuark 2y agoThe polynomial is not present in the binary. The table was obfuscated so this approach will not work here (and it's pretty common to do this specifically to stop such a simply look at the bytes in a binary).
- SideQuark 2y agoIn this example, the "encrypted data" is xored with the key 4 bytes at a time. The first 4 bytes in the data are the same as the key. For the next 4 and you get the constant I posted above. Plug into Google, find where it is often found, decide rest of table, see it matches. I've learned programmers either invent their own hashes, random number generators, and crypto, in which case I usually break them, or they reuse existing algos, in which any code constants are searchable. Plus I've written and reversed enough of all that I recognized the loop as a CRC polynomial remainder loop. All Crc-n algos are trivially crackable/reversible/collideable. They're a remainder on division of polynomials (learn the math on how they work), so use the polynomial equivalent of extended euclidean algo and you get one answer. Now all sufficient multiples of that mod class give all possible answers, one at a time. That should give you plenty to chase through
- 93po 2y agoIs it possible to learn this power?
- TheAdamist 2y agoBinwalk claims to recognize crc polynomial tables i wonder if it could find this one. Also someone needs to integrate binwalk & ghidra, they synergize too much.
- SideQuark 2y agoBinwalk wouldn't find it. The constants were xored with a value so they wouldn't show up in the binary