MS office 2013 Hash algo in python
#1
Does anyone know if there exists a python script to take a password and output the MS office 2013 hash of that password? I couldn't find one and was bored and trying to make a password cracker but couldn't figure out how MS office 2013 hashes passwords. I get the hash from office2john. Sorry if this question is silly but I found libraries for seemingly every hashing algorithm but cant find one for the one Im playing with. I know it is built into hashcat but I like to reinvent the wheel in a most likely less efficient but somehow still personally rewarding way.Thank you
Reply
#2
Well, the most suitable answer would be just read the kernel's source code (of e.g. -m 9600) and convert it to python (that may also - be the only thing that - help to get an idea about the optimizations used by hashcat etc).

Otherwise, it is also always good to stick to the specs and public documents about the hashing algorithm used by office 2013 documents (the source that was also used to implement the format into hashcat).

But there exist even a more "understandable" hashing algorithm description in terms of source code within hashcat and that thing being: the test.pl implementation!
see https://github.com/hashcat/hashcat/blob/...5725-L5791
well it is a perl implementation, but this can very easily converted 1:1 to python (by just considering/changing the little differences that the two languages have). Also, why use python if you have a perl implementation Wink (I'm just kidding, there might be reasons for that, I guess)
Reply
#3
Thanx, I guess I'll learn Pearl and translate it or just switch to Pearl. Doesn't seem to bad, I was just horrified that it would be something too complicated( I'm neither a great programmer nor a great information theorist so I was really hoping for the easy way out). Anyway thanx again for the link to the source code.
Reply