SlideShare a Scribd company logo
1 of 27
Drupal Security
Drupal’s solutions, and how to maintain site security



                              - Bakiyanathan R

                www.techday7.com
9 out of 10 websites have serious
          vulnerabilities

       WhiteHat Security




          www.techday7.com
The Top 10 Web Security Issues*
...and how Drupal addresses them




             www.techday7.com
Cross-Site Scripting




    www.techday7.com
How Drupal prevents...

• Drupal has a system of input filters that
  remove potential XSS exploits from user input.
• The Form API verifies that a user loaded a
  form before submitting it. This verification
  makes effective XSS against Drupal sites
  considerably more difficult.




                 www.techday7.com
Injection Flaws

Username:
                                               SELECT uid FROM users
 Administrator” OR uid=1 OR “1”=“1             WHERE
Password                                       name=“Administrator”
                                               OR uid=1
 ••••••••••••                                  OR “1”=“1”
                                               AND password=“kjsdkjds”
   Login




                            www.techday7.com
How Drupal prevents...

• Drupal provides a database API with built-in
  SQL injection attack prevention.
• Drupal provides a set of functions to process
  URLs and SQL arguments, making security an
  easy choice for developers.




                 www.techday7.com
Malicious File Execution
• Code vulnerable to remote file inclusion (RFI)
  allows attackers to include hostile code and
  data, resulting in devastating attacks, such as
  total server compromise.
• Malicious file execution attacks affect PHP,
  XML and any framework which accepts
  filenames or files from users
• Ex : http://mydomain.com/show.php?page=../
  install.php
How Drupal prevents...
• PHP has a configurable base directory for
  inclusions. Using this option limits possible
  attacks to only the Drupal directories.
• Drupal modules generally offer no entry point
  except through Drupal’s secure URL/menu
  handler. So, while users may be able to load
  arbitrary PHP files, the “attacks” will have no
  effect.
• Prevention of “insecure direct object
  reference” attacks also helps here.

                 www.techday7.com
Insecure Direct Object Reference
A direct object reference occurs when a
developer exposes a reference to an
internal implementation object, such as a
file, directory, database record, or
key, as a URL or form parameter.

Ex : http://mydomain.com?page=/etc/group
•It will show the Groups details of the Server.


                  www.techday7.com
How Drupal prevents...
• Drupal’s menu and form APIs encourage
  validating and sanitizing data submitted from
  users.
• When object references are passed through
  the Form API, Drupal core protects the values
  from tampering by site users.
• Drupal and PHP provide file and session APIs
  that allow convenient and secure object
  reference passing.

                 www.techday7.com
Cross-Site Request Forgery
• CSRF is an attack which forces an end user to
  execute unwanted actions on a web
  application in which he/she is currently
  authenticated.
• CSRF attacks generally target functions that
  cause a state change on the server but can
  also be used to access sensitive data.


                 www.techday7.com
How Drupal prevents...
• Drupal filters out scripting variations of this
  attack, leaving only simpler ones.
• The simpler CSRF attacks fail when attacking
  Drupal because the Form API isolates state
  changing operations behind POST requests.
• The Form API also requires loading forms prior
  to submission, making CSRF attacks much
  harder.


                 www.techday7.com
Information Leakage




Ex:
 Cannot connect to database.
(mysql://rootuser:password@localhost:/db)
How Drupal prevents...
• Administrators can configure Drupal to
  privately log errors, intercepting them before
  they ever reach users.
• Drupal never displays password information
  when experiencing database connection
  issues.
• Drupal ships with a .htaccess file preventing
  many forms of snooping.


                 www.techday7.com
Broken Authentication
• Account credentials and session tokens are
  often not properly protected.
• Authentication and session management
  includes all aspects of handling user
  authentication and managing active sessions.




                 www.techday7.com
How Drupal prevents...
• Authentication cookies are not modifiable by
  site users.
• User sessions (and related cookies) are
  completely destroyed and recreated on login
  and logout.
• User name, ID, and password are only
  managed on the server side, not in the user’s
  cookie. Passwords are never emailed.
• Session cookies are named uniquely for each
  Drupal installation
                 www.techday7.com
Insecure Cryptographic Storage
• Web applications rarely use cryptographic
  functions properly to protect data and
  credentials.
• Attackers use weakly protected data to
  conduct identity theft and other crimes, such
  as credit card fraud.




                 www.techday7.com
How Drupal prevents...

• Passwords are stored using a one-way hash.
• Drupal provides a randomly generated private
  key for every installation




                www.techday7.com
Insecure Communications
• Applications frequently fail to encrypt
  network traffic when it is necessary to protect
  sensitive communications.




                 www.techday7.com
How Drupal prevents...

• As a PHP-based system, Drupal can use
  Apache’s widely-trusted SSL support.
• If only part of the site is behind SSL,
  administrators can install modules to make
  certain URLs available only through a secure
  connection.
  Ex: $conf['https'] = TRUE need to be in settings.php




                            www.techday7.com
Failure to Restrict URL Access
• Frequently, an application only protects
  sensitive functionality by preventing the
  display of links or URLs to unauthorized users.
• Attackers can use this weakness to access and
  perform unauthorized operations by accessing
  those URLs directly.”
• Ex: http://mydomain.com/user/10/delete


                 www.techday7.com
How Drupal prevents...

• Drupal uses an integrated URL/access control
  system.
• Every URL in the system must have access
  control configured.




                www.techday7.com
Unvalidated input
• When users submit information to sites, their
  input must be checked for validity using Drupal
  Form API.
                                  Form Api
           User Input

                                               Validated             Form
                                                                   Processor
          Rejected Input



                                             Is User have access
              Is user input ok?                to submit form?
Writing secure code
Use check functions on output to prevent cross site scripting attacks



No piece of user-submitted content should ever be placed as-is into HTML.

 Use check plain or theme('placeholder') for plain text.

 Use check markup or filter_xss for markup containing text.

 Use the t() function with @ or % placeholders to construct safe, translatable
strings.

Ex:

drupal_set_message(t("Your favorite color is $color!")); // No input checking!

drupal_set_message('Your favorite color is ' . check_plain($color));

drupal_set_message(t('Your favorite color is @color', array('@color' => $color)));
Use the database abstraction layer to avoid SQL injection attacks



 For example, never concatenate data directly into SQL queries, like this:
<?php db_query('SELECT foo FROM {table} t WHERE t.name = '. $_GET['user']); ?
>
<?php db_query("SELECT foo FROM {table} t WHERE t.name = '%s' ",

 $_GET['user']); ?>

 Use db_rewrite_sql to respect node access restrictions.

 <?php

 $result = db_query(db_rewrite_sql("SELECT n.nid, n.title FROM {node} n"));

 ?>



                              www.techday7.com
www.techday7.com

More Related Content

What's hot

Hacking web applications
Hacking web applicationsHacking web applications
Hacking web applicationsAdeel Javaid
 
OWASP Top 10 Proactive Controls 2016 - NorthEast PHP 2017
OWASP Top 10 Proactive Controls 2016 - NorthEast PHP 2017 OWASP Top 10 Proactive Controls 2016 - NorthEast PHP 2017
OWASP Top 10 Proactive Controls 2016 - NorthEast PHP 2017 Philippe Gamache
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applicationsNiyas Nazar
 
WordPress Security - A Hacker's Guide - WordCamp 2019 Islamabad
WordPress Security - A Hacker's Guide - WordCamp 2019 IslamabadWordPress Security - A Hacker's Guide - WordCamp 2019 Islamabad
WordPress Security - A Hacker's Guide - WordCamp 2019 IslamabadRF Studio
 
Browser Serving Your Web Application Security - NorthEast PHP 2017
Browser Serving Your Web Application Security - NorthEast PHP 2017Browser Serving Your Web Application Security - NorthEast PHP 2017
Browser Serving Your Web Application Security - NorthEast PHP 2017Philippe Gamache
 
Automating Web Application Deployment
Automating Web Application DeploymentAutomating Web Application Deployment
Automating Web Application DeploymentMathew Byrne
 
Microsoft/Zend Webcast on Cloud Computing
Microsoft/Zend Webcast on Cloud ComputingMicrosoft/Zend Webcast on Cloud Computing
Microsoft/Zend Webcast on Cloud ComputingJosh Holmes
 
AppSec 2007 - .NET Web Services Hacking
AppSec 2007 - .NET Web Services HackingAppSec 2007 - .NET Web Services Hacking
AppSec 2007 - .NET Web Services HackingShreeraj Shah
 
Hacking A Web Site And Secure Web Server Techniques Used
Hacking A Web Site And Secure Web Server Techniques UsedHacking A Web Site And Secure Web Server Techniques Used
Hacking A Web Site And Secure Web Server Techniques UsedSiddharth Bhattacharya
 
Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Jay Nagar
 
Secure Your REST API (The Right Way)
Secure Your REST API (The Right Way)Secure Your REST API (The Right Way)
Secure Your REST API (The Right Way)Stormpath
 
Secure Code Warrior - Local file inclusion
Secure Code Warrior - Local file inclusionSecure Code Warrior - Local file inclusion
Secure Code Warrior - Local file inclusionSecure Code Warrior
 
Making Sense of APEX Security by Christoph Ruepprich
Making Sense of APEX Security by Christoph RuepprichMaking Sense of APEX Security by Christoph Ruepprich
Making Sense of APEX Security by Christoph RuepprichEnkitec
 
IIS for Developers
IIS for DevelopersIIS for Developers
IIS for DevelopersIdo Flatow
 
Common Web Application Attacks
Common Web Application Attacks Common Web Application Attacks
Common Web Application Attacks Ahmed Sherif
 

What's hot (20)

Hacking web applications
Hacking web applicationsHacking web applications
Hacking web applications
 
OWASP Top 10 Proactive Controls 2016 - NorthEast PHP 2017
OWASP Top 10 Proactive Controls 2016 - NorthEast PHP 2017 OWASP Top 10 Proactive Controls 2016 - NorthEast PHP 2017
OWASP Top 10 Proactive Controls 2016 - NorthEast PHP 2017
 
Web Hacking
Web HackingWeb Hacking
Web Hacking
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applications
 
Hack and Slash: Secure Coding
Hack and Slash: Secure CodingHack and Slash: Secure Coding
Hack and Slash: Secure Coding
 
WordPress Security - A Hacker's Guide - WordCamp 2019 Islamabad
WordPress Security - A Hacker's Guide - WordCamp 2019 IslamabadWordPress Security - A Hacker's Guide - WordCamp 2019 Islamabad
WordPress Security - A Hacker's Guide - WordCamp 2019 Islamabad
 
Browser Serving Your Web Application Security - NorthEast PHP 2017
Browser Serving Your Web Application Security - NorthEast PHP 2017Browser Serving Your Web Application Security - NorthEast PHP 2017
Browser Serving Your Web Application Security - NorthEast PHP 2017
 
Javacro 2014 Spring Security 3 Speech
Javacro 2014 Spring Security 3 SpeechJavacro 2014 Spring Security 3 Speech
Javacro 2014 Spring Security 3 Speech
 
Automating Web Application Deployment
Automating Web Application DeploymentAutomating Web Application Deployment
Automating Web Application Deployment
 
Web Hacking Intro
Web Hacking IntroWeb Hacking Intro
Web Hacking Intro
 
Microsoft/Zend Webcast on Cloud Computing
Microsoft/Zend Webcast on Cloud ComputingMicrosoft/Zend Webcast on Cloud Computing
Microsoft/Zend Webcast on Cloud Computing
 
AppSec 2007 - .NET Web Services Hacking
AppSec 2007 - .NET Web Services HackingAppSec 2007 - .NET Web Services Hacking
AppSec 2007 - .NET Web Services Hacking
 
Hacking A Web Site And Secure Web Server Techniques Used
Hacking A Web Site And Secure Web Server Techniques UsedHacking A Web Site And Secure Web Server Techniques Used
Hacking A Web Site And Secure Web Server Techniques Used
 
Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )
 
Secure Your REST API (The Right Way)
Secure Your REST API (The Right Way)Secure Your REST API (The Right Way)
Secure Your REST API (The Right Way)
 
Secure Code Warrior - Local file inclusion
Secure Code Warrior - Local file inclusionSecure Code Warrior - Local file inclusion
Secure Code Warrior - Local file inclusion
 
Making Sense of APEX Security by Christoph Ruepprich
Making Sense of APEX Security by Christoph RuepprichMaking Sense of APEX Security by Christoph Ruepprich
Making Sense of APEX Security by Christoph Ruepprich
 
IIS for Developers
IIS for DevelopersIIS for Developers
IIS for Developers
 
Common Web Application Attacks
Common Web Application Attacks Common Web Application Attacks
Common Web Application Attacks
 
JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...
JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...
JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...
 

Similar to Drupal security

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 securityJozef Toth
 
Doing Drupal security right
Doing Drupal security rightDoing Drupal security right
Doing Drupal security rightGábor Hojtsy
 
Drupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp BratislavaDrupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp BratislavaGábor Hojtsy
 
2013 OWASP Top 10
2013 OWASP Top 102013 OWASP Top 10
2013 OWASP Top 10bilcorry
 
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADFOWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADFBrian Huff
 
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 MeetupChris Hales
 
Website Hacking and Preventive Measures
Website Hacking and Preventive MeasuresWebsite Hacking and Preventive Measures
Website Hacking and Preventive MeasuresShubham Takode
 
Extending drupal authentication
Extending drupal authenticationExtending drupal authentication
Extending drupal authenticationCharles Russell
 
Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultMohammed ALDOUB
 
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
Mr. Mohammed Aldoub  - A case study of django web applications that are secur...Mr. Mohammed Aldoub  - A case study of django web applications that are secur...
Mr. Mohammed Aldoub - A case study of django web applications that are secur...nooralmousa
 
How to Test for The OWASP Top Ten
 How to Test for The OWASP Top Ten How to Test for The OWASP Top Ten
How to Test for The OWASP Top TenSecurity Innovation
 
OWASP top 10-2013
OWASP top 10-2013OWASP top 10-2013
OWASP top 10-2013tmd800
 

Similar to Drupal security (20)

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
 
Is Drupal Secure?
Is Drupal Secure?Is Drupal Secure?
Is Drupal Secure?
 
Drupal security
Drupal securityDrupal security
Drupal security
 
Doing Drupal security right
Doing Drupal security rightDoing Drupal security right
Doing Drupal security right
 
Drupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp BratislavaDrupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp Bratislava
 
2013 OWASP Top 10
2013 OWASP Top 102013 OWASP Top 10
2013 OWASP Top 10
 
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADFOWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
 
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
 
Drupal Security Hardening
Drupal Security HardeningDrupal Security Hardening
Drupal Security Hardening
 
Drupal Security Hardening
Drupal Security HardeningDrupal Security Hardening
Drupal Security Hardening
 
Website Hacking and Preventive Measures
Website Hacking and Preventive MeasuresWebsite Hacking and Preventive Measures
Website Hacking and Preventive Measures
 
Extending drupal authentication
Extending drupal authenticationExtending drupal authentication
Extending drupal authentication
 
Joomla web application development vulnerabilities
Joomla web application development vulnerabilitiesJoomla web application development vulnerabilities
Joomla web application development vulnerabilities
 
Case Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by DefaultCase Study of Django: Web Frameworks that are Secure by Default
Case Study of Django: Web Frameworks that are Secure by Default
 
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
Mr. Mohammed Aldoub  - A case study of django web applications that are secur...Mr. Mohammed Aldoub  - A case study of django web applications that are secur...
Mr. Mohammed Aldoub - A case study of django web applications that are secur...
 
Rails Security
Rails SecurityRails Security
Rails Security
 
null Bangalore meet - Php Security
null Bangalore meet - Php Securitynull Bangalore meet - Php Security
null Bangalore meet - Php Security
 
How to Test for The OWASP Top Ten
 How to Test for The OWASP Top Ten How to Test for The OWASP Top Ten
How to Test for The OWASP Top Ten
 
OWASP top 10-2013
OWASP top 10-2013OWASP top 10-2013
OWASP top 10-2013
 
Web security
Web securityWeb security
Web security
 

Recently uploaded

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Drupal security

  • 1. Drupal Security Drupal’s solutions, and how to maintain site security - Bakiyanathan R www.techday7.com
  • 2. 9 out of 10 websites have serious vulnerabilities WhiteHat Security www.techday7.com
  • 3. The Top 10 Web Security Issues* ...and how Drupal addresses them www.techday7.com
  • 4. Cross-Site Scripting www.techday7.com
  • 5. How Drupal prevents... • Drupal has a system of input filters that remove potential XSS exploits from user input. • The Form API verifies that a user loaded a form before submitting it. This verification makes effective XSS against Drupal sites considerably more difficult. www.techday7.com
  • 6. Injection Flaws Username: SELECT uid FROM users Administrator” OR uid=1 OR “1”=“1 WHERE Password name=“Administrator” OR uid=1 •••••••••••• OR “1”=“1” AND password=“kjsdkjds” Login www.techday7.com
  • 7. How Drupal prevents... • Drupal provides a database API with built-in SQL injection attack prevention. • Drupal provides a set of functions to process URLs and SQL arguments, making security an easy choice for developers. www.techday7.com
  • 8. Malicious File Execution • Code vulnerable to remote file inclusion (RFI) allows attackers to include hostile code and data, resulting in devastating attacks, such as total server compromise. • Malicious file execution attacks affect PHP, XML and any framework which accepts filenames or files from users • Ex : http://mydomain.com/show.php?page=../ install.php
  • 9. How Drupal prevents... • PHP has a configurable base directory for inclusions. Using this option limits possible attacks to only the Drupal directories. • Drupal modules generally offer no entry point except through Drupal’s secure URL/menu handler. So, while users may be able to load arbitrary PHP files, the “attacks” will have no effect. • Prevention of “insecure direct object reference” attacks also helps here. www.techday7.com
  • 10. Insecure Direct Object Reference A direct object reference occurs when a developer exposes a reference to an internal implementation object, such as a file, directory, database record, or key, as a URL or form parameter. Ex : http://mydomain.com?page=/etc/group •It will show the Groups details of the Server. www.techday7.com
  • 11. How Drupal prevents... • Drupal’s menu and form APIs encourage validating and sanitizing data submitted from users. • When object references are passed through the Form API, Drupal core protects the values from tampering by site users. • Drupal and PHP provide file and session APIs that allow convenient and secure object reference passing. www.techday7.com
  • 12. Cross-Site Request Forgery • CSRF is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated. • CSRF attacks generally target functions that cause a state change on the server but can also be used to access sensitive data. www.techday7.com
  • 13. How Drupal prevents... • Drupal filters out scripting variations of this attack, leaving only simpler ones. • The simpler CSRF attacks fail when attacking Drupal because the Form API isolates state changing operations behind POST requests. • The Form API also requires loading forms prior to submission, making CSRF attacks much harder. www.techday7.com
  • 14. Information Leakage Ex: Cannot connect to database. (mysql://rootuser:password@localhost:/db)
  • 15. How Drupal prevents... • Administrators can configure Drupal to privately log errors, intercepting them before they ever reach users. • Drupal never displays password information when experiencing database connection issues. • Drupal ships with a .htaccess file preventing many forms of snooping. www.techday7.com
  • 16. Broken Authentication • Account credentials and session tokens are often not properly protected. • Authentication and session management includes all aspects of handling user authentication and managing active sessions. www.techday7.com
  • 17. How Drupal prevents... • Authentication cookies are not modifiable by site users. • User sessions (and related cookies) are completely destroyed and recreated on login and logout. • User name, ID, and password are only managed on the server side, not in the user’s cookie. Passwords are never emailed. • Session cookies are named uniquely for each Drupal installation www.techday7.com
  • 18. Insecure Cryptographic Storage • Web applications rarely use cryptographic functions properly to protect data and credentials. • Attackers use weakly protected data to conduct identity theft and other crimes, such as credit card fraud. www.techday7.com
  • 19. How Drupal prevents... • Passwords are stored using a one-way hash. • Drupal provides a randomly generated private key for every installation www.techday7.com
  • 20. Insecure Communications • Applications frequently fail to encrypt network traffic when it is necessary to protect sensitive communications. www.techday7.com
  • 21. How Drupal prevents... • As a PHP-based system, Drupal can use Apache’s widely-trusted SSL support. • If only part of the site is behind SSL, administrators can install modules to make certain URLs available only through a secure connection. Ex: $conf['https'] = TRUE need to be in settings.php www.techday7.com
  • 22. Failure to Restrict URL Access • Frequently, an application only protects sensitive functionality by preventing the display of links or URLs to unauthorized users. • Attackers can use this weakness to access and perform unauthorized operations by accessing those URLs directly.” • Ex: http://mydomain.com/user/10/delete www.techday7.com
  • 23. How Drupal prevents... • Drupal uses an integrated URL/access control system. • Every URL in the system must have access control configured. www.techday7.com
  • 24. Unvalidated input • When users submit information to sites, their input must be checked for validity using Drupal Form API. Form Api User Input Validated Form Processor Rejected Input Is User have access Is user input ok? to submit form?
  • 25. Writing secure code Use check functions on output to prevent cross site scripting attacks No piece of user-submitted content should ever be placed as-is into HTML.  Use check plain or theme('placeholder') for plain text.  Use check markup or filter_xss for markup containing text.  Use the t() function with @ or % placeholders to construct safe, translatable strings. Ex: drupal_set_message(t("Your favorite color is $color!")); // No input checking! drupal_set_message('Your favorite color is ' . check_plain($color)); drupal_set_message(t('Your favorite color is @color', array('@color' => $color)));
  • 26. Use the database abstraction layer to avoid SQL injection attacks For example, never concatenate data directly into SQL queries, like this: <?php db_query('SELECT foo FROM {table} t WHERE t.name = '. $_GET['user']); ? > <?php db_query("SELECT foo FROM {table} t WHERE t.name = '%s' ", $_GET['user']); ?> Use db_rewrite_sql to respect node access restrictions. <?php $result = db_query(db_rewrite_sql("SELECT n.nid, n.title FROM {node} n")); ?> www.techday7.com

Editor's Notes

  1. rfgtgyhygghyhtg