Sinisterly
how to Brute Force MD5 - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Java, JVM, & JRE (https://sinister.ly/Forum-Java-JVM-JRE)
+--- Thread: how to Brute Force MD5 (/Thread-how-to-Brute-Force-MD5)

Pages: 1 2


how to Brute Force MD5 - Mr.Kurd - 07-26-2016

In The Name Of Allah

Salam Alekum Hi guys ,
I'm programming tools for encode and decode MD5 string with java language but know i don't know how to Brute Force MD5 string i need your help to complete my tools.
i maked TextArea with name (t) so we put MD5 Hash there and i maked command with name decode to click and burteforce hash , Can any one help me to completing my tools.
Waiting You


RE: how to Brute Force MD5 - Ex094 - 07-26-2016

Wasalam, MD5 is a hashing Algorithm, you can't revert it (i.e get the original value) It's not an encryption. The easiest way to crack MD5 is to launch a dictionary attack, pick each word from your dictionary and convert it into an MD5 hash then compare it with your original hash. A match means you have a word in your dictionary that maps to your hash and is indeed your original string that you want.

Check it out here on how to generate a MD5 hash in Java http://stackoverflow.com/questions/415953/how-can-i-generate-an-md5-hash

PSEUDO CODE for your program:
Code:
hash_to_crack = textbox_value_here
for each word in the dictionary:
      hash = convert_word_to_md5_hash()
       if hash matches has_to_crack:
              display to the user that the cracked string is: word
              break the loop
       else keep on matching till the dictionary ends or a valid match is found



RE: how to Brute Force MD5 - Skullmeat - 07-26-2016

Exactly. In the malware research business we use MD5 to check against known safe/good files. It's not fullproof, but it helps.


RE: how to Brute Force MD5 - Mr.Kurd - 07-26-2016

ok ok i know that hash don't reverse i wan't do that you typed it but i don't know how i code it with java.
[code]
hash_to_crack = textbox_value_here
for each word in the dictionary:
hash = convert_word_to_md5_hash()
if hash matches has_to_crack:
display to the user that the cracked string is: word
break the loop
else keep on matching till the dictionary ends or a valid match is found[code]

i'm don't know how to type a code like you say
ihave wordlist in text box like this :
1
2
3
But how i call java to hashing all of him and know what of him matching the hash and show the user that this word is right.
i tired you but i need it .


RE: how to Brute Force MD5 - Ex094 - 07-26-2016

Bruuuh, I just gave you the program logic. Just start converting the pieces into code like for

Code:
hash_to_crack = textbox_value_here

In Java code it translates to:

Code:
String hashToCrack = JTextField.getText();

And so on.. Come on if you have done programming in Java it won't be that hard, otherwise you haven't done Java, I suggest you learn that language first then proceed to this task. I can help you on the way Smile

BTW Look into my JavaFX series in this section for GUI


RE: how to Brute Force MD5 - Mr.Kurd - 07-26-2016

hhhhhhhhhhhh man i know do this and i'm good at java but some of this i dk.
i complete this steps i'm not beginner.
my english isn't so good so sorry for my ohh i forget a word..

You Work on NetBeans ... if you , i send you a source code of program.


RE: how to Brute Force MD5 - Ex094 - 07-26-2016

In the GUI you must have a button in order to select the wordlist, now when the user selects the wordlist just read that file.

For Reading/Writing: https://docs.oracle.com/javase/tutorial/essential/io/file.html

Now for the compare part:

Code:
try (BufferedReader reader = Files.newBufferedReader(file, charset)) {
    String line = null;
    while ((line = reader.readLine()) != null) {
        String hash = md5(line); //Use some library for MD5 conversion
        if(hash == hashToCrack) {
               System.out.println("Found a possible match! Word is: " + line);
               break;
        }
    }
} catch (IOException x) {
    System.err.format("IOException: %s%n", x);
}

Java Docs are your friend dude, use em. Plus Stack Overflow too


RE: how to Brute Force MD5 - Mr.Kurd - 07-26-2016

you use NetBeans Or Not...


RE: how to Brute Force MD5 - Ex094 - 07-26-2016

Only when I'm doing JavaFX


RE: how to Brute Force MD5 - Mr.Kurd - 07-26-2016

I have Some work i should go but i send you source cod of program.

I sent It So goodby to i back
Wasalam Alekum
Thank For Your Help Teacher.