Leaving the Back Door Open: File Permissions in WordPress
June 9th, 2008 | by blank89 |
Plugins directory
One way they can be sure their exploit will work is if they can figure out what software their victim is running. This happens when the victim is giving away too much information. In my article about hardening Wordpress I showed you some plugins that will try to hide your WP version. It usually does this by removing references to the version in the output html. However, there is another way to figure out what software is running on the server. If your file permissions are set wrong, an attacker could potentially figure out what themes and plugins you’re running. If the attacker can do that, he doesn’t need to find a vulnerability in wordpress, he can just find a vulnerability in one of those plugins or themes.

Themes directory
Remember that themes can have vulnerabilities as well. Simply checking the themes directory will allow for the same kind of information gathering as the plugins directory.
As a proof of concept, go to a poorly maintained Wordpress blog, and after the “www.example.com” type “/wp-content/themes” or “/wp-content/plugins”. If the blog is vulnerable, you will see a directory listing. If it is not, you will see a 404 error. To fix the problem, the permissions on these directories must be set so that the world group does not have read permissions.










2 Responses to “Leaving the Back Door Open: File Permissions in WordPress”
By jesse on Jun 14, 2008 | Reply
lol, nice directory there eh?
alternatively.. upload an index.html
By blank89 on Jun 17, 2008 | Reply
If you upload an index.html/.php and the permissions are set incorrectly for the whole directory structure the attacker can still probe for vulnerable plugins by trying to go to the specific plugin directory and looking for a response.