SlideShare a Scribd company logo
1 of 137
LET’S WRITE SECURE DRUPAL
CODE!
TATAR BALAZS JANOS
DRUPALCAMP BELARUS
MINSK, BELARUS – 18.05.2019
Who am I?
Tatar Balazs Janos
@tatarbj
Works with Drupal since 2007
CTO @ Petend
Drupal Security Correspondent @ EC
Active mentor @ Mentoring community group
Provisional member @ Drupal Security Team
SecOSdreamer @ Secure Open Source day
Tatar Balazs Janos - @tatarbj
Are there site builders?
Tatar Balazs Janos - @tatarbj
Tatar Balazs Janos - @tatarbj
Demo
Tatar Balazs Janos - @tatarbj
Gist
https://gist.github.com/tatarbj/4a3ecaece9abc7100baf33fe06934634
Tatar Balazs Janos - @tatarbj
Are there developers/maintainers?
Tatar Balazs Janos - @tatarbj
Have you attended on a previous Let’s
write secure Drupal code! session?
Tatar Balazs Janos - @tatarbj
DrupalCamp Antwerp 2017
DrupalCamp Ruhr 2018
DrupalDevDays 2018
Drupal Europe 2018
DrupalCamp Oslo 2018
DrupalCamp London 2019
Drupal Mountain Camp 2019
DrupalCamp Spain 2019
DrupalCamp Belarus 2019 – New edition!
History
Trends in Security
Tatar Balazs Janos - @tatarbj
Tatar Balazs Janos - @tatarbj
Tatar Balazs Janos - @tatarbj
Types of vulnerabilities
Tatar Balazs Janos - @tatarbj
Tatar Balazs Janos - @tatarbj
Cross Site Scripting
Tatar Balazs Janos - @tatarbj
Client side vulnerability
Unfiltered output
Never trust any user input.
We’ve seen the demo before ;)
Cross Site Scripting
Tatar Balazs Janos - @tatarbj
Tatar Balazs Janos - @tatarbj
Html::escape() – plain text
Xss::filter() – html is allowed
Xss::filterAdmin() – text by admins
Tatar Balazs Janos - @tatarbj
Bingo
Tatar Balazs Janos - @tatarbj
Everyone has a bingo card (check your bag!)
If you answer well, mark the number!
Wrong answer = no number!
First who shouts BINGO! wins the price!
Rules and etiquette
Tatar Balazs Janos - @tatarbj
Round 1
Tatar Balazs Janos - @tatarbj
function custom_field_formatter_view(...) {
foreach ($items as $key => $value) {
//...
$element[$key] = array(
'#type' => 'markup',
'#markup' => t('<img src="!src" alt="@alt" />',
array('!src' => $value['src'], ‚$alt’ => $value['alt'])),
);
//...
}
return $element;
}
Tatar Balazs Janos - @tatarbj
function custom_field_formatter_view(...) {
foreach ($items as $key => $value) {
//...
$element[$key] = array(
'#type' => 'markup',
'#markup' => t('<img src="!src" alt="@alt" />',
array('!src' => $value['src'], ‚$alt’ => $value['alt'])),
);
//...
}
return $element;
}
Tatar Balazs Janos - @tatarbj
function custom_field_formatter_view(...) {
foreach ($items as $key => $value) {
//...
$element[$key] = array(
'#type' => 'markup',
'#markup' => t('<img src="@src" alt="@alt" />',
array('@src' => $value['src'], ‚$alt’ => $value['alt'])),
);
//...
}
return $element;
}
Tatar Balazs Janos - @tatarbj
12
Tatar Balazs Janos - @tatarbj
<?php print check_plain($body_field); ?>
Tatar Balazs Janos - @tatarbj
<?php print check_plain($body_field); ?>
Tatar Balazs Janos - @tatarbj
<?php print check_markup($body_field); ?>
Tatar Balazs Janos - @tatarbj
34
Tatar Balazs Janos - @tatarbj
<?php print '<a href="/' . check_url($url) . '">'; ?>
Tatar Balazs Janos - @tatarbj
<?php print '<a href="/' . check_url($url) . '">'; ?>
Tatar Balazs Janos - @tatarbj
4
Tatar Balazs Janos - @tatarbj
foreach ($items as $delta => $item) {
$id = $item->getValue()['target_id'];
$content = Drupal::entityTypeManager()
->getStorage($entity_type_id)
->load($id);
$body = $content->get('body_field')->getValue()[0]['value'];
}
$elements[$delta] = array(
'#theme' => 'something_custom',
'#body' => $body,
);
return $elements;
Tatar Balazs Janos - @tatarbj
foreach ($items as $delta => $item) {
$id = $item->getValue()['target_id'];
$content = Drupal::entityTypeManager()
->getStorage($entity_type_id)
->load($id);
$body = $content->get('body_field')->getValue()[0]['value'];
}
$elements[$delta] = array(
'#theme' => 'something_custom',
'#body' => $body,
);
return $elements;
Tatar Balazs Janos - @tatarbj
foreach ($items as $delta => $item) {
$id = $item->getValue()['target_id'];
$content = Drupal::entityTypeManager()
->getStorage($entity_type_id)
->load($id);
$body = [
'#type' => 'processed_text',
'#text' => $content->get('body_field')->getValue()[0]['value'],
'#format' => $content->get('body_field')->getValue()[0]['format'], ];
}
$elements[$delta] = array(
'#theme' => 'something_custom',
'#body' => $body,
);
return $elements;
Tatar Balazs Janos - @tatarbj
23
Tatar Balazs Janos - @tatarbj
Drupal 8 allows Basic HTML to be
used by authenticated users.
Tatar Balazs Janos - @tatarbj
?
Drupal 8 allows Basic HTML to be
used by authenticated users.
Tatar Balazs Janos - @tatarbj
?
17
Tatar Balazs Janos - @tatarbj
Cross site scripting is a server side
vulnerability.
Tatar Balazs Janos - @tatarbj
?
Cross site scripting is a server side
vulnerability.
Tatar Balazs Janos - @tatarbj
?
Cross site scripting is a client side
vulnerability.
Tatar Balazs Janos - @tatarbj
?
2
Tatar Balazs Janos - @tatarbj
User input must be always sanitized.
Tatar Balazs Janos - @tatarbj
?
User input must be always sanitized.
Tatar Balazs Janos - @tatarbj
?
25
Tatar Balazs Janos - @tatarbj
Tatar Balazs Janos - @tatarbj
Use behat/automated tests.
<script>alert('XSS')</script>
<img src="a" onerror="alert('title')">
Check your filters and user roles.
Do not give too many options to untrusted users!
Protection against Cross Site Scripting
Tatar Balazs Janos - @tatarbj
Access Bypass
Tatar Balazs Janos - @tatarbj
User can access/do something.
Menu items can be defined to be
accessed/denied.
Many access systems: node, entity, field, views...
Access bypass
Tatar Balazs Janos - @tatarbj
Round 2
Tatar Balazs Janos - @tatarbj
<?php
$query = db_select('node', 'n')
->fields('n', array('title', 'nid'))
->condition('type', 'article');
$result = $query->execute();
?>
Tatar Balazs Janos - @tatarbj
<?php
$query = db_select('node', 'n')
->fields('n', array('title', 'nid'))
->condition('type', 'article');
$result = $query->execute();
?>
Tatar Balazs Janos - @tatarbj
<?php
$query = db_select('node', 'n')
->fields('n', array('title', 'nid')
->condition('type', 'article')
->addTag('node_access');
$result = $query->execute();
?>
Tatar Balazs Janos - @tatarbj
29
Tatar Balazs Janos - @tatarbj
mymodule.not_found:
path: '/not-found'
defaults:
_controller: DrupalmymoduleControllerNotFoundController::build404
_title: 'Page not found'
requirements:
_access: 'TRUE'
Tatar Balazs Janos - @tatarbj
mymodule.not_found:
path: '/not-found'
defaults:
_controller: DrupalmymoduleControllerNotFoundController::build404
_title: 'Page not found'
requirements:
_access: 'TRUE'
Tatar Balazs Janos - @tatarbj
16
Tatar Balazs Janos - @tatarbj
All users on Drupal sites belong to at
least 1 user role.
Tatar Balazs Janos - @tatarbj
?
All users on Drupal sites belong to at
least 1 user role.
Tatar Balazs Janos - @tatarbj
?
22
Tatar Balazs Janos - @tatarbj
Restricted permissions make Drupal
sites more secure by calling
restrict_permission() method.
Tatar Balazs Janos - @tatarbj
?
Restricted permissions make Drupal
sites more secure by calling
restrict_permission() method.
Tatar Balazs Janos - @tatarbj
?
Restricted permissions make Drupal
sites more secure by raising
attention on the permission page.
Tatar Balazs Janos - @tatarbj
?
6
Tatar Balazs Janos - @tatarbj
Drupal 8 allows users to mistype
their passwords unlimited times.
Tatar Balazs Janos - @tatarbj
?
Drupal 8 allows users to mistype
their passwords unlimited times.
Tatar Balazs Janos - @tatarbj
?
Drupal 8 allows users to mistype
their passwords 5 times.
Tatar Balazs Janos - @tatarbj
?
9
Tatar Balazs Janos - @tatarbj
Tatar Balazs Janos - @tatarbj
Visit node/nid and other urls
Visit anything/%node
Use behat/automated tests.
node_access, entity_access
Menu definitions
user_access for permissions
$query->addTag('node_access')
Protection against Access bypass
Tatar Balazs Janos - @tatarbj
SQL Injection
Tatar Balazs Janos - @tatarbj
Unauthorized access to database resources.
Do not trust any user input.
SA-CORE-2014-005 – Highly critical D7 SA
SQL Injection
Tatar Balazs Janos - @tatarbj
Round 3
Tatar Balazs Janos - @tatarbj
<?php
$table = 'field_data_' . $field;
$sql = 'SELECT entity_id, bundle, ' . $field . '_linklabel FROM
{' . $table . '} WHERE ' . $field . '_normalized = :phoneno’;
$eid = db_query($sql, array(':phoneno' => $normalized))
->fetchAssoc();
?>
Tatar Balazs Janos - @tatarbj
<?php
$table = 'field_data_' . $field;
$sql = 'SELECT entity_id, bundle, ' . $field . '_linklabel FROM
{' . $table . '} WHERE ' . $field . '_normalized = :phoneno’;
$eid = db_query($sql, array(':phoneno' => $normalized))
->fetchAssoc();
?>
Tatar Balazs Janos - @tatarbj
<?php
$query = db_select('field_data_' . $field, 'fdf');
$query->fields('fdf', array('entity_id', 'bundle', $field .
'_linklabel'));
$query->condition('fdf.' . $field . '_normalized',
$normalized);
$eid = $query->execute()->fetchAssoc();
?>
Tatar Balazs Janos - @tatarbj
7
Tatar Balazs Janos - @tatarbj
<?php
$result = Drupal::database()
->delete('people')
->condition('name', '%_' . $_GET['param'], 'LIKE');
->execute();
?>
Tatar Balazs Janos - @tatarbj
<?php
$result = Drupal::database()
->delete('people')
->condition('name', '%_' . $_GET['param'], 'LIKE');
->execute();
?>
Tatar Balazs Janos - @tatarbj
<?php
$database = Drupal::database();
$result = $database
->delete('people')
->condition('name', $database->escapeLike($_GET['param']), 'LIKE');
->execute();
?>
Tatar Balazs Janos - @tatarbj
31
Tatar Balazs Janos - @tatarbj
Single statement execution for SQL
is present in Drupal 8 Database API.
Tatar Balazs Janos - @tatarbj
?
Single statement execution for SQL
is present in Drupal 8 Database API.
Tatar Balazs Janos - @tatarbj
?
24
Tatar Balazs Janos - @tatarbj
A highly critical Drupal 8 core update
remediated an SQL injection
vulnerability in 2014.
Tatar Balazs Janos - @tatarbj
?
A highly critical Drupal 8 core update
remediated an SQL injection
vulnerability in 2014.
Tatar Balazs Janos - @tatarbj
?
A highly critical Drupal 7 core update
remediated an SQL injection
vulnerability in 2014.
Tatar Balazs Janos - @tatarbj
?
15
Tatar Balazs Janos - @tatarbj
Tatar Balazs Janos - @tatarbj
Use always drupal Database API!
db_query with :placeholder (deprecated in D8,
in D9 will be removed)
Filter parameters
Check the queries in code.
username' AND 1=1
POST requests by curl
Protection against SQL Injection
Tatar Balazs Janos - @tatarbj
Round 4
Ready for some other code?
Tatar Balazs Janos - @tatarbj
<?php
function _generate_password($length = 8) {
$pass = ’’;
for ($i = 0; $i < $length; $i++) {
// Each iteration, pick a random character from the
// allowable string and append it to the password:
$pass .= $allowable_characters[mt_rand(0, $len)];
}
}
?>
Tatar Balazs Janos - @tatarbj
<?php
function _generate_password($length = 8) {
$pass = ’’;
for ($i = 0; $i < $length; $i++) {
// Each iteration, pick a random character from the
// allowable string and append it to the password:
$pass .= $allowable_characters[mt_rand(0, $len)];
}
}
?>
Tatar Balazs Janos - @tatarbj
<?php
function _generate_password($length = 8) {
$pass = ’’;
for ($i = 0; $i < $length; $i++) {
do {
// Find a secure random number within the range needed.
$index = ord(drupal_random_bytes(1));
} while ($index > $len);
$pass .= $allowable_characters[$index];
}
}
?>
Tatar Balazs Janos - @tatarbj
8
Tatar Balazs Janos - @tatarbj
// custom_module.permissions.yml
administer custom module:
title: 'Bypass access control'
description: 'Allows a user to bypass access control.’
// custom_module.routing.yml
custom_module.settings.form:
path: '/admin/config/custom/settings'
requirements:
_permission: 'administer custom module'
Tatar Balazs Janos - @tatarbj
// custom_module.permissions.yml
administer custom module:
title: 'Bypass access control'
description: 'Allows a user to bypass access control.’
// custom_module.routing.yml
custom_module.settings.form:
path: '/admin/config/custom/settings'
requirements:
_permission: 'administer custom module'
Tatar Balazs Janos - @tatarbj
// custom_module.permissions.yml
administer custom module:
title: 'Bypass access control'
description: 'Allows a user to bypass access control.’
restrict access: TRUE
// custom_module.routing.yml
custom_module.settings.form:
path: '/admin/config/custom/settings'
requirements:
_permission: 'administer custom module'
Tatar Balazs Janos - @tatarbj
20
Tatar Balazs Janos - @tatarbj
// custom_module.routing.yml
custom_module.settings.form:
path: '/admin/config/custom/settings'
requirements:
_permission: 'administer site configuration'
Tatar Balazs Janos - @tatarbj
// custom_module.routing.yml
custom_module.settings.form:
path: '/admin/config/custom/settings'
requirements:
_permission: 'administer site configuration'
Tatar Balazs Janos - @tatarbj
26
Tatar Balazs Janos - @tatarbj
OWASP stands for Online Web
Authentication Super Project.
Tatar Balazs Janos - @tatarbj
?
OWASP stands for Online Web
Authentication Super Project.
Tatar Balazs Janos - @tatarbj
?
OWASP stands for Open Web
Application Security Project.
Tatar Balazs Janos - @tatarbj
?
10
Tatar Balazs Janos - @tatarbj
XXE stands for XML External
Entities vulnerability.
Tatar Balazs Janos - @tatarbj
?
XXE stands for XML External
Entities vulnerability.
Tatar Balazs Janos - @tatarbj
?
32
Tatar Balazs Janos - @tatarbj
SQL Injection is a server side
vulnerability.
Tatar Balazs Janos - @tatarbj
?
SQL Injection is a server side
vulnerability.
Tatar Balazs Janos - @tatarbj
?
13
Tatar Balazs Janos - @tatarbj
Cross Site Request Forgery
vulnerability is in the TOP10 of
OWASP list from 2017.
Tatar Balazs Janos - @tatarbj
?
Cross Site Request Forgery
vulnerability is in the TOP10 of
OWASP list from 2017.
Tatar Balazs Janos - @tatarbj
?
Cross Site Request Forgery
vulnerability is not in the TOP10 of
OWASP list from 2017, but was in 2013.
Tatar Balazs Janos - @tatarbj
?
5
Tatar Balazs Janos - @tatarbj
In case of no winner,
extra numbers are coming!
Tatar Balazs Janos - @tatarbj
!
18
Tatar Balazs Janos - @tatarbj
27
Tatar Balazs Janos - @tatarbj
30
Tatar Balazs Janos - @tatarbj
1
Tatar Balazs Janos - @tatarbj
11
Tatar Balazs Janos - @tatarbj
33
Tatar Balazs Janos - @tatarbj
Tatar Balazs Janos - @tatarbj
Security Improvements
Tatar Balazs Janos - @tatarbj
*https://events.drupal.org/sites/default/files/slides/pwolanin-2017-09-ways-drupal8-d.pdf
Many ways Drupal 8 is more secure!*
Twig templates for HTML generation
Removed PHP format
Site configuration exportable, versionable
User content entry and filtering improvements
User session and session always in ID handling
Automated CSRF token protection
Trusted host patterns enforced for requests
Single statement execution for SQL
Clickjacking protection
Content security policy compatibility with Core Javascript API
Tatar Balazs Janos - @tatarbj
Learn by Advisories
Tatar Balazs Janos - @tatarbj
Security advisories are for
 Only stable modules
 No alpha, beta, dev
 d.org hosted projects
@Maintainers: If you are contacted, be supportive! 
Drupal Security Team
Tatar Balazs Janos - @tatarbj
Tatar Balazs Janos - @tatarbj
Hacked!
Security review (simplytest.me)
Password policy
Encrypt
Composer Security Checker
Permission report
Drop Guard
Security Awareness programs
+ PHPCS Drupal BestPractice Sniff
Security related projects
Tatar Balazs Janos - @tatarbj
Tatar Balazs Janos - @tatarbj
https://tiny.cc/DrupalCampByContribute
Tatar Balazs Janos - @tatarbj
SecOSdays
25-26 OCTOBER, 2019 - SOFIA, BULGARIA
Call For Sessions and Sponsors are open!
Questions?
Tatar Balazs Janos - @tatarbj
Tatar Balazs Janos
@tatarbj
Thank you!

More Related Content

What's hot

Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)
Jacob Kaplan-Moss
 
On secure application of PHP wrappers
On secure application  of PHP wrappersOn secure application  of PHP wrappers
On secure application of PHP wrappers
Positive Hack Days
 
PHP 5.3 Overview
PHP 5.3 OverviewPHP 5.3 Overview
PHP 5.3 Overview
jsmith92
 

What's hot (20)

Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
 
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
 
Hack in the Box Keynote 2006
Hack in the Box Keynote 2006Hack in the Box Keynote 2006
Hack in the Box Keynote 2006
 
My shell
My shellMy shell
My shell
 
WIRED and the WP REST API
WIRED and the WP REST APIWIRED and the WP REST API
WIRED and the WP REST API
 
Ant
Ant Ant
Ant
 
Top 10 php classic traps php serbia
Top 10 php classic traps php serbiaTop 10 php classic traps php serbia
Top 10 php classic traps php serbia
 
Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)
 
Redis for your boss 2.0
Redis for your boss 2.0Redis for your boss 2.0
Redis for your boss 2.0
 
Redis for your boss
Redis for your bossRedis for your boss
Redis for your boss
 
Example-driven Web API Specification Discovery
Example-driven Web API Specification DiscoveryExample-driven Web API Specification Discovery
Example-driven Web API Specification Discovery
 
Assetic (Zendcon)
Assetic (Zendcon)Assetic (Zendcon)
Assetic (Zendcon)
 
Get Started with RabbitMQ (CoderCruise 2017)
Get Started with RabbitMQ (CoderCruise 2017)Get Started with RabbitMQ (CoderCruise 2017)
Get Started with RabbitMQ (CoderCruise 2017)
 
Dip Your Toes in the Sea of Security (CoderCruise 2017)
Dip Your Toes in the Sea of Security (CoderCruise 2017)Dip Your Toes in the Sea of Security (CoderCruise 2017)
Dip Your Toes in the Sea of Security (CoderCruise 2017)
 
Schemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST APISchemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST API
 
On secure application of PHP wrappers
On secure application  of PHP wrappersOn secure application  of PHP wrappers
On secure application of PHP wrappers
 
PHP
PHP PHP
PHP
 
PHP 5.3 Overview
PHP 5.3 OverviewPHP 5.3 Overview
PHP 5.3 Overview
 
Bioinformatics p5-bioperl v2013-wim_vancriekinge
Bioinformatics p5-bioperl v2013-wim_vancriekingeBioinformatics p5-bioperl v2013-wim_vancriekinge
Bioinformatics p5-bioperl v2013-wim_vancriekinge
 
Code obfuscation, php shells & more
Code obfuscation, php shells & moreCode obfuscation, php shells & more
Code obfuscation, php shells & more
 

Similar to Let's write secure Drupal code! - DrupalCamp Belarus 2019

PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
elliando dias
 
12-security.ppt - PHP and Arabic Language - Index
12-security.ppt - PHP and Arabic Language - Index12-security.ppt - PHP and Arabic Language - Index
12-security.ppt - PHP and Arabic Language - Index
webhostingguy
 

Similar to Let's write secure Drupal code! - DrupalCamp Belarus 2019 (20)

Let's write secure Drupal code! - DrupalCamp Spain 2019
Let's write secure Drupal code! - DrupalCamp Spain 2019Let's write secure Drupal code! - DrupalCamp Spain 2019
Let's write secure Drupal code! - DrupalCamp Spain 2019
 
Let's write secure Drupal code! - 13.09.2018 @ Drupal Europe, Darmstadt, Germany
Let's write secure Drupal code! - 13.09.2018 @ Drupal Europe, Darmstadt, GermanyLet's write secure Drupal code! - 13.09.2018 @ Drupal Europe, Darmstadt, Germany
Let's write secure Drupal code! - 13.09.2018 @ Drupal Europe, Darmstadt, Germany
 
Let's write secure Drupal code! Drupal MountainCamp 2019
Let's write secure Drupal code! Drupal MountainCamp 2019Let's write secure Drupal code! Drupal MountainCamp 2019
Let's write secure Drupal code! Drupal MountainCamp 2019
 
Let's write secure Drupal code! - DrupalCamp London 2019
Let's write secure Drupal code! - DrupalCamp London 2019Let's write secure Drupal code! - DrupalCamp London 2019
Let's write secure Drupal code! - DrupalCamp London 2019
 
LET’S WRITE SECURE DRUPAL CODE!
LET’S WRITE SECURE DRUPAL CODE!LET’S WRITE SECURE DRUPAL CODE!
LET’S WRITE SECURE DRUPAL CODE!
 
Let's write secure Drupal code! - DrupalCamp Kyiv 2019
Let's write secure Drupal code! - DrupalCamp Kyiv 2019Let's write secure Drupal code! - DrupalCamp Kyiv 2019
Let's write secure Drupal code! - DrupalCamp Kyiv 2019
 
Let's write secure Drupal code!
Let's write secure Drupal code!Let's write secure Drupal code!
Let's write secure Drupal code!
 
Let's write secure drupal code!
Let's write secure drupal code!Let's write secure drupal code!
Let's write secure drupal code!
 
Broadleaf Presents Thymeleaf
Broadleaf Presents ThymeleafBroadleaf Presents Thymeleaf
Broadleaf Presents Thymeleaf
 
Bag Of Tricks From Iusethis
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
 
Open Source Search: An Analysis
Open Source Search: An AnalysisOpen Source Search: An Analysis
Open Source Search: An Analysis
 
Mojolicious
MojoliciousMojolicious
Mojolicious
 
Ubi comp27nov04
Ubi comp27nov04Ubi comp27nov04
Ubi comp27nov04
 
Daily notes
Daily notesDaily notes
Daily notes
 
Hacking Movable Type
Hacking Movable TypeHacking Movable Type
Hacking Movable Type
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 
Concern of Web Application Security
Concern of Web Application SecurityConcern of Web Application Security
Concern of Web Application Security
 
12-security.ppt - PHP and Arabic Language - Index
12-security.ppt - PHP and Arabic Language - Index12-security.ppt - PHP and Arabic Language - Index
12-security.ppt - PHP and Arabic Language - Index
 
Security.ppt
Security.pptSecurity.ppt
Security.ppt
 
REST with Eve and Python
REST with Eve and PythonREST with Eve and Python
REST with Eve and Python
 

More from Balázs Tatár

More from Balázs Tatár (15)

How To Have Fun in Open Source - CMS Garden Unconference 2019
How To Have Fun in Open Source - CMS Garden Unconference 2019How To Have Fun in Open Source - CMS Garden Unconference 2019
How To Have Fun in Open Source - CMS Garden Unconference 2019
 
Software Development Weaknesses - SecOSdays Sofia, 2019
Software Development Weaknesses - SecOSdays Sofia, 2019Software Development Weaknesses - SecOSdays Sofia, 2019
Software Development Weaknesses - SecOSdays Sofia, 2019
 
Security Awareness for Open Source Web Applications
Security Awareness for Open Source Web ApplicationsSecurity Awareness for Open Source Web Applications
Security Awareness for Open Source Web Applications
 
A bug's life - Decoupled Drupal Security and Vulnerability Management
A bug's life - Decoupled Drupal Security and Vulnerability ManagementA bug's life - Decoupled Drupal Security and Vulnerability Management
A bug's life - Decoupled Drupal Security and Vulnerability Management
 
A bug's life - Drupal Application Security and Vulnerability Management
A bug's life - Drupal Application Security and Vulnerability ManagementA bug's life - Drupal Application Security and Vulnerability Management
A bug's life - Drupal Application Security and Vulnerability Management
 
A bug's life - Drupal Application Security and Vulnerability Management
A bug's life - Drupal Application Security and Vulnerability ManagementA bug's life - Drupal Application Security and Vulnerability Management
A bug's life - Drupal Application Security and Vulnerability Management
 
DrupalCon Seattle 2019 - Mentoring Booth slides
DrupalCon Seattle 2019 - Mentoring Booth slidesDrupalCon Seattle 2019 - Mentoring Booth slides
DrupalCon Seattle 2019 - Mentoring Booth slides
 
Everything You Always Wanted to Know About Drupal Security* (*But Were Afraid...
Everything You Always Wanted to Know About Drupal Security* (*But Were Afraid...Everything You Always Wanted to Know About Drupal Security* (*But Were Afraid...
Everything You Always Wanted to Know About Drupal Security* (*But Were Afraid...
 
Everything You Always Wanted to Know About Drupal Security (*But Were Afraid ...
Everything You Always Wanted to Know About Drupal Security (*But Were Afraid ...Everything You Always Wanted to Know About Drupal Security (*But Were Afraid ...
Everything You Always Wanted to Know About Drupal Security (*But Were Afraid ...
 
Mentoring slides - Drupal Europe, Darmstadt, Germany 2018
Mentoring slides - Drupal Europe, Darmstadt, Germany 2018Mentoring slides - Drupal Europe, Darmstadt, Germany 2018
Mentoring slides - Drupal Europe, Darmstadt, Germany 2018
 
Quality assurance in practice
Quality assurance in practiceQuality assurance in practice
Quality assurance in practice
 
Quality assurance in practice - coffee meeting, January, DIGIT
Quality assurance in practice - coffee meeting, January, DIGITQuality assurance in practice - coffee meeting, January, DIGIT
Quality assurance in practice - coffee meeting, January, DIGIT
 
Quality assurance in practice - brussels drupal meetup
Quality assurance in practice - brussels drupal meetupQuality assurance in practice - brussels drupal meetup
Quality assurance in practice - brussels drupal meetup
 
Quality assurance in practice
Quality assurance in practiceQuality assurance in practice
Quality assurance in practice
 
Drupal 7 - Form API
Drupal 7 - Form APIDrupal 7 - Form API
Drupal 7 - Form API
 

Recently uploaded

Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 

Recently uploaded (20)

Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 

Let's write secure Drupal code! - DrupalCamp Belarus 2019

Editor's Notes

  1. Einstein said: “insanity is when you do the same thing over and over again and expect different results”
  2. Owasp: open web application security project
  3. Reference for the XSS issue that was basically caused by a security misconfiguration.
  4. Hide enabled blocks from selector that are used Context update from this wednesday
  5. Hide enabled blocks from selector that are used Context update from this wednesday
  6. Hide enabled blocks from selector that are used Context update from this wednesday
  7. Not because of having db_query deprecated, but: The $field param is used to derive various table and field names, but in each case the Database API automatically escapes these values. Note that the API does not do this for all arguments!
  8. Not because of having db_query deprecated, but: The $field param is used to derive various table and field names, but in each case the Database API automatically escapes these values. Note that the API does not do this for all arguments!
  9. Not because of having db_query deprecated, but: The $field param is used to derive various table and field names, but in each case the Database API automatically escapes these values. Note that the API does not do this for all arguments!
  10. Not because of having db_query deprecated, but: The $field param is used to derive various table and field names, but in each case the Database API automatically escapes these values. Note that the API does not do this for all arguments!
  11. Mt_rand is not secure enough!
  12. Insecure randomness by Mass Password Reset (SA-CONTRIB-2018-043) by Greg Knaddison