Results 1 to 10 of 10

Thread: User Authentication Security

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Posts
    258

    User Authentication Security

    How secure is a php script that retrieves user login via php script and stores it in a MySQL DB? I'd have thought bar anyone gaining access to the DB, very... is this somewhat naive?

    Why would I want to use encryption on the user's passwords, such as MD5? Would this be solely to provide my users with a sense of personal security from the script's host?

    Just wanting some informed opinions.

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    The only reason I provide md5() in my applications where there are multiple users is so that admin's cannot look in the database, find out the password, and then mess with their account.

    Of course, if they knew a little PHP, then they could just replace the password with another hashed one...but if they know PHP, there's probably very little that can be done to prevent it.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Posts
    258
    That's what I figured. :S

    So, the advantage of it is only to give the users of the forum some assurance that whatever passwords they use, can't be seen by others who may have access to the account details... or anyone that hacks into the account's data area.

    Thanks

  4. #4
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    no it isn't for the assurance of the users. they dont' even know how it is stored unless it says in text somewhere.

    it is very possible to hack a mysql database if the codeing is not good hence the reason to keep the passwords encrypted, not just for the admins.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Posts
    258
    no it isn't for the assurance of the users. they dont' even know how it is stored unless it says in text somewhere.
    Precisely. Which should be accepted as is from a trusted source... hopefully.

    it is very possible to hack a mysql database if the codeing is not good hence the reason to keep the passwords encrypted, not just for the admins.
    Which goes back to what I was saying before... I think.

    -----------
    So, the advantage of it is only to give the users of the forum some assurance that whatever passwords they use, can't be seen by others who may have access to the account details... or anyone that hacks into the account's data area.
    -----------

    As always, thanks guys.

  6. #6
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    I think you missed something. the users of the forum have no idea the passwords are encrypted. the reason is they can't see in the database themselves.

    the main reasons we encrypt passwords is becasue we don't want our software hacked and then people wouldn't trust it and never by it.

    it is the makers of the forum, not the users.

    not jsut forums but think about if we had credit card numbers (pretty stupid but it has been done) in the database and no encryption and somebody hacked the database. they would get all those cc #'s and the users name and password. the users would be furious because the makers didn't encrypt the passwords. so it is up to the script makers to protect there investment. it isn't to reassure the users.

  7. #7
    Lively Member Brandito's Avatar
    Join Date
    Nov 2000
    Location
    Here, There, Every Where!
    Posts
    106

    idea

    Sorry, but I skimmed what everyone else wrote.... so they might have already stated what I am about to say.

    You should keep user name, password, database stuff all stored in a seperate file so if you give out your code you don't have to worry about people seeing that information. (Stored in Variables)

    Encryption is also a MUST!!! Why encrypt the login and password you ask? Because of Injection attacks. I can hack your site without knowing the password in most cases. By using encryption functions... you are more safe. For more information you can read some papers I wrote on the subject at
    www.jotdot.net/brandito/authentic

    There are also some other ways to secure your logins... but you don't need to worry about them if you design your pages correctly. (by the way... cookie authentication is easy to hack)

    hope that helps,
    Brandito
    Master of Cyber Fu - A Temple of Digital Chi

  8. #8
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337

    Re: idea

    Originally posted by Brandito
    (by the way... cookie authentication is easy to hack)

    hope that helps,
    Brandito
    and how do you figure that? can you give an example or something to back that statement up?

  9. #9
    Lively Member Brandito's Avatar
    Join Date
    Nov 2000
    Location
    Here, There, Every Where!
    Posts
    106

    yes

    There are many reasons and examples why. But of course it is all on how you implement it and how secure your site is. If your site is poorly programmed... have cookie authentication will rape you every time.

    example: phpbb was flawed by an html injection attack allowing everyone who went to a maliciously coded post to send there cookie authentication data to the "hacker". There are many other examples.

    l8r,
    Brandito

    again... it is all based on your implementation
    Master of Cyber Fu - A Temple of Digital Chi

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Posts
    258
    Thanks Brandito, that was an interesting read and has given me something else to think about. I'm going to try these sql injection attacks out on my site.

    Hopefully it'll be ok as I've already considered malicious data entry as it seems to be covered in published PHP works too (to a small degree).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width