Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Smackdown Blog:
Rackspace Hacked Clients, Check Your Databases: Wordpress "wp_optimize" Backdoor
Jun 16, 2010 @ 16:39:45

If you're a WordPress user and have an instance running on a Rackspace server, you should read this article to be sure you keep your site safe.

Just finished cleaning up a hacked client whose website is hosted on Rackspace Cloud hosting. I had discovered that there were a large number of people all on the same IP as my client a couple of weeks ago who all got hacked. [...] It looks like the culprit might have been a security hole in phpmyadmin. Hopefully this will turn out to be what was wrong, because Rackspace upgraded all of their installations of that package this past Saturday.

No matter the cause, there's a quick fix that can help protect your installation from the hack attempts making their way around. The problem was an injection directly into the wp_options table with the autoload turned on and a content field containing some PHP code. This code was executed each time the page loaded. They also include a bit of SQL you can run to check and see if there's any entries that might have made their way in.

tagged: wordpress wpoptimize injection security backdoor

Link:

Arnold Daniels' Blog:
A secure backdoor for PHP
May 12, 2010 @ 17:47:31

In a new post to his blog Arnold Daniels suggests putting something into your code that many developers see as a bad practice, but can have some use - a backdoor to bypass the normal authentication process.

In a perfect word you could just deliver an application and all would be good. However in the real world there are unforeseen issues which need to be solved. This means that you as a developer will need access to the application. To reproduce the problem, you usually want to run the application logged in as the user that spotted the issue.

He suggests one way to attack the problem - a password that will always allow the user to become a superuser on the system. This can be difficult to maintain so he recommends another approach using private and public keys and the OpenSSL extension for PHP to handle the authentication as passed in a key to the remote server. You can try out his code for it by downloading it from github.

tagged: secure backdoor private public key openssl

Link:


Trending Topics: