TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-24-2008, 10:07 PM   #1 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default How do big companies like VB store passwords?

How does VBulletin or Paypal store their passwords? Can you tell me in a way that I can copy? :P
__________________
Signatures are nothing but incriminating.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 04-24-2008, 10:45 PM   #2 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Passwords for what? They store the database passwords in a file and most of the others in the database. I've never seen paypal's source, so I dont know what they do.
__________________

Village Idiot is offline  
Reply With Quote
Old 04-24-2008, 10:48 PM   #3 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

like, database passwords.

does vb like... do salt first, or even use a salt? do they combine md5 with sha1 or do they use one or the other?
__________________
Signatures are nothing but incriminating.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 04-24-2008, 10:49 PM   #4 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by Aaron View Post
like, database passwords.

does vb like... do salt first, or even use a salt? do they combine md5 with sha1 or do they use one or the other?
No, VB has their DB password in a PHP file, completely unencrypted.
__________________

Village Idiot is offline  
Reply With Quote
Old 04-24-2008, 10:50 PM   #5 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by Village Idiot View Post
No, VB has their DB password in a PHP file, completely unencrypted.
and yet, that's one of the great forum softwares. ;P i dunno
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 04-24-2008, 10:50 PM   #6 (permalink)
The Wanderer
 
Join Date: Apr 2008
Posts: 12
Thanks: 7
Durux is on a distinguished road
Default

My bet is that Paypal uses an encryption for their data and not Hash and salt.
Can be wrong, but i don't think that a site as Paypal can't afford not to be as safe as possible.
Durux is offline  
Reply With Quote
Old 04-24-2008, 10:51 PM   #7 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by Orc View Post
and yet, that's one of the great forum softwares. ;P i dunno
What do you mean? It is not a security risk to have it in the PHP file. Its not like anyone can view the source.
__________________

Village Idiot is offline  
Reply With Quote
Old 04-24-2008, 10:51 PM   #8 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by Village Idiot View Post
What do you mean? It is not a security risk to have it in the PHP file. Its not like anyone can view the source.
well yes but. nevermind
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 04-24-2008, 11:04 PM   #9 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

I mean like the database password for users. Do they shai($username . $salt) or what?
__________________
Signatures are nothing but incriminating.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 04-24-2008, 11:06 PM   #10 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by Aaron View Post
I mean like the database password for users. Do they shai($username . $salt) or what?
Users dont have database passwords.... If what you mean is their login passwords, they are encrypted, I think via sha1.
__________________

Village Idiot is offline  
Reply With Quote
Old 04-24-2008, 11:07 PM   #11 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

just sha1, or do they use a salt? Is the salt before or after the password? :/
__________________
Signatures are nothing but incriminating.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 04-24-2008, 11:14 PM   #12 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by Aaron View Post
just sha1, or do they use a salt? Is the salt before or after the password? :/
I dont know. Sha1 is sufficient, it is a destructive algorithm. There are rumors that it has been cracked by a group of Chinese hackers, but I'm not sure I believe it.
__________________

Village Idiot is offline  
Reply With Quote
Old 04-24-2008, 11:33 PM   #13 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

VB does
Code:
md5(md5($password) . $salt);
Weird... Why use that?
__________________
Signatures are nothing but incriminating.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 04-24-2008, 11:43 PM   #14 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

There's way better encryption than MD5 and SHA1, and if it was needed could easily be implemented, but for one problem. At least in this country, which like it or not has a heavy hand when leaning on other countries to do the same - the government doesn't want the public to have stronger encryption, because then they risk the possibility that they won't be able to crack civilian communications when ever necessary. </today's fun little conspiracy factoid>
-m
delayedinsanity is offline  
Reply With Quote
Old 04-25-2008, 12:13 AM   #15 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by Aaron View Post
VB does
Code:
md5(md5($password) . $salt);
Weird... Why use that?
that's nothing, I use zlib compression, and the hash function which allows sha256, and many more, I also use substring, and more.
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 04-25-2008, 01:02 AM   #16 (permalink)
The Addict
 
Join Date: Nov 2007
Posts: 264
Thanks: 2
TlcAndres is on a distinguished road
Default

The reason they use something like that is first there something called rainbow tables or glorified brute forces that try and guess your password, add a salt and it gets that much harder but they can add the salt to the list and have them md5 that now md5 the password then salt it and md5 it and it just's that much harder to crack...

In the end MD5 and SHA1 have been cracked because computers can't do true random numbers (they're based off algoritms like the twister) and thus reversible. so if a team of determined hackers want your password than they will get them, the only true way to be secure from network intrusion is to black box it - I find security to be more a game of "Tire out the hacker" then "Keep the hacker out" (I refrain from using "he" or "him" because some girls are very nasty hackers..)
__________________
"What everyone seems to forget is that while knowledge certainly is something - it's the implementation of knowledge that brings power" - Andres Galindo.
TlcAndres is offline  
Reply With Quote
Old 04-25-2008, 01:05 AM   #17 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by TlcAndres View Post
The reason they use something like that is first there something called rainbow tables or glorified brute forces that try and guess your password, add a salt and it gets that much harder but they can add the salt to the list and have them md5 that now md5 the password then salt it and md5 it and it just's that much harder to crack...

In the end MD5 and SHA1 have been cracked because computers can't do true random numbers (they're based off algoritms like the twister) and thus reversible. so if a team of determined hackers want your password than they will get them, the only true way to be secure from network intrusion is to black box it - I find security to be more a game of "Tire out the hacker" then "Keep the hacker out" (I refrain from using "he" or "him" because some girls are very nasty hackers..)
Rainbow tables are only good if you already know the password.
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 04-25-2008, 02:31 AM   #18 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by TlcAndres View Post
The reason they use something like that is first there something called rainbow tables or glorified brute forces that try and guess your password, add a salt and it gets that much harder but they can add the salt to the list and have them md5 that now md5 the password then salt it and md5 it and it just's that much harder to crack...

In the end MD5 and SHA1 have been cracked because computers can't do true random numbers (they're based off algoritms like the twister) and thus reversible. so if a team of determined hackers want your password than they will get them, the only true way to be secure from network intrusion is to black box it - I find security to be more a game of "Tire out the hacker" then "Keep the hacker out" (I refrain from using "he" or "him" because some girls are very nasty hackers..)
MD5 was cracked a while ago, there are only rumors of sha1 being cracked. Sha1 nor MD5 use random algorithms because they must come out with the same result every time. They destroy the original value, meaning that even if you can reverse the process, there are unlimited possibilities of what it could be. If you dont have a short or dictionary word password, the hacker wont know one from another. Using two or more wont render much since anyone experienced enough to crack it once would catch on to what it was and just do the process again.
__________________

Village Idiot is offline  
Reply With Quote
Old 04-26-2008, 07:28 PM   #19 (permalink)
The Wanderer
 
Join Date: Feb 2008
Posts: 15
Thanks: 2
Mathew is on a distinguished road
Default

For my projects I use a combination of 2 salts (1 Static, 1 Dynamic). When a user registers to my website the backend will generate a random salt key for each user. Even if 2 different users register to my website with the same password, the resulting hash will be different.

So if the database was ever hacked or stolen, they would be missing the static salt key, thus it would prove to be impossible for them to bruteforce any of the passwords.

However I'll touch wood, just incase.
Mathew is offline  
Reply With Quote
Old 04-26-2008, 07:34 PM   #20 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

1 dynamic? How do you go about that, if I may ask? As far as I understand you need the same SALT to unhash as you use in the hash, so don't you have to store the dynamic one somewhere?
-m
delayedinsanity is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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


All times are GMT. The time now is 03:36 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design