SlideShare a Scribd company logo
Doing Drupal security right from Drupalcon London
Doing Drupal security right from Drupalcon London
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?
Doing Drupal security right from Drupalcon London
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
Doing Drupal security right from Drupalcon London
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?
Doing Drupal security right from Drupalcon London
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!

More Related Content

What's hot (20)

PPTX
Introduction to Monsoon PHP framework
Krishna Srikanth Manda
 
PDF
Building Web Sites that Work Everywhere
Doris Chen
 
PDF
Blisstering drupal module development ppt v1.2
Anil Sagar
 
PPT
Jsp
Manav Prasad
 
PDF
Best Practices for WordPress
Taylor Lovett
 
PDF
Real World REST with Atom/AtomPub
Peter Keane
 
PPTX
Responsive Layout Frameworks for XPages Application UI
Chris Toohey
 
PDF
Drupal campleuven: Secure Drupal Development
Steven Van den Hout
 
PPTX
SEA Open Hack - YQL
Jonathan LeBlanc
 
PDF
Pattern Library in WordPress projects
Karlis Upitis
 
PDF
Angular mobile angular_u
Doris Chen
 
PDF
Angular or Backbone: Go Mobile!
Doris Chen
 
ODP
HTML 5 Drupalcamp Ireland Dublin 2010
alanburke
 
PDF
Migrating to Drupal 8: How to Migrate Your Content and Minimize the Risks
Acquia
 
PDF
Advancing JavaScript with Libraries (Yahoo Tech Talk)
jeresig
 
PDF
Build Amazing Add-ons for Atlassian JIRA and Confluence
K15t
 
PPTX
WordPress Themes 101 - PSUWeb13 Workshop
Curtiss Grymala
 
PPTX
Solr
Peter Svehla
 
PDF
State of search | drupalcamp ghent
Joris Vercammen
 
PDF
Web & Wireless Hacking
Don Anto
 
Introduction to Monsoon PHP framework
Krishna Srikanth Manda
 
Building Web Sites that Work Everywhere
Doris Chen
 
Blisstering drupal module development ppt v1.2
Anil Sagar
 
Best Practices for WordPress
Taylor Lovett
 
Real World REST with Atom/AtomPub
Peter Keane
 
Responsive Layout Frameworks for XPages Application UI
Chris Toohey
 
Drupal campleuven: Secure Drupal Development
Steven Van den Hout
 
SEA Open Hack - YQL
Jonathan LeBlanc
 
Pattern Library in WordPress projects
Karlis Upitis
 
Angular mobile angular_u
Doris Chen
 
Angular or Backbone: Go Mobile!
Doris Chen
 
HTML 5 Drupalcamp Ireland Dublin 2010
alanburke
 
Migrating to Drupal 8: How to Migrate Your Content and Minimize the Risks
Acquia
 
Advancing JavaScript with Libraries (Yahoo Tech Talk)
jeresig
 
Build Amazing Add-ons for Atlassian JIRA and Confluence
K15t
 
WordPress Themes 101 - PSUWeb13 Workshop
Curtiss Grymala
 
State of search | drupalcamp ghent
Joris Vercammen
 
Web & Wireless Hacking
Don Anto
 

Similar to Doing Drupal security right from Drupalcon London (20)

PDF
Drupal security
Jozef Toth
 
PDF
Staying Sane with Drupal NEPHP
Oscar Merida
 
PDF
Staying Sane with Drupal (A Develper's Survival Guide)
Oscar Merida
 
PDF
Staging Drupal 8 31 09 1 3
Drupalcon Paris
 
PDF
Drupal 8 - Core and API Changes
Shabir Ahmad
 
PPTX
Drupal Security: What You Need to Know
Mediacurrent
 
ODP
Drupal Theme Development - DrupalCon Chicago 2011
Ryan Price
 
PPTX
OWASP Top 10 vs Drupal - OWASP Benelux 2012
ZIONSECURITY
 
ODP
Drupal Security Hardening
Gerald Villorente
 
ODP
Drupal Security Hardening
Gerald Villorente
 
PPT
Drupal security
Techday7
 
PPTX
Neo word press meetup ehermits - how to keep your blog from being hacked 2012
Brian Layman
 
PDF
An Introduction to Tornado
Gavin Roy
 
PDF
Absolute Beginners Guide to Drupal
Rod Martin
 
PDF
Gajendra sharma Drupal Module development
Gajendra Sharma
 
KEY
Intro to Drush
Carson Black
 
PPTX
Pure Speed Drupal 4 Gov talk
Bryan Ollendyke
 
PPTX
Drupal Camp Porto - Developing with Drupal: First Steps
Luís Carneiro
 
PPTX
Anatomy of a Drupal Hack - TechKnowFile 2014
University of Toronto Libraries - Information Technology Services
 
ODP
Coder Presentation Szeged
Doug Green
 
Drupal security
Jozef Toth
 
Staying Sane with Drupal NEPHP
Oscar Merida
 
Staying Sane with Drupal (A Develper's Survival Guide)
Oscar Merida
 
Staging Drupal 8 31 09 1 3
Drupalcon Paris
 
Drupal 8 - Core and API Changes
Shabir Ahmad
 
Drupal Security: What You Need to Know
Mediacurrent
 
Drupal Theme Development - DrupalCon Chicago 2011
Ryan Price
 
OWASP Top 10 vs Drupal - OWASP Benelux 2012
ZIONSECURITY
 
Drupal Security Hardening
Gerald Villorente
 
Drupal Security Hardening
Gerald Villorente
 
Drupal security
Techday7
 
Neo word press meetup ehermits - how to keep your blog from being hacked 2012
Brian Layman
 
An Introduction to Tornado
Gavin Roy
 
Absolute Beginners Guide to Drupal
Rod Martin
 
Gajendra sharma Drupal Module development
Gajendra Sharma
 
Intro to Drush
Carson Black
 
Pure Speed Drupal 4 Gov talk
Bryan Ollendyke
 
Drupal Camp Porto - Developing with Drupal: First Steps
Luís Carneiro
 
Anatomy of a Drupal Hack - TechKnowFile 2014
University of Toronto Libraries - Information Technology Services
 
Coder Presentation Szeged
Doug Green
 
Ad

More from Gábor Hojtsy (17)

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

Recently uploaded (20)

PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Digital Circuits, important subject in CS
contactparinay1
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 

Doing Drupal security right from Drupalcon London

  • 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?
  • 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
  • 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/
  • 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!