Some of your db passwords are belong to us

Google opened up a new search sevice called Google Code Search today. The new search allows you to search through a huge index of code that the Google search engine has crawled over the years.

Being the curious beings we are, a friend of mine and I immediately started searching for passwords to see just how much Google was indexing. It didn’t turn up much in the way of anything “secretâ€? until we refined our search to just wp-config files (the file that contains the database connection information for Wordpress installs).

That worked. Since Google Code Search actually indexes the contents of compressed files like ZIP and TARBALL files, we were able to find copies of people’s wp-config files and several contained usernames and passwords.

Here’s an example search.

Now, this only pulls up 50 results (after filtering out the sample config files), but we only looked for Wordpress config files. Who knows what other similar files out there are being indexed and made public. So, a lesson to webmasters– don’t put anything you don’t want seen in a zip file on your server. Perhaps obvious to most, but worth repeating.

[source]

Wow, never even thought about using it for these kind of purposes.

About the Author, Dan Cameron:

I'm the owner and solution engineer at Sprout Venture, a web solutions company that specializes in web development including WordPress.

I started my first blog in 2003 and transitioned to WordPress in 2004. Since moving to WordPress I've written a few plugins and themes for public consumption. Lately I'm busy engineering/building/coding and have only been able to share a few code snippets.

If you're in need of some web development, web design or custom WordPress plugins and/or themes contact me, I'll be happy to discuss it with you.

Read More »

  • nstryker
    locals only
  • This is pretty funny. I always tend to think these things are good because it at least gets people thinking about security.

    Not only should your config files not be in a publicly indexed place, but for most WP installations there is no reason that the database should be available to the outside world anyway, so even a compromise of the db password wouldn't allow anyone any access.
  • nstryker
    this is why i just rename my config files config.txt. :-)
blog comments powered by Disqus