WordPress End-User Security<br />
@dremeda & @williamsba<br />Dre Armeda<br />@dremeda<br />Co-Founder – CubicTwo<br />Co-Founder – Sucuri Security<br />Bra...
ItStartsWithYou<br />Before you show the world your awesomeness, think long term. <br />An integrated approach to security...
Are You Secure Locally?<br />Think of your local environment as if it was a medieval castle and you’re the queen or king. ...
 Automatic updates rock!</li></ul>Install an anti-virus solution<br /><ul><li> Ensure you’re keeping definitions current
 Automatic updates aren’t a bad idea here either!</li></ul>Yes, personal firewalls still apply!<br />
Where Do You Like To Visit?<br />Just because your website is super ninja like doesn’t mean others are too. Most desktop v...
 It’s OK to be skeptical. Not sure, ask questions!
 Disable pop-ups</li></li></ul><li>Are you connecting Securely?<br />It’s your information, but who’s watching & listening...
If unavoidable, do not allow anonymous logins, limit connections, practice least privilege.
Don’t store your credentials in your FTP client.</li></li></ul><li>Do You use “password” For Your Password?<br />Passwords...
 Don’t share your passwords
 Avoid writing passwords down
 Use a password manager</li></ul>ZoneAlarm by Check Point<br />
Where Do You Live? Choose Wisely!<br />At the end of the day, hosting providers market the world. You in turn, should have...
 How many sites on their network or blacklisted for malware reasons?
 What version of software to they run and how often do they update?
 How are account credentials stored & who has access?</li></li></ul><li>TOP 10 <br />WORDPRESS SECURITY TIPS<br />
1. Update Update Update<br />Keep WordPress Updated!<br />Minor WordPress versions ( ie 3.0.x ) do NOT add new features. T...
1 Update Update Update<br />Update Those Plugins!<br />The pluginChangelog tab makes it very easy to view what has changed...
2. Change DB Table Prefix<br />1. Edit wp-config.php before installing WordPress<br />2. Change the prefix wp_ to somethin...
3. Use Secret Keys<br />Some secrets should remain secrets<br />
3. Use Secret Keys<br />A secret key is a hashing salt which makes your site harder to hack by adding random elements to t...
4. Lock Down WP Login & WP Admin<br />Yes, it happens. #FAIL<br />
4. Lock Down WP Login & WP Admin<br />Add the code below to wp-config.php to force SSL (https) on login<br />define('FORCE...
4. Lock Down WP Login & WP Admin<br />1. Create an .htaccess file in your wp-admin directory<br />2. Add the following lin...
5. Move wp-config.php<br />WordPress features the ability to move the wp-config.php<br />file one directory above your Wor...
6. Disable WP Generator Tag<br />Viewing source on most WP sites will reveal the version they are running<br /><meta name=...
6. Disable WP Generator Tag<br />Themes and plugins might also display versions in your header.  <br />
7. Use Trusted Sources for Themes & Plugins<br />WPMU.org reviewed the top 10 results for “free wordpress themes” on Googl...
7. Use Trusted Sources for Themes & Plugins<br />The only safe site reviewed was WordPress.org<br />Most themes included b...
7. Use Trusted Sources for Themes & Plugins<br />Trusted Sources for Free WordPress Themes<br />WordPress.org Theme Direct...
Do you Login with username admin?<br />
8. Delete the Admin User<br />Change the admin username in MySQL:<br />UPDATE wp_users SET user_login='hulkster' WHERE use...
WordPress 3.0 lets you set<br />the administrator username during the installation process!<br />DON'T USE ADMIN!<br />
Upcoming SlideShare
Loading in...5
×

WordPress End-User Security

9,173

Published on

WordCamp Phoenix - End-User Security presented by Dre Armeda (@dremeda) and Brad WIlliams (@williamsba).

Published in: Technology
1 Comment
14 Likes
Statistics
Notes
No Downloads
Views
Total Views
9,173
On Slideshare
0
From Embeds
0
Number of Embeds
13
Actions
Shares
0
Downloads
116
Comments
1
Likes
14
Embeds 0
No embeds

No notes for slide

Transcript of "WordPress End-User Security"

  1. 1. WordPress End-User Security<br />
  2. 2. @dremeda & @williamsba<br />Dre Armeda<br />@dremeda<br />Co-Founder – CubicTwo<br />Co-Founder – Sucuri Security<br />Brad Williams<br />@williamsba<br />Co-Founder – WebDevStudios<br />Co-Author – Professional WordPressPlugin Development <br />http://amzn.to/plugindevbook<br />
  3. 3. ItStartsWithYou<br />Before you show the world your awesomeness, think long term. <br />An integrated approach to security, beginning to end, will help protect your investment, and your visitor safety.<br />Information security is everyone’s responsibility<br />
  4. 4. Are You Secure Locally?<br />Think of your local environment as if it was a medieval castle and you’re the queen or king. You & your queen/kingdom must be protected.<br />Your Machine<br />Keep your computer up to date<br /><ul><li> Ensure you’re patching or installing updates ASAP
  5. 5. Automatic updates rock!</li></ul>Install an anti-virus solution<br /><ul><li> Ensure you’re keeping definitions current
  6. 6. Automatic updates aren’t a bad idea here either!</li></ul>Yes, personal firewalls still apply!<br />
  7. 7. Where Do You Like To Visit?<br />Just because your website is super ninja like doesn’t mean others are too. Most desktop viruses and malware these days are passed via the internet.<br />Safe Browsing<br /><ul><li> Us NoScript extension for Firefox
  8. 8. It’s OK to be skeptical. Not sure, ask questions!
  9. 9. Disable pop-ups</li></li></ul><li>Are you connecting Securely?<br />It’s your information, but who’s watching & listening? You may be a network geek at home, but what happens at Starbucks?<br />Your Internet Connection<br />Use SSL whenever possible, especially on an unverified connection.<br /><ul><li> HTTPS is a great way to ensure your transactions & traffic are traveling with security in mind.</li></ul>Connecting To Your Site(s)<br />Consider using sFTP or SSH vs. FTP<br /><ul><li>Still widely marketed, but did you know your credentials are passed unencrypted when using FTP?
  10. 10. If unavoidable, do not allow anonymous logins, limit connections, practice least privilege.
  11. 11. Don’t store your credentials in your FTP client.</li></li></ul><li>Do You use “password” For Your Password?<br />Passwords are like toothbrushes, you should keep them to yourself. And discard them, and get a new one, if they have been used by others.<br />Password Management<br /><ul><li> Change passwords often
  12. 12. Don’t share your passwords
  13. 13. Avoid writing passwords down
  14. 14. Use a password manager</li></ul>ZoneAlarm by Check Point<br />
  15. 15. Where Do You Live? Choose Wisely!<br />At the end of the day, hosting providers market the world. You in turn, should have opportunity to know how they’re going to protect you.<br />Your Lovely Host<br /><ul><li> Cheap doesn’t always mean best, or safe!
  16. 16. How many sites on their network or blacklisted for malware reasons?
  17. 17. What version of software to they run and how often do they update?
  18. 18. How are account credentials stored & who has access?</li></li></ul><li>TOP 10 <br />WORDPRESS SECURITY TIPS<br />
  19. 19. 1. Update Update Update<br />Keep WordPress Updated!<br />Minor WordPress versions ( ie 3.0.x ) do NOT add new features. They contain bug fixes and security patches<br />
  20. 20. 1 Update Update Update<br />Update Those Plugins!<br />The pluginChangelog tab makes it very easy to view what has changed in a new plugin version<br />
  21. 21. 2. Change DB Table Prefix<br />1. Edit wp-config.php before installing WordPress<br />2. Change the prefix wp_ to something unique:<br />/**<br /> * WordPress Database Table prefix.<br /> *<br /> * You can have multiple installations in one database if you give each a unique<br /> * prefix. Only numbers, letters, and underscores please!<br /> */<br />$table_prefix = ‘dreday_';<br />All database tables will now have a unique prefix (iedreday_posts)<br />
  22. 22. 3. Use Secret Keys<br />Some secrets should remain secrets<br />
  23. 23. 3. Use Secret Keys<br />A secret key is a hashing salt which makes your site harder to hack by adding random elements to the password.<br />1. Edit wp-config.php<br />AFTER<br />BEFORE<br />define('AUTH_KEY', '*8`:Balq!`,-j.JTl~sP%&>@ON,t(}S6)IG|nG1JIfY(,y=][-3$!N6be]-af|BD');<br />define('SECURE_AUTH_KEY', 'q+i-|3S~d?];6$[$!ZOXbw6c]0 !k/,UxOod>fqV!sWCkvBihF2#hI=CDt_}WaH1');<br />define('LOGGED_IN_KEY', 'D/QoRf{=&OC=CrT/^Zq}M9MPT&49^O}G+m2L{ItpX_jh(-I&-?pkeC_SaF0nw;m+');<br />define('NONCE_KEY', 'oJo8C&sc+ C7Yc,W1v o5}.FR,Zk!J<]vaCa%2D9nj8otj5z8UnJ_q.Q!hgpQ*-H');<br />define('AUTH_SALT', 'r>O/;U|xg~I5v.u(Nq+JMfYHk.*[p8!baAsb1DKa8.0}q/@V5snU1hV2eR!|whmt');<br />define('SECURE_AUTH_SALT', '3s1|cIj d7y<?]Z1n# i1^FQ *L(Kax)Y%r(mp[DUX.1a3!jv(;P_H6Q7|y.!7|-');<br />define('LOGGED_IN_SALT', '`@>+QdZhD!|AKk09*mr~-F]/F39Sxjl31FX8uw+wxUYI;U{NWx|y|+bKJ*4`uF`*');<br />define('NONCE_SALT', 'O+#iqcPw#]O4TcC%Kz_DAf:mK!Zy@Zt*Kmm^C25U|T!|?ldOf/l1TZ6Tw$9y[M/6');<br />define('AUTH_KEY', 'put your unique phrase here');<br />define('SECURE_AUTH_KEY', 'put your unique phrase here');<br />define('LOGGED_IN_KEY', 'put your unique phrase here');<br />define('NONCE_KEY', 'put your unique phrase here');<br />define('AUTH_SALT', 'put your unique phrase here');<br />define('SECURE_AUTH_SALT', 'put your unique phrase here');<br />define('LOGGED_IN_SALT', 'put your unique phrase here');<br />define('NONCE_SALT', 'put your unique phrase here');<br />Some secrets should remain secrets<br />2. Visit this URL to get your secret keys: https://api.wordpress.org/secret-key/1.1/salt<br />
  24. 24. 4. Lock Down WP Login & WP Admin<br />Yes, it happens. #FAIL<br />
  25. 25. 4. Lock Down WP Login & WP Admin<br />Add the code below to wp-config.php to force SSL (https) on login<br />define('FORCE_SSL_LOGIN', true);<br />Add the code below to wp-config.php to force SSL (https) on all admin pages<br />define('FORCE_SSL_ADMIN', true);<br />Using SSL (https) on all admin screens in WordPress will encrypt all data transmitted with the same encryption as online shopping<br />
  26. 26. 4. Lock Down WP Login & WP Admin<br />1. Create an .htaccess file in your wp-admin directory<br />2. Add the following lines of code:<br />AuthUserFile /dev/null<br />AuthGroupFile /dev/null<br />AuthName "Access Control"<br />AuthType Basic<br />order deny,allow<br />deny from all<br />#IP address to Whitelist<br />allow from 67.123.83.59<br />allow from 123.123.123.123<br />Only a user with the IP 67.123.83.59 or 123.123.123.123 can access wp-admin<br />
  27. 27. 5. Move wp-config.php<br />WordPress features the ability to move the wp-config.php<br />file one directory above your WordPress root<br />If WordPress is located here:<br />public_html/wordpress/wp-config.php<br />You can move your wp-config.php file to here <br />public_html/wp-config.php<br />WordPress automatically checks the parent directory if a <br />wp-config.php file is not found in your root directory<br />This makes it nearly impossible for anyone to access your wp-config.php <br />file from a browser as it now resides outside of your website’s root directory<br />
  28. 28. 6. Disable WP Generator Tag<br />Viewing source on most WP sites will reveal the version they are running<br /><meta name="generator" content="WordPress 3.0" /> <!-- leave this for stats --><br />This helps hackers find vulnerable WP blogs running older versions<br />To remove find the code below in your header.php file of your theme and remove it<br /><meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /><br /><!-- leave this for stats --><br />The wp_head() function also includes the WP version in your header.<br />To remove add this line of code in your themes functions.php file<br />remove_action( 'wp_head', 'wp_generator' );<br />
  29. 29. 6. Disable WP Generator Tag<br />Themes and plugins might also display versions in your header. <br />
  30. 30. 7. Use Trusted Sources for Themes & Plugins<br />WPMU.org reviewed the top 10 results for “free wordpress themes” on Google. <br />Out of the ten sites reviewed<br /> Safe: 1<br /> Iffy: 1<br /> Avoid: 8<br />
  31. 31. 7. Use Trusted Sources for Themes & Plugins<br />The only safe site reviewed was WordPress.org<br />Most themes included base64() encoded text links to promote various servies<br />http://wpmu.org/why-you-should-never-search-for-free-wordpress-themes-in-google-or-anywhere-else/<br />
  32. 32. 7. Use Trusted Sources for Themes & Plugins<br />Trusted Sources for Free WordPress Themes<br />WordPress.org Theme Directory<br /><ul><li>http://wordpress.org/extend/themes/</li></ul>WooThemes<br /><ul><li>http://www.woothemes.com/themes/free/</li></ul>Themelab<br /><ul><li>http://www.themelab.com/free-wordpress-themes</li></ul>Theme Hybrid<br /><ul><li>http://themehybrid.com/</li></ul>ThemeShaper(Thematic)<br /><ul><li>http://themeshaper.com/ </li></ul>More themes: http://wpmu.org/when-is-a-free-wordpress-theme-really-free-some-thoughts-and-some-places-to-find-them/<br />
  33. 33. Do you Login with username admin?<br />
  34. 34.
  35. 35. 8. Delete the Admin User<br />Change the admin username in MySQL:<br />UPDATE wp_users SET user_login='hulkster' WHERE user_login='admin';<br />Or create a new account with administrator privileges.<br /> Create a new account. Make the username very unique<br /> Assign account to Administrator role<br /> Log out and log back in with new account<br /> Delete admin account<br />WordPress will allow you to reassign all content written by admin to an account of your choice. <br />
  36. 36. WordPress 3.0 lets you set<br />the administrator username during the installation process!<br />DON'T USE ADMIN!<br />
  37. 37. Knowing your username is half the battle. <br />Don't make it easy on the hackers.<br />
  38. 38. 9. File / Folder Permissions<br />What folder permissions should you use?<br />Good Rule of Thumb:<br /><ul><li> Files should be set to 644
  39. 39. Folders should be set to 755</li></ul>Start with the default settings above <br />If your host requires 777…SWITCH HOSTS!<br />
  40. 40. 9. File / Folder Permissions<br />Or via SSH with the following commands<br />find [your path here] -type d -exec chmod 755 {} ;<br />find [your path here] -type f -exec chmod 644 {} ;<br />
  41. 41. 10. Update Update Update<br />
  42. 42. SecurityPlugins<br /><ul><li>WordPress Exploit Scanner - http://wordpress.org/extend/plugins/exploit-scanner/
  43. 43. WordPress File Monitor - http://wordpress.org/extend/plugins/wordpress-file-monitor/
  44. 44. Login Lockdown- http://wordpress.org/extend/plugins/login-lockdown/
  45. 45. AskApache Password Protect - http://wordpress.org/extend/plugins/askapache-password-protect/
  46. 46. BulletProof Security - http://wordpress.org/extend/plugins/bulletproof-security/
  47. 47. Secure WordPress- http://wordpress.org/extend/plugins/secure-wordpress/</li></ul>http://wordpress.org/extend/plugins/wp-time-machine/<br />
  48. 48. BackupPlugins<br /><ul><li>WP Time Machine - http://wordpress.org/extend/plugins/wp-time-machine/
  49. 49. WP-DB Backup - http://wordpress.org/extend/plugins/wp-db-backup/
  50. 50. Backup Buddy - http://pluginbuddy.com/purchase/backupbuddy/
  51. 51. VaultPress - http://vaultpress.com/</li></ul>http://wordpress.org/extend/plugins/wp-time-machine/<br />
  52. 52. Website Scanning Tools<br />Website Scanning Tools <br /><ul><li>Sucuri.net- http://sucuri.net
  53. 53. Unmask Parasites - http://www.unmaskparasites.com</li></ul>Malware Removal<br /><ul><li>Sucuri.net - http://sucuri.net
  54. 54. VaultPress- http://vaultpress.com</li></ul>http://wordpress.org/extend/plugins/wp-time-machine/<br />
  55. 55. Resources<br /> Security Related Codex Articles<br /><ul><li>http://codex.wordpress.org/Hardening_WordPress
  56. 56. http://codex.wordpress.org/Changing_File_Permissions
  57. 57. http://codex.wordpress.org/Editing_wp-config.php
  58. 58. http://codex.wordpress.org/htaccess_for_subdirectories</li></ul> Blog Security Articles<br /><ul><li>http://www.wpbeginner.com/wp-tutorials/11-vital-tips-and-hacks-to-protect-your-wordpress-admin-area/
  59. 59. http://blog.sucuri.net/2010/11/yet-another-wordpress-security-post-part-one.html
  60. 60. http://www.growmap.com/wordpress-exploits/
  61. 61. http://wpcandy.com/teaches/security-tips
  62. 62. http://semlabs.co.uk/journal/how-to-stop-your-wordpress-blog-getting-hacked/
  63. 63. http://www.makeuseof.com/tag/18-useful-plugins-and-hacks-to-protect-your-wordpress-blog/
  64. 64. http://www.catswhocode.com/blog/10-easy-ways-to-secure-your-wordpress-blog</li></li></ul><li>@dremeda @williamsba are #WordPress security ninjas and #WELOVETACOS<br />#WCPHX<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×