SlideShare a Scribd company logo
Drupal and SecurityAdvice for Site Builders and Coders
Arunkumar Kuppuswamy
Software Engineer
Innoppl Technologies
arunkumar1.akk@gmail.com
Phone: +91 80986 41508
● Security Vulnerabilities
● General Tips
● Server Environment
● Site Configurations
● Personal Practices
● Drupal Configuration
● Writing Custom Codes
Agenda
● Drupal is an open-source CMS and or framework
● 2.2% of websites in Internet are running using
Drupal
● 3rd Popular CMS in world.
● Reliability
● Scalability
● A huge dedicated community
Why Drupal ?
https://w3techs.com/technologies/overview/content_management/all
Do you think Drupal is the Right choice ?
Source: CVE Details
Source: CVE Details
- System flaw or weakness in an application
● Cross Site Scripting (XSS)
● Broken Authentication
● Gain Information / Privileges
● SQL Injection
● Bypass something
● CSRF
Security vulnerabilities
● Cross Site Scripting
● Code in the browser
● Making requests
● Parsing responses
● Javascript, Flash, Java, etc.
What is XSS?
● Filter text
● On output to browser
● As late as reasonable
● Some API filters where reasonable
● t() and Drupal::translation()->formatPlural()
with @text and %text placeholders
Fixing XSS?
Drupal and security - Advice for Site Builders and Coders
- User to access the system without going through
the security clearance
● User can see or do something
● That permissions/access should prevent
What is Access Bypass?
● Creating Permissions
MODULE_NAME.permissions.yml
Fixing Access Bypass
● Menu Callbacks
MODULE_NAME.routing.yml
Fixing Access Bypass
● Node access
○ hook_node_access()
● User access
○ hook_user_access()
● Entity access
○ hook_entity_access()
● Field access
○ hook_field_access()
Fixing Access Bypass
Fixing Access Bypass?
● User has permission to Access
● Use behat
Fixing Access Bypass?
- Executing malicious SQL statements.
● Incorrectly filtered escape characters
● Incorrect type handling
● Blind Conditional SQL injection
SQL Injection
Drupal SQL Injection Sample Code
Drupal SQL Injection Sample Code
● Database abstraction layer
● Adding tags to your queries
Fixing SQL Injection
Unauthorized commands are transmitted from a user that
the website trusts.
● Path that does not confirm intent
● <img src="http://example.com/node/1/quickdelete" >
● Mostly in Form submissions
What is CSRF?
● Use Form API: confirmation forms
● Send and validate tokens : Drupal::csrfToken()
● Using a secret cookie
● Multi-Step Transactions
● HTTPS
Fixing CSRF?
● YAML route definition for a protected link
● Protected Ajax request
Fixing CSRF?
● Protected Ajax request
Fixing CSRF?
● Roles and permissions
● Keep your site settings secure
○ Text formats
○ PHP module
○ PHP in other modules
Secure site configuration
● File permissions: web server user forbidden to
change code
● PHP execution: restrict in .htaccess or Nginx
config
● Drupal handbook for securing your site
Secure site configuration
● Secure Login
● Paranoia
● Security Review
● Permissions Lock
● Hacked!
● Password policy / Password strength
● Two Factor Authentication
● Shield
● Security Kit
Modules Enhancing Security
● Stronger password hashing / salt
● Login flood control
○ prevents brute-force credential guessing
● Protected cron
○ prevents Denial of Service attacks
Drupal 8
Update Settings
● Automatically sanitizes strings on output
● No PHP in templates
● You can't run SQL queries
● Twig auto-escaping : htmlspecialchars()
Drupal 8: Twig
Drupal and security - Advice for Site Builders and Coders
● Filtered HTML format
● Limiting users to using only images local
Content Entry & Filtering Improved
Choosing Contrib Modules
● Use HTTPS, SSH, SFTP
● Strong password policy
● Server – LAMP stack
● Require SSH keys
● Take & verify your backups
○ Sanitize backups before sharing
General Tips
● Drupal Security Team
○ Keep Drupal code secure in core and contrib
○ Educate the community on security best
practices
1. Developers
2. Site builders
3. Site administrators and users
4. Decision makers
○ Security Advisory for every security release
○ @drupalsecurityandSecurity Group
Security Process
Security Issue
Code Maintainer
Team Security
New Release
● https://www.oakleys.org.uk/blog/2017/01/how_to_secure_a_drupal
_website
● https://pantheon.io/blog/9-tips-and-tricks-securing-your-drupal-site
-pantheon
● https://www.drupal.org/documentation/is-drupal-secure
● https://www.drupal.org/security/secure-configuration
● https://www.ostraining.com/blog/drupal/8-things-drupal-security/
● https://www.keycdn.com/blog/drupal-security/
References:
Any Queries ?
Thank you!

More Related Content

What's hot (19)

PPTX
Power shell v3 session1
Vladimir Márquez
 
PPTX
Security Testing - Zap It
Manjyot Singh
 
PDF
Getting Started With WP REST API
Kishor Kumar
 
PDF
Sơ lược kiến trúc hệ thống Zing Me
zingopen
 
PDF
StripeCon EU 2018 - SilverStripe 4 application framework
Andy Adiwidjaja
 
PPTX
Learn to pen-test with OWASP ZAP
Paul Ionescu
 
PPTX
NodeJS Presentation
Faisal Shahzad Khan
 
PDF
Zingme practice for building scalable website with PHP
Chau Thanh
 
PDF
Virtual Security Lab Setup - OWASP Broken Web Apps, Webgoat, & ZAP
Michael Coates
 
PDF
Discovering Chrome Extensions
Àlex Cabrera Gil
 
PPTX
Adobe CQ5 for Developers - Introduction
Tekno Point
 
PDF
How to Secure Your WordPress Site
QBurst
 
PDF
AOEconf17: Application Security - Bastian Ike
AOE
 
PPTX
Xss preso
foobarlink4
 
PDF
How to speed up your website
VernalWeb
 
PDF
Secret Management Journey - Here Be Dragons aka Secret Dragons
Michael Man
 
PPTX
Introdcution to Adobe CQ
Rest West
 
PPTX
Blazor v1.1
Juan Luis Guerrero Minero
 
ODP
2014 ZAP Workshop 2: Contexts and Fuzzing
Simon Bennetts
 
Power shell v3 session1
Vladimir Márquez
 
Security Testing - Zap It
Manjyot Singh
 
Getting Started With WP REST API
Kishor Kumar
 
Sơ lược kiến trúc hệ thống Zing Me
zingopen
 
StripeCon EU 2018 - SilverStripe 4 application framework
Andy Adiwidjaja
 
Learn to pen-test with OWASP ZAP
Paul Ionescu
 
NodeJS Presentation
Faisal Shahzad Khan
 
Zingme practice for building scalable website with PHP
Chau Thanh
 
Virtual Security Lab Setup - OWASP Broken Web Apps, Webgoat, & ZAP
Michael Coates
 
Discovering Chrome Extensions
Àlex Cabrera Gil
 
Adobe CQ5 for Developers - Introduction
Tekno Point
 
How to Secure Your WordPress Site
QBurst
 
AOEconf17: Application Security - Bastian Ike
AOE
 
Xss preso
foobarlink4
 
How to speed up your website
VernalWeb
 
Secret Management Journey - Here Be Dragons aka Secret Dragons
Michael Man
 
Introdcution to Adobe CQ
Rest West
 
2014 ZAP Workshop 2: Contexts and Fuzzing
Simon Bennetts
 

Similar to Drupal and security - Advice for Site Builders and Coders (20)

PDF
Drupal and Security: What You Need to Know
Acquia
 
PDF
Doing Drupal security right
Gábor Hojtsy
 
PDF
Doing Drupal security right from Drupalcon London
Gábor Hojtsy
 
PDF
Drupal Security from Drupalcamp Cologne 2009
Gábor Hojtsy
 
PDF
Drupal Security Basics for the DrupalJax January Meetup
Chris Hales
 
PDF
Drupal Security from Drupalcamp Bratislava
Gábor Hojtsy
 
PDF
Looking for Vulnerable Code. Vlad Savitsky
Vlad Savitsky
 
PPT
Drupal security
Techday7
 
PDF
Drupal campleuven: Secure Drupal Development
Steven Van den Hout
 
PDF
Drupal Security Seminar
Calibrate
 
ODP
Drupal Security Hardening
Gerald Villorente
 
PDF
Drupal security
Jozef Toth
 
PPTX
OWASP Top 10 vs Drupal - OWASP Benelux 2012
ZIONSECURITY
 
PDF
Drupal Security
Ran Bar-Zik
 
KEY
Drupal Security Intro
Cash Williams
 
ODP
Scout xss csrf_security_presentation_chicago
knaddison
 
PPT
Hack-Proof Your Drupal App
Erich Beyrent
 
PDF
Attacking Drupal
Greg Foss
 
PDF
Is Drupal Secure?
David Timothy Strauss
 
PDF
Is Drupal secure?
Four Kitchens
 
Drupal and Security: What You Need to Know
Acquia
 
Doing Drupal security right
Gábor Hojtsy
 
Doing Drupal security right from Drupalcon London
Gábor Hojtsy
 
Drupal Security from Drupalcamp Cologne 2009
Gábor Hojtsy
 
Drupal Security Basics for the DrupalJax January Meetup
Chris Hales
 
Drupal Security from Drupalcamp Bratislava
Gábor Hojtsy
 
Looking for Vulnerable Code. Vlad Savitsky
Vlad Savitsky
 
Drupal security
Techday7
 
Drupal campleuven: Secure Drupal Development
Steven Van den Hout
 
Drupal Security Seminar
Calibrate
 
Drupal Security Hardening
Gerald Villorente
 
Drupal security
Jozef Toth
 
OWASP Top 10 vs Drupal - OWASP Benelux 2012
ZIONSECURITY
 
Drupal Security
Ran Bar-Zik
 
Drupal Security Intro
Cash Williams
 
Scout xss csrf_security_presentation_chicago
knaddison
 
Hack-Proof Your Drupal App
Erich Beyrent
 
Attacking Drupal
Greg Foss
 
Is Drupal Secure?
David Timothy Strauss
 
Is Drupal secure?
Four Kitchens
 
Ad

More from Arunkumar Kupppuswamy (7)

PDF
Drupal Development Tools.pdf
Arunkumar Kupppuswamy
 
PPTX
Build website using Open Source Technology
Arunkumar Kupppuswamy
 
PPTX
Drupal 8 Performance & SEO optimizaion
Arunkumar Kupppuswamy
 
PPTX
D8 search api
Arunkumar Kupppuswamy
 
PPTX
Object Oriented Programming - Basic Concepts
Arunkumar Kupppuswamy
 
PPTX
Drupal 8 : Introduction to Big Pipe
Arunkumar Kupppuswamy
 
PPTX
Drupal Coding Standards - do and don't
Arunkumar Kupppuswamy
 
Drupal Development Tools.pdf
Arunkumar Kupppuswamy
 
Build website using Open Source Technology
Arunkumar Kupppuswamy
 
Drupal 8 Performance & SEO optimizaion
Arunkumar Kupppuswamy
 
D8 search api
Arunkumar Kupppuswamy
 
Object Oriented Programming - Basic Concepts
Arunkumar Kupppuswamy
 
Drupal 8 : Introduction to Big Pipe
Arunkumar Kupppuswamy
 
Drupal Coding Standards - do and don't
Arunkumar Kupppuswamy
 
Ad

Recently uploaded (20)

PDF
Cleaning up your RPKI invalids, presented at PacNOG 35
APNIC
 
PPTX
西班牙巴利阿里群岛大学电子版毕业证{UIBLetterUIB文凭证书}文凭复刻
Taqyea
 
PPTX
Networking_Essentials_version_3.0_-_Module_3.pptx
ryan622010
 
PDF
BRKACI-1003 ACI Brownfield Migration - Real World Experiences and Best Practi...
fcesargonca
 
PDF
Digital burnout toolkit for youth workers and teachers
asociatiastart123
 
PPTX
Metaphysics_Presentation_With_Visuals.pptx
erikjohnsales1
 
PDF
FutureCon Seattle 2025 Presentation Slides - You Had One Job
Suzanne Aldrich
 
PPTX
Presentation3gsgsgsgsdfgadgsfgfgsfgagsfgsfgzfdgsdgs.pptx
SUB03
 
PPTX
Networking_Essentials_version_3.0_-_Module_5.pptx
ryan622010
 
PDF
Boardroom AI: The Next 10 Moves | Cerebraix Talent Tech
ssuser73bdb11
 
PPTX
L1A Season 1 ENGLISH made by A hegy fixed
toszolder91
 
PDF
Top 10 Testing Procedures to Ensure Your Magento to Shopify Migration Success...
CartCoders
 
PPTX
Softuni - Psychology of entrepreneurship
Kalin Karakehayov
 
PDF
BRKSP-2551 - Introduction to Segment Routing.pdf
fcesargonca
 
DOCX
Custom vs. Off-the-Shelf Banking Software
KristenCarter35
 
PDF
Enhancing Parental Roles in Protecting Children from Online Sexual Exploitati...
ICT Frame Magazine Pvt. Ltd.
 
PPTX
Orchestrating things in Angular application
Peter Abraham
 
PDF
The Internet - By the numbers, presented at npNOG 11
APNIC
 
PDF
BRKAPP-1102 - Proactive Network and Application Monitoring.pdf
fcesargonca
 
PPTX
04 Output 1 Instruments & Tools (3).pptx
GEDYIONGebre
 
Cleaning up your RPKI invalids, presented at PacNOG 35
APNIC
 
西班牙巴利阿里群岛大学电子版毕业证{UIBLetterUIB文凭证书}文凭复刻
Taqyea
 
Networking_Essentials_version_3.0_-_Module_3.pptx
ryan622010
 
BRKACI-1003 ACI Brownfield Migration - Real World Experiences and Best Practi...
fcesargonca
 
Digital burnout toolkit for youth workers and teachers
asociatiastart123
 
Metaphysics_Presentation_With_Visuals.pptx
erikjohnsales1
 
FutureCon Seattle 2025 Presentation Slides - You Had One Job
Suzanne Aldrich
 
Presentation3gsgsgsgsdfgadgsfgfgsfgagsfgsfgzfdgsdgs.pptx
SUB03
 
Networking_Essentials_version_3.0_-_Module_5.pptx
ryan622010
 
Boardroom AI: The Next 10 Moves | Cerebraix Talent Tech
ssuser73bdb11
 
L1A Season 1 ENGLISH made by A hegy fixed
toszolder91
 
Top 10 Testing Procedures to Ensure Your Magento to Shopify Migration Success...
CartCoders
 
Softuni - Psychology of entrepreneurship
Kalin Karakehayov
 
BRKSP-2551 - Introduction to Segment Routing.pdf
fcesargonca
 
Custom vs. Off-the-Shelf Banking Software
KristenCarter35
 
Enhancing Parental Roles in Protecting Children from Online Sexual Exploitati...
ICT Frame Magazine Pvt. Ltd.
 
Orchestrating things in Angular application
Peter Abraham
 
The Internet - By the numbers, presented at npNOG 11
APNIC
 
BRKAPP-1102 - Proactive Network and Application Monitoring.pdf
fcesargonca
 
04 Output 1 Instruments & Tools (3).pptx
GEDYIONGebre
 

Drupal and security - Advice for Site Builders and Coders