WordPress Security
Copenhagen September 2013
• Thor Kristiansen
– Self-employed WP-Developer and Business
Consultant
– Long time meditator
• First WP Blog: The Pure Vi...
• Security Stats
• Example Hack
• Top Security Tips
• Recommended Plugins & Services
• Resources
Security Stats
700+ million websites May 2012 (Netcraft)
300 million websites in 2011 (Pingdom)
10+ billion indexed pages (WorldWebSize)
...
WordPress Stats
• 73+ Million WordPress powered websites
• 18.9% of all websites are running WordPress
• 22 out of every 1...
Web Malware Stats
• 403 Million unique variants of malware in 2011 (Symantec)
• 140% growth since 2010
• 81% increase in m...
In Summary – Be Scared!
Hack Example
Link Injection
Hacker bots look for known exploits (SQL Injection, folder
permissions, etc)
This allows them to insert spa...
Link Injection
375 spam links per page, only shown to search engines
Securing WordPress
1 Update Update Update
Keep WordPress Updated!
Minor WordPress versions ( ie 3.5.x ) do NOT add new features.
They contain...
1 Update Update Update
Update Those Plugins!
The plugin Changelog tab
makes it very easy to view what
has changed in a new...
1. Update Update Update
NO EXCUSES! UPDATE!
2.Do you login with username admin?
3. Delete the Admin user account
UPDATE wp_users SET user_login=‘Thor' WHERE user_login='admin';
Change the admin username...
3. Delete the Admin user account
WordPress lets you set
the username during the
installation process!
DON'T USE ADMIN!
3. Delete the Admin user account
Knowing your
username is half
the battle.
Don't make it
easy on the
hackers.
4. File and Folder Permissions
What folder permissions should you use?
Good Rule of Thumb:
• Files should be set to 644
• ...
4. File and Folder Permissions
find [your path here] -type d -exec chmod 755 {} ;
find [your path here] -type f -exec chmo...
5. Move wp-config.php
WordPress features the ability to move the wp-config.php
file one directory above your WordPress roo...
6. Lock Down WP Login and WP Admin
6. Lock Down WP Login and WP Admin
define('FORCE_SSL_LOGIN', true);
Add the code below to wp-config.php to force SSL (http...
6. Lock Down WP Login and WP Admin
AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName "Access Control"
AuthType Basic...
7. Use Trusted Sources for Themes & Plugins
WPMU.org reviewed the top
10 results for “free
wordpress themes” on
Google.
Ou...
7. Use Trusted Sources for Themes & Plugins
Source: http://wpmu.org/why-you-should-never-search-for-free-wordpress-themes-...
8. Be Secure Locally
Think of your local environment as if it was a medieval castle and you’re the queen or
king. Your kin...
8. Be Secure Locally
It’s your information, but who’s watching & listening? You may be a network geek at
home, but what ha...
9. Use Common Sense
• Use a strong password
• BAD: bradisawesome
• GOOD: SCrEE79joLly$
• A=@, E=3, S=$, O=0 (This is not u...
Plugins & Services
Login Lockdown
http://wordpress.org/extend/plugins/login-lockdown/
Sucuri Security
SiteCheck Malware
Scanner
http://wordpress.org/plugins/sucuri-scanner/
• Scan your site for
malware, SPAM
...
Exploit Scanner
http://wordpress.org/extend/plugins/exploit-scanner/
• Scans your files and
database for potentially
malic...
• Free Website Malware Scanner: http://sitecheck.sucuri.net/scanner/
• Website monitoring
• Hack cleanup services
• Sucuri...
• Security Related Articles
• http://codex.wordpress.org/Hardening_WordPress
• http://blog.sucuri.net/2012/04/lockdown-wor...
• Mail: Thor@pureview.dk
• Twitter: @ThorK108
• Linkedin: in/ThorKristiansen
• Web: Shivaweb.dk
• Facebook: Wordpress Fan
WordPress Security - WordPress Meetup Copenhagen 2013
Upcoming SlideShare
Loading in...5
×

WordPress Security - WordPress Meetup Copenhagen 2013

1,538

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,538
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "WordPress Security - WordPress Meetup Copenhagen 2013"

  1. 1. WordPress Security Copenhagen September 2013
  2. 2. • Thor Kristiansen – Self-employed WP-Developer and Business Consultant – Long time meditator • First WP Blog: The Pure View: http://pureview.dk – 200-400 visitors a day, 90% traffic is US, non-profit – Former Sr. Business Analyst & QA Mgr. at Dell – Portfolio website: http://shivaweb.dk
  3. 3. • Security Stats • Example Hack • Top Security Tips • Recommended Plugins & Services • Resources
  4. 4. Security Stats
  5. 5. 700+ million websites May 2012 (Netcraft) 300 million websites in 2011 (Pingdom) 10+ billion indexed pages (WorldWebSize) Projected: • 1 Billion websites by 2013 • 2 Billion websites by 2015 0 500 1000 1500 2000 2500 2011 2012 2013 2015 Websites Websites
  6. 6. WordPress Stats • 73+ Million WordPress powered websites • 18.9% of all websites are running WordPress • 22 out of every 100 new domains in the U.S. launches with WordPress • Projected 300-500 Million WordPress sites by 2015
  7. 7. Web Malware Stats • 403 Million unique variants of malware in 2011 (Symantec) • 140% growth since 2010 • 81% increase in malicious web-based attacks between 2010 - 2011
  8. 8. In Summary – Be Scared!
  9. 9. Hack Example
  10. 10. Link Injection Hacker bots look for known exploits (SQL Injection, folder permissions, etc) This allows them to insert spam files/links into your WordPress Themes, plugins, and core files.
  11. 11. Link Injection 375 spam links per page, only shown to search engines
  12. 12. Securing WordPress
  13. 13. 1 Update Update Update Keep WordPress Updated! Minor WordPress versions ( ie 3.5.x ) do NOT add new features. They contain bug fixes and security patches
  14. 14. 1 Update Update Update Update Those Plugins! The plugin Changelog tab makes it very easy to view what has changed in a new plugin version
  15. 15. 1. Update Update Update NO EXCUSES! UPDATE!
  16. 16. 2.Do you login with username admin?
  17. 17. 3. Delete the Admin user account UPDATE wp_users SET user_login=‘Thor' WHERE user_login='admin'; Change the admin username in MySQL: Or create a new account with administrator privileges. 1. Create a new account. Make the username very unique 2. Set account to Administrator role 3. Log out and log back in with new account 4. Delete admin account WordPress will allow you to reassign all content written by admin to an account of your choice.
  18. 18. 3. Delete the Admin user account WordPress lets you set the username during the installation process! DON'T USE ADMIN!
  19. 19. 3. Delete the Admin user account Knowing your username is half the battle. Don't make it easy on the hackers.
  20. 20. 4. File and Folder Permissions What folder permissions should you use? Good Rule of Thumb: • Files should be set to 644 • Folders should be set to 755 Start with the default settings above If your host requires 777…SWITCH HOSTS!
  21. 21. 4. File and Folder Permissions find [your path here] -type d -exec chmod 755 {} ; find [your path here] -type f -exec chmod 644 {} ; Or via SSH with the following commands
  22. 22. 5. Move wp-config.php WordPress features the ability to move the wp-config.php file one directory above your WordPress root This makes it nearly impossible for anyone to access your wp-config.php file from a browser as it now resides outside of your website’s root directory You can move your wp-config.php file to here WordPress automatically checks the parent directory if a wp-config.php file is not found in your root directory public_html/wordpress/wp-config.php If WordPress is located here: public_html/wp-config.php
  23. 23. 6. Lock Down WP Login and WP Admin
  24. 24. 6. Lock Down WP Login and WP Admin define('FORCE_SSL_LOGIN', true); Add the code below to wp-config.php to force SSL (https) on login Add the code below to wp-config.php to force SSL (https) on all admin pages define('FORCE_SSL_ADMIN', true); Using SSL (https) on all admin screens in WordPress will encrypt all data transmitted with the same encryption as online shopping
  25. 25. 6. Lock Down WP Login and WP Admin AuthUserFile /dev/null AuthGroupFile /dev/null AuthName "Access Control" AuthType Basic order deny,allow deny from all #IP address to Whitelist allow from 67.123.83.59 allow from 123.123.123.* 1. Create an .htaccess file in your wp-admin directory Only a user with the IP 67.123.83.59 or 123.123.123.* can access wp-admin 2. Add the following lines of code:
  26. 26. 7. Use Trusted Sources for Themes & Plugins WPMU.org reviewed the top 10 results for “free wordpress themes” on Google. Out of the ten sites reviewed 1. Safe: 1 2. Iffy: 1 3. Avoid: 8 Source: http://wpmu.org/why-you-should-never-search-for-free-wordpress-themes-in-google-or-anywhere-else/
  27. 27. 7. Use Trusted Sources for Themes & Plugins Source: http://wpmu.org/why-you-should-never-search-for-free-wordpress-themes-in-google-or-anywhere-else/ The only safe site reviewed was WordPress.org Most themes included base64() encoded text links to promote various servies
  28. 28. 8. Be Secure Locally Think of your local environment as if it was a medieval castle and you’re the queen or king. Your kingdom must be protected! Keep your computer up to date • Ensure you’re patching or installing updates ASAP • Automatic updates rock! Install an anti-virus solution • Ensure you’re keeping definitions current • Automatic updates aren’t a bad idea here either! Yes, personal firewalls still apply!
  29. 29. 8. Be Secure Locally It’s your information, but who’s watching & listening? You may be a network geek at home, but what happens at Starbucks? Your Internet Connection Use SSL whenever possible, especially on an unverified connection. • HTTPS is a great way to ensure your transactions & traffic are traveling with security in mind. Connecting To Your Site(s) Consider using sFTP or SSH vs. FTP •Still widely marketed, but did you know your credentials are passed unencrypted when using FTP? •If unavoidable, do not allow anonymous logins, limit connections, practice least privilege. •Don’t store your credentials in your FTP client.
  30. 30. 9. Use Common Sense • Use a strong password • BAD: bradisawesome • GOOD: SCrEE79joLly$ • A=@, E=3, S=$, O=0 (This is not unique, they know this) • Update passwords regularly (Monthly, make a schedule) • Know your admins, limit number of accounts (WP, FTP, Hosting, etc) • Backup, Backup, Backup (Use BackupBuddy for scheduled backups) • http://strongpasswordgenerator.com/
  31. 31. Plugins & Services
  32. 32. Login Lockdown http://wordpress.org/extend/plugins/login-lockdown/
  33. 33. Sucuri Security SiteCheck Malware Scanner http://wordpress.org/plugins/sucuri-scanner/ • Scan your site for malware, SPAM injections, errors, and more • Hardening of key WordPress directories • Verify core WordPress files have not been modified
  34. 34. Exploit Scanner http://wordpress.org/extend/plugins/exploit-scanner/ • Scans your files and database for potentially malicious code • Does not remove code, only detects it
  35. 35. • Free Website Malware Scanner: http://sitecheck.sucuri.net/scanner/ • Website monitoring • Hack cleanup services • Sucuri Security Plugin • Free to clients • Web Application Firewall • Integrity Monitoring • Auditing • Hardening http://Sucuri.net
  36. 36. • Security Related Articles • http://codex.wordpress.org/Hardening_WordPress • http://blog.sucuri.net/2012/04/lockdown-wordpress-a-security-webinar-with-dre-armeda.html • http://blog.sucuri.net/2012/04/ask-sucuri-how-to-stop-the-hacker-and-ensure-your-site-is- locked.html • http://blog.sucuri.net/2012/04/ask-sucuri-what-should-i-know-when-engaging-a-web- malware-company.html • Clean a Hacked Site • http://codex.wordpress.org/FAQ_My_site_was_hacked • http://www.marketingtechblog.com/wordpress-hacked/ • Support Forums • Hacked: http://wordpress.org/tags/hacked • Malware: http://wordpress.org/tags/malware
  37. 37. • Mail: Thor@pureview.dk • Twitter: @ThorK108 • Linkedin: in/ThorKristiansen • Web: Shivaweb.dk • Facebook: Wordpress Fan
  1. A particular slide catching your eye?

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

×