Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Security: balancing two conflicting password policies

by danb (Friar)
on May 12, 2005 at 23:33 UTC ( [id://456570]=note: print w/replies, xml ) Need Help??


in reply to Security: balancing two conflicting password policies

...how to approach storing a password in a secure way, without storing keys or passwords in the clear, and without requiring user interaction. It seems like an impossible task...

You hit the nail on the head. It is impossible (1). Since they probably don't think it's impossible, they must think that compiling a program is the same as encrypting it. It's not, just as dragonchild said above. In fact, if they think that is secure, they might be impressed if you told them that your entire application is ROT-26 encrypted.

Furthermore, even if they changed the policy so that it was possible to comply with by allowing you to store the private key in plain text, then it would still not increase the security of the credentials very much. Because then all a cracker has to do is get the plain text private key.

In other words, at some point, something has to be stored in plain text. You can encrypt it 10 times and 9 of the private keys will be encrypted, but the last one has to be plain text. That might delay a script kiddie, but I wouldn't put much stock in that defense.

The only way to keep someone from getting the credentials is plain old security. It doesn't matter if it's in the source code, binary, configuration file, or what. If a cracker gets into your system and can read the password and the private key, then it's game over.

So you have to focus on preventing crackers from getting the password file and the private key file. Good luck in dealing with this situation (ugh, and the politics).

(1) OK, actually it is possible. But you would need a Cray super computer. Because instead of storing the private key in plain text, you would have to run a brute force decryption crack program to get the contents of the encrypted passwords every time your app starts up.

Or, instead of encrypting the password, you could store it in the middle of some really bad VB code. While reading the code, the cracker would go clinically insane before he finds the password.

-Dan

  • Comment on Re: Security: balancing two conflicting password policies

Replies are listed 'Best First'.
Re^2: Security: balancing two conflicting password policies
by Tanktalus (Canon) on May 13, 2005 at 00:06 UTC

    It's not impossible, it's just improbable. ;-)

    We've had this discussion before. And my answer was to not store passwords at all. The difficult part, of course, is that this would require changing database servers - probably just as much of a beaurocratic nightmare, if not moreso, than what the OP is facing already.

    This kinda reminds me of the old maxim: fast, working, cheap - pick two. Here it is: secure at the front, secure at the back, database that requires userid/password to be secure - pick two. And, like management making the first decision, management here is likely to say "All three!" as if just decreeing it changes the laws of physics.

    (And here I go, revealing a bit more about my life by the assumptions that I make in my answer...)

      Just store it in a hidden system file, then its not in the application code:)

      If the user account is restricted by host ip using database privileges and only granted what it needs the worst that happens upon password discovery is your application data gets compromised if someone gets on the box.

      If someone is on the box they can most likely get your encryption keys and code as easily as they can get the password so the encryption wont help much

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://456570]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-04-19 18:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found