SlideShare a Scribd company logo
Drupal Security
                            Gábor Hojtsy & Ben Jeavons
                                                         24. aug 14:45
                                                         VPS.net


Tuesday, August 31, 2010
Who we are

                  •        Gábor Hojtsy             •   Ben Jeavons

                  •        Drupal 6 co-maintainer   •   Drupal Security Report

                  •        Acquia                   •   Growing Venture Solutions

                  •        Security Team Member     •   Security Team Member




Tuesday, August 31, 2010
Web security

                    • Protecting resources from abuse
                    • Protecting data
                    • Protecting available actions
                    • Attackers exploit a weakness to do harm

Tuesday, August 31, 2010
Demo

                    • Malicious Javascript is entered
                    • Admin unknowingly executes
                    • Javascript alters admin-only settings
                     • Changes admin password
                     • Puts site offline

Tuesday, August 31, 2010
66%
                   likeliness a website has
                     Cross Site Scripting

                  http://whitehatsec.com/home/assets/presentations/09PPT/PPT_statsfall09_8th.pdf


Tuesday, August 31, 2010
Vulnerabilities by popularity
                                               12%


                                       7%


                                     4%

                                     3%

                                                                      48%
                                      10%




                                                16%




                  XSS                                Access Bypass              CSRF
                  Authentication/Session             Arbitrary Code Execution   SQL Injection
                  Others
                                           http://drupalsecurityreport.org

Tuesday, August 31, 2010
Lots of risks

                    • Prioritize your actions
                     • Secure configuration
                     • Careful processes
                       • Keep code up-to-date
                     • Audit custom code

Tuesday, August 31, 2010
Smart configuration

                    • Control user input
                     • Input formats
                    • Trust
                     • Roles and permissions

Tuesday, August 31, 2010
Input formats


                    • Input formats control what happens when
                           user-supplied data is displayed




Tuesday, August 31, 2010
Input formats


                    • Filtered HTML for untrusted roles
                    • Full HTML for completely trusted roles


Tuesday, August 31, 2010
Filtered HTML

       •     HTML filter

             •     Limits the allowed tags




Tuesday, August 31, 2010
Unsafe HTML tags

                    • Script tags or any that allow JS events
                     • <script>
                    • Any that allow URL reference
                     • <img>

Tuesday, August 31, 2010
No image tags?!

                    • Image tags allow for CSRF attacks
                    • It’s a matter of trust
                    • Use CCK & imagefield
                    • Use control access to Full HTML

Tuesday, August 31, 2010
Trust

                    • Know your roles
                     • Which users have which roles
                    • How roles are granted


Tuesday, August 31, 2010
“Super-admin”
                                  permissions
                    •      Administer permissions

                    •      Administer users

                    •      Administer filters

                    •      Administer content types

                    •      Administer site configuration



Tuesday, August 31, 2010
Trust


                    • Utilize principle of Least Privilege
                     • Grant only the necessary permissions to
                           carry out the required work




Tuesday, August 31, 2010
Tuesday, August 31, 2010
Recovering from attack

                    • Restore from backup
                    • Upgrade to latest security releases
                    • Change your passwords
                    • Audit your configuration & custom code

Tuesday, August 31, 2010
Backups

                    • You do have backups, don’t you?
                    • phpMyAdmin > Export
                    • mysqldump on the command line
                    • Be sure to check they worked!

Tuesday, August 31, 2010
Open source is secure

                    • Source code is open for people to look at
                    • Popularity means eyes on code
                    • Collaboration increases code quality


Tuesday, August 31, 2010
Drupal is secure


                    • Drupal APIs are designed to be secure
                    • http://drupal.org/writing-secure-code


Tuesday, August 31, 2010
Drupal security team

                    • Team of volunteers
                    • Support core and all(!) of contrib
                    • Not actively reviewing all contrib projects


Tuesday, August 31, 2010
Security Advisories

                    • Only stable project releases
                    • SAs on Wednesdays
                    • New core release types
                     • Bug fix release / Security fix release

Tuesday, August 31, 2010
Stay up-to-date

                    • Know about security updates
                     • Security Advisories
                       • Update status module
                       • Mailing list, RSS, Twitter
                    • Apply them!

Tuesday, August 31, 2010
Security updates

                    • Most security updates are small
                     • But not always
                    • Apply updates to development instance
                     • Test, then apply to production

Tuesday, August 31, 2010
FTP

                    • Do not use it!
                     • Common vector for attack
                     • Really, we’ve moved past plain-text


Tuesday, August 31, 2010
SFTP

                    • “Secure” FTP
                     • Your host should provide it
                     • If not, consider a new one


Tuesday, August 31, 2010
SSL
                    • Run Drupal on full SSL
                    • Use securepages and
                           securepages_prevent_hijack modules
                    • http://crackingdrupal.com/blog/greggles/
                           drupal-and-ssl-multiple-recipes-possible-
                           solutions-https
                    • Use a valid certificate
Tuesday, August 31, 2010
Security Review
                    • http://drupal.org/project/security_review
                    • File system permissions
                    • Granted “super-admin” permissions
                    • Input formats
                    • Allowed upload extensions
                    • PHP & Javascript in content
Tuesday, August 31, 2010
•      Security Advisories

                           •   http://drupal.org/security

                    •      Handbooks

                           •   http://drupal.org/security/secure-configuration

                           •   http://drupal.org/writing-secure-code

                    •      Cracking Drupal Book

                           •   http://crackingdrupal.com

                    •      http://www.owasp.org/



Tuesday, August 31, 2010
http://cph2010.drupal.org/node/12628




Tuesday, August 31, 2010

More Related Content

PDF
Continuous Integration Testing for Plone Using Hudson
PDF
Realities of Mainlining -- Case of the TOMOYO Linux project
PDF
Plone Conference 2010 – Where we go from here
PPT
Fall 2009 (partial)
PDF
Exhibition Design Install
PDF
Backstage with Drupal localization - Part 1
PDF
Drupal 8 multilingual APIs
PDF
Doing Drupal security right
Continuous Integration Testing for Plone Using Hudson
Realities of Mainlining -- Case of the TOMOYO Linux project
Plone Conference 2010 – Where we go from here
Fall 2009 (partial)
Exhibition Design Install
Backstage with Drupal localization - Part 1
Drupal 8 multilingual APIs
Doing Drupal security right

Similar to Drupal security - Configuration and process (20)

PDF
Drupal Security Dive Into the Code
PDF
Pony Pwning Djangocon 2010
PDF
So... you want to be a security consultant
PDF
Web Application Scanning 101
PDF
Intro drupal security
PDF
Protect Your Drupal Site Against Common Security Attacks
PPTX
Open Source Security
PDF
Understanding and Implementing Website Security
PDF
Cracking drupal table_of_contents
KEY
Opa @ owasp 2010
PDF
Web Security: What's wrong, and how the bad guys can break your website
PDF
Looking for Vulnerable Code. Vlad Savitsky
PDF
Owasp london training course 2010 - Matteo Meucci
PDF
Things that go bump on the web - Web Application Security
PDF
Managing and Securing Web 2.0
PDF
Andrew Hay - Chris Nickerson - Building Bridges - Forcing Hackers and Busine...
PDF
Injecting simplicity not SQL BSides Las Vegas 2010
PDF
Crash Course In Brain Surgery
PDF
The Thing That Should Not Be
PDF
Web Security
Drupal Security Dive Into the Code
Pony Pwning Djangocon 2010
So... you want to be a security consultant
Web Application Scanning 101
Intro drupal security
Protect Your Drupal Site Against Common Security Attacks
Open Source Security
Understanding and Implementing Website Security
Cracking drupal table_of_contents
Opa @ owasp 2010
Web Security: What's wrong, and how the bad guys can break your website
Looking for Vulnerable Code. Vlad Savitsky
Owasp london training course 2010 - Matteo Meucci
Things that go bump on the web - Web Application Security
Managing and Securing Web 2.0
Andrew Hay - Chris Nickerson - Building Bridges - Forcing Hackers and Busine...
Injecting simplicity not SQL BSides Las Vegas 2010
Crash Course In Brain Surgery
The Thing That Should Not Be
Web Security
Ad

More from Gábor Hojtsy (18)

PDF
Open source project management at scale
PDF
Drupal 8.3.0: the features are ready, are you?
PDF
A Drupal 8 jövője és az oda vezető út
PDF
Everything multilingual in Drupal 8
PDF
Everything multilingual in Drupal 8 (2015 November)
PDF
All the language support in Drupal 8 - At Drupalaton 2014
PDF
Drupal 8 Multilingual - what to look forward to
PDF
Doing Drupal security right from Drupalcon London
PDF
Multilingual Drupal
PDF
Come for the software, stay for the community
PDF
Come for the software, stay for the community - How Drupal improves and evolves
PDF
Drupal Security from Drupalcamp Bratislava
PDF
Drupal Security from Drupalcamp Cologne 2009
PDF
Here comes localize.drupal.org!
PDF
Translate Drupal from Drupalcamp Vienna
PDF
Translate Drupal from Drupalcamp Prague
PDF
What's up with Drupal 7?
PDF
Multilingual Drupal presentation from "Do it With Drupal"
Open source project management at scale
Drupal 8.3.0: the features are ready, are you?
A Drupal 8 jövője és az oda vezető út
Everything multilingual in Drupal 8
Everything multilingual in Drupal 8 (2015 November)
All the language support in Drupal 8 - At Drupalaton 2014
Drupal 8 Multilingual - what to look forward to
Doing Drupal security right from Drupalcon London
Multilingual Drupal
Come for the software, stay for the community
Come for the software, stay for the community - How Drupal improves and evolves
Drupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp Cologne 2009
Here comes localize.drupal.org!
Translate Drupal from Drupalcamp Vienna
Translate Drupal from Drupalcamp Prague
What's up with Drupal 7?
Multilingual Drupal presentation from "Do it With Drupal"
Ad

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
cuic standard and advanced reporting.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Encapsulation theory and applications.pdf
Machine learning based COVID-19 study performance prediction
cuic standard and advanced reporting.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
A comparative analysis of optical character recognition models for extracting...
MYSQL Presentation for SQL database connectivity
Per capita expenditure prediction using model stacking based on satellite ima...
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Network Security Unit 5.pdf for BCA BBA.
MIND Revenue Release Quarter 2 2025 Press Release
Advanced methodologies resolving dimensionality complications for autism neur...
Programs and apps: productivity, graphics, security and other tools
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Unlocking AI with Model Context Protocol (MCP)
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...

Drupal security - Configuration and process

  • 1. Drupal Security Gábor Hojtsy & Ben Jeavons 24. aug 14:45 VPS.net Tuesday, August 31, 2010
  • 2. Who we are • Gábor Hojtsy • Ben Jeavons • Drupal 6 co-maintainer • Drupal Security Report • Acquia • Growing Venture Solutions • Security Team Member • Security Team Member Tuesday, August 31, 2010
  • 3. Web security • Protecting resources from abuse • Protecting data • Protecting available actions • Attackers exploit a weakness to do harm Tuesday, August 31, 2010
  • 4. Demo • Malicious Javascript is entered • Admin unknowingly executes • Javascript alters admin-only settings • Changes admin password • Puts site offline Tuesday, August 31, 2010
  • 5. 66% likeliness a website has Cross Site Scripting http://whitehatsec.com/home/assets/presentations/09PPT/PPT_statsfall09_8th.pdf Tuesday, August 31, 2010
  • 6. Vulnerabilities by popularity 12% 7% 4% 3% 48% 10% 16% XSS Access Bypass CSRF Authentication/Session Arbitrary Code Execution SQL Injection Others http://drupalsecurityreport.org Tuesday, August 31, 2010
  • 7. Lots of risks • Prioritize your actions • Secure configuration • Careful processes • Keep code up-to-date • Audit custom code Tuesday, August 31, 2010
  • 8. Smart configuration • Control user input • Input formats • Trust • Roles and permissions Tuesday, August 31, 2010
  • 9. Input formats • Input formats control what happens when user-supplied data is displayed Tuesday, August 31, 2010
  • 10. Input formats • Filtered HTML for untrusted roles • Full HTML for completely trusted roles Tuesday, August 31, 2010
  • 11. Filtered HTML • HTML filter • Limits the allowed tags Tuesday, August 31, 2010
  • 12. Unsafe HTML tags • Script tags or any that allow JS events • <script> • Any that allow URL reference • <img> Tuesday, August 31, 2010
  • 13. No image tags?! • Image tags allow for CSRF attacks • It’s a matter of trust • Use CCK & imagefield • Use control access to Full HTML Tuesday, August 31, 2010
  • 14. Trust • Know your roles • Which users have which roles • How roles are granted Tuesday, August 31, 2010
  • 15. “Super-admin” permissions • Administer permissions • Administer users • Administer filters • Administer content types • Administer site configuration Tuesday, August 31, 2010
  • 16. Trust • Utilize principle of Least Privilege • Grant only the necessary permissions to carry out the required work Tuesday, August 31, 2010
  • 18. Recovering from attack • Restore from backup • Upgrade to latest security releases • Change your passwords • Audit your configuration & custom code Tuesday, August 31, 2010
  • 19. Backups • You do have backups, don’t you? • phpMyAdmin > Export • mysqldump on the command line • Be sure to check they worked! Tuesday, August 31, 2010
  • 20. Open source is secure • Source code is open for people to look at • Popularity means eyes on code • Collaboration increases code quality Tuesday, August 31, 2010
  • 21. Drupal is secure • Drupal APIs are designed to be secure • http://drupal.org/writing-secure-code Tuesday, August 31, 2010
  • 22. Drupal security team • Team of volunteers • Support core and all(!) of contrib • Not actively reviewing all contrib projects Tuesday, August 31, 2010
  • 23. Security Advisories • Only stable project releases • SAs on Wednesdays • New core release types • Bug fix release / Security fix release Tuesday, August 31, 2010
  • 24. Stay up-to-date • Know about security updates • Security Advisories • Update status module • Mailing list, RSS, Twitter • Apply them! Tuesday, August 31, 2010
  • 25. Security updates • Most security updates are small • But not always • Apply updates to development instance • Test, then apply to production Tuesday, August 31, 2010
  • 26. FTP • Do not use it! • Common vector for attack • Really, we’ve moved past plain-text Tuesday, August 31, 2010
  • 27. SFTP • “Secure” FTP • Your host should provide it • If not, consider a new one Tuesday, August 31, 2010
  • 28. SSL • Run Drupal on full SSL • Use securepages and securepages_prevent_hijack modules • http://crackingdrupal.com/blog/greggles/ drupal-and-ssl-multiple-recipes-possible- solutions-https • Use a valid certificate Tuesday, August 31, 2010
  • 29. Security Review • http://drupal.org/project/security_review • File system permissions • Granted “super-admin” permissions • Input formats • Allowed upload extensions • PHP & Javascript in content Tuesday, August 31, 2010
  • 30. Security Advisories • http://drupal.org/security • Handbooks • http://drupal.org/security/secure-configuration • http://drupal.org/writing-secure-code • Cracking Drupal Book • http://crackingdrupal.com • http://www.owasp.org/ Tuesday, August 31, 2010