SlideShare a Scribd company logo
1 of 67
Download to read offline
Props @tweetsfromchris
Who Am I?

Brad Williams
Co-Founder of WebDevStudios.com
Organizer NJ/Philly WordPress Meetup
Co-Host SitePoint Podcast




Co-Author of Professional WordPress (http://bit.ly/pro-wp)
The Goal of this Presentation…
The Goal of this Presentation…




   …Is to scare the crap out of you!
The Goal of this Presentation…




   …and then make everything better
   with the best security tips!
Topics

 Example  WordPress Hacks
 Securing Your WordPress Website
 How to Clean Up a Hacked Site
 Hosting Considerations
 Recommended Plugins
Who Do Hackers Target?
Who Do Hackers Target?




  YOU
Who Is Safe?
Who Is Safe?




NO ONE
Scared Yet?
Example

Hacker bot finds a security hole on your website




                     WordPress
Example

Hacker bot hides a file in your WordPress installation



      WordPress




         Akismet.cache.php is NOT an Akismet file
Example

Hacker bot can now trigger this file/code remotely




        WordPress             Hacker Bot
Example
    Common Hacker bot script jobs


• Add spam content and links to your websites theme files
• Create posts and pages with spam content and links
• Delete posts/pages/settings wreaking havoc on your site
• etc, etc, bad stuff, etc, etc




   WordPress                    Hacker Bot
CSS Hides the Spam

<b style=“display:none”>Any text you want to hide</b>
Hidden Spam Links
Only Noobs Get Hacked
WRONG!
Only Noobs Get Hacked
Scobleizer.com: HACKED
Scobleizer.com: HACKED
Scobleizer.com: HACKED
Pearsonified.com: HACKED
FeaturedContentGallery.com: HACKED
Make it Stop!
Palette Cleanser
Securing WordPress
Don‟t use the admin account

                  If you are using the admin account you are wrong!



     Either change the username in MySQL:

     UPDATE wp_users SET user_login='newuser' WHERE user_login='admin';


       Or create a new/unique account with administrator privileges.

       1.   Create a new account. Make the username very unique
       2.   Assign account to Administrator role
       3.   Log out and log back in with new account
       4.   Delete admin account


Make it hard on the hacker! If they already know your username that‟s half the battle
Don‟t use the admin account



WordPress 3.0 lets you set
the administrator username
   during the installation
         process!
The Great Permission Debate
               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!




       Permission levels vary depending on server configuration
The Great Permission Debate

Permissions can be set via FTP




Or via SSH with the following commands

find [your path here] -type d -exec chmod 755 {} ;
find [your path here] -type f -exec chmod 644 {} ;
Move the wp-config.php file
      WordPress 2.6 added the ability to move the wp-config.php
           file one directory above your WordPress root


   If WordPress is located here:

           public_html/wordpress/wp-config.php

   You can move your wp-config.php file to here

           public_html/wp-config.php


       WordPress automatically checks the parent directory if a
        wp-config.php file is not found in your root directory


This makes it nearly impossible for anyone to access your wp-config.php
      file as it now resides outside of your website‟s root directory
Move the wp-content Directory
        WordPress 2.6 added the ability to move the wp-content directory



1. Move your wp-content directory
2. Make two additions to wp-config.php

define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content' );
define( 'WP_CONTENT_URL', 'http://domain.com/blog/wp-content');



 If you have compatibility issues with plugins there are two optional settings

define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content/plugins' );
define( 'WP_PLUGIN_URL', 'http://domain.com/blog/wp-content/plugins');




          If hackers can‟t find your wp-content folder, they can‟t hack it!
Stay Current on Updates
    Keep WordPress core, plugins, and theme files up to date

Recent WordPress hack only affected outdated WordPress installs




                                             The plugin Changelog tab
                                             makes it very easy to view
                                             what has changed in a new
                                             plugin version
Use Secure Passwords
Use strong passwords to protect your website from dictionary attacks
         Not just for WordPress, but also FTP, MySQL, etc

         BAD PASSWORD: bradrocks
         GOOD PASSWORD: S-gnop2D[6@8

                                            WordPress will tell you
                                            when you have it right




         Great resource:
      toughpassword.com

  Creates random passwords
Use Secret Keys
              A secret key is a hashing salt which makes your site harder to
                   hack by adding random elements to the password.
1. Edit wp-config.php
2. Visit this URL to get your secret keys: https://api.wordpress.org/secret-key/1.1/salt
  BEFORE
   define('AUTH_KEY',   'put your unique phrase here');
   define('SECURE_AUTH_KEY', 'put your unique phrase here');
   define('LOGGED_IN_KEY', 'put your unique phrase here');
   define('NONCE_KEY',    'put your unique phrase here');
   define('AUTH_SALT',   'put your unique phrase here');
   define('SECURE_AUTH_SALT', 'put your unique phrase here');
   define('LOGGED_IN_SALT', 'put your unique phrase here');
   define('NONCE_SALT',    'put your unique phrase here');

  AFTER
   define('AUTH_KEY',   '*8`:Balq!`,-j.JTl~sP%&>@ON,t(}S6)IG|nG1JIfY(,y=][-3$!N6be]-af|BD');
   define('SECURE_AUTH_KEY', 'q+i-|3S~d?];6$[$!ZOXbw6c]0 !k/,UxOod>fqV!sWCkvBihF2#hI=CDt_}WaH1');
   define('LOGGED_IN_KEY', 'D/QoRf{=&OC=CrT/^Zq}M9MPT&49^O}G+m2L{ItpX_jh(-I&-?pkeC_SaF0nw;m+');
   define('NONCE_KEY',     'oJo8C&sc+ C7Yc,W1v o5}.FR,Zk!J<]vaCa%2D9nj8otj5z8UnJ_q.Q!hgpQ*-H');
   define('AUTH_SALT',   'r>O/;U|xg~I5v.u(Nq+JMfYHk.*[p8!baAsb1DKa8.0}q/@V5snU1hV2eR!|whmt');
   define('SECURE_AUTH_SALT', '3s1|cIj d7y<?]Z1n# i1^FQ *L(Kax)Y%r(mp[DUX.1a3!jv(;P_H6Q7|y.!7|-');
   define('LOGGED_IN_SALT', '`@>+QdZhD!|AKk09*mr~-F]/F39Sxjl31FX8uw+wxUYI;U{NWx|y|+bKJ*4`uF`*');
   define('NONCE_SALT',     'O+#iqcPw#]O4TcC%Kz_DAf:mK!Zy@Zt*Kmm^C25U|T!|?ldOf/l1TZ6Tw$9y[M/6');

                      You can add/change secret keys at anytime.
     This will invalidate all existing cookies and require your users to login again
Change WordPress Table Prefix

       1. Edit wp-config.php before installing WordPress
       2. Change the prefix wp_ to something unique:

/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each a unique
 * prefix. Only numbers, letters, and underscores please!
 */
$table_prefix = „wtf_';




        All database tables will now have a unique prefix (ie wtf_posts)
Force SSL Login and Admin Access

      Set the below option in wp-config.php to force SSL (https) on login

define('FORCE_SSL_LOGIN', true);


Set the below option in wp-config.php to force SSL (https) on all admin pages

define('FORCE_SSL_ADMIN', true);
.htaccess lockdown

      1. Create a .htaccess file in your wp-admin directory
      2. Add the following lines of code:

           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.123


Only a user with the IP 67.123.83.59 or 123.123.123.123 can access wp-admin
Hosting Considerations
You Get What You Pay For
Shared Hosting
           Shared Hosting Server


Website   Website        Website   Website
Website   Website        Website   Website
Website   Website        Website   Website
Website   Website        Website   Website
Website   Website        Website   Website
Website   Website        Website   Website
Website   Website        Website   Website
Website   Website        Website   Website
Website   Website        Website   Website
Website   Website        Website   Website
Shared Hosting
 What‟s
wrong with
that guy?       Shared Hosting Server


     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
Shared Hosting
Oh frack!
                Shared Hosting Server


     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
Shared Hosting
braaaaains
                Shared Hosting Server


     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
     Website   Website        Website   Website
#protip
Invest In Your Website




Go VPS or Dedicated
Clean Up a Hacked Site
Step 1: Delete Everything and Start Over!
OR
Step 1: Do a Fresh Install of WordPress



    • Delete, don‟t overwrite, all original WordPress files
    • Upload fresh copies of all WordPress core files




           Be sure to backup your theme, plugins, media, etc
Step 2: Re-install All Plugins



   • Install fresh copies of all WP plugins need
   • DON‟T use the same plugin files from the hacked site
Step 3: Re-install Your Theme



• If possible install a fresh copy of your theme
• If using the old theme be sure to inspect every file for hack code
Step 4: Change all Passwords and Keys



• Change your passwords: WordPress, FTP, MySQL
• Verify the hacker didn‟t create another user, if so delete it
• Update your secret keys in wp-config.php (as shown earlier)
Step 5: Scan Database for Malicious Code



• Look for common hack keywords:
    • eval, base64, strrev, iframe, noscript, display
• Use WordPress Exploit Scanner plugin (discussed later)


Example SQL: SELECT * FROM wp_posts WHERE post_content LIKE '%eval%'
Step 6: Verify folder/file permissions



• Check all folder and file permissions are correct
• Reset to 755 on folders and 644 on files if needed
Step 7: Pray
Recommended Security Plugins
WP Security Scan




http://wordpress.org/extend/plugins/wp-security-scan/
ServerBuddy




http://wordpress.org/extend/plugins/serverbuddy-by-pluginbuddy/
WordPress Exploit Scanner




http://wordpress.org/extend/plugins/exploit-scanner/
WordPress File Monitor




http://wordpress.org/extend/plugins/wordpress-file-monitor/
Login Lockdown




http://wordpress.org/extend/plugins/login-lockdown/
WordPress Security Resources
   Security Related Codex Articles
    ›   http://codex.wordpress.org/Hardening_WordPress
    ›   http://codex.wordpress.org/Changing_File_Permissions
    ›   http://codex.wordpress.org/Editing_wp-config.php
    ›   http://codex.wordpress.org/htaccess_for_subdirectories
   Blog Security Articles
    ›   http://www.wpbeginner.com/wp-tutorials/11-vital-tips-and-hacks-to-protect-your-
        wordpress-admin-area/
    ›   http://www.growmap.com/wordpress-exploits/
    ›   http://lorelle.wordpress.com/2009/03/07/firewalling-and-hack-proofing-your-wordpress-
        blog/
    ›   http://semlabs.co.uk/journal/how-to-stop-your-wordpress-blog-getting-hacked/
    ›   http://www.makeuseof.com/tag/18-useful-plugins-and-hacks-to-protect-your-wordpress-
        blog/
    ›   http://www.catswhocode.com/blog/10-easy-ways-to-secure-your-wordpress-blog
   Clean A Hacked Site
    ›   http://codex.wordpress.org/FAQ_My_site_was_hacked
    ›   http://ottodestruct.com/blog/2009/hacked-wordpress-backdoors/
    ›   http://ocaoimh.ie/did-your-wordpress-site-get-hacked/
    ›   http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-
        wordpress-installation/
    ›   http://blog.sucuri.net/2010/02/removing-malware-from-wordpress-blog.html
Contact

Brad Williams
brad@webdevstudios.com

Blog: strangework.com
Twitter: @williamsba
IRC: WDS-Brad

       http://www.slideshare.net/williamsba
Tweet: @williamsba WordPress Security Rocks! #wcma
        Win a copy of Professional WordPress!

More Related Content

What's hot

WordPress Security - WordCamp Boston 2010
WordPress Security - WordCamp Boston 2010WordPress Security - WordCamp Boston 2010
WordPress Security - WordCamp Boston 2010Brad Williams
 
Lockdown WordPress
Lockdown WordPressLockdown WordPress
Lockdown WordPressDre Armeda
 
Now That's What I Call WordPress Security 2010
Now That's What I Call WordPress Security 2010Now That's What I Call WordPress Security 2010
Now That's What I Call WordPress Security 2010Brad Williams
 
WordCamp Chicago 2011 - WordPress End User Security - Dre Armeda
WordCamp Chicago 2011 - WordPress End User Security - Dre ArmedaWordCamp Chicago 2011 - WordPress End User Security - Dre Armeda
WordCamp Chicago 2011 - WordPress End User Security - Dre ArmedaDre Armeda
 
WordPress Security - WordPress Meetup Copenhagen 2013
WordPress Security - WordPress Meetup Copenhagen 2013WordPress Security - WordPress Meetup Copenhagen 2013
WordPress Security - WordPress Meetup Copenhagen 2013Thor Kristiansen
 
Higher Order WordPress Security
Higher Order WordPress SecurityHigher Order WordPress Security
Higher Order WordPress SecurityDougal Campbell
 
Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Think Media Inc.
 
WordPress Security Presentation
WordPress Security PresentationWordPress Security Presentation
WordPress Security PresentationAndrew Paton
 
Introduction to WordPress Security
Introduction to WordPress SecurityIntroduction to WordPress Security
Introduction to WordPress SecurityShawn Hooper
 
WordCamp Finland 2015 - WordPress Security
WordCamp Finland 2015 - WordPress SecurityWordCamp Finland 2015 - WordPress Security
WordCamp Finland 2015 - WordPress SecurityTiia Rantanen
 
Protect Your WordPress From The Inside Out
Protect Your WordPress From The Inside OutProtect Your WordPress From The Inside Out
Protect Your WordPress From The Inside OutSiteGround.com
 
Securing Your WordPress Website - WordCamp GC 2011
Securing Your WordPress Website - WordCamp GC 2011Securing Your WordPress Website - WordCamp GC 2011
Securing Your WordPress Website - WordCamp GC 2011Vlad Lasky
 
Top Ten WordPress Security Tips for 2012
Top Ten WordPress Security Tips for 2012Top Ten WordPress Security Tips for 2012
Top Ten WordPress Security Tips for 2012Brad Williams
 
WordPress Security Presentation from South Florida WordPress Meetup
WordPress Security Presentation from South Florida WordPress MeetupWordPress Security Presentation from South Florida WordPress Meetup
WordPress Security Presentation from South Florida WordPress MeetupJohn Carcutt
 
WordPress Performance optimization
WordPress Performance optimizationWordPress Performance optimization
WordPress Performance optimizationBrecht Ryckaert
 
Intro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentIntro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentBrad Williams
 
Contributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter WilsonContributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter WilsonWordCamp Sydney
 

What's hot (20)

WordPress Security - WordCamp Boston 2010
WordPress Security - WordCamp Boston 2010WordPress Security - WordCamp Boston 2010
WordPress Security - WordCamp Boston 2010
 
Lockdown WordPress
Lockdown WordPressLockdown WordPress
Lockdown WordPress
 
Now That's What I Call WordPress Security 2010
Now That's What I Call WordPress Security 2010Now That's What I Call WordPress Security 2010
Now That's What I Call WordPress Security 2010
 
WordCamp Chicago 2011 - WordPress End User Security - Dre Armeda
WordCamp Chicago 2011 - WordPress End User Security - Dre ArmedaWordCamp Chicago 2011 - WordPress End User Security - Dre Armeda
WordCamp Chicago 2011 - WordPress End User Security - Dre Armeda
 
WordPress Security - WordPress Meetup Copenhagen 2013
WordPress Security - WordPress Meetup Copenhagen 2013WordPress Security - WordPress Meetup Copenhagen 2013
WordPress Security - WordPress Meetup Copenhagen 2013
 
Secure All The Things!
Secure All The Things!Secure All The Things!
Secure All The Things!
 
Higher Order WordPress Security
Higher Order WordPress SecurityHigher Order WordPress Security
Higher Order WordPress Security
 
Google Hacking Basics
Google Hacking BasicsGoogle Hacking Basics
Google Hacking Basics
 
Website security
Website securityWebsite security
Website security
 
Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013
 
WordPress Security Presentation
WordPress Security PresentationWordPress Security Presentation
WordPress Security Presentation
 
Introduction to WordPress Security
Introduction to WordPress SecurityIntroduction to WordPress Security
Introduction to WordPress Security
 
WordCamp Finland 2015 - WordPress Security
WordCamp Finland 2015 - WordPress SecurityWordCamp Finland 2015 - WordPress Security
WordCamp Finland 2015 - WordPress Security
 
Protect Your WordPress From The Inside Out
Protect Your WordPress From The Inside OutProtect Your WordPress From The Inside Out
Protect Your WordPress From The Inside Out
 
Securing Your WordPress Website - WordCamp GC 2011
Securing Your WordPress Website - WordCamp GC 2011Securing Your WordPress Website - WordCamp GC 2011
Securing Your WordPress Website - WordCamp GC 2011
 
Top Ten WordPress Security Tips for 2012
Top Ten WordPress Security Tips for 2012Top Ten WordPress Security Tips for 2012
Top Ten WordPress Security Tips for 2012
 
WordPress Security Presentation from South Florida WordPress Meetup
WordPress Security Presentation from South Florida WordPress MeetupWordPress Security Presentation from South Florida WordPress Meetup
WordPress Security Presentation from South Florida WordPress Meetup
 
WordPress Performance optimization
WordPress Performance optimizationWordPress Performance optimization
WordPress Performance optimization
 
Intro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentIntro to WordPress Plugin Development
Intro to WordPress Plugin Development
 
Contributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter WilsonContributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter Wilson
 

Similar to WordCamp Mid-Atlantic WordPress Security

Up and Running with WordPress - Site Shack Nashville Web Design
Up and Running with WordPress - Site Shack Nashville Web DesignUp and Running with WordPress - Site Shack Nashville Web Design
Up and Running with WordPress - Site Shack Nashville Web DesignJudy Wilson
 
WordPress Optimization & Security - LAC 2013, London
WordPress Optimization & Security - LAC 2013, LondonWordPress Optimization & Security - LAC 2013, London
WordPress Optimization & Security - LAC 2013, LondonBastian Grimm
 
WordPress Resources Nov 2014
WordPress Resources Nov 2014WordPress Resources Nov 2014
WordPress Resources Nov 2014Judy Wilson
 
Wordpress Security Tips
Wordpress Security TipsWordpress Security Tips
Wordpress Security TipsLalit Nama
 
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 201340 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013Bastian Grimm
 
Vagrant WordCamp Hamilton
Vagrant  WordCamp HamiltonVagrant  WordCamp Hamilton
Vagrant WordCamp HamiltonPaul Bearne
 
Wordpress Security & Hardening Steps
Wordpress Security & Hardening StepsWordpress Security & Hardening Steps
Wordpress Security & Hardening StepsPlasterdog Web Design
 
Word camp pune 2013 security
Word camp pune 2013   securityWord camp pune 2013   security
Word camp pune 2013 securityGaurav Singh
 
WordPress Plugins and Security
WordPress Plugins and SecurityWordPress Plugins and Security
WordPress Plugins and SecurityThink Media Inc.
 
WordPress Security Essential Tips & Tricks
WordPress Security Essential Tips & TricksWordPress Security Essential Tips & Tricks
WordPress Security Essential Tips & TricksFaraz Ahmed
 
Security Presentation for Boulder WordPress Meetup
Security Presentation for Boulder WordPress MeetupSecurity Presentation for Boulder WordPress Meetup
Security Presentation for Boulder WordPress MeetupAngela Bowman
 
Hardening WordPress - SAScon Manchester 2013 (WordPress Security)
Hardening WordPress - SAScon Manchester 2013 (WordPress Security)Hardening WordPress - SAScon Manchester 2013 (WordPress Security)
Hardening WordPress - SAScon Manchester 2013 (WordPress Security)Bastian Grimm
 
WordPress Security Best Practices 2019 Update
WordPress Security Best Practices 2019 UpdateWordPress Security Best Practices 2019 Update
WordPress Security Best Practices 2019 UpdateZero Point Development
 
PHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source ProjectPHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source Projectxsist10
 
Comparative Development Methodologies
Comparative Development MethodologiesComparative Development Methodologies
Comparative Development Methodologieselliando dias
 
Your WordPress Site is and is not Hacked - You don't know until you check
Your WordPress Site is and is not Hacked - You don't know until you checkYour WordPress Site is and is not Hacked - You don't know until you check
Your WordPress Site is and is not Hacked - You don't know until you checkAngela Bowman
 
Battling the WSOD - A Tech Support Tale
Battling the WSOD - A Tech Support TaleBattling the WSOD - A Tech Support Tale
Battling the WSOD - A Tech Support TaleKayleigh Thorpe
 

Similar to WordCamp Mid-Atlantic WordPress Security (20)

Up and Running with WordPress - Site Shack Nashville Web Design
Up and Running with WordPress - Site Shack Nashville Web DesignUp and Running with WordPress - Site Shack Nashville Web Design
Up and Running with WordPress - Site Shack Nashville Web Design
 
WordPress Optimization & Security - LAC 2013, London
WordPress Optimization & Security - LAC 2013, LondonWordPress Optimization & Security - LAC 2013, London
WordPress Optimization & Security - LAC 2013, London
 
WordPress Resources Nov 2014
WordPress Resources Nov 2014WordPress Resources Nov 2014
WordPress Resources Nov 2014
 
Wordpress Security Tips
Wordpress Security TipsWordpress Security Tips
Wordpress Security Tips
 
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 201340 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013
 
Vagrant WordCamp Hamilton
Vagrant  WordCamp HamiltonVagrant  WordCamp Hamilton
Vagrant WordCamp Hamilton
 
Wordpress Security & Hardening Steps
Wordpress Security & Hardening StepsWordpress Security & Hardening Steps
Wordpress Security & Hardening Steps
 
Word camp pune 2013 security
Word camp pune 2013   securityWord camp pune 2013   security
Word camp pune 2013 security
 
WordPress Plugins and Security
WordPress Plugins and SecurityWordPress Plugins and Security
WordPress Plugins and Security
 
WordPress Security Guide
WordPress Security GuideWordPress Security Guide
WordPress Security Guide
 
WordPress Security Essential Tips & Tricks
WordPress Security Essential Tips & TricksWordPress Security Essential Tips & Tricks
WordPress Security Essential Tips & Tricks
 
Security Presentation for Boulder WordPress Meetup
Security Presentation for Boulder WordPress MeetupSecurity Presentation for Boulder WordPress Meetup
Security Presentation for Boulder WordPress Meetup
 
Hardening WordPress - SAScon Manchester 2013 (WordPress Security)
Hardening WordPress - SAScon Manchester 2013 (WordPress Security)Hardening WordPress - SAScon Manchester 2013 (WordPress Security)
Hardening WordPress - SAScon Manchester 2013 (WordPress Security)
 
Optimize wordpress
Optimize wordpressOptimize wordpress
Optimize wordpress
 
WordPress Security Best Practices 2019 Update
WordPress Security Best Practices 2019 UpdateWordPress Security Best Practices 2019 Update
WordPress Security Best Practices 2019 Update
 
PHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source ProjectPHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source Project
 
secure php
secure phpsecure php
secure php
 
Comparative Development Methodologies
Comparative Development MethodologiesComparative Development Methodologies
Comparative Development Methodologies
 
Your WordPress Site is and is not Hacked - You don't know until you check
Your WordPress Site is and is not Hacked - You don't know until you checkYour WordPress Site is and is not Hacked - You don't know until you check
Your WordPress Site is and is not Hacked - You don't know until you check
 
Battling the WSOD - A Tech Support Tale
Battling the WSOD - A Tech Support TaleBattling the WSOD - A Tech Support Tale
Battling the WSOD - A Tech Support Tale
 

More from Brad Williams

From Freelance to Agency: Hiring Employee Number One - WordCamp London 2015
From Freelance to Agency: Hiring Employee Number One - WordCamp London 2015From Freelance to Agency: Hiring Employee Number One - WordCamp London 2015
From Freelance to Agency: Hiring Employee Number One - WordCamp London 2015Brad Williams
 
Hiring Employee Number One: From Freelancer to Agency
Hiring Employee Number One: From Freelancer to AgencyHiring Employee Number One: From Freelancer to Agency
Hiring Employee Number One: From Freelancer to AgencyBrad Williams
 
Writing Secure WordPress Code WordCamp NYC 2014
Writing Secure WordPress Code WordCamp NYC 2014Writing Secure WordPress Code WordCamp NYC 2014
Writing Secure WordPress Code WordCamp NYC 2014Brad Williams
 
How to Make a Native Mobile App with WordPress
How to Make a Native Mobile App with WordPressHow to Make a Native Mobile App with WordPress
How to Make a Native Mobile App with WordPressBrad Williams
 
Writing Secure WordPress Code
Writing Secure WordPress CodeWriting Secure WordPress Code
Writing Secure WordPress CodeBrad Williams
 
Using WordPress as an Application Framework
Using WordPress as an Application FrameworkUsing WordPress as an Application Framework
Using WordPress as an Application FrameworkBrad Williams
 
WordPress Security from WordCamp NYC 2012
WordPress Security from WordCamp NYC 2012WordPress Security from WordCamp NYC 2012
WordPress Security from WordCamp NYC 2012Brad Williams
 
WordPress for Beginners
WordPress for BeginnersWordPress for Beginners
WordPress for BeginnersBrad Williams
 
Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress PluginBrad Williams
 
Surviving the Zombie Apocalypse using Custom Post Types and Taxonomies
Surviving the Zombie Apocalypse using Custom Post Types and TaxonomiesSurviving the Zombie Apocalypse using Custom Post Types and Taxonomies
Surviving the Zombie Apocalypse using Custom Post Types and TaxonomiesBrad Williams
 
Spooky WordPress: Disturbingly Brilliant Uses of WP
Spooky WordPress: Disturbingly Brilliant Uses of WPSpooky WordPress: Disturbingly Brilliant Uses of WP
Spooky WordPress: Disturbingly Brilliant Uses of WPBrad Williams
 
Custom Post Types and Taxonomies in WordPress
Custom Post Types and Taxonomies in WordPressCustom Post Types and Taxonomies in WordPress
Custom Post Types and Taxonomies in WordPressBrad Williams
 
Top 20 WordPress Plugins You've Never Heard Of
Top 20 WordPress Plugins You've Never Heard OfTop 20 WordPress Plugins You've Never Heard Of
Top 20 WordPress Plugins You've Never Heard OfBrad Williams
 
Website Design Dos and Don’ts for a Successful Online Presence
Website Design Dos and Don’ts  for a Successful Online PresenceWebsite Design Dos and Don’ts  for a Successful Online Presence
Website Design Dos and Don’ts for a Successful Online PresenceBrad Williams
 

More from Brad Williams (15)

From Freelance to Agency: Hiring Employee Number One - WordCamp London 2015
From Freelance to Agency: Hiring Employee Number One - WordCamp London 2015From Freelance to Agency: Hiring Employee Number One - WordCamp London 2015
From Freelance to Agency: Hiring Employee Number One - WordCamp London 2015
 
Hiring Employee Number One: From Freelancer to Agency
Hiring Employee Number One: From Freelancer to AgencyHiring Employee Number One: From Freelancer to Agency
Hiring Employee Number One: From Freelancer to Agency
 
Writing Secure WordPress Code WordCamp NYC 2014
Writing Secure WordPress Code WordCamp NYC 2014Writing Secure WordPress Code WordCamp NYC 2014
Writing Secure WordPress Code WordCamp NYC 2014
 
How to Make a Native Mobile App with WordPress
How to Make a Native Mobile App with WordPressHow to Make a Native Mobile App with WordPress
How to Make a Native Mobile App with WordPress
 
Writing Secure WordPress Code
Writing Secure WordPress CodeWriting Secure WordPress Code
Writing Secure WordPress Code
 
Using WordPress as an Application Framework
Using WordPress as an Application FrameworkUsing WordPress as an Application Framework
Using WordPress as an Application Framework
 
WordPress Security from WordCamp NYC 2012
WordPress Security from WordCamp NYC 2012WordPress Security from WordCamp NYC 2012
WordPress Security from WordCamp NYC 2012
 
WordPress Multisite
WordPress MultisiteWordPress Multisite
WordPress Multisite
 
WordPress for Beginners
WordPress for BeginnersWordPress for Beginners
WordPress for Beginners
 
Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress Plugin
 
Surviving the Zombie Apocalypse using Custom Post Types and Taxonomies
Surviving the Zombie Apocalypse using Custom Post Types and TaxonomiesSurviving the Zombie Apocalypse using Custom Post Types and Taxonomies
Surviving the Zombie Apocalypse using Custom Post Types and Taxonomies
 
Spooky WordPress: Disturbingly Brilliant Uses of WP
Spooky WordPress: Disturbingly Brilliant Uses of WPSpooky WordPress: Disturbingly Brilliant Uses of WP
Spooky WordPress: Disturbingly Brilliant Uses of WP
 
Custom Post Types and Taxonomies in WordPress
Custom Post Types and Taxonomies in WordPressCustom Post Types and Taxonomies in WordPress
Custom Post Types and Taxonomies in WordPress
 
Top 20 WordPress Plugins You've Never Heard Of
Top 20 WordPress Plugins You've Never Heard OfTop 20 WordPress Plugins You've Never Heard Of
Top 20 WordPress Plugins You've Never Heard Of
 
Website Design Dos and Don’ts for a Successful Online Presence
Website Design Dos and Don’ts  for a Successful Online PresenceWebsite Design Dos and Don’ts  for a Successful Online Presence
Website Design Dos and Don’ts for a Successful Online Presence
 

Recently uploaded

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 

Recently uploaded (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

WordCamp Mid-Atlantic WordPress Security

  • 2. Who Am I? Brad Williams Co-Founder of WebDevStudios.com Organizer NJ/Philly WordPress Meetup Co-Host SitePoint Podcast Co-Author of Professional WordPress (http://bit.ly/pro-wp)
  • 3. The Goal of this Presentation…
  • 4. The Goal of this Presentation… …Is to scare the crap out of you!
  • 5. The Goal of this Presentation… …and then make everything better with the best security tips!
  • 6. Topics  Example WordPress Hacks  Securing Your WordPress Website  How to Clean Up a Hacked Site  Hosting Considerations  Recommended Plugins
  • 7. Who Do Hackers Target?
  • 8. Who Do Hackers Target? YOU
  • 12. Example Hacker bot finds a security hole on your website WordPress
  • 13. Example Hacker bot hides a file in your WordPress installation WordPress Akismet.cache.php is NOT an Akismet file
  • 14. Example Hacker bot can now trigger this file/code remotely WordPress Hacker Bot
  • 15. Example Common Hacker bot script jobs • Add spam content and links to your websites theme files • Create posts and pages with spam content and links • Delete posts/pages/settings wreaking havoc on your site • etc, etc, bad stuff, etc, etc WordPress Hacker Bot
  • 16. CSS Hides the Spam <b style=“display:none”>Any text you want to hide</b>
  • 18. Only Noobs Get Hacked
  • 28. Don‟t use the admin account If you are using the admin account you are wrong! Either change the username in MySQL: UPDATE wp_users SET user_login='newuser' WHERE user_login='admin'; Or create a new/unique account with administrator privileges. 1. Create a new account. Make the username very unique 2. Assign account to Administrator role 3. Log out and log back in with new account 4. Delete admin account Make it hard on the hacker! If they already know your username that‟s half the battle
  • 29.
  • 30. Don‟t use the admin account WordPress 3.0 lets you set the administrator username during the installation process!
  • 31. The Great Permission Debate 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! Permission levels vary depending on server configuration
  • 32. The Great Permission Debate Permissions can be set via FTP Or via SSH with the following commands find [your path here] -type d -exec chmod 755 {} ; find [your path here] -type f -exec chmod 644 {} ;
  • 33. Move the wp-config.php file WordPress 2.6 added the ability to move the wp-config.php file one directory above your WordPress root If WordPress is located here: public_html/wordpress/wp-config.php You can move your wp-config.php file to here public_html/wp-config.php WordPress automatically checks the parent directory if a wp-config.php file is not found in your root directory This makes it nearly impossible for anyone to access your wp-config.php file as it now resides outside of your website‟s root directory
  • 34. Move the wp-content Directory WordPress 2.6 added the ability to move the wp-content directory 1. Move your wp-content directory 2. Make two additions to wp-config.php define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content' ); define( 'WP_CONTENT_URL', 'http://domain.com/blog/wp-content'); If you have compatibility issues with plugins there are two optional settings define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content/plugins' ); define( 'WP_PLUGIN_URL', 'http://domain.com/blog/wp-content/plugins'); If hackers can‟t find your wp-content folder, they can‟t hack it!
  • 35. Stay Current on Updates Keep WordPress core, plugins, and theme files up to date Recent WordPress hack only affected outdated WordPress installs The plugin Changelog tab makes it very easy to view what has changed in a new plugin version
  • 36. Use Secure Passwords Use strong passwords to protect your website from dictionary attacks Not just for WordPress, but also FTP, MySQL, etc BAD PASSWORD: bradrocks GOOD PASSWORD: S-gnop2D[6@8 WordPress will tell you when you have it right Great resource: toughpassword.com Creates random passwords
  • 37. Use Secret Keys A secret key is a hashing salt which makes your site harder to hack by adding random elements to the password. 1. Edit wp-config.php 2. Visit this URL to get your secret keys: https://api.wordpress.org/secret-key/1.1/salt BEFORE define('AUTH_KEY', 'put your unique phrase here'); define('SECURE_AUTH_KEY', 'put your unique phrase here'); define('LOGGED_IN_KEY', 'put your unique phrase here'); define('NONCE_KEY', 'put your unique phrase here'); define('AUTH_SALT', 'put your unique phrase here'); define('SECURE_AUTH_SALT', 'put your unique phrase here'); define('LOGGED_IN_SALT', 'put your unique phrase here'); define('NONCE_SALT', 'put your unique phrase here'); AFTER define('AUTH_KEY', '*8`:Balq!`,-j.JTl~sP%&>@ON,t(}S6)IG|nG1JIfY(,y=][-3$!N6be]-af|BD'); define('SECURE_AUTH_KEY', 'q+i-|3S~d?];6$[$!ZOXbw6c]0 !k/,UxOod>fqV!sWCkvBihF2#hI=CDt_}WaH1'); define('LOGGED_IN_KEY', 'D/QoRf{=&OC=CrT/^Zq}M9MPT&49^O}G+m2L{ItpX_jh(-I&-?pkeC_SaF0nw;m+'); define('NONCE_KEY', 'oJo8C&sc+ C7Yc,W1v o5}.FR,Zk!J<]vaCa%2D9nj8otj5z8UnJ_q.Q!hgpQ*-H'); define('AUTH_SALT', 'r>O/;U|xg~I5v.u(Nq+JMfYHk.*[p8!baAsb1DKa8.0}q/@V5snU1hV2eR!|whmt'); define('SECURE_AUTH_SALT', '3s1|cIj d7y<?]Z1n# i1^FQ *L(Kax)Y%r(mp[DUX.1a3!jv(;P_H6Q7|y.!7|-'); define('LOGGED_IN_SALT', '`@>+QdZhD!|AKk09*mr~-F]/F39Sxjl31FX8uw+wxUYI;U{NWx|y|+bKJ*4`uF`*'); define('NONCE_SALT', 'O+#iqcPw#]O4TcC%Kz_DAf:mK!Zy@Zt*Kmm^C25U|T!|?ldOf/l1TZ6Tw$9y[M/6'); You can add/change secret keys at anytime. This will invalidate all existing cookies and require your users to login again
  • 38. Change WordPress Table Prefix 1. Edit wp-config.php before installing WordPress 2. Change the prefix wp_ to something unique: /** * WordPress Database Table prefix. * * You can have multiple installations in one database if you give each a unique * prefix. Only numbers, letters, and underscores please! */ $table_prefix = „wtf_'; All database tables will now have a unique prefix (ie wtf_posts)
  • 39. Force SSL Login and Admin Access Set the below option in wp-config.php to force SSL (https) on login define('FORCE_SSL_LOGIN', true); Set the below option in wp-config.php to force SSL (https) on all admin pages define('FORCE_SSL_ADMIN', true);
  • 40. .htaccess lockdown 1. Create a .htaccess file in your wp-admin directory 2. Add the following lines of code: 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.123 Only a user with the IP 67.123.83.59 or 123.123.123.123 can access wp-admin
  • 42. You Get What You Pay For
  • 43. Shared Hosting Shared Hosting Server Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website
  • 44. Shared Hosting What‟s wrong with that guy? Shared Hosting Server Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website
  • 45. Shared Hosting Oh frack! Shared Hosting Server Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website
  • 46. Shared Hosting braaaaains Shared Hosting Server Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website
  • 48. Invest In Your Website Go VPS or Dedicated
  • 49. Clean Up a Hacked Site
  • 50. Step 1: Delete Everything and Start Over!
  • 51. OR
  • 52. Step 1: Do a Fresh Install of WordPress • Delete, don‟t overwrite, all original WordPress files • Upload fresh copies of all WordPress core files Be sure to backup your theme, plugins, media, etc
  • 53. Step 2: Re-install All Plugins • Install fresh copies of all WP plugins need • DON‟T use the same plugin files from the hacked site
  • 54. Step 3: Re-install Your Theme • If possible install a fresh copy of your theme • If using the old theme be sure to inspect every file for hack code
  • 55. Step 4: Change all Passwords and Keys • Change your passwords: WordPress, FTP, MySQL • Verify the hacker didn‟t create another user, if so delete it • Update your secret keys in wp-config.php (as shown earlier)
  • 56. Step 5: Scan Database for Malicious Code • Look for common hack keywords: • eval, base64, strrev, iframe, noscript, display • Use WordPress Exploit Scanner plugin (discussed later) Example SQL: SELECT * FROM wp_posts WHERE post_content LIKE '%eval%'
  • 57. Step 6: Verify folder/file permissions • Check all folder and file permissions are correct • Reset to 755 on folders and 644 on files if needed
  • 65. WordPress Security Resources  Security Related Codex Articles › http://codex.wordpress.org/Hardening_WordPress › http://codex.wordpress.org/Changing_File_Permissions › http://codex.wordpress.org/Editing_wp-config.php › http://codex.wordpress.org/htaccess_for_subdirectories  Blog Security Articles › http://www.wpbeginner.com/wp-tutorials/11-vital-tips-and-hacks-to-protect-your- wordpress-admin-area/ › http://www.growmap.com/wordpress-exploits/ › http://lorelle.wordpress.com/2009/03/07/firewalling-and-hack-proofing-your-wordpress- blog/ › http://semlabs.co.uk/journal/how-to-stop-your-wordpress-blog-getting-hacked/ › http://www.makeuseof.com/tag/18-useful-plugins-and-hacks-to-protect-your-wordpress- blog/ › http://www.catswhocode.com/blog/10-easy-ways-to-secure-your-wordpress-blog  Clean A Hacked Site › http://codex.wordpress.org/FAQ_My_site_was_hacked › http://ottodestruct.com/blog/2009/hacked-wordpress-backdoors/ › http://ocaoimh.ie/did-your-wordpress-site-get-hacked/ › http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked- wordpress-installation/ › http://blog.sucuri.net/2010/02/removing-malware-from-wordpress-blog.html
  • 66. Contact Brad Williams brad@webdevstudios.com Blog: strangework.com Twitter: @williamsba IRC: WDS-Brad http://www.slideshare.net/williamsba
  • 67. Tweet: @williamsba WordPress Security Rocks! #wcma Win a copy of Professional WordPress!