Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Murray Roke 503 posts 966 karma points c-trib
    Mar 02, 2010 @ 02:51
    Murray Roke
    0

    Hash and Salt

    Hi all

    I'm trying to find documentation on securing logins.

    I've found you can set passwordFormat="hashed" in the UmbracoMembershipProvider and in the UsersMembershipProvider in the web.config

    However, is there a way to 'salt' the passwords? they do not appear to be salted in the database.

    Also which algorithm is used to hash passwords?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 02, 2010 @ 09:18
    Dirk De Grave
    2

    Murray,

    Both providers derive from the standard asp.net membership providers, so msdn would be best place to find info about hashing and salting.. here's an excerpt from the msdn docs:

    The PasswordFormat property indicates the format that passwords are stored in. Passwords can be stored in ClearEncrypted, andHashed password formats. Clear passwords are stored in plain text, which improves the performance of password storage and retrieval but is less secure, as passwords are easily read if your data source is compromised. Encrypted passwords are encrypted when stored and can be decrypted for password comparison or password retrieval. This requires additional processing for password storage and retrieval, but is more secure, as passwords are not easily determined if the data source is compromised. Hashed passwords are hashed using a one-way hash algorithm and a randomly generated salt value when stored in the database. When a password is validated, it is hashed with the salt value in the database for verification. Hashed passwords cannot be retrieved.

    Hope this helps.

    Regards,

    /Dirk

     

     

     

  • Murray Roke 503 posts 966 karma points c-trib
    Mar 02, 2010 @ 22:12
    Murray Roke
    0

    @Dirk The snippet says setting the password to 'hashed' will use a salt, but looking in the DB there is no salt field (I guess the salt could be concatenated with the hash and stored in the password field) however this does not appear to be the case, if I enter 2 users with the same password, then the value in the password field is identical for each (this is what salting is designed to avoid)

    So... should we add this to codeplex as a feature we wish to add to the core umbraco providers?

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Mar 02, 2010 @ 22:19
    Morten Bock
    1

    @murray Maybe the salt is random per application, and not per user?

  • Murray Roke 503 posts 966 karma points c-trib
    Mar 02, 2010 @ 22:33
    Murray Roke
    0

    @Morten, Perhaps. 'per user' sound more secure to me, but that's only my guess?

  • Ken Mark 82 posts 94 karma points
    Jul 09, 2010 @ 10:44
    Ken Mark
    1

    I definitly think that the passwords should be salted per user out of the box.

  • Max Mumford 266 posts 293 karma points
    Dec 30, 2011 @ 15:02
    Max Mumford
    0

    Any updates on this? Is there any way to go from having an existing "clear" provider and converting it into an encrypted and salted one?

  • Joey 20 posts 44 karma points
    Jan 15, 2012 @ 16:34
    Joey
    2

    As of 4.7.1 the default membership provider does NOT use a salt value. This is a HUGE security hole. Even though passwords are stroed as one way hashed values in the database they can easily be cracked using lookup tables and rainbow tables.

    If you are using any version of Umbraco and haven't made the necessary changes to include a salt you are at high risk of comprimising every user registered on your site RIGHT NOW..

    Adding this to the growing list of changes necessary before I launch my own site. If successful I'll post a new "umbraco project" with a revised membership provider and the steps to update a 4.7.1 installation to utizilize it.

  • Daniel.S 50 posts 135 karma points
    Jan 25, 2012 @ 02:50
    Daniel.S
    2

    I concur that this should be a top priority for Umbraco given the current environment and myriad of cases lately where databases have been compromised and passwords easily cracked using rainbow tables.

    There's an excellent article here about cryptographic storage on Troy Hunt's blog (add the blog to your RSS reader, it's invaluable) that's targeted towards .NET developers.

  • Murray Roke 503 posts 966 karma points c-trib
    Jul 18, 2012 @ 23:05
    Murray Roke
    0

    @Joey Hi, did you ever build anything worth sharing regarding salting passwords? we've got a project now which it appears will require salting passwords.

     

  • Allan Lykke 3 posts 23 karma points
    May 14, 2013 @ 14:36
    Allan Lykke
    0

    Any update regarding salting passwords?

    Has this been solved in Umbraco 6.0.5?

     

  • SC Digital Services Team 104 posts 171 karma points
    Jun 28, 2013 @ 11:23
    SC Digital Services Team
    0

    Just bumping this thread as we are also concerned about the security implications with the default membership provider not salting passwords...

    I know there are changes planned to the v6.2.0 member API (http://our.umbraco.org/contribute/roadmap), but I can't seem to find any further details.

     

  • SC Digital Services Team 104 posts 171 karma points
    Sep 11, 2013 @ 16:08
    SC Digital Services Team
    0

    Another bump for this thread - we will need to use some form of membership provider with Umbraco in the near future, but this security issue with the default provider is still a bit of a concern to us...

  • Dan Evans 629 posts 1016 karma points
    Apr 23, 2014 @ 11:44
    Dan Evans
    0

    I've just created 2 users with the same password in Umbraco 7 and the Hash is the same. So there is still no salting?

    Thanks

    Dan

  • Dan Mothersole 22 posts 109 karma points
    Apr 28, 2014 @ 15:51
    Dan Mothersole
    0

    Hi Dan,

     

    In the old API - pre 7.1 I belive there was a salt applied (from reading the source) but the salt was the last half of the password - not idea in my opinion. 

    This means that if you have two matching passwords the hash in the db will be the same, the password hash stored in the db is actuly made of two parts 1st is the hashed password, 2nd is the salt created form the hashed value from the 2nd half of the password (this is from memory so order could be wrong but you get the idea).

    Now in 7.1 a new API has been introduced and I am still going through this so can't say how the hash and salting is being preformed.

  • Dan Evans 629 posts 1016 karma points
    Apr 28, 2014 @ 17:31
    Dan Evans
    0

    I've just tested in 7.1.1 in both Members and Users and identical passwords still create identical hashes - at least in the same installation of Umbraco.

  • Pogo 6 posts 29 karma points
    Oct 08, 2014 @ 20:13
    Pogo
    0

    This is actually easy to fix. Just set "useLegacyEncoding" to "False" on the membership providers within the Web.config.

    http://blog.reneorban.com/2014/10/hash-and-salt-umbraco-passwords.html

Please Sign in or register to post replies

Write your reply to:

Draft