
|
View Full Version : MySQL decryption
dbzgod 10-01-2002, 06:28 PM I was looking at a dump I made of an old mysql databse of my passwords I used for various things. I no longer have the program I wrote to correspond with it, and frankly I dont want to take the time to redo the script, as I have a lot to do.
Is there a program that can decrypt passwords that were stored in a mysql database? The one that I need is...
b50ac41ec20631c7b6be72f070d8ff67
Thanks,
dbzgod
there is no way to decrypt the passwords made by md5 or password functions
CChard 10-01-2002, 07:36 PM You can try guessing.
But that will take a while.
try guessing.... That's funny. It will take millions of years :-)
Studio64 10-02-2002, 12:13 AM Judging by the length or the string it appears to be a MD5 hash....
So you want to know what the string is eh?
Good luck. If you do crack it you'd probably get a few mathematics awards, seriously.
The reason why they are encrypted like that is because the are almost impossible to decrypt.
priyadi 10-02-2002, 01:01 AM Originally posted by dbzgod
Is there a program that can decrypt passwords that were stored in a mysql database? The one that I need is...
b50ac41ec20631c7b6be72f070d8ff67
That looks like MD5 hash. That's one way encryption, you can encrypt, but you can't decrypt. You can brute force the hash but it will take lots of time. I'll try to brute force it using john the ripper but don't count on it :D
Studio64 10-02-2002, 02:22 AM Originally posted by priyadi
That looks like MD5 hash. That's one way encryption, you can encrypt, but you can't decrypt. You can brute force the hash but it will take lots of time. I'll try to brute force it using john the ripper but don't count on it :D
No... You can't brute force it...
It's a hash... Not an encryption...
It's a one-way method... There are no true mathematical formulas that can reverse a hash.
priyadi 10-02-2002, 02:44 AM Originally posted by Studio64
No... You can't brute force it...
It's a hash... Not an encryption...
It's a one-way method... There are no true mathematical formulas that can reverse a hash.
Why not? I'd try a lot of combination of letters and compute the hash until the hash matches. That's called brute force right?
On the other hand, I gave up using john the ripper, it looks like I need to patch it and I don't have time to do it :D
Studio64 10-02-2002, 04:46 AM Originally posted by priyadi
Why not? I'd try a lot of combination of letters and compute the hash until the hash matches. That's called brute force right?
On the other hand, I gave up using john the ripper, it looks like I need to patch it and I don't have time to do it :D
Which is why I don't just md5 my passwords when designing website administration panels... (I'm a sick paranoid bastard when it comes to security)
Every password protection scheme I have implemented in sites that I run use 2 tables for password authentication. 1 is a TINYINT of a 5 digit randomly generated (at the time of password creation) number that is used to salt the password in the crypt function then md5 the result twice :D
So you go ahead and try to "brute force" my hash :D...
Your trying to brute force a string that is 32 charecters long.
That is 32 spaces that can be filled with
-- 52 letters (upper or lower case)
-- 10 numbers
That gives you 62 possible choices for 32 spaces.
If my math isn't mistaken that would be (62!)*32.
62 factorial = 507580213877224600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Now multiply that number by 32 :D...
Thats how many possible combinations you would need to try..
Good luck... I'll see you when the Sun explodes (but, when it really does not what WWNews says) (http://www.webhostingtalk.com/showthread.php?s=&threadid=78232)
cortices 10-02-2002, 05:12 AM Yeah, but speaking theoretically, by brute forcing, it's just as likely I'll guess correctly the first time than the last time. :)
/me tries...no, damn!
/me tries again...no, damn!
priyadi 10-02-2002, 05:33 AM If I know your md5 as well as your salt (and the algorithm of course) it is still possible to brute force your password. :D
For web apps I'd just put the salt in the same fields as the md5 hash since I'm not going to show anyone the hash nor the salt. For salt I'd use md5 sum of 16KB of /dev/urandom instead of your puny random tinyint :D
MD5 is 128 bit, so it has 2 ^ 128 = 340282366920938463463374607431768211456 combinations, normally represented in 32 characters representing 4 bit each (16 combination of characters, 0-9a-f). One message have one unique checksum from that many combination. If you have more than 2^128 messages, you are going to have some dups. So, to brute force it you need to have more than 2^128 messages, but it still can be simplified if you have weak password listed in wordlists. :D
dbzgod 10-02-2002, 07:27 AM Ah, well that suxs. I really wanted to figure it out. Anyway, thanks for the responses.
Neo
cryoes 07-08-2005, 03:31 PM b50ac41ec20631c7b6be72f070d8ff67
torres <-- decrypted ...... wheres my math award.
maxymizer 07-08-2005, 03:55 PM Originally posted by cryoes
b50ac41ec20631c7b6be72f070d8ff67
torres <-- decrypted ...... wheres my math award.
Math award for typing www.google.com into your web browser?
http://topfx.com/dist/digest/digest-842.txt
A tip: "crackers" started using google for decrypting md5, sha1 and the like since there are people that encrypted common words and made a word list..and google indexed it :)
If it happens to you that you forgot where the original string came from - try to google it.
UrlGuy 07-08-2005, 05:20 PM rainbow tables,huh?
VolkNet 07-08-2005, 06:41 PM I got it! The password is "mulligan"
Here is how I got it:
$selection = mysql_query("UPDATE users SET password='".md5('mulligan')."' where password='b50ac41ec20631c7b6be72f070d8ff67';");
;) hehe.
VolkNet 07-08-2005, 06:42 PM Originally posted by priyadi
On the other hand, I gave up using john the ripper, it looks like I need to patch it and I don't have time to do it :D
John the ripper is usually only used for /ect/passwd files. not hashes.
error404 07-08-2005, 07:09 PM You can't brute-force a hash; that is you can't be sure that even if the hash matches that the input is the same. Because the output of the hashing function is a fixed size, while the input can be any size, there are an infinite number of possible inputs that generate a given hash. To find one, you still need to go through a huge number of possibilities, but you can never be sure that it exactly matches the original input. That's why it's not encryption; there is less information stored in the hash than in the input.
Of course, any value that generates the same hash will obviously satisfy any checks against the hash, such as a password check, so the point is moot here.
maxymizer 07-08-2005, 07:31 PM error404, you can brute-force a hash. There's a fixed amout of characters that you can input..not infinite. But then again, the time required to brute-force something like that becomes the decisive factor.. :)
error404 07-08-2005, 08:22 PM Originally posted by maxymizer
error404, you can brute-force a hash. There's a fixed amout of characters that you can input..not infinite. But then again, the time required to brute-force something like that becomes the decisive factor.. :)
In cryptography, hash functions take an arbitrary length input and produce a fixed-length hash that is computed from that input. In general computer-science, hash functions don't always have a larger input domain than output domain, but this is nearly always the case. In the case of common hashing functions (such as MD5, SHA1 and etc.), the hash is calculated cumulatively based on some fixed block size. The input text is padded up to this length. Only one block is caculated at a time, and joined to the hash from whatever previous data was there. Since only a small amount of data is processed at a time, and the effects of the hash accumulate (though stay at a fixed size), any amount of input can be hashed. If you ever download large files from open-source software groups, you'll see MD5 sums of large files (on the order of gigabytes, sometimes). There is effectively no limit to the possible input size of most hashing functions.
And as I said before, collisions are inevitable whenever the output domain of the function is smaller than it's input domain. It's entirely possible for 'foo' and 'bar' to have the same hash output, and it would be impossible to tell which was given to the hash function as input originally when compared to an existing hash.
Essentially, hashing is a glorified method of error checking. From an arbitrary data set a hash can be computed that (with reasonable accuracy) can prove the integrity of that data once transferred. It, of course, has other uses such as one-way encryption, but the concept behind it is similar to that of simpler schemes such as parity.
maxymizer 07-08-2005, 09:22 PM And what does your post now has to do with proving the fact that the hashes can be brute-forced?
They can be brute-forced and that's the fact that won't change. All you need is time, as always so I don't get why you had to go trough explaining what's hashing and what are collisions..
UrlGuy 07-08-2005, 11:22 PM http://www.antsight.com/zsl/rainbowcrack/
http://rainbowtables.shmoo.com/
http://rainbowcrack.com
If I got it right you can decrypt a MD5 hash within seconds with good precomputed "rainbow tables".
laserlight 07-09-2005, 01:55 AM They can be brute-forced and that's the fact that won't change. All you need is time, as always so I don't get why you had to go trough explaining what's hashing and what are collisions..
I think the point that error404 is trying to make is that even though it may be possible to use brute force to find a pre-image that maps to a given hash, one cannot know (barring human recognition) if that pre-image is indeed the one used to generate the hash in the first place.
If I got it right you can decrypt a MD5 hash within seconds with good precomputed "rainbow tables".
You cant. You can only find a pre-image that maps to the given hash, assuming that the mapping has been recorded.
Of course, for practical purposes concerning passwords there is very little difference.
VolkNet 07-09-2005, 03:30 AM Originally posted by UrlGuy
http://www.antsight.com/zsl/rainbowcrack/
http://rainbowtables.shmoo.com/
http://rainbowcrack.com
If I got it right you can decrypt a MD5 hash within seconds with good precomputed "rainbow tables".
Ill check these out and tell you all the results.
bruceleeon 07-09-2005, 03:34 AM You all just confused the sh*t out of me....
gogocode 07-09-2005, 08:47 AM Sigh, it seems this subject comes up so often..
A HASH is not encryption. A hash is a one-way algorithm, you put in as much data as you like, and you get out a fixed length "fingerprint" of the data. For MD5 that's 32 bytes. You feed in the entire Google database, you get out 32 bytes, you feed in a 4 gig DVD, you get out 32 bytes, you feed in the letter 'A' (one byte) you get out 32 bytes.
Imagine for a moment that you could "decrypt" a hash, you have just invented the worlds best encryption algorithm. You can feed in as much data as you like and it comes out to 32 bytes! So you see that "decrypting" a hash is nonsense.
The pidgeon hole principle clearly shows that for any given hash it is extremely likely that a very large (infinite) number of input strings will give you the same hash - for example it could be possible that the entire google database's hash is "a0cc175b9c0f1b6a831c399e269772661", which is also the hash of "a". Indeed for a well distributed hashing algorithm one expects that each possible hash has an infinite number of input strings.
There are algorithms (as well as brute force checking of likely inputs) that can produce an input string that when hashed will give a given hash (of course you'll need some decent power to run them). But you have NO WAY of knowing if the input string you find is the original one that was used to create the hash - using such an algorithm I could input the hash "a0cc175b9c0f1b6a831c399e269772661" and I might get both "a" and the entire database of google (and an infinite number of other strings) as input strings that produce that hash (these are the collisions for the hash value) - but how do I know which is the "right" one - I don't, it's not possible, the information is not stored.
Now, in the respect of passwords, it's a bit easier, if we can generate a collision for the hash, any collision, and that collision is short enough to be used as a password, then we have something suitable to be used when authenticating against the hash - we don't know that it's the original, but it is good enough.
VolkNet 07-09-2005, 01:42 PM Originally posted by gogocode
I don't, it's not possible, the information is not stored.
If you have two or even 10000 - it's a lot less narrow than trying to guess out of thin air :P
|