wordpress server security

18
WordPress Server Security Best Practices Peter Baylies aka @pbaylies on Twitter Semper Fi Web Design

Upload: peter-baylies

Post on 15-Jun-2015

705 views

Category:

Internet


1 download

DESCRIPTION

WordPress Server Security

TRANSCRIPT

Page 1: WordPress Server Security

WordPress Server Security Best Practices

Peter Baylies aka @pbaylies on Twitter

Semper Fi Web Design

Page 2: WordPress Server Security

Security

• isn't simple

• isn't perfect

• isn't ever finished

• ...no pressure!

Page 3: WordPress Server Security

Basic Tips and Gotchas• Backups, backups, backups.

• Change the defaults

• Use strong passwords(and password salts!)

• Use SFTP and HTTPS

• Update all the things

• Trust no one.

Page 4: WordPress Server Security
Page 5: WordPress Server Security

Do I Need To Do All This?• Probably? - depends on your situation.

• Find a great managed hosting company?

• http://wpdevshed.com/managed-wordpress-hosting/

• Have a good sysadmin - or be one.

Page 6: WordPress Server Security
Page 7: WordPress Server Security

Good Advice• Limiting Access - reduce possible entry points

• Containment - minimize potential damage

• Preparation and Knowledge - backups!

• Trusted Sources - download from reputable sites

• http://codex.wordpress.org/Hardening_WordPress

Page 8: WordPress Server Security
Page 9: WordPress Server Security

Understanding  the  Environment

•  “LAMP”  Environment  –  OS  -­‐                                Linux  –  Webserver  -­‐  Apache  –  Database  -­‐      MySQL  –  Scripting  -­‐        PHP  

•  and…  WordPress!

Page 10: WordPress Server Security

WordPress Security• Move wp-config.php out of the webroot

• Friends don't let friends use any eval plugins.

• iThemes Security - https://ithemes.com/tutorials/getting-started-ithemes-security-part-1/

• Wordfence - https://wordpress.org/plugins/wordfence/

• BruteProtect (soon to be JetPack) - https://wordpress.org/plugins/bruteprotect/

Page 11: WordPress Server Security

OS Level Security• File permissions

• User groups

• mount / chroot / jail

• Firewalls - csf / lfd

• Virtual Machines

• ...and much more.http://en.wikipedia.org/wiki/Unix_security

Page 12: WordPress Server Security

Web Server Security• Turn off indexing

• Disable unnecessary modules

• Use Deny / Allow directives, .htaccess

• Hardening - mod_security, mod_evasive

• Consider using a service like CloudFlare

• http://www.tecmint.com/apache-security-tips/

Page 13: WordPress Server Security

Database security• User permissions

• Disable remote access

• Change the defaults

• mysql_secure_installation

• http://dev.mysql.com/doc/refman/5.0/en/mysql-secure-installation.html

Page 14: WordPress Server Security

PHP Security• suPHP - http://www.suphp.org/Home.html

• Suhosin - back from the dead - https://github.com/stefanesser/suhosin

• php.ini - disable_functions - http://php.net/manual/en/ini.core.php#ini.disable-functions

• php.ini - set open_basedir - http://php.net/manual/en/ini.core.php#ini.open-basedir

Page 15: WordPress Server Security

More Tools and Testing

• Sucuri Sitecheck - http://sitecheck.sucuri.net/

• Beyond Security - https://www.scanmyserver.com/

• Hacker Target - http://hackertarget.com/wordpress-security-scan/

• WPScan - https://github.com/wpscanteam/wpscan

Page 16: WordPress Server Security
Page 17: WordPress Server Security

So You Think You Got• Don't Panic!

• Contact your host

• Remember those backups I mentioned?

• Change passwords, check logs

• Tools - rkhunter, ClamAV, Linux Malware Detect

• http://codex.wordpress.org/FAQ_My_site_was_hacked

Page 18: WordPress Server Security

Questions?• Thank you!

• Slides available here -