Custom Hashing Algorithms
#1
So I have a bunch of hashes made with
md5(sha1(md5(sha1(sha1(hash('sha512',"password"))))))

Wouldn't it be awesome if you could create a custom file with 1 hash type and make it yourself using existing methods

0(100(100(100(100($hash)$salt)))) for example would be md5(sha1(sha1(sha1(sha1($hash)$salt))))

Something like this for example.
#2
You are correct, that would be cool to have in hashcat. And John the Ripper actually already has such functionality on CPU (see doc/DYNAMIC), but not GPU.

I actually started work on a project a couple years ago that implements dynamic formats on both CPU and GPU via OpenCL, in hopes that a fair amount of GPU acceleration might be gained from such algorithms (basically compiling a custom scripting language down to OpenCL.) I've been contemplating reviving development on it, but I don't really have much spare time these days. But I recently encountered a custom algorithm that made me start thinking about this project again. So maybe all I really need is a bit of motivation to finish it. Maybe atom will allow me to release it as a hashcat product called "dynacat" or something Tongue
#3
Good idea, EGB already has something like this implemented IIRC.
#4
On CPU or GPU (or both)?
#5
I never heard of the GPU one but HashManager (CPU) has it implemented already. Not sure if it's support SHA512 but MD5 and SHA-1, yes.
#6
I'm not a friend of dynamic hash modes. It can be done pretty easy on CPU but on GPU I think there is alot of overhead caused by branches and kernel code size. But the real reason is that I think it's simply not worth the effort.
#7
Welp, there's my motivation right there Tongue

I'M GONNA PROVE YOU WRONG, JENS! Smile
#8
(04-22-2015, 09:52 PM)epixoip Wrote: On CPU or GPU (or both)?
Ah, now I remember, it's not EGB, it's HM, so it's CPU only.
#9
(04-24-2015, 01:49 AM)atom Wrote: I'm not a friend of dynamic hash modes. It can be done pretty easy on CPU but on GPU I think there is alot of overhead caused by branches and kernel code size. But the real reason is that I think it's simply not worth the effort.

You don't have to use it. The main functionality is if you come across a hash function that you know the algorithm off but it's not in the list.
Since it's a unique case, there's no point in asking it to be added to hashcat.
So this would allow a lot more functionality & customization.
It shouldn't have any downsides either.
#10
It has downsides, because from programming view (basically such an idea is not compatible with GPGPU) it will slow down the cracking speed to a point where there is no more acceleration due to using GPU. In other words, you can stick to CPU based cracking if you want such a feature. But then it makes no more sense to add it to oclHashcat.