SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Securing Drupal 7:
Don’t get Hacked or
Spammed to death!

     Adelle Frank
   Friday, February 15, 2013

      GT Drupal Users Group
Who is the presentation for?


    • Site builders
    • NOT Server admins
    • NOT module/theme coders.
      – For secure coding tips, see:
        http://drupal.org/writing-secure-code




2
Places that need securing in Drupal


    1.   YOUR Code
    2.   Drupal Core
    3.   Drupal Contrib(uted) Themes/Modules
    4.   External Libraries & Code
    5.   Editor Support
    6.   Server & Monitoring




3
1. YOUR Code Choices
    • http://drupal.org/writing-secure-code

    • Be careful if you write a module or make code
      changes to a Theme!!
      – Separate/Comment any changes to Code.
      – Don't hack CORE!


    • Don't install non-recommended modules or libraries
      OR THEMES


4
2. Drupal Core: Updating
    • Update manager (module ON & configured for
      security emails admin/reports/updates/settings)
    • Apply every security patch after backing up
      EVERYTHING
      – module updates are EASY in Drupal 7
      – Installatron makes CORE updates easier (but MUST
        backup .htaccess and robots.txt).
        http://drupal.gatech.edu/wiki/importing-existing-site-insta

    • http://drupal.org/project/security_review (module)


5
2. Drupal Core: Some module settings
    • PHP filter (module OFF)
    • Tracker (module OFF, unless have LOTS of users
      or sensitive data)
    • Comments (module OFF, unless have use case,
      and will require protective measures)
    • Error message display (NONE/OFF)
      admin/config/development/logging, but keep ALL.
    • File system (admin/config/media/file-system):
      private?
    • Database logging (module ON, instead of Syslog)

6
2. Drupal Core: User accounts
    • admin/config/people/accounts & admin/people
    • Disable User #1 (& masquerade) in Drupal 7 b/c not
      needed, give self "administer software updates”
    • Choose: "Disable the account and keep its content.”
      b/c deleting users who have created content can
      lead to access bypass
    • Only Admins can register accounts.
    • OFF: Enable personal contact form by default
    • OFF: Enable signatures (b/c applies to ALL)
    • OFF: Enable user pictures (b/c applies to ALL)

7
2. Drupal Core: Permissions
    • admin/people/permissions
    • Only give ANONYMOUS & AUTHENTICATED
      “View published content”, add more if NEEDED.
    • Only Developer/SuperAdmin gets "Administer...”
    • (Possible) Exception. Might give EDITORS
      "Administer” for: Blocks, Comments, Menus.
    • Contrib Modules for fine grained permissions:
      – override node options,
      – role delegation or role assign
      – field permissions, etc.

8
2. Drupal Core: Filters
    • http://drupal.org/node/224921
    • Filter (module ON) = Text input formats
    • Do NOT allow these tags: SCRIPT, IMG, IFRAME,
      EMBED, OBJECT, INPUT, LINK, STYLE, META,
      FRAMESET, DIV, SPAN, BASE, TABLE, TR, TD
    • ORDER of Filters (plain text for ALL at TOP)
    • Filter Permissions (limit ANONYMOUS &
      AUTHENTICATED to plain, give EDITOR basic)
      – More filters details in Contrib. modules


9
3. Contrib Modules & Themes
     • Disable or un-install modules you are not using (UI
       & Devel modules, like Masquerade). Regularly audit
       sites for unused modules.
     • Criteria for evaluating contrib (Erik Webb):
       –   supported version(s)
       –   maintainer reputation
       –   total usage
       –   number of open issues
       –   usage change over time
     • Criteria 2: allows PHP execution? Some modules
       that do are: Devel; CCK fields; Views; Webform
10
3. Contrib: CAS and Captcha/Spamicide
     • For GTaccount holders, CAS module (requiring GT
       Logins for certain pages/forms) will usually be
       sufficient to protect individual content types/forms
       – admin/config/people/cas
       – Redirection > Specific pages

     • If ANONYMOUS users can Add content or can
       Login, MUST HAVE Captcha + Spamicide

     • Helpful Tool: StopSpamForum.com (esp if you
       Block IPs in your Drupal site).
11
3. Contrib: Editor & More Filters
     • Because user content is dangerous, pay attention
       to settings for editing and file uploading modules.
     • Who can use IMCE to add files/images & which file
       extensions are allowed? (profile)
     • Who can use LinkIt to make a Link? (profile)
     • Use WYSIWYG Filter to strip out unwanted code
     • Limit buttons on CKEditor Toolbar
     • Use Plain Text for ANONYMOUS users and on
       most TextArea Fields.


12
3. Contrib: Field permissions & privacy
     • Create unique names for every field that holds
       remotely-sensitive info. Why? Because permissions
       are by FIELD NAME regardless of content type
       – Example: field_user_address, if used on 2 different
         forms, has the SAME permissions on both forms.
     • Tip: Use bundle_copy module to make a generic
       Content Type with pre-set fields & display settings
       that are easy to alter & copy.




13
3. Contrib: Fields, cont.
     • Types of data NOT to store and NOT to share:
       – FERPA student data not in directory (directory =
         name, email, field/dept)
       – HIPAA health-related
       – Identity theft-prone (SSN, Birthdate, etc.)
     • Types of permissions for fields and content types:
       –   create
       –   edit OWN; view OWN (might be safe)
       –   edit ANY; view ANY (editors or admins only)
       –   delete OWN; delete ANY (be careful, admins only)

14
3. Contrib: Webform
     • http://drupal.org/project/webform
     • NOT good at fine-grained permissions
     • Can have PHP execution vulnerabilities
     • You have MUCH better better access control &
       reporting options (Views), if you use Content Types,
       instead.
     • Content types are Safer, but harder to delegate to
       editors for set up.



15
3. Contrib: Views
     • http://drupal.org/project/views
     • Very popular, will be Core in Drupal 8.
     • Allows you to report out on data in LOTs of ways
     • Must take care with PERMISSIONS, esp by Role,
       for each View, esp if any data is private or sensitive.
     • Be careful not to allow PHP in arguments, unless
       necessary.




16
3. Contrib: Pathauto & Auto Label
     • http://drupal.org/project/auto_entitylabel
        – If hide Title field and auto create the Title, don't give
          away private info in that Title.


     • http://drupal.org/project/pathauto
        – [user:name] not good default path for user URLs (will
          show gtaccount)
        – Do your content type auto aliases reveal too much
          about content?



17
4. External Libraries & Code
     • HOW Can we: ?
       – Regularly check libraries for security notices
         (CKeditor, phpCAS, jquery.cycle, etc.).
       – Audit 3rd party code for security holes (such as
         superglobals like $_GET)
       – Audit libraries’ example code or other 4th party
         included packages.
       – Discover unneeded code to remove from libraries
         (and, of course, notate in README.txt file)



18
5. Editor Support
     • Training, especially security implications of:
        –   forms
        –   comments
        –   file types
        –   tag choices in HTML


     • Regular audits of content + users
        – every semester
        – less files/revisions/people to look over if hacked
        – less chance of un-used file/account being co-opted

19
6. Server & Monitoring
     • Not a good use of time = hide clues that a site runs
       on Drupal (http://drupal.org/node/766404)
     • Robots.txt (only works on good search engines)
     • .htaccess (can limit to on-campus or VPN access,
       Drupal already hides directories)
       –   RewriteCond %{REMOTE_ADDR} !^130.207.
       –   RewriteCond %{REMOTE_ADDR} !^128.61.
       –   RewriteCond %{REMOTE_ADDR} !^143.215.
       –   RewriteCond %{REMOTE_ADDR} !^192.93.8.
       –   RewriteRule ^.* http://site.gatech.edu/message.html
           [R=301,L]

20
6. Server & Monitoring, cont.
     • HTTPS, instead of HTTP
     • Securing file permissions and ownership
       (settings.php, etc., http://drupal.org/node/244924)
     • Regular BACKUPS (and diffs for comparison)
     • Avoid installing multiple softwares on same server
       (i.e. Wordpress AND Drupal)
     • Avoid storing ANYTHING other than the Drupal
       install in the web ROOT (httpdocs).



21
References
     • http://drupal.org/security/secure-configuration
     • List of security-related contrib modules:
       http://drupal.org/node/382752

     • http://www.slideshare.net/meghsweet/badcamp-
       2012-drupal-support
     • http://www.slideshare.net/erikwebb/performance-
       for-site-builders
     • http://drupalscout.com/knowledge-base/dangers-
       3rd-party-libraries-drupal-sites

22

Weitere ähnliche Inhalte

Was ist angesagt?

Browser Serving Your Web Application Security - NorthEast PHP 2017
Browser Serving Your Web Application Security - NorthEast PHP 2017Browser Serving Your Web Application Security - NorthEast PHP 2017
Browser Serving Your Web Application Security - NorthEast PHP 2017Philippe Gamache
 
Configuring CQ Security
Configuring CQ SecurityConfiguring CQ Security
Configuring CQ Securityconnectwebex
 
Word press security checklist
Word press security checklistWord press security checklist
Word press security checklistSanjay Dabhoya
 
WordCamp Finland 2015 - WordPress Security
WordCamp Finland 2015 - WordPress SecurityWordCamp Finland 2015 - WordPress Security
WordCamp Finland 2015 - WordPress SecurityTiia Rantanen
 
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...Otto Kekäläinen
 
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
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesOtto Kekäläinen
 
Drupal Security Basics for the DrupalJax January Meetup
Drupal Security Basics for the DrupalJax January MeetupDrupal Security Basics for the DrupalJax January Meetup
Drupal Security Basics for the DrupalJax January MeetupChris Hales
 
Wordpress development: A Modern Approach
Wordpress development:  A Modern ApproachWordpress development:  A Modern Approach
Wordpress development: A Modern ApproachAlessandro Fiore
 
WordPress Security - A Hacker's Guide - WordCamp 2019 Islamabad
WordPress Security - A Hacker's Guide - WordCamp 2019 IslamabadWordPress Security - A Hacker's Guide - WordCamp 2019 Islamabad
WordPress Security - A Hacker's Guide - WordCamp 2019 IslamabadRF Studio
 
Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriverRajathi-QA
 
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim HegazyHackIT Ukraine
 
A Drush Primer - DrupalCamp Chattanooga 2013
A Drush Primer - DrupalCamp Chattanooga 2013A Drush Primer - DrupalCamp Chattanooga 2013
A Drush Primer - DrupalCamp Chattanooga 2013Chris Hales
 
Bsidesnova- Pentesting Methodology - Making bits less complicated
Bsidesnova- Pentesting Methodology - Making bits less complicatedBsidesnova- Pentesting Methodology - Making bits less complicated
Bsidesnova- Pentesting Methodology - Making bits less complicatedOctavio Paguaga
 
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
 
WordPress Security Updated - NYC Meetup 2009
WordPress Security Updated - NYC Meetup 2009WordPress Security Updated - NYC Meetup 2009
WordPress Security Updated - NYC Meetup 2009Brad Williams
 
Java Secure Coding Practices
Java Secure Coding PracticesJava Secure Coding Practices
Java Secure Coding PracticesOWASPKerala
 
Securing WordPress by Jeff Hoffman
Securing WordPress by Jeff HoffmanSecuring WordPress by Jeff Hoffman
Securing WordPress by Jeff HoffmanJeff Hoffman
 

Was ist angesagt? (20)

Browser Serving Your Web Application Security - NorthEast PHP 2017
Browser Serving Your Web Application Security - NorthEast PHP 2017Browser Serving Your Web Application Security - NorthEast PHP 2017
Browser Serving Your Web Application Security - NorthEast PHP 2017
 
Configuring CQ Security
Configuring CQ SecurityConfiguring CQ Security
Configuring CQ Security
 
Word press security checklist
Word press security checklistWord press security checklist
Word press security checklist
 
WordCamp Finland 2015 - WordPress Security
WordCamp Finland 2015 - WordPress SecurityWordCamp Finland 2015 - WordPress Security
WordCamp Finland 2015 - WordPress Security
 
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...
 
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
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes
 
Drupal Security Basics for the DrupalJax January Meetup
Drupal Security Basics for the DrupalJax January MeetupDrupal Security Basics for the DrupalJax January Meetup
Drupal Security Basics for the DrupalJax January Meetup
 
Wordpress development: A Modern Approach
Wordpress development:  A Modern ApproachWordpress development:  A Modern Approach
Wordpress development: A Modern Approach
 
WordPress Security - A Hacker's Guide - WordCamp 2019 Islamabad
WordPress Security - A Hacker's Guide - WordCamp 2019 IslamabadWordPress Security - A Hacker's Guide - WordCamp 2019 Islamabad
WordPress Security - A Hacker's Guide - WordCamp 2019 Islamabad
 
Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriver
 
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
 
A Drush Primer - DrupalCamp Chattanooga 2013
A Drush Primer - DrupalCamp Chattanooga 2013A Drush Primer - DrupalCamp Chattanooga 2013
A Drush Primer - DrupalCamp Chattanooga 2013
 
Bsidesnova- Pentesting Methodology - Making bits less complicated
Bsidesnova- Pentesting Methodology - Making bits less complicatedBsidesnova- Pentesting Methodology - Making bits less complicated
Bsidesnova- Pentesting Methodology - Making bits less complicated
 
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
 
WordPress Security Updated - NYC Meetup 2009
WordPress Security Updated - NYC Meetup 2009WordPress Security Updated - NYC Meetup 2009
WordPress Security Updated - NYC Meetup 2009
 
Java Secure Coding Practices
Java Secure Coding PracticesJava Secure Coding Practices
Java Secure Coding Practices
 
WordPress Security
WordPress SecurityWordPress Security
WordPress Security
 
JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...
JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...
JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...
 
Securing WordPress by Jeff Hoffman
Securing WordPress by Jeff HoffmanSecuring WordPress by Jeff Hoffman
Securing WordPress by Jeff Hoffman
 

Ähnlich wie Securing Drupal 7: Do not get Hacked or Spammed to death!

Top 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectTop 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectIztok Smolic
 
Drupal module development
Drupal module developmentDrupal module development
Drupal module developmentRachit Gupta
 
Drupal security
Drupal securityDrupal security
Drupal securityJozef Toth
 
Doing Drupal security right
Doing Drupal security rightDoing Drupal security right
Doing Drupal security rightGábor Hojtsy
 
Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.DrupalCamp Kyiv
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master BuilderPhilip Norton
 
Absolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalAbsolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalRod Martin
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To DrupalLauren Roth
 
Drupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsDrupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsMicky Metts
 
Moodle Development Best Pracitces
Moodle Development Best PracitcesMoodle Development Best Pracitces
Moodle Development Best PracitcesJustin Filip
 
Drupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp BratislavaDrupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp BratislavaGábor Hojtsy
 
Introduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, TerminologiesIntroduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, TerminologiesGerald Villorente
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Angela Byron
 
Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Anil Sagar
 
Easy Drupal Project Deployment With Features Module & Drush
Easy Drupal Project Deployment With Features Module & DrushEasy Drupal Project Deployment With Features Module & Drush
Easy Drupal Project Deployment With Features Module & DrushQArea
 
Why Drupal?
Why Drupal?Why Drupal?
Why Drupal?Grossum
 

Ähnlich wie Securing Drupal 7: Do not get Hacked or Spammed to death! (20)

Top 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectTop 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal project
 
Drupal module development
Drupal module developmentDrupal module development
Drupal module development
 
Drupal security
Drupal securityDrupal security
Drupal security
 
Drupal Skils Lab 302Labs
Drupal Skils Lab 302Labs Drupal Skils Lab 302Labs
Drupal Skils Lab 302Labs
 
Doing Drupal security right
Doing Drupal security rightDoing Drupal security right
Doing Drupal security right
 
Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
Absolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalAbsolute Beginners Guide to Drupal
Absolute Beginners Guide to Drupal
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
 
Drupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsDrupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal Concepts
 
Moodle Development Best Pracitces
Moodle Development Best PracitcesMoodle Development Best Pracitces
Moodle Development Best Pracitces
 
CHANGELOG.txt
CHANGELOG.txtCHANGELOG.txt
CHANGELOG.txt
 
72d5drupal
72d5drupal72d5drupal
72d5drupal
 
Drupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp BratislavaDrupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp Bratislava
 
Drupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating ModulesDrupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating Modules
 
Introduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, TerminologiesIntroduction to Drupal - Installation, Anatomy, Terminologies
Introduction to Drupal - Installation, Anatomy, Terminologies
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8
 
Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2
 
Easy Drupal Project Deployment With Features Module & Drush
Easy Drupal Project Deployment With Features Module & DrushEasy Drupal Project Deployment With Features Module & Drush
Easy Drupal Project Deployment With Features Module & Drush
 
Why Drupal?
Why Drupal?Why Drupal?
Why Drupal?
 

Mehr von Adelle Frank

Drupal 6 to 7 migration
Drupal 6 to 7 migrationDrupal 6 to 7 migration
Drupal 6 to 7 migrationAdelle Frank
 
Views can Show that!
Views can Show that!Views can Show that!
Views can Show that!Adelle Frank
 
Build your Chunks! Explain real life to Drupal in its own Words (at BADCamp 2...
Build your Chunks! Explain real life to Drupal in its own Words (at BADCamp 2...Build your Chunks! Explain real life to Drupal in its own Words (at BADCamp 2...
Build your Chunks! Explain real life to Drupal in its own Words (at BADCamp 2...Adelle Frank
 
Plan your Chunks! Future-proofing Your Information Architecture with Drupal ...
 Plan your Chunks! Future-proofing Your Information Architecture with Drupal ... Plan your Chunks! Future-proofing Your Information Architecture with Drupal ...
Plan your Chunks! Future-proofing Your Information Architecture with Drupal ...Adelle Frank
 
Drupal Workgroup: how OIT helps make the GT web community even MORE awesome!
Drupal Workgroup: how OIT helps make the GT web community even MORE awesome! Drupal Workgroup: how OIT helps make the GT web community even MORE awesome!
Drupal Workgroup: how OIT helps make the GT web community even MORE awesome! Adelle Frank
 
Plan your Chunks! Win the Future with Information Architecture NOW
Plan your Chunks! Win the Future with Information Architecture NOWPlan your Chunks! Win the Future with Information Architecture NOW
Plan your Chunks! Win the Future with Information Architecture NOWAdelle Frank
 
Feeds is my Friend: a Drupal 6 to 7 Migration story
Feeds is my Friend: a Drupal 6 to 7 Migration storyFeeds is my Friend: a Drupal 6 to 7 Migration story
Feeds is my Friend: a Drupal 6 to 7 Migration storyAdelle Frank
 
GT Drupal: Install Script, Profile, and Editor
GT Drupal: Install Script, Profile, and EditorGT Drupal: Install Script, Profile, and Editor
GT Drupal: Install Script, Profile, and EditorAdelle Frank
 
ViewsWoW! (for Drupal)
ViewsWoW! (for Drupal)ViewsWoW! (for Drupal)
ViewsWoW! (for Drupal)Adelle Frank
 
Catalyzing Drupal collaboration & coding at your institution
Catalyzing Drupal collaboration & coding at your institutionCatalyzing Drupal collaboration & coding at your institution
Catalyzing Drupal collaboration & coding at your institutionAdelle Frank
 
How to publish your university catalog and class schedules online using the C...
How to publish your university catalog and class schedules online using the C...How to publish your university catalog and class schedules online using the C...
How to publish your university catalog and class schedules online using the C...Adelle Frank
 

Mehr von Adelle Frank (11)

Drupal 6 to 7 migration
Drupal 6 to 7 migrationDrupal 6 to 7 migration
Drupal 6 to 7 migration
 
Views can Show that!
Views can Show that!Views can Show that!
Views can Show that!
 
Build your Chunks! Explain real life to Drupal in its own Words (at BADCamp 2...
Build your Chunks! Explain real life to Drupal in its own Words (at BADCamp 2...Build your Chunks! Explain real life to Drupal in its own Words (at BADCamp 2...
Build your Chunks! Explain real life to Drupal in its own Words (at BADCamp 2...
 
Plan your Chunks! Future-proofing Your Information Architecture with Drupal ...
 Plan your Chunks! Future-proofing Your Information Architecture with Drupal ... Plan your Chunks! Future-proofing Your Information Architecture with Drupal ...
Plan your Chunks! Future-proofing Your Information Architecture with Drupal ...
 
Drupal Workgroup: how OIT helps make the GT web community even MORE awesome!
Drupal Workgroup: how OIT helps make the GT web community even MORE awesome! Drupal Workgroup: how OIT helps make the GT web community even MORE awesome!
Drupal Workgroup: how OIT helps make the GT web community even MORE awesome!
 
Plan your Chunks! Win the Future with Information Architecture NOW
Plan your Chunks! Win the Future with Information Architecture NOWPlan your Chunks! Win the Future with Information Architecture NOW
Plan your Chunks! Win the Future with Information Architecture NOW
 
Feeds is my Friend: a Drupal 6 to 7 Migration story
Feeds is my Friend: a Drupal 6 to 7 Migration storyFeeds is my Friend: a Drupal 6 to 7 Migration story
Feeds is my Friend: a Drupal 6 to 7 Migration story
 
GT Drupal: Install Script, Profile, and Editor
GT Drupal: Install Script, Profile, and EditorGT Drupal: Install Script, Profile, and Editor
GT Drupal: Install Script, Profile, and Editor
 
ViewsWoW! (for Drupal)
ViewsWoW! (for Drupal)ViewsWoW! (for Drupal)
ViewsWoW! (for Drupal)
 
Catalyzing Drupal collaboration & coding at your institution
Catalyzing Drupal collaboration & coding at your institutionCatalyzing Drupal collaboration & coding at your institution
Catalyzing Drupal collaboration & coding at your institution
 
How to publish your university catalog and class schedules online using the C...
How to publish your university catalog and class schedules online using the C...How to publish your university catalog and class schedules online using the C...
How to publish your university catalog and class schedules online using the C...
 

Kürzlich hochgeladen

Call Girls Dubai O525547819 Favor Dubai Call Girls Agency
Call Girls Dubai O525547819 Favor Dubai Call Girls AgencyCall Girls Dubai O525547819 Favor Dubai Call Girls Agency
Call Girls Dubai O525547819 Favor Dubai Call Girls Agencykojalkojal131
 
English basic for beginners Future tenses .pdf
English basic for beginners Future tenses .pdfEnglish basic for beginners Future tenses .pdf
English basic for beginners Future tenses .pdfbromerom1
 
Benefits of Co working & Shared office space in India
Benefits of Co working & Shared office space in IndiaBenefits of Co working & Shared office space in India
Benefits of Co working & Shared office space in IndiaBrantfordIndia
 
The 5 sec rule - Mel Robins (Hindi Summary)
The 5 sec rule - Mel Robins (Hindi Summary)The 5 sec rule - Mel Robins (Hindi Summary)
The 5 sec rule - Mel Robins (Hindi Summary)Shakti Savarn
 
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?Mikko Kangassalo
 
integrity in personal relationship (1).pdf
integrity in personal relationship (1).pdfintegrity in personal relationship (1).pdf
integrity in personal relationship (1).pdfAmitRout25
 
Spiritual Life Quote from Shiva Negi
Spiritual Life Quote from Shiva Negi Spiritual Life Quote from Shiva Negi
Spiritual Life Quote from Shiva Negi OneDay18
 

Kürzlich hochgeladen (7)

Call Girls Dubai O525547819 Favor Dubai Call Girls Agency
Call Girls Dubai O525547819 Favor Dubai Call Girls AgencyCall Girls Dubai O525547819 Favor Dubai Call Girls Agency
Call Girls Dubai O525547819 Favor Dubai Call Girls Agency
 
English basic for beginners Future tenses .pdf
English basic for beginners Future tenses .pdfEnglish basic for beginners Future tenses .pdf
English basic for beginners Future tenses .pdf
 
Benefits of Co working & Shared office space in India
Benefits of Co working & Shared office space in IndiaBenefits of Co working & Shared office space in India
Benefits of Co working & Shared office space in India
 
The 5 sec rule - Mel Robins (Hindi Summary)
The 5 sec rule - Mel Robins (Hindi Summary)The 5 sec rule - Mel Robins (Hindi Summary)
The 5 sec rule - Mel Robins (Hindi Summary)
 
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?
 
integrity in personal relationship (1).pdf
integrity in personal relationship (1).pdfintegrity in personal relationship (1).pdf
integrity in personal relationship (1).pdf
 
Spiritual Life Quote from Shiva Negi
Spiritual Life Quote from Shiva Negi Spiritual Life Quote from Shiva Negi
Spiritual Life Quote from Shiva Negi
 

Securing Drupal 7: Do not get Hacked or Spammed to death!

  • 1. Securing Drupal 7: Don’t get Hacked or Spammed to death! Adelle Frank Friday, February 15, 2013 GT Drupal Users Group
  • 2. Who is the presentation for? • Site builders • NOT Server admins • NOT module/theme coders. – For secure coding tips, see: http://drupal.org/writing-secure-code 2
  • 3. Places that need securing in Drupal 1. YOUR Code 2. Drupal Core 3. Drupal Contrib(uted) Themes/Modules 4. External Libraries & Code 5. Editor Support 6. Server & Monitoring 3
  • 4. 1. YOUR Code Choices • http://drupal.org/writing-secure-code • Be careful if you write a module or make code changes to a Theme!! – Separate/Comment any changes to Code. – Don't hack CORE! • Don't install non-recommended modules or libraries OR THEMES 4
  • 5. 2. Drupal Core: Updating • Update manager (module ON & configured for security emails admin/reports/updates/settings) • Apply every security patch after backing up EVERYTHING – module updates are EASY in Drupal 7 – Installatron makes CORE updates easier (but MUST backup .htaccess and robots.txt). http://drupal.gatech.edu/wiki/importing-existing-site-insta • http://drupal.org/project/security_review (module) 5
  • 6. 2. Drupal Core: Some module settings • PHP filter (module OFF) • Tracker (module OFF, unless have LOTS of users or sensitive data) • Comments (module OFF, unless have use case, and will require protective measures) • Error message display (NONE/OFF) admin/config/development/logging, but keep ALL. • File system (admin/config/media/file-system): private? • Database logging (module ON, instead of Syslog) 6
  • 7. 2. Drupal Core: User accounts • admin/config/people/accounts & admin/people • Disable User #1 (& masquerade) in Drupal 7 b/c not needed, give self "administer software updates” • Choose: "Disable the account and keep its content.” b/c deleting users who have created content can lead to access bypass • Only Admins can register accounts. • OFF: Enable personal contact form by default • OFF: Enable signatures (b/c applies to ALL) • OFF: Enable user pictures (b/c applies to ALL) 7
  • 8. 2. Drupal Core: Permissions • admin/people/permissions • Only give ANONYMOUS & AUTHENTICATED “View published content”, add more if NEEDED. • Only Developer/SuperAdmin gets "Administer...” • (Possible) Exception. Might give EDITORS "Administer” for: Blocks, Comments, Menus. • Contrib Modules for fine grained permissions: – override node options, – role delegation or role assign – field permissions, etc. 8
  • 9. 2. Drupal Core: Filters • http://drupal.org/node/224921 • Filter (module ON) = Text input formats • Do NOT allow these tags: SCRIPT, IMG, IFRAME, EMBED, OBJECT, INPUT, LINK, STYLE, META, FRAMESET, DIV, SPAN, BASE, TABLE, TR, TD • ORDER of Filters (plain text for ALL at TOP) • Filter Permissions (limit ANONYMOUS & AUTHENTICATED to plain, give EDITOR basic) – More filters details in Contrib. modules 9
  • 10. 3. Contrib Modules & Themes • Disable or un-install modules you are not using (UI & Devel modules, like Masquerade). Regularly audit sites for unused modules. • Criteria for evaluating contrib (Erik Webb): – supported version(s) – maintainer reputation – total usage – number of open issues – usage change over time • Criteria 2: allows PHP execution? Some modules that do are: Devel; CCK fields; Views; Webform 10
  • 11. 3. Contrib: CAS and Captcha/Spamicide • For GTaccount holders, CAS module (requiring GT Logins for certain pages/forms) will usually be sufficient to protect individual content types/forms – admin/config/people/cas – Redirection > Specific pages • If ANONYMOUS users can Add content or can Login, MUST HAVE Captcha + Spamicide • Helpful Tool: StopSpamForum.com (esp if you Block IPs in your Drupal site). 11
  • 12. 3. Contrib: Editor & More Filters • Because user content is dangerous, pay attention to settings for editing and file uploading modules. • Who can use IMCE to add files/images & which file extensions are allowed? (profile) • Who can use LinkIt to make a Link? (profile) • Use WYSIWYG Filter to strip out unwanted code • Limit buttons on CKEditor Toolbar • Use Plain Text for ANONYMOUS users and on most TextArea Fields. 12
  • 13. 3. Contrib: Field permissions & privacy • Create unique names for every field that holds remotely-sensitive info. Why? Because permissions are by FIELD NAME regardless of content type – Example: field_user_address, if used on 2 different forms, has the SAME permissions on both forms. • Tip: Use bundle_copy module to make a generic Content Type with pre-set fields & display settings that are easy to alter & copy. 13
  • 14. 3. Contrib: Fields, cont. • Types of data NOT to store and NOT to share: – FERPA student data not in directory (directory = name, email, field/dept) – HIPAA health-related – Identity theft-prone (SSN, Birthdate, etc.) • Types of permissions for fields and content types: – create – edit OWN; view OWN (might be safe) – edit ANY; view ANY (editors or admins only) – delete OWN; delete ANY (be careful, admins only) 14
  • 15. 3. Contrib: Webform • http://drupal.org/project/webform • NOT good at fine-grained permissions • Can have PHP execution vulnerabilities • You have MUCH better better access control & reporting options (Views), if you use Content Types, instead. • Content types are Safer, but harder to delegate to editors for set up. 15
  • 16. 3. Contrib: Views • http://drupal.org/project/views • Very popular, will be Core in Drupal 8. • Allows you to report out on data in LOTs of ways • Must take care with PERMISSIONS, esp by Role, for each View, esp if any data is private or sensitive. • Be careful not to allow PHP in arguments, unless necessary. 16
  • 17. 3. Contrib: Pathauto & Auto Label • http://drupal.org/project/auto_entitylabel – If hide Title field and auto create the Title, don't give away private info in that Title. • http://drupal.org/project/pathauto – [user:name] not good default path for user URLs (will show gtaccount) – Do your content type auto aliases reveal too much about content? 17
  • 18. 4. External Libraries & Code • HOW Can we: ? – Regularly check libraries for security notices (CKeditor, phpCAS, jquery.cycle, etc.). – Audit 3rd party code for security holes (such as superglobals like $_GET) – Audit libraries’ example code or other 4th party included packages. – Discover unneeded code to remove from libraries (and, of course, notate in README.txt file) 18
  • 19. 5. Editor Support • Training, especially security implications of: – forms – comments – file types – tag choices in HTML • Regular audits of content + users – every semester – less files/revisions/people to look over if hacked – less chance of un-used file/account being co-opted 19
  • 20. 6. Server & Monitoring • Not a good use of time = hide clues that a site runs on Drupal (http://drupal.org/node/766404) • Robots.txt (only works on good search engines) • .htaccess (can limit to on-campus or VPN access, Drupal already hides directories) – RewriteCond %{REMOTE_ADDR} !^130.207. – RewriteCond %{REMOTE_ADDR} !^128.61. – RewriteCond %{REMOTE_ADDR} !^143.215. – RewriteCond %{REMOTE_ADDR} !^192.93.8. – RewriteRule ^.* http://site.gatech.edu/message.html [R=301,L] 20
  • 21. 6. Server & Monitoring, cont. • HTTPS, instead of HTTP • Securing file permissions and ownership (settings.php, etc., http://drupal.org/node/244924) • Regular BACKUPS (and diffs for comparison) • Avoid installing multiple softwares on same server (i.e. Wordpress AND Drupal) • Avoid storing ANYTHING other than the Drupal install in the web ROOT (httpdocs). 21
  • 22. References • http://drupal.org/security/secure-configuration • List of security-related contrib modules: http://drupal.org/node/382752 • http://www.slideshare.net/meghsweet/badcamp- 2012-drupal-support • http://www.slideshare.net/erikwebb/performance- for-site-builders • http://drupalscout.com/knowledge-base/dangers- 3rd-party-libraries-drupal-sites 22