Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Web-App-Sec
[Top] [All Lists]

Re: Salt Storage - web.config or database?

Subject: Re: Salt Storage - web.config or database?
Date: Fri, 2 Jun 2006 20:42:31 -0400
The salt should be created for each password and not static for all passwords, otherwise the value of the salt in protecting against attacks using rainbow tables is almost useless. Usually the salt is stored appended to the hash, alternatively you can store it in another column.

Usually your login code will look like:

select username, password_hash from usertable where userid = 'some_user_id';
salt = substring(password_hash, 0, 2);
hashed_password = substring(password_hash, 2, 16);


if (hash(salt + userpassword) == hashed_password)
{
        login...
}
else
{
        login failed...
}

So there is no extra database traffic to speak of. Well... there is the extra 2 bytes of salt, which is pretty trivial.

-dhs

Dean H. Saxe, CEH
dean@fullfrontalnerdity.com
"Great spirits have often encountered violent opposition from weak minds."
--Einstein


Find out about my Hike for Discovery at www.fullfrontalnerdity.com/hfd


On Jun 1, 2006, at 10:20 AM, cynthia.peluso@us.ngrid.com wrote:

Where is the best place to store salts? I have developers that will be using the Microsoft random number generator (ASP.NET ) to generate a salt to append to the password and then hash. They want to store the salt in the web.config file and the password hashes in the database. What is best practice for salt storage? The developer's concern is that storing the salts in the database will increase traffic volume. I'm not sure if this is the case as we are talking 16 bytes or so. If stored in web.config what level of protection is required?

Cindy

---------------------------------------------------------------------- ---
Sponsored by: Watchfire


Watchfire named worldwide market share leader in web application
security assessment by leading market research firm. Watchfire's AppScan
is the industry's first and leading web application security testing
suite, and the only solution to provide comprehensive and consolidated
remediation task lists at every level of the application. See for
yourself.
Download a Free Trial of AppScan 6.0 today!


https://www.watchfire.com/securearea/appscansix.aspx? id=701300000007t9c
---------------------------------------------------------------------- ----





-------------------------------------------------------------------------
Sponsored by: Watchfire

Watchfire named worldwide market share leader in web application
security assessment by leading market research firm. Watchfire's AppScan
is the industry's first and leading web application security testing
suite, and the only solution to provide comprehensive and consolidated
remediation task lists at every level of the application. See for
yourself.
Download a Free Trial of AppScan 6.0 today!

https://www.watchfire.com/securearea/appscansix.aspx?id=701300000007t9c
--------------------------------------------------------------------------

<Prev in Thread] Current Thread [Next in Thread>