SlideShare ist ein Scribd-Unternehmen logo
1 von 62
Downloaden Sie, um offline zu lesen
Site Building and Environment Set-up




        Doing Drupal
         security right

         Presented by Gábor Hojtsy, Acquia
with special thanks to Greg Knaddison, Four Kitchens and Jakub Suchy
Why I’m here?


• Maintainer for Drupal 6
• De-facto member of the security team
Why are you here?

• Managers?
• Site builders?
• Themers?
• Developers?
Are you affected?
With relatively simple holes,
your administrator user can
be taken over.
https://www.owasp.org/index.php/
Category:OWASP_Top_Ten_Project
Security misconfiguration
Heard of the mid-
April wordpress.com
       attack?
Secure server

• Avoid using FTP at all cost, check your
  client tool

• Who do you share your server with?
  Are you confident? Run other apps?

• Keep your OS, PHP, SQL server, etc.
  up to date
Secure Drupal

• Is your admin password “admin”?
• Look at all “administer *” permissions
• “administer filters” can take over a site
• Use update.module, watch the security
  news (Wednesdays)
Secure Drupal
• Avoid any kind of PHP input, write your
  own modules instead

• Look into using paranoia.module
• Watch your input formats (you can be
  googled)

• Check out the security_review module.
Injection
index.php?id=12


mysql_query(“UPDATE mytable
SET value = ‘”. $value .”’
WHERE id = ”. $_GET[‘id’]);
Drupal approach

• db_query(“UPDATE {mytable} SET
  value = :value WHERE id = :id”,
  array(‘:value’ => $value, ‘:id’ => $id);

• If you need to include dynamic table or
  column names in your query, see
  db_escape_table()
Cross Site Scripting (XSS)
index.php?id=12
print $_GET[‘id’];


$output .= $node->title;
Giving full HTML access.
Unsafe tags in other formats.
64%
likelihood a website has a
 Cross site scripting issue
https://www.whitehatsec.com/assets/presentations/11PPT/PPT_topwebvulns_030311.pdf
jQuery.get('/user/1/edit',
   function (data, status) {
     if (status == 'success') {
       var p = /id="edit-user-edit-form-token"
value="([a-z0-9]*)"/;
       var matches = data.match(p);
       var token = matches[1];
       var payload = {
          "form_id": 'user_edit',
          "form_token": token,
          "pass[pass1]": 'hacked',
          "pass[pass2]": 'hacked'
       };
       jQuery.post('/user/1/edit', payload);
     }
   }
);
                   Example from Heine Deelstra, Drupal Security team lead
                     http://heine.familiedeelstra.com/change-password-xss
                      Technique (with code changes) works up to Drupal 6
Drupal approach
        No            No          No          No
  URL         Plain        Rich        HTML        Trusted



check_url()
        check_plain()
                  check_markup()
                                  filter_xss()

                      HTML output
Drupal approach
• t(), format_plural() placeholders:
  %name, @url, !insecure

  t(‘%name has a blog at <a
  href=”@url”>@url</a>’, array(‘@url’ =>
  valid_url($user->profile_blog), ‘%name’ =>
  $user->name));
• Use Drupal.t(), Drupal.formatPlural() in JS.
Not all output is
    HTML
Authentication
 & sessions
• Weak password storage and
 account management
•Session hijacking / fixation
• Lack of session timeout /
 logout
Drupal approach

• Passwords are stored hashed
• Session IDs changed when permissions
  change
• Drupal works with Apache’s SSL transport
• Modules to set certain URLs to use SSL
Insecure direct object references
index.php?id=12


db_query(“SELECT * FROM {node}
WHERE nid = :id”, array(‘:id’
=> $_GET[‘id’]));
Drupal approach

• Menu system handles permission checking
• user_access(‘administer nodes’, $account)
• node_access(‘edit’, $node, $account);
• $select->addtag(‘node_access’);
• Form API checks for data validity
Cross Site Request
 Forgery (CSRF)
<img src=”http://example.com/
user/logout” />
http://example.com/index.php?
delete=12


<img src=”http://example.com/
index.php?delete=12” />
Drupal approach
• Form API works with POST submissions
  by default (makes it harder)

• Form API includes form tokens, requires
  form retrieval before submission, checks
  valid values

• drupal_valid_token() provided to generate/
  validate tokens for GET requests
Insecure
cryptographic
    storage
Drupal approach
• Drupal stores user passwords hashed
  with a one-way hash

• Different randomly generated private
  key is provided on each site, which can
  be used to do reversible encryption

• Modules exist to help encrypt more data
• Up to you to ensure backups are
  properly protected
Failure to restrict
  URL access
Drupal approach


• Menu system uses access callback and
  access arguments

• Continually review permissions
Insufficient transport protection
Heard of Firesheep?
Drupal approach
• Run Drupal on top of full SSL
• Use securepages and
  securepages_prevent_hijack to wall
  your important pages

• http://drupalscout.com/knowledge-base/
  drupal-and-ssl-multiple-recipes-
  possible-solutions-https

• Use a valid certificate
Unvalidated redirects
http://example.com/index.php?
target=evil.com
Drupal approach

• Drupal has various internal redirections,
  which use local paths and generate
  URLs based on them

• Look for use of drupal_goto() and Form
  API #redirect instances in your modules
  to validate their compliance
https://www.owasp.org/index.php/
Category:OWASP_Top_Ten_Project
Is Open Source
    secure?
“Open Source is
       secure”
• Open Source makes people look at it
• Popularity gets more eyes
• There are always more smart people to
  find and fix problems
“Open Source is
       insecure”
• People can equally find holes
• Some people (inadvertently) disclose
  issues in the public

• Fix becomes public and can / will be
  reviewed
Is Drupal secure?
Developers and
        users
• Drupal APIs are designed to be secure
• It is eventually up to programmers to
  use them that way

• http://drupal.org/writing-secure-code
• Tools designed for security can still be
  misconfigured
Drupal security team


A team of volunteers working to ensure
best security of Drupal and thousands of
contributed modules
Design. Educate. Fix.
What’s supported?
• Drupal core and all(!) contributed
  projects on drupal.org

• Stable releases (development versions
  only for very popular modules)

• Not actively looking for vulnerabilities in
  contributed modules

• Only current and one earlier versions
  are supported: now 7.x and 6.x
Points of contact
• Releases at http://drupal.org/security
• Reporting issues: http://drupal.org/node/
  101494

• Reporting cracked sites: http://drupal.org/
  node/213320

• Discuss general issues: http://
  groups.drupal.org/best-practices-drupal-
  security
These slides are (CC)
                       Images used:
        http://www.flickr.com/photos/rtv/2398561954/
         http://www.flickr.com/photos/jonk/19422564/
      http://www.flickr.com/photos/duncan/2693141693/
      http://www.flickr.com/photos/duncan/2742371814
   http://www.flickr.com/photos/jontintinjordan/3736095793/
      http://www.flickr.com/photos/djbrady/2304740173/
     http://www.flickr.com/photos/inkytwist/2654071573/
      http://www.flickr.com/photos/duncan/2741594585/
   http://www.flickr.com/photos/shellysblogger/2924699161/
    http://www.flickr.com/photos/blogumentary/434097609/
     http://www.flickr.com/photos/glamhag/2214986176/
      http://www.flickr.com/photos/duncan/2693140217/




This presentation created by Gábor Hojtsy
Licensed: http://creativecommons.org/licenses/by-nc-sa/2.0/
Questions?
What did you think?
What did you think?
Locate this session on the
DrupalCon London website:
http://london2011.drupal.org/conference/schedule
What did you think?
Locate this session on the
DrupalCon London website:
http://london2011.drupal.org/conference/schedule


Click the “Take the survey” link
What did you think?
Locate this session on the
DrupalCon London website:
http://london2011.drupal.org/conference/schedule


Click the “Take the survey” link

THANK YOU!

Weitere ähnliche Inhalte

Was ist angesagt?

Building Web Sites that Work Everywhere
Building Web Sites that Work EverywhereBuilding Web Sites that Work Everywhere
Building Web Sites that Work EverywhereDoris Chen
 
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
 
Best Practices for WordPress
Best Practices for WordPressBest Practices for WordPress
Best Practices for WordPressTaylor Lovett
 
Real World REST with Atom/AtomPub
Real World REST with Atom/AtomPubReal World REST with Atom/AtomPub
Real World REST with Atom/AtomPubPeter Keane
 
Responsive Layout Frameworks for XPages Application UI
Responsive Layout Frameworks for XPages Application UIResponsive Layout Frameworks for XPages Application UI
Responsive Layout Frameworks for XPages Application UIChris Toohey
 
Drupal campleuven: Secure Drupal Development
Drupal campleuven: Secure Drupal DevelopmentDrupal campleuven: Secure Drupal Development
Drupal campleuven: Secure Drupal DevelopmentSteven Van den Hout
 
Pattern Library in WordPress projects
Pattern Library in WordPress projectsPattern Library in WordPress projects
Pattern Library in WordPress projectsKarlis Upitis
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_uDoris Chen
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Doris Chen
 
HTML 5 Drupalcamp Ireland Dublin 2010
HTML 5 Drupalcamp Ireland Dublin 2010HTML 5 Drupalcamp Ireland Dublin 2010
HTML 5 Drupalcamp Ireland Dublin 2010alanburke
 
Migrating to Drupal 8: How to Migrate Your Content and Minimize the Risks
Migrating to Drupal 8: How to Migrate Your Content and Minimize the RisksMigrating to Drupal 8: How to Migrate Your Content and Minimize the Risks
Migrating to Drupal 8: How to Migrate Your Content and Minimize the RisksAcquia
 
Advancing JavaScript with Libraries (Yahoo Tech Talk)
Advancing JavaScript with Libraries (Yahoo Tech Talk)Advancing JavaScript with Libraries (Yahoo Tech Talk)
Advancing JavaScript with Libraries (Yahoo Tech Talk)jeresig
 
Build Amazing Add-ons for Atlassian JIRA and Confluence
Build Amazing Add-ons for Atlassian JIRA and ConfluenceBuild Amazing Add-ons for Atlassian JIRA and Confluence
Build Amazing Add-ons for Atlassian JIRA and ConfluenceK15t
 
WordPress Themes 101 - PSUWeb13 Workshop
WordPress Themes 101 - PSUWeb13 WorkshopWordPress Themes 101 - PSUWeb13 Workshop
WordPress Themes 101 - PSUWeb13 WorkshopCurtiss Grymala
 
State of search | drupalcamp ghent
State of search | drupalcamp ghentState of search | drupalcamp ghent
State of search | drupalcamp ghentJoris Vercammen
 
Web & Wireless Hacking
Web & Wireless HackingWeb & Wireless Hacking
Web & Wireless HackingDon Anto
 

Was ist angesagt? (20)

Introduction to Monsoon PHP framework
Introduction to Monsoon PHP frameworkIntroduction to Monsoon PHP framework
Introduction to Monsoon PHP framework
 
Building Web Sites that Work Everywhere
Building Web Sites that Work EverywhereBuilding Web Sites that Work Everywhere
Building Web Sites that Work Everywhere
 
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
 
Jsp
JspJsp
Jsp
 
Best Practices for WordPress
Best Practices for WordPressBest Practices for WordPress
Best Practices for WordPress
 
Real World REST with Atom/AtomPub
Real World REST with Atom/AtomPubReal World REST with Atom/AtomPub
Real World REST with Atom/AtomPub
 
Responsive Layout Frameworks for XPages Application UI
Responsive Layout Frameworks for XPages Application UIResponsive Layout Frameworks for XPages Application UI
Responsive Layout Frameworks for XPages Application UI
 
Drupal campleuven: Secure Drupal Development
Drupal campleuven: Secure Drupal DevelopmentDrupal campleuven: Secure Drupal Development
Drupal campleuven: Secure Drupal Development
 
SEA Open Hack - YQL
SEA Open Hack - YQLSEA Open Hack - YQL
SEA Open Hack - YQL
 
Pattern Library in WordPress projects
Pattern Library in WordPress projectsPattern Library in WordPress projects
Pattern Library in WordPress projects
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_u
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!
 
HTML 5 Drupalcamp Ireland Dublin 2010
HTML 5 Drupalcamp Ireland Dublin 2010HTML 5 Drupalcamp Ireland Dublin 2010
HTML 5 Drupalcamp Ireland Dublin 2010
 
Migrating to Drupal 8: How to Migrate Your Content and Minimize the Risks
Migrating to Drupal 8: How to Migrate Your Content and Minimize the RisksMigrating to Drupal 8: How to Migrate Your Content and Minimize the Risks
Migrating to Drupal 8: How to Migrate Your Content and Minimize the Risks
 
Advancing JavaScript with Libraries (Yahoo Tech Talk)
Advancing JavaScript with Libraries (Yahoo Tech Talk)Advancing JavaScript with Libraries (Yahoo Tech Talk)
Advancing JavaScript with Libraries (Yahoo Tech Talk)
 
Build Amazing Add-ons for Atlassian JIRA and Confluence
Build Amazing Add-ons for Atlassian JIRA and ConfluenceBuild Amazing Add-ons for Atlassian JIRA and Confluence
Build Amazing Add-ons for Atlassian JIRA and Confluence
 
WordPress Themes 101 - PSUWeb13 Workshop
WordPress Themes 101 - PSUWeb13 WorkshopWordPress Themes 101 - PSUWeb13 Workshop
WordPress Themes 101 - PSUWeb13 Workshop
 
Solr
SolrSolr
Solr
 
State of search | drupalcamp ghent
State of search | drupalcamp ghentState of search | drupalcamp ghent
State of search | drupalcamp ghent
 
Web & Wireless Hacking
Web & Wireless HackingWeb & Wireless Hacking
Web & Wireless Hacking
 

Ähnlich wie Doing Drupal security right from Drupalcon London

Drupal security
Drupal securityDrupal security
Drupal securityJozef Toth
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPOscar Merida
 
Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)Oscar Merida
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Drupalcon Paris
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesShabir Ahmad
 
Drupal Security: What You Need to Know
Drupal Security: What You Need to KnowDrupal Security: What You Need to Know
Drupal Security: What You Need to KnowMediacurrent
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Ryan Price
 
OWASP Top 10 vs Drupal - OWASP Benelux 2012
OWASP Top 10 vs Drupal - OWASP Benelux 2012OWASP Top 10 vs Drupal - OWASP Benelux 2012
OWASP Top 10 vs Drupal - OWASP Benelux 2012ZIONSECURITY
 
Drupal security
Drupal securityDrupal security
Drupal securityTechday7
 
Neo 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 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 2012Brian Layman
 
An Introduction to Tornado
An Introduction to TornadoAn Introduction to Tornado
An Introduction to TornadoGavin Roy
 
Absolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalAbsolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalRod Martin
 
Gajendra sharma Drupal Module development
Gajendra sharma Drupal Module developmentGajendra sharma Drupal Module development
Gajendra sharma Drupal Module developmentGajendra Sharma
 
Pure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkPure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkBryan Ollendyke
 
Drupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsDrupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsLuís Carneiro
 
Coder Presentation Szeged
Coder Presentation SzegedCoder Presentation Szeged
Coder Presentation SzegedDoug Green
 

Ähnlich wie Doing Drupal security right from Drupalcon London (20)

Drupal security
Drupal securityDrupal security
Drupal security
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
 
Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API Changes
 
Drupal Security: What You Need to Know
Drupal Security: What You Need to KnowDrupal Security: What You Need to Know
Drupal Security: What You Need to Know
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
 
OWASP Top 10 vs Drupal - OWASP Benelux 2012
OWASP Top 10 vs Drupal - OWASP Benelux 2012OWASP Top 10 vs Drupal - OWASP Benelux 2012
OWASP Top 10 vs Drupal - OWASP Benelux 2012
 
Drupal Security Hardening
Drupal Security HardeningDrupal Security Hardening
Drupal Security Hardening
 
Drupal Security Hardening
Drupal Security HardeningDrupal Security Hardening
Drupal Security Hardening
 
Drupal security
Drupal securityDrupal security
Drupal security
 
Neo 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 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
 
An Introduction to Tornado
An Introduction to TornadoAn Introduction to Tornado
An Introduction to Tornado
 
Absolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalAbsolute Beginners Guide to Drupal
Absolute Beginners Guide to Drupal
 
Gajendra sharma Drupal Module development
Gajendra sharma Drupal Module developmentGajendra sharma Drupal Module development
Gajendra sharma Drupal Module development
 
Intro to Drush
Intro to DrushIntro to Drush
Intro to Drush
 
Pure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkPure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talk
 
Drupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsDrupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First Steps
 
Anatomy of a Drupal Hack - TechKnowFile 2014
Anatomy of a Drupal Hack - TechKnowFile 2014Anatomy of a Drupal Hack - TechKnowFile 2014
Anatomy of a Drupal Hack - TechKnowFile 2014
 
Coder Presentation Szeged
Coder Presentation SzegedCoder Presentation Szeged
Coder Presentation Szeged
 

Mehr von Gábor Hojtsy

Open source project management at scale
 Open source project management at scale Open source project management at scale
Open source project management at scaleGábor Hojtsy
 
Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?Gábor Hojtsy
 
Drupal 8 multilingual APIs
Drupal 8 multilingual APIsDrupal 8 multilingual APIs
Drupal 8 multilingual APIsGábor Hojtsy
 
A Drupal 8 jövője és az oda vezető út
A Drupal 8 jövője és az oda vezető útA Drupal 8 jövője és az oda vezető út
A Drupal 8 jövője és az oda vezető útGábor Hojtsy
 
Everything multilingual in Drupal 8
Everything multilingual in Drupal 8Everything multilingual in Drupal 8
Everything multilingual in Drupal 8Gábor Hojtsy
 
Everything multilingual in Drupal 8 (2015 November)
Everything multilingual in Drupal 8 (2015 November)Everything multilingual in Drupal 8 (2015 November)
Everything multilingual in Drupal 8 (2015 November)Gábor Hojtsy
 
All the language support in Drupal 8 - At Drupalaton 2014
All the language support in Drupal 8 - At Drupalaton 2014All the language support in Drupal 8 - At Drupalaton 2014
All the language support in Drupal 8 - At Drupalaton 2014Gábor Hojtsy
 
Drupal 8 Multilingual - what to look forward to
Drupal 8 Multilingual - what to look forward toDrupal 8 Multilingual - what to look forward to
Drupal 8 Multilingual - what to look forward toGábor Hojtsy
 
Drupal security - Configuration and process
Drupal security - Configuration and processDrupal security - Configuration and process
Drupal security - Configuration and processGábor Hojtsy
 
Backstage with Drupal localization - Part 1
Backstage with Drupal localization - Part 1Backstage with Drupal localization - Part 1
Backstage with Drupal localization - Part 1Gábor Hojtsy
 
Come for the software, stay for the community
Come for the software, stay for the communityCome for the software, stay for the community
Come for the software, stay for the communityGábor Hojtsy
 
Come for the software, stay for the community - How Drupal improves and evolves
Come for the software, stay for the community - How Drupal improves and evolvesCome for the software, stay for the community - How Drupal improves and evolves
Come for the software, stay for the community - How Drupal improves and evolvesGábor Hojtsy
 
Here comes localize.drupal.org!
Here comes localize.drupal.org!Here comes localize.drupal.org!
Here comes localize.drupal.org!Gábor Hojtsy
 
Translate Drupal from Drupalcamp Vienna
Translate Drupal from Drupalcamp ViennaTranslate Drupal from Drupalcamp Vienna
Translate Drupal from Drupalcamp ViennaGábor Hojtsy
 
Translate Drupal from Drupalcamp Prague
Translate Drupal from Drupalcamp PragueTranslate Drupal from Drupalcamp Prague
Translate Drupal from Drupalcamp PragueGábor Hojtsy
 
Multilingual Drupal presentation from "Do it With Drupal"
Multilingual Drupal presentation from "Do it With Drupal"Multilingual Drupal presentation from "Do it With Drupal"
Multilingual Drupal presentation from "Do it With Drupal"Gábor Hojtsy
 

Mehr von Gábor Hojtsy (17)

Open source project management at scale
 Open source project management at scale Open source project management at scale
Open source project management at scale
 
Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?
 
Drupal 8 multilingual APIs
Drupal 8 multilingual APIsDrupal 8 multilingual APIs
Drupal 8 multilingual APIs
 
A Drupal 8 jövője és az oda vezető út
A Drupal 8 jövője és az oda vezető útA Drupal 8 jövője és az oda vezető út
A Drupal 8 jövője és az oda vezető út
 
Everything multilingual in Drupal 8
Everything multilingual in Drupal 8Everything multilingual in Drupal 8
Everything multilingual in Drupal 8
 
Everything multilingual in Drupal 8 (2015 November)
Everything multilingual in Drupal 8 (2015 November)Everything multilingual in Drupal 8 (2015 November)
Everything multilingual in Drupal 8 (2015 November)
 
All the language support in Drupal 8 - At Drupalaton 2014
All the language support in Drupal 8 - At Drupalaton 2014All the language support in Drupal 8 - At Drupalaton 2014
All the language support in Drupal 8 - At Drupalaton 2014
 
Drupal 8 Multilingual - what to look forward to
Drupal 8 Multilingual - what to look forward toDrupal 8 Multilingual - what to look forward to
Drupal 8 Multilingual - what to look forward to
 
Multilingual Drupal
Multilingual DrupalMultilingual Drupal
Multilingual Drupal
 
Drupal security - Configuration and process
Drupal security - Configuration and processDrupal security - Configuration and process
Drupal security - Configuration and process
 
Backstage with Drupal localization - Part 1
Backstage with Drupal localization - Part 1Backstage with Drupal localization - Part 1
Backstage with Drupal localization - Part 1
 
Come for the software, stay for the community
Come for the software, stay for the communityCome for the software, stay for the community
Come for the software, stay for the community
 
Come for the software, stay for the community - How Drupal improves and evolves
Come for the software, stay for the community - How Drupal improves and evolvesCome for the software, stay for the community - How Drupal improves and evolves
Come for the software, stay for the community - How Drupal improves and evolves
 
Here comes localize.drupal.org!
Here comes localize.drupal.org!Here comes localize.drupal.org!
Here comes localize.drupal.org!
 
Translate Drupal from Drupalcamp Vienna
Translate Drupal from Drupalcamp ViennaTranslate Drupal from Drupalcamp Vienna
Translate Drupal from Drupalcamp Vienna
 
Translate Drupal from Drupalcamp Prague
Translate Drupal from Drupalcamp PragueTranslate Drupal from Drupalcamp Prague
Translate Drupal from Drupalcamp Prague
 
Multilingual Drupal presentation from "Do it With Drupal"
Multilingual Drupal presentation from "Do it With Drupal"Multilingual Drupal presentation from "Do it With Drupal"
Multilingual Drupal presentation from "Do it With Drupal"
 

Kürzlich hochgeladen

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Kürzlich hochgeladen (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Doing Drupal security right from Drupalcon London

  • 1.
  • 2.
  • 3. Site Building and Environment Set-up Doing Drupal security right Presented by Gábor Hojtsy, Acquia with special thanks to Greg Knaddison, Four Kitchens and Jakub Suchy
  • 4. Why I’m here? • Maintainer for Drupal 6 • De-facto member of the security team
  • 5. Why are you here? • Managers? • Site builders? • Themers? • Developers?
  • 6.
  • 8. With relatively simple holes, your administrator user can be taken over.
  • 11. Heard of the mid- April wordpress.com attack?
  • 12. Secure server • Avoid using FTP at all cost, check your client tool • Who do you share your server with? Are you confident? Run other apps? • Keep your OS, PHP, SQL server, etc. up to date
  • 13. Secure Drupal • Is your admin password “admin”? • Look at all “administer *” permissions • “administer filters” can take over a site • Use update.module, watch the security news (Wednesdays)
  • 14. Secure Drupal • Avoid any kind of PHP input, write your own modules instead • Look into using paranoia.module • Watch your input formats (you can be googled) • Check out the security_review module.
  • 16. index.php?id=12 mysql_query(“UPDATE mytable SET value = ‘”. $value .”’ WHERE id = ”. $_GET[‘id’]);
  • 17. Drupal approach • db_query(“UPDATE {mytable} SET value = :value WHERE id = :id”, array(‘:value’ => $value, ‘:id’ => $id); • If you need to include dynamic table or column names in your query, see db_escape_table()
  • 19. index.php?id=12 print $_GET[‘id’]; $output .= $node->title; Giving full HTML access. Unsafe tags in other formats.
  • 20. 64% likelihood a website has a Cross site scripting issue https://www.whitehatsec.com/assets/presentations/11PPT/PPT_topwebvulns_030311.pdf
  • 21. jQuery.get('/user/1/edit', function (data, status) { if (status == 'success') { var p = /id="edit-user-edit-form-token" value="([a-z0-9]*)"/; var matches = data.match(p); var token = matches[1]; var payload = { "form_id": 'user_edit', "form_token": token, "pass[pass1]": 'hacked', "pass[pass2]": 'hacked' }; jQuery.post('/user/1/edit', payload); } } ); Example from Heine Deelstra, Drupal Security team lead http://heine.familiedeelstra.com/change-password-xss Technique (with code changes) works up to Drupal 6
  • 22. Drupal approach No No No No URL Plain Rich HTML Trusted check_url() check_plain() check_markup() filter_xss() HTML output
  • 23. Drupal approach • t(), format_plural() placeholders: %name, @url, !insecure t(‘%name has a blog at <a href=”@url”>@url</a>’, array(‘@url’ => valid_url($user->profile_blog), ‘%name’ => $user->name)); • Use Drupal.t(), Drupal.formatPlural() in JS.
  • 24. Not all output is HTML
  • 26. • Weak password storage and account management •Session hijacking / fixation • Lack of session timeout / logout
  • 27. Drupal approach • Passwords are stored hashed • Session IDs changed when permissions change • Drupal works with Apache’s SSL transport • Modules to set certain URLs to use SSL
  • 29. index.php?id=12 db_query(“SELECT * FROM {node} WHERE nid = :id”, array(‘:id’ => $_GET[‘id’]));
  • 30. Drupal approach • Menu system handles permission checking • user_access(‘administer nodes’, $account) • node_access(‘edit’, $node, $account); • $select->addtag(‘node_access’); • Form API checks for data validity
  • 31. Cross Site Request Forgery (CSRF)
  • 34. Drupal approach • Form API works with POST submissions by default (makes it harder) • Form API includes form tokens, requires form retrieval before submission, checks valid values • drupal_valid_token() provided to generate/ validate tokens for GET requests
  • 36. Drupal approach • Drupal stores user passwords hashed with a one-way hash • Different randomly generated private key is provided on each site, which can be used to do reversible encryption • Modules exist to help encrypt more data • Up to you to ensure backups are properly protected
  • 37. Failure to restrict URL access
  • 38. Drupal approach • Menu system uses access callback and access arguments • Continually review permissions
  • 41. Drupal approach • Run Drupal on top of full SSL • Use securepages and securepages_prevent_hijack to wall your important pages • http://drupalscout.com/knowledge-base/ drupal-and-ssl-multiple-recipes- possible-solutions-https • Use a valid certificate
  • 44. Drupal approach • Drupal has various internal redirections, which use local paths and generate URLs based on them • Look for use of drupal_goto() and Form API #redirect instances in your modules to validate their compliance
  • 46. Is Open Source secure?
  • 47. “Open Source is secure” • Open Source makes people look at it • Popularity gets more eyes • There are always more smart people to find and fix problems
  • 48. “Open Source is insecure” • People can equally find holes • Some people (inadvertently) disclose issues in the public • Fix becomes public and can / will be reviewed
  • 50. Developers and users • Drupal APIs are designed to be secure • It is eventually up to programmers to use them that way • http://drupal.org/writing-secure-code • Tools designed for security can still be misconfigured
  • 51. Drupal security team A team of volunteers working to ensure best security of Drupal and thousands of contributed modules
  • 53. What’s supported? • Drupal core and all(!) contributed projects on drupal.org • Stable releases (development versions only for very popular modules) • Not actively looking for vulnerabilities in contributed modules • Only current and one earlier versions are supported: now 7.x and 6.x
  • 54. Points of contact • Releases at http://drupal.org/security • Reporting issues: http://drupal.org/node/ 101494 • Reporting cracked sites: http://drupal.org/ node/213320 • Discuss general issues: http:// groups.drupal.org/best-practices-drupal- security
  • 55.
  • 56. These slides are (CC) Images used: http://www.flickr.com/photos/rtv/2398561954/ http://www.flickr.com/photos/jonk/19422564/ http://www.flickr.com/photos/duncan/2693141693/ http://www.flickr.com/photos/duncan/2742371814 http://www.flickr.com/photos/jontintinjordan/3736095793/ http://www.flickr.com/photos/djbrady/2304740173/ http://www.flickr.com/photos/inkytwist/2654071573/ http://www.flickr.com/photos/duncan/2741594585/ http://www.flickr.com/photos/shellysblogger/2924699161/ http://www.flickr.com/photos/blogumentary/434097609/ http://www.flickr.com/photos/glamhag/2214986176/ http://www.flickr.com/photos/duncan/2693140217/ This presentation created by Gábor Hojtsy Licensed: http://creativecommons.org/licenses/by-nc-sa/2.0/
  • 58.
  • 59. What did you think?
  • 60. What did you think? Locate this session on the DrupalCon London website: http://london2011.drupal.org/conference/schedule
  • 61. What did you think? Locate this session on the DrupalCon London website: http://london2011.drupal.org/conference/schedule Click the “Take the survey” link
  • 62. What did you think? Locate this session on the DrupalCon London website: http://london2011.drupal.org/conference/schedule Click the “Take the survey” link THANK YOU!