Jump to content

hashing


manix

Recommended Posts

Hey,

 

Does it make it harder for someone to bruteforce a string which is hashed multiple times?

 

For an example I have the string 'John' and I do md5(md5($john)) would that be the same as md5($john)

 

Or maybe if I do md5(sha1(md5($john))) ?

 

And also is it able to tell the hashing, which would make this whole post pointless ?

Link to comment
Share on other sites

Hashing the password prevents someone from from seeing the password if they managed to access the database.

 

I dont think it is possible to completely stop a brute force attempt, but you can slow them down with a CAPTCHA:

 

1 The user starts a session when 1st accessing the homepage.

2 Count the number of log in attempts into a session variable or cookie

3 When the count reaches a certain value, tell the user they must now complete a CATPCHA to continue... or anything similar.

Link to comment
Share on other sites

Nah I have a cookie containing a hashed username (if the user chose to stay logged in forever) but if a user can tell what hashing I used and then hash the admin username the same way I hashed the cookie will be able to log in with the admin account

 

example:

database username: philip

cookie's value: sha1(md5(sha1($username)))

then check

if (sha1(md5(sha1($databaseusername)))==$_COOKIE['username']){add user panel etc etc}

 

my point is that a user can see the cookie's value and bruteforce it without using the website at all if they can tell the hashing

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.