I'm interested in creating a hash cracker in C++. Is it possible? And if so, how would I go about doing it? I'm uneducated and self taught but very good at research.
Thanks in advance.
Thanks in advance.
|
C
C++ Hash Cracker |
(May 11, 2019 12:31 PM)Ex Nihilo Wrote: I'm interested in creating a hash cracker in C++. Is it possible? And if so, how would I go about doing it? I'm uneducated and self taught but very good at research. what kind of hashes?
http://sunjester.rf.gd - proxies, logins, scanner results
(May 11, 2019 01:05 PM)realsunjester Wrote: what kind of hashes? MD5 preferably.
May 11, 2019 10:19 PM
(This post was last modified: May 11, 2019 10:19 PM by Faith Connors.)
(May 11, 2019 02:33 PM)Ex Nihilo Wrote: MD5 preferably. so now you have a few options: Code -- find a hashing algo implementation in ur language of choice online (which is also limited to arch) and use that for your hash cracker (cpu based/single thread)
humble rubyist in a world of pythonistas
I think that you can easily start off with something that does a simple dictionary-style attack on an MD5 hash using a big word list.
In very easy-to-follow terms, you start with an MD5 hash you want to crack. We'll hardcore it for now as a string (char * hash = "MD5_hash_goes_here";) Next, you'll find a C++ function that can generate MD5 hashes given a word of some sort, say the word "muffins". The function will take in the word "muffins" and spit out the MD5 hash for that word. Remember the MD5 we want to crack? We'll use it now by comparing it to the MD5 hash we just generated for the word "muffins." If the two hashes match, we've cracked our hash. If not, it isn't a match and we need to try another word besides "muffins." Now imagine you have a big file full of words like "muffins" "pizza", and all sorts of other shit like that. You'd open() up the file and read() one word at a time into a character array (char). Now you have the word in the form of a string, so you send the string to your MD5-hash-generating function and compare the hash you get back to the known MD5 hash you're trying to crack. You'd create an while loop like while(read(file_descriptor_from_open, size_of_buffer, memory_address_of_buffer) != EOF) { char hash_buffer[some_size]; crypt_func(memory_address_of_hash_buffer, MD5_or_whatever_the_hell); if (strcmp(hash_buffer, hash) == 0) { break; } } I'm high right now, so I know this shit is rough, but I hope you get the gist of it. Multithreading and all that shit is great, and useful in those application, but if you're just learning, something really simple like this can go a long way. (May 13, 2019 11:33 PM)pelayo Wrote: I think that you can easily start off with something that does a simple dictionary-style attack on an MD5 hash using a big word list. Damn you're a genius even when high. That helped tremendously, thank you. (May 14, 2019 01:11 PM)Ex Nihilo Wrote: Damn you're a genius even when high. That helped tremendously, thank you. I'm no genius, my friend, but I am glad that I was able to help you in some way. If you have any followup questions, I'd be happy to answer them for you. I'm no expert when it comes to creating hash-cracking programs, but I like to think about how things are done because learning is fun and rewarding. I know a bit about systems programming in a *nix environment, so if that's what you're developing on, I can help out a lot more with that. 🎉 Best |
|
|
| Possibly Related Threads... | |||
| Thread / Author | Replies | Views | Last Post |
| [Python] by bhop_alexNov 13, 2016 05:46 AM | 8 | 326 |
Nov 13, 2016 05:46 AM Last Post: 0xBD |
| [Python] by LambasoftOct 19, 2015 01:10 AM | 2 | 417 |
Oct 19, 2015 01:10 AM Last Post: Lambasoft |
| [Shell] by BuxableJun 11, 2014 10:41 AM | 15 | 702 |
Jun 11, 2014 10:41 AM Last Post: Buxable |