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
  #11  
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

Well, heck, I don't want to break into any Databases. If you really wanna look at SQL Injections, and what-not, then Google "milw0rm."
Reply With Quote
  #12  
Old 07-16-2008
Stephen Bryant's Avatar
I eat trolls.
 
Join Date: Aug 2006
Location: North Carolina
Age: 21
Posts: 1,216
Rep Power: 6
Stephen Bryant is on a distinguished road
Re: MD5 Hash Unencryption

Quote:
Karan Bhangui originally posted: View Post
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?
That would work for brute-forcing a password on a webpage itself. However, most of the time, the attacker has the hash, and is able to do it locally. Cracking an MD5 over a webserver could take... centuries.
Reply With Quote
  #13  
Old 07-16-2008
hot_cakes's Avatar
Moderat0r!!1
 
Join Date: Aug 2005
Location: Bristol, UK
Age: 28
Posts: 2,939
Rep Power: 8
hot_cakes will become famous soon enough
Re: MD5 Hash Unencryption

You often won't need to find a password, merely a collision. To this end, MD5 is thoroughly useless for crypto purposes.

"It may be expected that [...] the overall time for finding a complete collision can fall down to as less as 2 minutes on a PC notebook"

SHA1 is weakened in light of recent research. If you're serious about keeping data safe, use one of the later SHAs.

Edd
Reply With Quote
  #14  
Old 07-16-2008
Mike Tomasello's Avatar
 
Join Date: Dec 2006
Location: University of York, UK
Age: 20
Posts: 1,892
Rep Power: 5
Mike Tomasello is on a distinguished road
Re: MD5 Hash Unencryption

Hashing is not primarily for the purposes of making your log-in scheme (or whatever) more secure, but rather for protecting your user's log-in details should your database be compromised. Collisions, therefore, are not the major issue - you should focus more on getting an algorithm that is computationally expensive enough to be impractical to brute force but fast enough to be used in (say) a log-in script.

If you're simply trying to make your log-in system more secure, consider enforcing stricter password policies, expiring passwords, requiring additional information at log-in (e.g. 'secret questions') or other forms of verification.
Reply With Quote
  #15  
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
If you're simply trying to make your log-in system more secure, consider enforcing stricter password policies, expiring passwords, requiring additional information at log-in (e.g. 'secret questions') or other forms of verification.
God no. If a website says that my password is too insecure then I'm just going to click the back button. No way am I remembering a separate password just for that website. ADC requires that I change my password every year so I just have two accounts so I can switch the passwords on each

Don't make users change their passwords.
Reply With Quote
  #16  
Old 07-16-2008
Forum Administrator
 
Join Date: Mar 2006
Location: Toronto, Ontario
Posts: 2,396
Rep Power: 7
Nick Presta is on a distinguished road
Re: MD5 Hash Unencryption

If you're really worried about your hash being unsafe, use something like SHA 512 or a whirlpool hash function.

Reply With Quote
  #17  
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

Quote:
gorda001 originally posted: View Post
God no. If a website says that my password is too insecure then I'm just going to click the back button. No way am I remembering a separate password just for that website. ADC requires that I change my password every year so I just have two accounts so I can switch the passwords on each

Don't make users change their passwords.
I'm really not trying to make it safer. I'm just in the developing stages for now. As for expiring passwords, it's really not the 'shiniest hook' to be dragging in users with, as Gorda explained.
Reply With Quote
  #18  
Old 07-17-2008
Mike Tomasello's Avatar
 
Join Date: Dec 2006
Location: University of York, UK
Age: 20
Posts: 1,892
Rep Power: 5
Mike Tomasello is on a distinguished road
Re: MD5 Hash Unencryption

Quote:
gorda001 originally posted: View Post
God no. If a website says that my password is too insecure then I'm just going to click the back button. No way am I remembering a separate password just for that website. ADC requires that I change my password every year so I just have two accounts so I can switch the passwords on each

Don't make users change their passwords.
It is only one of many options. It is inconvenient for frivolous sites like YC, but for enterprise security or banking (amongst other things) then perhaps a necessary evil. Would you leave your bank because their web-site security is too stringent? Sometimes I wish there was an option to go into an 'insecure mode' and let me suffer the consequences dammit! But I guess I wouldn't quite feel like that if my money was stolen and the bank refused to cover me because I opted out of their security.

Quote:
Nick Presta originally posted:
If you're really worried about your hash being unsafe, use something like SHA 512 or a whirlpool hash function.
What would be better in terms of brute force strength is an iterative function like PBKDF2, even with something like SHA1.
Reply With Quote
  #19  
Old 07-19-2008
Toddler
 
Join Date: Jul 2008
Posts: 12
Rep Power: 0
Scripten is on a distinguished road
Re: MD5 Hash Unencryption

It`s called encryotor and heres the code to a encrytptor and decryptor for MD5 hashes, so i hope you like it:

PHP Code:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251"> 
<center> 
<?php 

if (isset($_POST['submit'])) { 

$_POST['pass'] = stripslashes($_POST['pass']); 
$pass $_POST['pass']; 

$passkod md5("$pass"); 


?> 

<form action="<?php echo $_SERVER['PHP_SELF']?>" method="POST"> 
<table width=100% border=1 cellspacing=0 cellpadding=10> 

<tr></font></td><input class="inputbox" type="pass" name="pass" size="30"></td></td> 

<input type="submit" name="submit" value= "Encrypt"> 
</td> 
</tr> 
</table> 
</form> 
<? 
echo("$pass: $passkod"); 
?> 

<form method="post" enctype="multipart/form-data"> 
<input type="text" name="md5"><input type="submit" value="Decrypt"> 
<br> 
<?php 
set_time_limit
(0); 
$md5 $_POST['md5']; 
if (
$md5) { 
$char = array('0''1''2''3''4''5''6''7''8''9''a''b''c''d''e''f''g''h''i''j''k''l''m''n''o''p''q''r''s''t''u''v''w''x''y''z''A''B''C''D''E''F''G''H''I''J''K''L''M''N''O''P''Q''R''S''T''U''V''W''X''Y''Z''!''@''#''$''%''^''&''*''('')''-''_''=''+'); 
foreach (
$char as $a) { 
$i="$a"
$hash md5($i); 
if (
$hash == $md5) { 
die(
"$md5: $i"); 


foreach (
$char as $a) { 
foreach (
$char as $b) { 
$i="$a$b"
$hash md5($i); 
if (
$hash == $md5) { 
die(
"$md5: $i"); 



foreach (
$char as $a) { 
foreach (
$char as $b) { 
foreach (
$char as $c) { 
$i="$a$b$c"
$hash md5($i); 
if (
$hash == $md5) { 
die(
"$md5: $i"); 




foreach (
$char as $a) { 
foreach (
$char as $b) { 
foreach (
$char as $c) { 
foreach (
$char as $d) { 
$i="$a$b$c$d"
$hash md5($i); 
if (
$hash == $md5) { 
die(
"$md5: $i"); 





foreach (
$char as $a) { 
foreach (
$char as $b) { 
foreach (
$char as $c) { 
foreach (
$char as $d) { 
foreach (
$char as $e) { 
$i="$a$b$c$d$e"
$hash md5($i); 
if (
$hash == $md5) { 
die(
"$md5: $i"); 






foreach (
$char as $a) { 
foreach (
$char as $b) { 
foreach (
$char as $c) { 
foreach (
$char as $d) { 
foreach (
$char as $e) { 
foreach (
$char as $f) { 
$i="$a$b$c$d$e$f"
$hash md5($i); 
if (
$hash == $md5) { 
die(
"$md5: $i"); 







foreach (
$char as $a) { 
foreach (
$char as $b) { 
foreach (
$char as $c) { 
foreach (
$char as $d) { 
foreach (
$char as $e) { 
foreach (
$char as $f) { 
$i="$a$b$c$d$e$f"
$hash md5($i); 
if (
$hash == $md5) { 
die(
"$md5: $i"); 







foreach (
$char as $a) { 
foreach (
$char as $b) { 
foreach (
$char as $c) { 
foreach (
$char as $d) { 
foreach (
$char as $e) { 
foreach (
$char as $f) { 
foreach (
$char as $g) { 
$i="$a$b$c$d$e$f$g"
$hash md5($i); 
if (
$hash == $md5) { 
die(
"$md5: $i"); 








foreach (
$char as $a) { 
foreach (
$char as $b) { 
foreach (
$char as $c) { 
foreach (
$char as $d) { 
foreach (
$char as $e) { 
foreach (
$char as $f) { 
foreach (
$char as $g) { 
foreach (
$char as $h) { 
$i="$a$b$c$d$e$f$g$h"
$hash md5($i); 
if (
$hash == $md5) { 
die(
"$md5: $i"); 









foreach (
$char as $a) { 
foreach (
$char as $b) { 
foreach (
$char as $c) { 
foreach (
$char as $d) { 
foreach (
$char as $e) { 
foreach (
$char as $f) { 
foreach (
$char as $g) { 
foreach (
$char as $h) { 
foreach (
$char as $i) { 
$i="$a$b$c$d$e$f$g$h$i"
$hash md5($i); 
if (
$hash == $md5) { 
die(
"$md5: $i"); 












?> 
</form>
Reply With Quote
  #20  
Old 07-19-2008
Mike Tomasello's Avatar
 
Join Date: Dec 2006
Location: University of York, UK
Age: 20
Posts: 1,892
Rep Power: 5
Mike Tomasello is on a distinguished road
Re: MD5 Hash Unencryption

PHP is one of the worst languages you could possibly choose to write a MD5 brute forcer in.
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