![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
currently we store user/pass in a plain php file, but we want to have a better method to protect the MySQL login authentication by hiding the real user name & password Hiding it from whom? By putting it in a plain php file, you are hiding it from all except those who can access the php file. So who else do you wish to hide it from. The solution depends on this. okay, let consider it is a Perl script, running on the server, any advice? i.e. sometimes, you even don't want the root to know the password to the remote DB... If your script can know the password, so can root. If you encrypt the password, your script also has to have the key to decrypt it. If it isn't necessary to decrypt it, then it *IS* the password. Some people have attempted this anyway (see Pay TV vendors with their descrambler boxes) but they get hacked in spite of supposedly "tamperproof" hardware. consider some applications like e-banking system, how they protect your data from being modified by the `root` account? |
#12
| |||
| |||
|
|
i.e. sometimes, you even don't want the root to know the password to the remote DB... If your script can know the password, so can root. If you encrypt the password, your script also has to have the key to decrypt it. If it isn't necessary to decrypt it, then it *IS* the password. Some people have attempted this anyway (see Pay TV vendors with their descrambler boxes) but they get hacked in spite of supposedly "tamperproof" hardware. consider some applications like e-banking system, how they protect your data from being modified by the `root` account? By encrypting the data and *NOT* storing the key on the computer. Then |
|
all root can get is encrypted data. But all depends on how "secure" things need to be. Perfect security is an illusion. The best you can get is sufficient security. This is when the costs for a successful attack are higher than the value of the protected good. The traditional use-more-than-once password is already a compromise, sacrificing security for simplicity. A password entered on the keyboard should be considered exposed (keyloggers exist, even in pure software) and must never be re-used. If this is a viable attack vector you need external hardware like key tokens or smartcard terminals. |
![]() |
| Thread Tools | |
| Display Modes | |
| |