Jump to content

Securing database passwords


kiss-o-matic

Recommended Posts

So, what's the standard here?  I realize that my site right now is probably not optimal.  I have a php file I include which connects to my database (and stores the database passwords).  Back on an provider, they were attacked and Perl was stopped.  So, when someone accessed the site, just displayed the code, in all it's glory.  As nothing is perfect, I assume that can happen now. 

 

So, considering you need a password to actually get to the database, I'm interested in hearing of secure methods to store the DB password.  I guess if you refuse connections from remote machines in MySQL that's a start.  Renaming the phpmyadmin link would be next.

 

Thoughts?

Cheers

 

Link to comment
Share on other sites

make all your code as .php

or define then as constant and put them in one page (php page)

 

That won't fix the issue that kiss-o-matic reported about what happened with the PERL script. That could happen in PHP too. You could zend encode/guard your scripts.

 

http://www.zend.com/products/zend_guard

 

 

FYI - You can use md5() for saving user passwords in a table.

 

 

Link to comment
Share on other sites

Thanks.  So Zend Guard basically makes executables out of your php scripts?  I'm not so worried about people seeing the code, or the database structure.  It's mainly the passwords. 

 

FYI - You can use md5() for saving user passwords in a table.

 

I md5() user's passwords, but not the passwords in the mysql table (the ones I'm worried about).  I guess it's much more likely in this situation.  If apache dies, you shouldn't be able to see *anything* on the box.  Can Apache spontaneously lose PHP support?  Perl obviously runs on it's own, so is far easier to break while leaving apache running fine.  So, I guess when you think of it the odds are somewhat slim.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.