wordpress security

10
Wordpress Security Tim Elliott

Upload: tim-elliott

Post on 22-Oct-2014

10 views

Category:

Documents


5 download

DESCRIPTION

Presentation from my talk about securing Wordpress at the MSP Wordpress meeting on March 22, 2012.

TRANSCRIPT

Page 1: Wordpress Security

Wordpress SecurityTim Elliott

Page 3: Wordpress Security

Wordpress Vulnerabilities

• It’s Open Source

• Link Injection

• TimThumb

• Social Engineering

Page 4: Wordpress Security

The Easy Stuff

• Stay updated!

• Don’t use ‘admin’ user

• Don’t display usernames in post meta

• Change database table prefix from ‘wp_’

• Use strong passwords

Page 5: Wordpress Security

The Easy Stuff

• Verify file permissions (files=644 / dir.=755)

• Use secret keys in wp-config.php

• Remove Wordpress version number from theme header

• Run backups often (like everyday)

• Secure wp-includes & wp-config.php

Page 6: Wordpress Security

.htaccess# Protect wpconfig.php<files wp-config.php>order allow,denydeny from all</files>

# Protect .htaccess<Files .htaccess> Order Allow,Deny Deny from all </Files>

# BEGIN WordPress<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /directory_goes_here/RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /directory_goes_here/index.php [L]</IfModule># END WordPress

# Block the include-only filesRewriteRule ^wp-admin/includes/ - [F,L]RewriteRule !^wp-includes/ - [S=3]RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]RewriteRule ^wp-includes/theme-compat/ - [F,L]

# Disable directory browsingOptions All -Indexes

Page 7: Wordpress Security

Helpful Plugins

• WP Security Scan

• BulletProof Security

• TimThumb Vulnerability Scanner

• WordPress File Monitor

• Login Lock

• ManageWP Worker

Page 9: Wordpress Security

The Harder Stuff• Lock down wp-admin to specific IP’s

• Add to .htaccess in wp-admin root:

• Force SSL on login (requires certificate)

• Add to wp-config.php: define('FORCE_SSL_ADMIN', true);

• Move wp-content directory

• http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content

# Lockdown wp-adminAuthUserFile /dev/nullAuthGroupFile /dev/nullAuthName “Access Control”AuthType Basicorder deny,allowdeny from allAllow from YOUR_IP_HERE