Welcome to our forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Forum Statistics

  • Forum Members:
  • Total Threads:
  • Total Posts: 20
There are 1 users currently browsing forums.
PHP Scripting PHP is a scripting language for rapid web-development. It's a popular and powerful, OOP-capable language that is used by professionals. Discuss PHP here.

Reply
  #1  
Old 07-16-2008
Graduate Student
 
Join Date: Dec 2007
Location: The Draco Supercluster
Age: 16
Posts: 410
Rep Power: 0
Aepos is on a distinguished road
MD5 Hash Unencryption

It's gotta be out there somewhere. I mean, if encrypted passwords and sensative information can be stored in a MySQL database, then recovered, there has to be a method of unencryption, right? How is this done?
Reply With Quote
  #2  
Old 07-16-2008
Mike Tomasello's Avatar
 
Join Date: Dec 2006
Location: University of York, UK
Age: 20
Posts: 1,893
Rep Power: 5
Mike Tomasello is on a distinguished road
Re: MD5 Hash Unencryption

There's no 'unencryption' as such, but someone with a lot of time (or computational power) on their hands can just try hashing millions of possible combinations of characters until they get a hash that matches the original hash, thus getting the original string used to generate the hash (or, in some cases, such a database of combinations already exists [frequently called 'rainbow tables'] which could be used to look up a hash).

It's not hugely difficult to make both of these types of attack unfeasible if your implementation of hashing is robust enough.
Reply With Quote
  #3  
Old 07-16-2008
gorda001's Avatar
This user is deprecated.
 
Join Date: Jun 2005
Location: <0x79a3f6>
Posts: 5,064
Rep Power: 11
gorda001 is on a distinguished road
Re: MD5 Hash Unencryption

If it could be done easily, nobody would use it. The point in a hash is that it is normally one-way.

As mike said, it all depends on what and how it was hashed. If the data is large or the hashes are salted then forget it - it's going to be too difficult. If it's short unsalted data then it may be possible using brute force or rainbow tables - but don't bet on it.
Reply With Quote
  #4  
Old 07-16-2008
Mike Tomasello's Avatar
 
Join Date: Dec 2006
Location: University of York, UK
Age: 20
Posts: 1,893
Rep Power: 5
Mike Tomasello is on a distinguished road
Re: MD5 Hash Unencryption

Just using a salt will not protect against brute forcing if you're using plain old MD5 or SHA1. It may take a while, but not too long by any means.
Reply With Quote
  #5  
Old 07-16-2008
gorda001's Avatar
This user is deprecated.
 
Join Date: Jun 2005
Location: <0x79a3f6>
Posts: 5,064
Rep Power: 11
gorda001 is on a distinguished road
Re: MD5 Hash Unencryption

Quote:
Mike Tomasello originally posted: View Post
Just using a salt will not protect against brute forcing if you're using plain old MD5 or SHA1. It may take a while, but not too long by any means.
It will if it's a long salt. Salt = increased length = more infeasible.
Reply With Quote
  #6  
Old 07-16-2008
Mike Tomasello's Avatar
 
Join Date: Dec 2006
Location: University of York, UK
Age: 20
Posts: 1,893
Rep Power: 5
Mike Tomasello is on a distinguished road
Re: MD5 Hash Unencryption

The length of the salt has no practical impact on the difficulty of brute forcing. Security through obscurity isn't really security at all - we must assume that an attacker has the salt (and if they have the hash, chances are they would have the salt); when you have the salt, its length does not matter at all.
Reply With Quote
  #7  
Old 07-16-2008
Stephen Bryant's Avatar
I eat trolls.
 
Join Date: Aug 2006
Location: North Carolina
Age: 21
Posts: 1,217
Rep Power: 5
Stephen Bryant is on a distinguished road
Re: MD5 Hash Unencryption

Salting will greatly decrease the likelyhood of cracking it through rainbow tables. However, it does no good with brute force. Also, the longer the salt the better. Now, granted, I haven't done any work with hashes in the new dual-and-quad-core age, but brute forcing anything over 8 chars usually takes months, assuming it's not a dictionary word.

Rainbow tables are by far quicker, usually taking only up to 2 days or so to crack a 14-char letters/numbers/symbols pass. I used to have a setup that could crack most passwords in 3 days or less. The tables took up nearly 500GB of hard drive space though, so I got rid of them a few years ago.
Reply With Quote
  #8  
Old 07-16-2008
Mike Tomasello's Avatar
 
Join Date: Dec 2006
Location: University of York, UK
Age: 20
Posts: 1,893
Rep Power: 5
Mike Tomasello is on a distinguished road
Re: MD5 Hash Unencryption

Quote:
Kyle Katarn originally posted: View Post
Now, granted, I haven't done any work with hashes in the new dual-and-quad-core age, but brute forcing anything over 8 chars usually takes months, assuming it's not a dictionary word.
Not really. To an amateur/script-kiddy perhaps, but not to someone who knows what they are doing and has the equipment to do it. If your data is irrelevant enough that nobody other than script-kiddies, doing it only for the thrill, would want to get their hands on it, then consider avoiding password based schemes entirely as they may put your users' passwords at additional risk from 'genuine' attackers.

Last edited by Mike Tomasello; 07-16-2008 at 09:35 AM.
Reply With Quote
  #9  
Old 07-16-2008
Graduate Student
 
Join Date: Dec 2007
Location: The Draco Supercluster
Age: 16
Posts: 410
Rep Power: 0
Aepos is on a distinguished road
Re: MD5 Hash Unencryption

Again, I don't want to start a new thread, so could someone tell me how to make a configuration file for EasyPHP, so I can turn image #1 into image #2?

- Brandon

Heck, I'll just start a new thread.

_
Attached Images
File Type: png screenie.PNG (68.4 KB, 8 views)
File Type: jpg mysql5.jpg (7.5 KB, 6 views)
Reply With Quote
  #10  
Old 07-16-2008
Karan Bhangui's Avatar
Child
 
Join Date: Apr 2007
Posts: 67
Rep Power: 4
Karan Bhangui is on a distinguished road
Re: MD5 Hash Unencryption

I'm not sure how effective this is, but to greatly increase the time taken by brute forcing, I've heard people including a php execution pause (of a few seconds) between checking for password authenticity, and sending a reply back to the browser. Any ideas if there is any point to doing this?
Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
External form using an MD5 processor Matty PHP Scripting 4 10-26-2006 02:38 PM
md5 why? Skylarmb PHP Scripting 22 05-08-2006 02:52 AM
unhashing MD5.. not what you think.. Vouksh PHP Scripting 24 11-05-2005 08:00 PM
MD5 Library problems.. Vouksh C and C++ Programming 1 10-14-2005 11:45 AM