wordpress security best practices

61
WordPress Security Best Practices Brennen Byrne @brennenbyrne Sam Hotchkiss @hotchkissconsulting

Upload: jessepollak

Post on 29-Nov-2014

1.930 views

Category:

Technology


2 download

DESCRIPTION

The slides for Brennen Byrne and Sam Hotchkiss' talk on WordPress security best practices at WordCamp Phoenix 2014.

TRANSCRIPT

Page 1: WordPress Security Best Practices

WordPress Security Best Practices

Brennen Byrne @brennenbyrne

Sam Hotchkiss @hotchkissconsulting

Page 2: WordPress Security Best Practices

How to make your site impossible to hack:

Page 3: WordPress Security Best Practices

Delete it.

Page 4: WordPress Security Best Practices

This talk is for the rest of you.

Page 5: WordPress Security Best Practices

For the next 100 minutes, we’ll cover the:• 5 Rules • 4 Tools and • 3 Important Habits

To keep your site safe.

Page 6: WordPress Security Best Practices

Sam HotchkissI run a WordPress agency in Bath, Maine and am the lead developer for the WordPress security plugin BruteProtect.

Page 7: WordPress Security Best Practices

Brennen ByrneI’m one of the founders of Clef, a security plugin for WordPress that lets you log in without a password.

Page 8: WordPress Security Best Practices

WordPress Security Best Practices

Brennen Byrne @brennenbyrne

Sam Hotchkiss @hotchkissweb

Page 9: WordPress Security Best Practices

Checklist

Slidesgetclef.com/wordcamp-security

getclef.com/wordpress-security-checklist

Page 10: WordPress Security Best Practices

Who attacks and why?it’s not usually because they want to be friends

Page 11: WordPress Security Best Practices

pharma / affiliateif you’re not using akismet, you know these well

Page 12: WordPress Security Best Practices

link injectionSEO hacking at its worst

Page 13: WordPress Security Best Practices

hacktivistsSyrian Electronic Army, lulzsec, anonops, etc.

Page 14: WordPress Security Best Practices

drive by downloadyou’re just the host

Page 15: WordPress Security Best Practices

redirectspretty much just hijacking your site

Page 16: WordPress Security Best Practices

How do they attack?know your own weaknesses

Page 17: WordPress Security Best Practices

XSScross site scripting: comments or posts that

attack other visitors to your site

Page 18: WordPress Security Best Practices

CSRFcross site request forgery: once you’re

authenticated, other sites can pretend to be you

Page 19: WordPress Security Best Practices

brute forcehow many tries does it take to guess

your password?

Page 20: WordPress Security Best Practices

brute force + botnethow long does it take an army to guess your

password?

Page 21: WordPress Security Best Practices

server breachsites where you log in store your password.

(even though they shouldn’t…) what happens if they mess up?

Page 22: WordPress Security Best Practices

bucket brigadean attacker sits between you and a site you log in to, when you send your password, they read it before passing it on

Page 23: WordPress Security Best Practices

but really, insecure plugins and themes

WordPress core has a team of security experts looking for these flaws all the time. Most plugins do not.

Page 24: WordPress Security Best Practices

Do you need to worry?some people think that their site is too small to be

attacked

Page 25: WordPress Security Best Practices

WordPress is 20% of the web

most attackers are counting on a small success rate across a huge number of sites

Page 26: WordPress Security Best Practices

Bots attack every siteBruteProtect blocked more than 20m attacks last

year, and it’s on less than 0.01% of WordPress sites

Page 27: WordPress Security Best Practices

Botnet Economicsone small site infects hundreds of users, who will

help infect more, bigger sites

Page 28: WordPress Security Best Practices

Now, The RulesThe first rule of WordPress is…

Page 29: WordPress Security Best Practices

Respect your passwords

“password” doesn’t cut it anymore

1.

Page 30: WordPress Security Best Practices

Require strong passwords

if you use them at all

Page 31: WordPress Security Best Practices

Don’t email themto anyone, ever.

Page 32: WordPress Security Best Practices

Don’t submit them without SSL on public wifi

or even private wifis that you don’t know that well

Page 33: WordPress Security Best Practices

respect admineven if you don’t respect your administrators

2.

Page 34: WordPress Security Best Practices

keep admin separateonly use it when you need it

Page 35: WordPress Security Best Practices

change db table prefix

wp-avoidinghackersallday_users >

wp_users

Page 36: WordPress Security Best Practices

make admin something other than

“admin”why make things easier?

Page 37: WordPress Security Best Practices

Sanitize user inputyou don’t know where it’s been

3.

Page 38: WordPress Security Best Practices

do not write your own SQL

or, if you do, clean it carefully before you use it

Page 39: WordPress Security Best Practices

validate data before you display it

avoid running hack.js in your users’ browsers

Page 40: WordPress Security Best Practices

Disclose Responsiblyand quietly

4.

Page 41: WordPress Security Best Practices

Toolsnot that kind of tool

Page 42: WordPress Security Best Practices

SFTPwhichever you like

Page 43: WordPress Security Best Practices

BruteProtectawesome

Page 44: WordPress Security Best Practices

Clefalso awesome

Page 45: WordPress Security Best Practices

Cloakbecause WiFi is dangerous

!

(this only works for Mac users)

Page 46: WordPress Security Best Practices

Important habitsgood security hygiene

Page 47: WordPress Security Best Practices

check for ssllook for the little lock before typing anything

Page 48: WordPress Security Best Practices

use different passwords

more important than using individually strong ones

!

better yet… don’t use passwords at all

Page 49: WordPress Security Best Practices

use a password manager

computers have better memories for this kind of stuff

Page 50: WordPress Security Best Practices

don’t trust new senders

.exe and .zip should be feared

Page 51: WordPress Security Best Practices

educate your clientsit’s your responsibility (and will save you a lot of

headache)

Page 52: WordPress Security Best Practices

Cleaning uphow do you recover after your site gets

compromised?

Page 53: WordPress Security Best Practices

first stepchange all of your passwords — admin, users,

host, keys, everything you can

Page 54: WordPress Security Best Practices

save wp-contentcopy the folder of your actual content

Page 55: WordPress Security Best Practices

scan your local machine

make sure your computer is not infected

Page 56: WordPress Security Best Practices

burn it with fire/www, chron, plugins and themes

Page 57: WordPress Security Best Practices

fresh installyou can restore a backup, save old themes, but nothing works as well as starting from scratch

Page 58: WordPress Security Best Practices

re-add wp-contentget back the things you’ve created

Page 59: WordPress Security Best Practices

last stepchange all of your passwords — admin, users,

host, everything you can

Page 60: WordPress Security Best Practices

Slidesgetclef.com/wordcamp-security

Checklistgetclef.com/wordpress-security-checklist

Page 61: WordPress Security Best Practices

Questionshttp://getclef.com/wordpress-security-checklist