PDA

View Full Version : D4rk-cracker : A md5 cracker in python



D4rk357
11-13-2010, 02:36 PM
This is my second code in python .. i have worked upon handling unexpected requests and a good format in which the information will be printed .
This tool can easily be expanded by adding more online md5 crack resources .


#!/usr/bin/python

# D4rk-cracker-- A small python code for MD5 cracking
# Coded By D4rk357[2010]


import urllib,urllib2, re,sys,cookielib
from socket import*

if len(sys.argv) != 2:
print "\n|-----------------------------------------------------------------|"
print "| lastman100[@]gmail[dot]com |"
print "| 10/2010 MD 5 Cracker v0.1 |"
print "| Visit : www.garage4hackers.com |"
print "|-----------------------------------------------------------------|\n"

mhash= raw_input('please enter the hash to crack :')
params = urllib.urlencode({'term':mhash})
f=urllib.urlopen("http://md5crack.com/crackmd5.php", params)
tas= f.read()
link=re.compile('Found: md5'+'\S+'+'\s+'+'\S+'+'\s+'+'\w+')

if link.search(tas):
a= link.search(tas).group()
print("[+]cracking...\n \n[+]Hash Cracked from md5crack.com \n")
print a.strip('[Found,:]')
else:
print "[+] Hash not found on md5crack.com\n"



params=urllib.urlencode({'oc_check_md5':mhash})
f=urllib.urlopen("http://opencrack.hashkiller.com/",params)
tas=f.read()
link=re.compile('result'+'.*'+'\S')
if link.search(tas):
a= link.search(tas).group()
print("\n[+]Hash Cracked from hashkiller.com \n")
print a.strip('[result,",>,<br/>]')
else:
print "[+] \nHash not found on hashkiller.com\n"

params=urllib.urlencode({'search_field':mhash})
f=urllib.urlopen("http://hashchecker.com/index.php?_sls=search_hash",params)
tas=f.read()
link=re.compile('Your md5 hash is :'+'\S+'+'\s+'+'\S+'+'\s+'+'\S+')

if link.search(tas):
a= link.search(tas).group()
print("\n[+]Hash Cracked from hashchecker.com \n")
print a.strip('[Your md5 hash is :,<br>,<li>,<b>,</b>]')
else:
print "[+] \nHash not found on hashchecker.com\n"
http://img337.imageshack.us/img337/3289/desktop2f.png

prashant_uniyal
11-13-2010, 02:40 PM
Rocking as always bro...and sexy shot ;)

D4rk357
11-13-2010, 02:41 PM
Thanks Prashant :) . I had this idea from past 1 year to make this tool ..but i was procastinating .. The EMpty() ne jab force kiya ki taal mat .. work hard tabhi i completed it :) (After being forced by the_empty to work hard on the idea...I finally managed to complete it)

Anant Shrivastava
06-02-2011, 04:57 PM
Good idea.... Hey bro just one suggestion
why not add more such sites in the list in sense what i am trying to say is utilize most of the online resorces and then when all exhausted say its not found.
Also if someone has necessary resources can we create a md5 hash dump (wondering what would be the size of dump for 15 Character small caps alphabet and number + special character basically whole keyboard. )
I am bad at maths however i suppose it should be
15*26*26*10*20*32 = 64GB approx
considering 15 char 26 a-z 26 A-Z 10 0-9 20 special char 32 bits of hash.
(This might be wrong in that case please do correct me.)

b0nd
06-02-2011, 06:07 PM
Probably it would be something like following:
Considering 102 charset (26 + 26 + 10 + 20 = 102)

For 15 character password:
1st place can be filled by 102 chars, at the same time 2nd place can be filled by 102 chars, at the same time 3rd place can be filled by 102 chars...and so on...
So total combination 102^15 and total chars would be 102^15 * 15 i.e so many bytes
(102^15 * 15)/(1024 * 1024 * 1024) GB.

That's why they could not be generated till date. My calculation is not precise but I know the sum would even cross Peta bytes.

fb1h2s
06-02-2011, 07:24 PM
@Anant we have a project which WIPU's (dream project), where we are planning to set up our on Cracking server. We believe we will have it done by this year hopefully .

Anant Shrivastava
06-02-2011, 08:40 PM
I can contribute with some funds.... (although not much but still something better then nothing.)

Anant Shrivastava
06-02-2011, 08:48 PM
Probably it would be something like following:
Considering 102 charset (26 + 26 + 10 + 20 = 102)

For 15 character password:
1st place can be filled by 102 chars, at the same time 2nd place can be filled by 102 chars, at the same time 3rd place can be filled by 102 chars...and so on...
So total combination 102^15 and total chars would be 102^15 * 15 i.e so many bytes
(102^15 * 15)/(1024 * 1024 * 1024) GB.

That's why they could not be generated till date. My calculation is not precise but I know the sum would even cross Peta bytes.

I seem to forgot that we also need to store the word for which md5 is generated.......

Anant Shrivastava
06-19-2011, 10:29 PM
Hey as per our last pune meet adding some more site examples here

API for Md5 generation and cracking :
http://md5.noisette.ch/
http://crax.eth24.net/api/

More sites :
http://www.cmd5.org/
http://www.hashhack.com/ <- although looks like it has human check but for me on different computer's different browser and different ip's the check was same 3+2 =
http://bokehman.com/cracker/
http://passcracking.com/

covers large number of links
http://www.stottmeister.com/blog/2009/04/14/how-to-crack-md5-passwords/


Now all we need is to write all this down in a neat script first and then as decided write it in a multithreaaded application.

Others also please do send in your suggestion.

D4rk357
06-23-2011, 04:58 PM
Nice idea .....One problem i faced is some of the very good md5 cracking resources online have captcha and i couldn't get around them . Secondly some websites required login ....That problem can be soolved by making a user on website and providing login through the code but the last time i checked ( which was few months back ) due to my own limited knowledge of python i could not login using the script and handle cookies but this time around i will be able to do it .. as i have worked a bit on that ....but first part is still the pain in ass that captcha thing ....

karniv0re
06-23-2011, 11:15 PM
This is a good start. I don't know if you guys have considered the following options, but anyways, my few cents on how this could be improved:
1. Generate rainbow tables using Philippe's time-memory tradeoff technique on a cloud system, build a web app/service around to crack an MD5 (http://project-rainbowcrack.com/)
2. Use an array of free web services (www.tmto.com anyone?) to get the hash. The following links have multiple links to such services:
- http://www.stottmeister.com/blog/2009/04/14/how-to-crack-md5-passwords/
- http://carnal0wnage.attackresearch.com/2010/01/various-online-password-crackers.html
Best of Luck!

Regards,
karniv0re

Anant Shrivastava
06-24-2011, 08:53 AM
Nice idea .....One problem i faced is some of the very good md5 cracking resources online have captcha and i couldn't get around them . Secondly some websites required login ....That problem can be soolved by making a user on website and providing login through the code but the last time i checked ( which was few months back ) due to my own limited knowledge of python i could not login using the script and handle cookies but this time around i will be able to do it .. as i have worked a bit on that ....but first part is still the pain in ass that captcha thing ....

exactly buddy however if you look at the links i provided they all don't have captcha... and 2 have there own API too... I am just a started at python right now so won't be able to help much however i have provided rresources for the eager minds.



2. Use an array of free web services (www.tmto.com anyone?) to get the hash. The following links have multiple links to such services:
- http://www.stottmeister.com/blog/2009/04/14/how-to-crack-md5-passwords/
- http://carnal0wnage.attackresearch.com/2010/01/various-online-password-crackers.html


that's exactly what we are trying to do aggregate results from all other sources.

building a cloud app will have its own cost implication's.
we can think of that at a later stage.

I posted few links as well as code has 3 sites already marked in for this same purpose

[s]
06-26-2011, 07:42 AM
i think as per pune meet , we are using our hardware for cracking the Md5...

We can use the CUDA sever for cracking the Md5

http://www.geeks3d.com/public/jegx/200910/nvidia_tesla_server_by_colfax.jpg

Full information about CUDA Server


http://www.nvidia.co.in/page/personal_computing.htm

one of the my friend having this hardware
testing 3.870.000.000 MD5 by second.

we have

Old computer with linux
Geforce GTX 480 superclocked
Geforce GTX 570
oclHachCat cracking software
its gives awesome performance ... with Speed.GPU: 3800.2M/s

neo
06-27-2011, 10:33 AM
Any Idea regarding total Cost of this RIG ?

c0d3inj3cT
07-02-2011, 11:42 AM
This is one Topic that really aligns with what I am doing right now!

Nice!! Decryption of different types of hashes. My choice:

Have you guys considered setting up an MPI Cluster between multiple Machines running a Linux OS? You can utilize multiple cores of a Processor with John the Ripper!

JTR doesn't have much bandwidth requirements, so we can make use of NFS to setup Network Shares between all the machines.

You even have an option to utilize a specific number of cores out of total. For instance, use only 3 cores out of 4 of an i7 processor!

This suggestion goes as an alternate to the above...

The most powerful way to cracking these days is by making use of GPUs!! Who buys GPU's for gaming anymore? :P

Previously it was just the Nvidia Graphic Cards with CUDA support which could be used for Cracking Hashes using the Parallel Processing Power of GPU...

But now we have oclhashcat by Atom, which adds support for the ATI Radeon Graphic Cards as well...

Infact I was planning to invest in one such Machine. A few days back, I got the idea of having a dedicated Online Decrypting Server which hosts a myriad of tools. And it has options to run cracking on both, GPUs or CPUs...

And I am so glad to find this thread and people with like minds!

I will compile a list of all the tools out there which we can make use of. Along with this, we need to shortlist the Hardware Devices also..

Whether we should go for Nvidia CUDA or ATI Radeon GPUs?

More on this later!! :)

r@zz()r
07-12-2011, 06:33 AM
Anyone tried this cracker ? http://www.golubev.com/hashgpu.htm ? it uses gpu to crack hashes and works with both ati and nvidia(uses opencl)

Anant Shrivastava
09-26-2011, 10:06 PM
another link of interest regarding the same topic

findmyhash - Python script to crack hashes using online services - Google Project Hosting (http://code.google.com/p/findmyhash/)

lol3ks
04-25-2012, 09:46 PM
hi guys,
try this site, should help:

pCrack.org