SlideShare a Scribd company logo
1 of 28
Download to read offline
An Introduction to Drupal Security
Security by Design:
Intros
Chris Teitzel
@technerdteitzel
/in/christeitzel
Chris has been working in Drupal for almost 8 years. During that time
he has worked on projects spanning the globe in front-end design,
e-commerce and security. His passion is for making technology
accessible to all skillsets.
Founder / CEO Lockr
2
Intros
Luke Probasco
Presenter Photo
@geetarluke
/in/lukeprobasco/
Manages Drupal business for Townsend Security. DrupalCon, Camp,
and Summit speaker. Security professional. Music enthusiast.
Drupal GM/Townsend Security
3
Intros
Mark Shropshire (shrop)
@shrop
/in/markshropshire
drupal.org
Mark brings 20 years of experience leading technical teams to his role
as Mediacurrent’s Open Source Security Lead. He is a leader in tech
community organizing, blogging, podcasting, and public speaking
within the Drupal community. Mark is passionate about architecting
systems to solve workflow problems and improve efficiencies using
open source software. He is also the maintainer of the Guardr Drupal
security module suite.
Mediacurrent Open Source Security Lead
4
Style Guide
Contents
Security by design in Drupal
Encrypting sensitive data
Key management (encryption & API)4
3
2
1
5
Site audit and security best practices
Resources to improve security5
Style Guide6 Takeaways
Security by design in Drupal1
7
Security by Design
8
Compliance, Security, and You
● Data discovery
● PCI DSS, HIPAA, GDPR, etc.
● Hosting and compliance
● See your security team for internal policies and controls
Security by Design
9
Keep Drupal Secure
● Keep Core and contrib modules up to date
● Use Drupal API
● Use version control
● Use social and enterprise login
● Use secure passwords
● Two factor authentication
● Log and review logs (watchdog and additional contrib)
● Don’t forget about infrastructure security
Security by Design
10
Security in Custom Modules
● Never trust user input
○ Filter plain text with check_plain() or t()
○ Filter HTML with filter_xss()
● Query properly
○ Do not concatenate values into db_query()
○ Instead use parameterized values %s %d %f %b
● Do not output db values directly (don’t trust user input)
● Protect user input - think before you save
Security by Design
Site audit and security best practices2
12
What is an audit?
● Review by someone not on the team
○ (internal or external)
● Review of software systems
● Review of supporting infrastructure
● Review of other related systems
Site audit and security best practices
13
Performing an audit
● Collect data manually and with tools
○ Analyze the data
○ Prioritize findings
● Eliminate false positives
● Complete usable report(s)
Site audit and security best practices
14
OWASP Top 10 Most Critical Web Application Security Risks
● Injection
● Weak authentication and session management
● XSS
● Insecure Direct Object References
● Security Misconfiguration
● Sensitive Data Exposure
● Missing Function Level Access Control
● Cross Site Request Forgery
● Using Components with Known Vulnerabilities
● Unvalidated Redirects and Forwards
Site audit and security best practices
15
Drupal audit tools
● Drupal Core reports
● Site Audit
● Security Review
● Sensitive Data
● Hacked!
● Coder
● Review of site config, users, permissions, and roles
● Manual code review
Site audit and security best practices
Encrypting sensitive data3
17
Encrypting Data in Drupal
● There is no native way to encrypt data in Drupal
● Compliance and risk management drive encryption
● Use encryption based on industry standards
● Use cryptographically strong keys - no passwords!
● See NIST Special Publication 800-57 for more info
Encrypting Sensitive Data
18
What Encryption Should I Use?
● Use AES, RSA, Triple DES, or other standard methods
● Beware of non-standard encryption
● Example: Homomorphic Encryption
○ Has not received wide review and acceptance
○ Cannot be certified by a standards body
○ Cannot achieve FIPS 140-2 validation
○ Compliance regulations prohibit its use
Encrypting Sensitive Data
Key management (encryption & API)4
20
McDonald's has acknowledged that a leaky API
exposed personal information for users of its
McDelivery mobile app in India. The flaw exposed
names, email addresses, phone numbers, home
addresses and sometimes the coordinates of
those homes, as well as links to social media profiles.
BankInfoSecurity.com
Key Management
21
Our review has shown that a threat actor obtained
access to a set of AWS keys and used them to access
the AWS API from an intermediate host with another,
smaller service provider in the US... Through the AWS
API, the actor created several instances in our
infrastructure to do reconnaissance.
OneLogin.com
Key Management
22
Payment
Gateways
Email
Marketing
SMTP Relays Authentication
Shipping Cloud Providers Encryption APIs
Key Management
Resources to improve security5
24
Encryption Modules
● Encrypt
● FieldEncrypt
● Real AES
● Encrypt User
● Encrypted Files
● Webform Encrypt
Resources to Improve Security
25
Key Management Modules
● Key
● Townsend Security Key Connection
● Lockr
Resources to Improve Security
26
Guardr
Guardr is a Drupal distribution with a combination of
modules and settings to enhance a Drupal application's
security and availability to meet enterprise security
requirements.
https://drupal.org/project/guardr
Resources to Improve Security
Takeaways6
Questions?
Thank you!
@Mediacurrent

More Related Content

What's hot

Session 7.3 Implementing threat intelligence systems - Moving from chaos to s...
Session 7.3 Implementing threat intelligence systems - Moving from chaos to s...Session 7.3 Implementing threat intelligence systems - Moving from chaos to s...
Session 7.3 Implementing threat intelligence systems - Moving from chaos to s...
Puneet Kukreja
 

What's hot (20)

Secure Software Design for Data Privacy
Secure Software Design for Data PrivacySecure Software Design for Data Privacy
Secure Software Design for Data Privacy
 
IOT Security FUN-damental
IOT Security FUN-damentalIOT Security FUN-damental
IOT Security FUN-damental
 
How To Avoid The Top Ten Software Security Flaws
How To Avoid The Top Ten Software Security FlawsHow To Avoid The Top Ten Software Security Flaws
How To Avoid The Top Ten Software Security Flaws
 
The Making of a simple Cyber Threat Intelligence Gathering System
The Making of a simple Cyber Threat Intelligence Gathering SystemThe Making of a simple Cyber Threat Intelligence Gathering System
The Making of a simple Cyber Threat Intelligence Gathering System
 
Bsides 2019 - Intelligent Threat Hunting
Bsides 2019 - Intelligent Threat HuntingBsides 2019 - Intelligent Threat Hunting
Bsides 2019 - Intelligent Threat Hunting
 
Deploying a Shadow Threat Intel Capability at CaralinaCon on March 6, 2016
Deploying a Shadow Threat Intel Capability at CaralinaCon on March 6, 2016Deploying a Shadow Threat Intel Capability at CaralinaCon on March 6, 2016
Deploying a Shadow Threat Intel Capability at CaralinaCon on March 6, 2016
 
Threat Intelligence Is Like Three Day Potty Training
Threat Intelligence Is Like Three Day Potty TrainingThreat Intelligence Is Like Three Day Potty Training
Threat Intelligence Is Like Three Day Potty Training
 
Threat Hunting - Moving from the ad hoc to the formal
Threat Hunting - Moving from the ad hoc to the formalThreat Hunting - Moving from the ad hoc to the formal
Threat Hunting - Moving from the ad hoc to the formal
 
Berkarir di Cyber Security
Berkarir di Cyber SecurityBerkarir di Cyber Security
Berkarir di Cyber Security
 
Getting Started With Hacking Android & iOS Apps? Tools, Techniques and resources
Getting Started With Hacking Android & iOS Apps? Tools, Techniques and resourcesGetting Started With Hacking Android & iOS Apps? Tools, Techniques and resources
Getting Started With Hacking Android & iOS Apps? Tools, Techniques and resources
 
TTPs for Threat hunting In Oil Refineries
TTPs for Threat hunting In Oil RefineriesTTPs for Threat hunting In Oil Refineries
TTPs for Threat hunting In Oil Refineries
 
How to assign a CVE to yourself?
How to assign a CVE to yourself?How to assign a CVE to yourself?
How to assign a CVE to yourself?
 
Cyber intelligence for corporate security
Cyber intelligence for corporate securityCyber intelligence for corporate security
Cyber intelligence for corporate security
 
TiC
TiCTiC
TiC
 
Threat hunting - Every day is hunting season
Threat hunting - Every day is hunting seasonThreat hunting - Every day is hunting season
Threat hunting - Every day is hunting season
 
2016 ISSA Conference Threat Intelligence Keynote philA
2016 ISSA Conference Threat Intelligence Keynote philA2016 ISSA Conference Threat Intelligence Keynote philA
2016 ISSA Conference Threat Intelligence Keynote philA
 
Cyber threat intelligence: maturity and metrics
Cyber threat intelligence: maturity and metricsCyber threat intelligence: maturity and metrics
Cyber threat intelligence: maturity and metrics
 
Session 7.3 Implementing threat intelligence systems - Moving from chaos to s...
Session 7.3 Implementing threat intelligence systems - Moving from chaos to s...Session 7.3 Implementing threat intelligence systems - Moving from chaos to s...
Session 7.3 Implementing threat intelligence systems - Moving from chaos to s...
 
The Rise of the Purple Team
The Rise of the Purple TeamThe Rise of the Purple Team
The Rise of the Purple Team
 
Enfilade: Tool to Detect Infections in MongoDB Instances
Enfilade: Tool to Detect Infections in MongoDB InstancesEnfilade: Tool to Detect Infections in MongoDB Instances
Enfilade: Tool to Detect Infections in MongoDB Instances
 

Similar to Security by Design: An Introduction to Drupal Security

Secure codingguide
Secure codingguideSecure codingguide
Secure codingguide
David Kwak
 
iotsecurity-171108154118.pdf
iotsecurity-171108154118.pdfiotsecurity-171108154118.pdf
iotsecurity-171108154118.pdf
KerimBozkanli
 

Similar to Security by Design: An Introduction to Drupal Security (20)

" onclick="alert(1)
" onclick="alert(1)" onclick="alert(1)
" onclick="alert(1)
 
<marquee>html title testfsdjk34254</marquee>
<marquee>html title testfsdjk34254</marquee><marquee>html title testfsdjk34254</marquee>
<marquee>html title testfsdjk34254</marquee>
 
Secure codingguide
Secure codingguideSecure codingguide
Secure codingguide
 
Security Fundamentals and Threat Modelling
Security Fundamentals and Threat ModellingSecurity Fundamentals and Threat Modelling
Security Fundamentals and Threat Modelling
 
Application Security - Your Success Depends on it
Application Security - Your Success Depends on itApplication Security - Your Success Depends on it
Application Security - Your Success Depends on it
 
Mobile App Security - Best Practices
Mobile App Security - Best PracticesMobile App Security - Best Practices
Mobile App Security - Best Practices
 
For Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSecFor Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSec
 
IoT Security
IoT SecurityIoT Security
IoT Security
 
Security Best Practices
Security Best PracticesSecurity Best Practices
Security Best Practices
 
Security overview 2
Security overview 2Security overview 2
Security overview 2
 
12 Crucial Windows Security Skills for 2018
12 Crucial Windows Security Skills for 201812 Crucial Windows Security Skills for 2018
12 Crucial Windows Security Skills for 2018
 
Drupal Security Basics for the DrupalJax January Meetup
Drupal Security Basics for the DrupalJax January MeetupDrupal Security Basics for the DrupalJax January Meetup
Drupal Security Basics for the DrupalJax January Meetup
 
7 Steps to Threat Modeling
7 Steps to Threat Modeling7 Steps to Threat Modeling
7 Steps to Threat Modeling
 
Security Incident machnism Security Incident machnismSecurity Incident machni...
Security Incident machnism Security Incident machnismSecurity Incident machni...Security Incident machnism Security Incident machnismSecurity Incident machni...
Security Incident machnism Security Incident machnismSecurity Incident machni...
 
iotsecurity-171108154118.pdf
iotsecurity-171108154118.pdfiotsecurity-171108154118.pdf
iotsecurity-171108154118.pdf
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020
 
Disruptionware-TRustedCISO103020v0.7.pptx
Disruptionware-TRustedCISO103020v0.7.pptxDisruptionware-TRustedCISO103020v0.7.pptx
Disruptionware-TRustedCISO103020v0.7.pptx
 
Web Security
Web SecurityWeb Security
Web Security
 
19BCP072_Presentation_Final.pdf
19BCP072_Presentation_Final.pdf19BCP072_Presentation_Final.pdf
19BCP072_Presentation_Final.pdf
 
DevSecOps: What Why and How : Blackhat 2019
DevSecOps: What Why and How : Blackhat 2019DevSecOps: What Why and How : Blackhat 2019
DevSecOps: What Why and How : Blackhat 2019
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

Security by Design: An Introduction to Drupal Security

  • 1. An Introduction to Drupal Security Security by Design:
  • 2. Intros Chris Teitzel @technerdteitzel /in/christeitzel Chris has been working in Drupal for almost 8 years. During that time he has worked on projects spanning the globe in front-end design, e-commerce and security. His passion is for making technology accessible to all skillsets. Founder / CEO Lockr 2
  • 3. Intros Luke Probasco Presenter Photo @geetarluke /in/lukeprobasco/ Manages Drupal business for Townsend Security. DrupalCon, Camp, and Summit speaker. Security professional. Music enthusiast. Drupal GM/Townsend Security 3
  • 4. Intros Mark Shropshire (shrop) @shrop /in/markshropshire drupal.org Mark brings 20 years of experience leading technical teams to his role as Mediacurrent’s Open Source Security Lead. He is a leader in tech community organizing, blogging, podcasting, and public speaking within the Drupal community. Mark is passionate about architecting systems to solve workflow problems and improve efficiencies using open source software. He is also the maintainer of the Guardr Drupal security module suite. Mediacurrent Open Source Security Lead 4
  • 5. Style Guide Contents Security by design in Drupal Encrypting sensitive data Key management (encryption & API)4 3 2 1 5 Site audit and security best practices Resources to improve security5 Style Guide6 Takeaways
  • 6. Security by design in Drupal1
  • 8. 8 Compliance, Security, and You ● Data discovery ● PCI DSS, HIPAA, GDPR, etc. ● Hosting and compliance ● See your security team for internal policies and controls Security by Design
  • 9. 9 Keep Drupal Secure ● Keep Core and contrib modules up to date ● Use Drupal API ● Use version control ● Use social and enterprise login ● Use secure passwords ● Two factor authentication ● Log and review logs (watchdog and additional contrib) ● Don’t forget about infrastructure security Security by Design
  • 10. 10 Security in Custom Modules ● Never trust user input ○ Filter plain text with check_plain() or t() ○ Filter HTML with filter_xss() ● Query properly ○ Do not concatenate values into db_query() ○ Instead use parameterized values %s %d %f %b ● Do not output db values directly (don’t trust user input) ● Protect user input - think before you save Security by Design
  • 11. Site audit and security best practices2
  • 12. 12 What is an audit? ● Review by someone not on the team ○ (internal or external) ● Review of software systems ● Review of supporting infrastructure ● Review of other related systems Site audit and security best practices
  • 13. 13 Performing an audit ● Collect data manually and with tools ○ Analyze the data ○ Prioritize findings ● Eliminate false positives ● Complete usable report(s) Site audit and security best practices
  • 14. 14 OWASP Top 10 Most Critical Web Application Security Risks ● Injection ● Weak authentication and session management ● XSS ● Insecure Direct Object References ● Security Misconfiguration ● Sensitive Data Exposure ● Missing Function Level Access Control ● Cross Site Request Forgery ● Using Components with Known Vulnerabilities ● Unvalidated Redirects and Forwards Site audit and security best practices
  • 15. 15 Drupal audit tools ● Drupal Core reports ● Site Audit ● Security Review ● Sensitive Data ● Hacked! ● Coder ● Review of site config, users, permissions, and roles ● Manual code review Site audit and security best practices
  • 17. 17 Encrypting Data in Drupal ● There is no native way to encrypt data in Drupal ● Compliance and risk management drive encryption ● Use encryption based on industry standards ● Use cryptographically strong keys - no passwords! ● See NIST Special Publication 800-57 for more info Encrypting Sensitive Data
  • 18. 18 What Encryption Should I Use? ● Use AES, RSA, Triple DES, or other standard methods ● Beware of non-standard encryption ● Example: Homomorphic Encryption ○ Has not received wide review and acceptance ○ Cannot be certified by a standards body ○ Cannot achieve FIPS 140-2 validation ○ Compliance regulations prohibit its use Encrypting Sensitive Data
  • 20. 20 McDonald's has acknowledged that a leaky API exposed personal information for users of its McDelivery mobile app in India. The flaw exposed names, email addresses, phone numbers, home addresses and sometimes the coordinates of those homes, as well as links to social media profiles. BankInfoSecurity.com Key Management
  • 21. 21 Our review has shown that a threat actor obtained access to a set of AWS keys and used them to access the AWS API from an intermediate host with another, smaller service provider in the US... Through the AWS API, the actor created several instances in our infrastructure to do reconnaissance. OneLogin.com Key Management
  • 22. 22 Payment Gateways Email Marketing SMTP Relays Authentication Shipping Cloud Providers Encryption APIs Key Management
  • 23. Resources to improve security5
  • 24. 24 Encryption Modules ● Encrypt ● FieldEncrypt ● Real AES ● Encrypt User ● Encrypted Files ● Webform Encrypt Resources to Improve Security
  • 25. 25 Key Management Modules ● Key ● Townsend Security Key Connection ● Lockr Resources to Improve Security
  • 26. 26 Guardr Guardr is a Drupal distribution with a combination of modules and settings to enhance a Drupal application's security and availability to meet enterprise security requirements. https://drupal.org/project/guardr Resources to Improve Security