21
bubuche93
Re: using SHA-256 instead of md5
  • 2006/11/20 21:52

  • bubuche93

  • Just popping in

  • Posts: 25

  • Since: 2006/11/19


Quote:

m0nty wrote:
Quote:

Suppose the hacker finds a file include vuln. he'll be able to read the content of mainfile.php, connect to the database and find the md5 passwords no?


couldn't he do that even if it was sha-256 encrypted aswell though?

either way, even if he has your md5 key, it's unlikely he'll be able to find out what password you actually use.. he might be able to find a key sequence that gives the same md5 key.. & if the hacker as got as far as a file include vulnerability then he could literally destroy the db or whatever regardless of what encryption method your site uses. he could also change the keys to some that he has produced anyway, so he could literally change your password to a password key that he knows. after all he has access to the DB itself.

stop the source of the exploitation rather than trying to solve an issue that could have been prevented at the source.

prevention is better than cure.


I totally agree with you ! The hacker can erase the whole DB (and we will be able to restore it in a few minutes with the last backup), but he can also destroy my users mail account/website. It gets critical when the site is used by univ students and professors (this is my case) with MD hash in the table. SHA-2 will prevent the hacker destroying more than 1 XOOPS website !

Julian: for me, MD5 unsalted = plaintext because now a days we can use a rainbowtable to guess a 10 caracters long password in a few seconds !

I made the test, i successfully found 310+ passwords out of ~360. (users were obliged to choose at least a 6caracters long password on register)



22
bubuche93
Re: using SHA-256 instead of md5
  • 2006/11/19 13:27

  • bubuche93

  • Just popping in

  • Posts: 25

  • Since: 2006/11/19


Quote:

MadFish wrote:
Quote:
is it possible to encrypt the password using sha-256 instead of md5 in the XOOPS user table? how can i do?
md5 is VERY unsecure and my website has been hacked recently. 350+ students passwords have been stolen...


It's very unlikely that they decrypted anything. Much more likely that they ran a dictionary attack against the hashes, and that a lot of your users had chosen weak passwords. Stronger encryption won't stop this kind of attack. The solution is to force your users to choose longer and more difficult passwords.

You can set a minimum password length in the system module preferences, but at the moment I don't think there's any way to make people use difficult passwords (there was a thread on that a week or two ago though...might be worth a look).



of course, rainbow tables are much more efficient than "decrypting" the password. But there is no rainbow table for sha-2, it would take too long to generate. It takes only a few seconds to guess a 14 characters long pass in md5.
have a look at the success rate here :http://www.rainbowcrack.com/rainbowtables.php

Dave: i don't see how the secret key will improve the security, because it is stored in plaintext in mainfile.php.
Suppose the hacker finds a file include vuln. he'll be able to read the content of mainfile.php, connect to the database and find the md5 passwords no?



23
bubuche93
Re: using SHA-256 instead of md5
  • 2006/11/19 11:17

  • bubuche93

  • Just popping in

  • Posts: 25

  • Since: 2006/11/19


ermm i need it for tomorrow :( i have to open the site again tonight..

but i'll submit it ;)

++
Buche



24
bubuche93
Re: using SHA-256 instead of md5
  • 2006/11/19 10:55

  • bubuche93

  • Just popping in

  • Posts: 25

  • Since: 2006/11/19


the stolen passwords were in md5 but it's easily decryptable !
I have a clean userbase (i had to delete all the accounts as they were compromised) so it's not a problem.
I use "MySQL client version: 4.1.20", it seems to support sha-1, it's still a bit better than md5..

Could you explain to me why we need MySQL to support sha-2? why don't we just encrypt the password in php and store it as a string in the user table?

Thanks,Buche



25
bubuche93
using SHA-256 instead of md5
  • 2006/11/19 10:12

  • bubuche93

  • Just popping in

  • Posts: 25

  • Since: 2006/11/19


is it possible to encrypt the password using sha-256 instead of md5 in the XOOPS user table? how can i do?
md5 is VERY unsecure and my website has been hacked recently. 350+ students passwords have been stolen...

Thanks, Buche




TopTop
« 1 2 (3)



Login

Who's Online

163 user(s) are online (80 user(s) are browsing Support Forums)


Members: 0


Guests: 163


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits