Word camp pune 2013 security

Gaurav Singh
Gaurav SinghFounder at verloop
WordPress Security
Nothing exposed to www is 100% secure


       WordCamp Pune 2013


           Gaurav Singh
          @sgaurav_baghel
The Real Problem
“38% of us Would Rather Clean a Toilet
   Than Think of A New Password”
            -- mashable




         @sgaurav_baghel
Challenges
•   Environment
•   Network
•   Application
•   End Users -- YOU

        Any of these levels can screw you.


            @sgaurav_baghel
Environment




 @sgaurav_baghel
The Real Scenario
Word                       phpMy             Modul
         cPanel
Press                      Admin              es

  Apache                 MySQL                PHP
                     Linux
  Each contains its own list of vulnerabilities.

              @sgaurav_baghel
Network




Why worry, be safe.

@sgaurav_baghel
Application

Core      Plugin         Theme               You

              WordPress

  Secure each, hackers have an eye on all.



           @sgaurav_baghel
End User




@sgaurav_baghel
Attack Types
If you know it well, you are already half
                secure.




        @sgaurav_baghel
Opportunistic Attacks
•   Mostly automated
•   Scanning web looking for know vulnerabilities.
•   Brute Force/Data Dictionary Attacks.
•   SQLi
•   XSS




               @sgaurav_baghel
Targeted Attacks
• Against Large Enterprise with mass user base.
• Sophisticated attacks mostly involving group of
  hackers.
• DDOS attacks to bring website down.
• Done for financial/data benefits.




              @sgaurav_baghel
Top WordPress Infections
• Defacement
• Injections
• Redirects
• Pharma Hacks
• Backdoors – hardest to find out


               @sgaurav_baghel
Tips to Save Yourself
 “A stitch in time, saves nine.”
                     – Matt Mullenweg




    @sgaurav_baghel
For “I Don’t Care” Rockstars
I know you login with admin to post blogs.
       Please change it from now.




          @sgaurav_baghel
Know your Host
1.   Cheap should never be the criteria.
2.   Choose your host wisely.
3.   Know there security plan.
4.   If your host do not offer SSH, time to find a new.
5.   What will they do in case you get hacked?
6.   http://google.com/safebrowsing/diagnostics?sit
     e=<yourhost>



                 @sgaurav_baghel
Be Safe and Connect Securely

1. Choose SFTP over FTP.
2. Always login with least privileges.
   • Use account with least privileges to get your task done.
   • Avoid using root as far as possible.
3. Marry Linux as your OS.
4. Keep antivirus updated, on your Mac too.




                    @sgaurav_baghel
Backup Regularly

1. Do not rely on your host to backup data for you.

2. All it takes is a single command to do the job.

3. Use VaultPress to do backup job.

4. Never keep backup on same server.

5. Keeping backup of database is equally important.



                 @sgaurav_baghel
Update Update Update

1. Single key to cut off most of attacks on WordPress.

2. Version like 3.1.X are mostly security patches.

3. Not just WordPress, update your themes and plugin as
    well.

4. Keep an eye on all vulnerabilities exposed and check if
    that can affect you.



                  @sgaurav_baghel
Care your WordPress
1. Use secure passwords and do not share.
2. Change Passwords regularly.
3. Login with least privileges possible.
4. Create a nickname to post blogs.
5. Do not search “Free Woo themes” until you plan
   to end up serving Viagra from your blog.


                @sgaurav_baghel
For “Yes, I do care” guys
•   Connect Securely, use SSH/SFTP
•   Choose a different “Admin” name.
•   Use a Nickname to post blogs.
•   Keep WordPress cookies salted.
    http://api.wordpress.org/secret-keys/1.1/salt/




                  @sgaurav_baghel
For “Yes, I do care” guys
•   Limit theme and plugin use, delete unused ones.
•   Move up wp-config.php one level and lock it
    down.
•   Rename database prefix during installation.
•   ‘Limit Login Attempts’ – kills brute force
•   Disable user registration
•   Use Child Themes to modify CSS instead of
    tweaking base files.


               @sgaurav_baghel
For “Yes, I do care” guys
•   Manage File Permissions
      Files: 644 or 640
      Folder: 755 or 750

• Hide version info – these small steps help.
      In functions.php add these lines




                   @sgaurav_baghel
For “Yes, I do care” guys
•   Enable SSL Login
      Site needs to be accessible from https
      Add following lines in wp-config.php




                   @sgaurav_baghel
For “Yes, I do care” guys
•   Discourage unnecessary crawl
      Crawlers can crawl unnecessary files and expose them to hackers.
      Create a robot.txt and disallow crawling of unnecessary files.




                   @sgaurav_baghel
For “The Paranoids”
These Settings can break your website, know well
               before you execute.




           @sgaurav_baghel
Kill PHP Execution
Ensure that PHP files can not be executed from within a
                        directory.




If it messes with theme/plugin, ensure this is implemented in at
             least wp-includes and uploads directory.

                 @sgaurav_baghel
Disable Editing in WP Admin
Too often your passwords get hacked and you end up
      giving hacker access to entire code base.




            Add these lines in wp-config.php




              @sgaurav_baghel
Limit Admin/Login access by IP
Add these lines of code in the .htaccess file placed in
                 admin/root folder




   To implement this, you need to have static ip address.




               @sgaurav_baghel
Forbid Proxy Comment Posting
Deny requests that use a proxy server to post comments
              and eliminate some spam.




              Courtesy, perishablepress.com




               @sgaurav_baghel
Disable PHP settings
Edit php.ini - Idea is to turn display errors to off, in case of
    error they might return location of your web root.




   This will most likely break something, test in dev server before
                             moving to live

                    @sgaurav_baghel
Some Security Plugins
• Akismet

• Duo Two Factor Authentication

• Vaultpress

• Limit Login Attempts

• BulletProof Security



                 @sgaurav_baghel
[Sh]it Happens
Nothing to Panic, just clean and resubmit




        @sgaurav_baghel
[Sh]it Happens

• WordPress Forum –

      http://wordpress.org/tags/hacked

      http://wordpress.org/tags/malware

• http://safeweb.norton.com




               @sgaurav_baghel
Wish your WordPress a
    secure future
    Queries/feedback?




  @sgaurav_baghel
1 of 34

Recommended

Website security by
Website securityWebsite security
Website securityAkhilesh Kant
601 views19 slides
WordPress Security - WordPress Meetup Copenhagen 2013 by
WordPress Security - WordPress Meetup Copenhagen 2013WordPress Security - WordPress Meetup Copenhagen 2013
WordPress Security - WordPress Meetup Copenhagen 2013Thor Kristiansen
2K views38 slides
Google Hacking Basics by
Google Hacking BasicsGoogle Hacking Basics
Google Hacking Basicsamiable_indian
12.6K views32 slides
RUNNING A SECURITY CHECK FOR YOUR WORDPRESS SITE by
RUNNING A SECURITY CHECK FOR YOUR WORDPRESS SITERUNNING A SECURITY CHECK FOR YOUR WORDPRESS SITE
RUNNING A SECURITY CHECK FOR YOUR WORDPRESS SITEAcodez IT Solutions
48 views6 slides
Sucuri Webinar: How to Optimize Your Website for Best Performance by
Sucuri Webinar: How to Optimize Your Website for Best PerformanceSucuri Webinar: How to Optimize Your Website for Best Performance
Sucuri Webinar: How to Optimize Your Website for Best PerformanceSucuri
1.5K views21 slides
Word press security checklist by
Word press security checklistWord press security checklist
Word press security checklistSanjay Dabhoya
103 views26 slides

More Related Content

What's hot

Sucuri Webinar: How to identify and clean a hacked Joomla! website by
Sucuri Webinar: How to identify and clean a hacked Joomla! websiteSucuri Webinar: How to identify and clean a hacked Joomla! website
Sucuri Webinar: How to identify and clean a hacked Joomla! websiteSucuri
2.6K views58 slides
8 Simple Ways to Hack Your Joomla by
8 Simple Ways to Hack Your Joomla8 Simple Ways to Hack Your Joomla
8 Simple Ways to Hack Your JoomlaSiteGround.com
92.7K views62 slides
Building Secure WordPress Sites by
Building Secure WordPress Sites Building Secure WordPress Sites
Building Secure WordPress Sites Catch Themes
3.7K views32 slides
WORDPRESS SECURITY: HOW TO AVOID BEING HACKED by
WORDPRESS SECURITY: HOW TO AVOID BEING HACKEDWORDPRESS SECURITY: HOW TO AVOID BEING HACKED
WORDPRESS SECURITY: HOW TO AVOID BEING HACKEDStuartJDavidson.com
482 views4 slides
How To Lock Down And Secure Your Wordpress by
How To Lock Down And Secure Your WordpressHow To Lock Down And Secure Your Wordpress
How To Lock Down And Secure Your WordpressChelsea O'Brien
455 views19 slides
Secrets to a Hack-Proof Joomla Revealed by
Secrets to a Hack-Proof Joomla RevealedSecrets to a Hack-Proof Joomla Revealed
Secrets to a Hack-Proof Joomla RevealedSiteGround.com
26.8K views39 slides

What's hot(20)

Sucuri Webinar: How to identify and clean a hacked Joomla! website by Sucuri
Sucuri Webinar: How to identify and clean a hacked Joomla! websiteSucuri Webinar: How to identify and clean a hacked Joomla! website
Sucuri Webinar: How to identify and clean a hacked Joomla! website
Sucuri 2.6K views
8 Simple Ways to Hack Your Joomla by SiteGround.com
8 Simple Ways to Hack Your Joomla8 Simple Ways to Hack Your Joomla
8 Simple Ways to Hack Your Joomla
SiteGround.com92.7K views
Building Secure WordPress Sites by Catch Themes
Building Secure WordPress Sites Building Secure WordPress Sites
Building Secure WordPress Sites
Catch Themes3.7K views
How To Lock Down And Secure Your Wordpress by Chelsea O'Brien
How To Lock Down And Secure Your WordpressHow To Lock Down And Secure Your Wordpress
How To Lock Down And Secure Your Wordpress
Chelsea O'Brien455 views
Secrets to a Hack-Proof Joomla Revealed by SiteGround.com
Secrets to a Hack-Proof Joomla RevealedSecrets to a Hack-Proof Joomla Revealed
Secrets to a Hack-Proof Joomla Revealed
SiteGround.com26.8K views
8 Most Popular Joomla Hacks & How To Avoid Them by SiteGround.com
8 Most Popular Joomla Hacks & How To Avoid Them8 Most Popular Joomla Hacks & How To Avoid Them
8 Most Popular Joomla Hacks & How To Avoid Them
SiteGround.com33.1K views
Locking Down Your WordPress Site by Frank Corso
Locking Down Your WordPress SiteLocking Down Your WordPress Site
Locking Down Your WordPress Site
Frank Corso221 views
Sucuri Webinar: Leveraging Sucuri's API by Sucuri
Sucuri Webinar: Leveraging Sucuri's APISucuri Webinar: Leveraging Sucuri's API
Sucuri Webinar: Leveraging Sucuri's API
Sucuri 786 views
Sucuri Webinar: Beginner's Guide to CDNs by Sucuri
Sucuri Webinar: Beginner's Guide to CDNsSucuri Webinar: Beginner's Guide to CDNs
Sucuri Webinar: Beginner's Guide to CDNs
Sucuri 963 views
WordPress security for everyone by Vladimír Smitka
WordPress security for everyoneWordPress security for everyone
WordPress security for everyone
Vladimír Smitka37.3K views
Sucuri Webinar: Understand and Fix Google Blacklist Warnings by Sucuri
Sucuri Webinar: Understand and Fix Google Blacklist WarningsSucuri Webinar: Understand and Fix Google Blacklist Warnings
Sucuri Webinar: Understand and Fix Google Blacklist Warnings
Sucuri 1.4K views
Attacking Drupal by Greg Foss
Attacking DrupalAttacking Drupal
Attacking Drupal
Greg Foss20.2K views
Sucuri Webinar: How to Clean a Hacked Magento Website by Sucuri
Sucuri Webinar: How to Clean a Hacked Magento WebsiteSucuri Webinar: How to Clean a Hacked Magento Website
Sucuri Webinar: How to Clean a Hacked Magento Website
Sucuri 2.4K views
MR201504 Web Defacing Attacks Targeting WordPress by FFRI, Inc.
MR201504 Web Defacing Attacks Targeting WordPressMR201504 Web Defacing Attacks Targeting WordPress
MR201504 Web Defacing Attacks Targeting WordPress
FFRI, Inc.3.3K views

Similar to Word camp pune 2013 security

WordPress End-User Security by
WordPress End-User SecurityWordPress End-User Security
WordPress End-User SecurityDre Armeda
8.3K views36 slides
Protect Your WordPress From The Inside Out by
Protect Your WordPress From The Inside OutProtect Your WordPress From The Inside Out
Protect Your WordPress From The Inside OutSiteGround.com
7.7K views46 slides
Top Ten WordPress Security Tips for 2012 by
Top Ten WordPress Security Tips for 2012Top Ten WordPress Security Tips for 2012
Top Ten WordPress Security Tips for 2012Brad Williams
11.9K views35 slides
WordPress Security Best Practices by
WordPress Security Best PracticesWordPress Security Best Practices
WordPress Security Best PracticesZero Point Development
342 views75 slides
Higher Order WordPress Security by
Higher Order WordPress SecurityHigher Order WordPress Security
Higher Order WordPress SecurityDougal Campbell
2.2K views37 slides
Secure wordpress by
Secure wordpressSecure wordpress
Secure wordpressPrabesh Thapa
180 views25 slides

Similar to Word camp pune 2013 security(20)

WordPress End-User Security by Dre Armeda
WordPress End-User SecurityWordPress End-User Security
WordPress End-User Security
Dre Armeda8.3K views
Protect Your WordPress From The Inside Out by SiteGround.com
Protect Your WordPress From The Inside OutProtect Your WordPress From The Inside Out
Protect Your WordPress From The Inside Out
SiteGround.com7.7K views
Top Ten WordPress Security Tips for 2012 by Brad Williams
Top Ten WordPress Security Tips for 2012Top Ten WordPress Security Tips for 2012
Top Ten WordPress Security Tips for 2012
Brad Williams11.9K views
Higher Order WordPress Security by Dougal Campbell
Higher Order WordPress SecurityHigher Order WordPress Security
Higher Order WordPress Security
Dougal Campbell2.2K views
WordPress Security by Brad Williams
WordPress SecurityWordPress Security
WordPress Security
Brad Williams16.8K views
Your WordPress Website Is/Not Hacked by Angela Bowman
Your WordPress Website Is/Not HackedYour WordPress Website Is/Not Hacked
Your WordPress Website Is/Not Hacked
Angela Bowman4.5K views
WordPress Security Essential Tips & Tricks by Faraz Ahmed
WordPress Security Essential Tips & TricksWordPress Security Essential Tips & Tricks
WordPress Security Essential Tips & Tricks
Faraz Ahmed2.3K views
Neo word press meetup ehermits - how to keep your blog from being hacked 2012 by Brian Layman
Neo word press meetup   ehermits - how to keep your blog from being hacked 2012Neo word press meetup   ehermits - how to keep your blog from being hacked 2012
Neo word press meetup ehermits - how to keep your blog from being hacked 2012
Brian Layman962 views
WordCamp Mid-Atlantic WordPress Security by Brad Williams
WordCamp Mid-Atlantic WordPress SecurityWordCamp Mid-Atlantic WordPress Security
WordCamp Mid-Atlantic WordPress Security
Brad Williams5.6K views
WordPress Security - 12 WordPress Security Fundamentals by findingsimple
WordPress Security - 12 WordPress Security FundamentalsWordPress Security - 12 WordPress Security Fundamentals
WordPress Security - 12 WordPress Security Fundamentals
findingsimple8.8K views
Now That's What I Call WordPress Security 2010 by Brad Williams
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
Brad Williams3.1K views
WordPress Security Essentials by Angela Bowman
WordPress Security EssentialsWordPress Security Essentials
WordPress Security Essentials
Angela Bowman947 views

Word camp pune 2013 security

  • 1. WordPress Security Nothing exposed to www is 100% secure WordCamp Pune 2013 Gaurav Singh @sgaurav_baghel
  • 2. The Real Problem “38% of us Would Rather Clean a Toilet Than Think of A New Password” -- mashable @sgaurav_baghel
  • 3. Challenges • Environment • Network • Application • End Users -- YOU Any of these levels can screw you. @sgaurav_baghel
  • 5. The Real Scenario Word phpMy Modul cPanel Press Admin es Apache MySQL PHP Linux Each contains its own list of vulnerabilities. @sgaurav_baghel
  • 6. Network Why worry, be safe. @sgaurav_baghel
  • 7. Application Core Plugin Theme You WordPress Secure each, hackers have an eye on all. @sgaurav_baghel
  • 9. Attack Types If you know it well, you are already half secure. @sgaurav_baghel
  • 10. Opportunistic Attacks • Mostly automated • Scanning web looking for know vulnerabilities. • Brute Force/Data Dictionary Attacks. • SQLi • XSS @sgaurav_baghel
  • 11. Targeted Attacks • Against Large Enterprise with mass user base. • Sophisticated attacks mostly involving group of hackers. • DDOS attacks to bring website down. • Done for financial/data benefits. @sgaurav_baghel
  • 12. Top WordPress Infections • Defacement • Injections • Redirects • Pharma Hacks • Backdoors – hardest to find out @sgaurav_baghel
  • 13. Tips to Save Yourself “A stitch in time, saves nine.” – Matt Mullenweg @sgaurav_baghel
  • 14. For “I Don’t Care” Rockstars I know you login with admin to post blogs. Please change it from now. @sgaurav_baghel
  • 15. Know your Host 1. Cheap should never be the criteria. 2. Choose your host wisely. 3. Know there security plan. 4. If your host do not offer SSH, time to find a new. 5. What will they do in case you get hacked? 6. http://google.com/safebrowsing/diagnostics?sit e=<yourhost> @sgaurav_baghel
  • 16. Be Safe and Connect Securely 1. Choose SFTP over FTP. 2. Always login with least privileges. • Use account with least privileges to get your task done. • Avoid using root as far as possible. 3. Marry Linux as your OS. 4. Keep antivirus updated, on your Mac too. @sgaurav_baghel
  • 17. Backup Regularly 1. Do not rely on your host to backup data for you. 2. All it takes is a single command to do the job. 3. Use VaultPress to do backup job. 4. Never keep backup on same server. 5. Keeping backup of database is equally important. @sgaurav_baghel
  • 18. Update Update Update 1. Single key to cut off most of attacks on WordPress. 2. Version like 3.1.X are mostly security patches. 3. Not just WordPress, update your themes and plugin as well. 4. Keep an eye on all vulnerabilities exposed and check if that can affect you. @sgaurav_baghel
  • 19. Care your WordPress 1. Use secure passwords and do not share. 2. Change Passwords regularly. 3. Login with least privileges possible. 4. Create a nickname to post blogs. 5. Do not search “Free Woo themes” until you plan to end up serving Viagra from your blog. @sgaurav_baghel
  • 20. For “Yes, I do care” guys • Connect Securely, use SSH/SFTP • Choose a different “Admin” name. • Use a Nickname to post blogs. • Keep WordPress cookies salted. http://api.wordpress.org/secret-keys/1.1/salt/ @sgaurav_baghel
  • 21. For “Yes, I do care” guys • Limit theme and plugin use, delete unused ones. • Move up wp-config.php one level and lock it down. • Rename database prefix during installation. • ‘Limit Login Attempts’ – kills brute force • Disable user registration • Use Child Themes to modify CSS instead of tweaking base files. @sgaurav_baghel
  • 22. For “Yes, I do care” guys • Manage File Permissions Files: 644 or 640 Folder: 755 or 750 • Hide version info – these small steps help. In functions.php add these lines @sgaurav_baghel
  • 23. For “Yes, I do care” guys • Enable SSL Login Site needs to be accessible from https Add following lines in wp-config.php @sgaurav_baghel
  • 24. For “Yes, I do care” guys • Discourage unnecessary crawl Crawlers can crawl unnecessary files and expose them to hackers. Create a robot.txt and disallow crawling of unnecessary files. @sgaurav_baghel
  • 25. For “The Paranoids” These Settings can break your website, know well before you execute. @sgaurav_baghel
  • 26. Kill PHP Execution Ensure that PHP files can not be executed from within a directory. If it messes with theme/plugin, ensure this is implemented in at least wp-includes and uploads directory. @sgaurav_baghel
  • 27. Disable Editing in WP Admin Too often your passwords get hacked and you end up giving hacker access to entire code base. Add these lines in wp-config.php @sgaurav_baghel
  • 28. Limit Admin/Login access by IP Add these lines of code in the .htaccess file placed in admin/root folder To implement this, you need to have static ip address. @sgaurav_baghel
  • 29. Forbid Proxy Comment Posting Deny requests that use a proxy server to post comments and eliminate some spam. Courtesy, perishablepress.com @sgaurav_baghel
  • 30. Disable PHP settings Edit php.ini - Idea is to turn display errors to off, in case of error they might return location of your web root. This will most likely break something, test in dev server before moving to live @sgaurav_baghel
  • 31. Some Security Plugins • Akismet • Duo Two Factor Authentication • Vaultpress • Limit Login Attempts • BulletProof Security @sgaurav_baghel
  • 32. [Sh]it Happens Nothing to Panic, just clean and resubmit @sgaurav_baghel
  • 33. [Sh]it Happens • WordPress Forum – http://wordpress.org/tags/hacked http://wordpress.org/tags/malware • http://safeweb.norton.com @sgaurav_baghel
  • 34. Wish your WordPress a secure future Queries/feedback? @sgaurav_baghel