SlideShare a Scribd company logo
#mm18nl | @RicTempesta
Riccardo Tempesta - CTO @ MageSpecialist
Magento addicted developer
Magento 1 Certified Developer Plus
Magento 2 Certified Professional Developer
In the top Magento2 contributors list of 2017
Magento Stack Exchange 4% topmost
Proud NERD and GEEK
Something about me…
#mm18nl | @RicTempesta
Magento2
under siege
Data Security and Leakage prevention
#mm18nl | @RicTempesta
70s
Phreaking
80s
Worms / Viruses
(network)
Big companies
EU/US governments
public authorities
Security threats timeline
Data Security and Leakage prevention
#mm18nl | @RicTempesta
70s
Phreaking
80s
Worms / Viruses
(network)
First 90s
Worms / Viruses
(floppy)
Late 90s
Email viruses
Big companies
EU/US governments
public authorities
Small business companies
and final users
Security threats timeline
Data Security and Leakage prevention
#mm18nl | @RicTempesta
70s
Phreaking
80s
Worms / Viruses
(network)
First 90s
Worms / Viruses
(floppy)
Late 90s
Email viruses
Big companies
EU/US governments
public authorities
Small business companies
and final users
Security threats timeline
2000s
Spywares
2010s
Websites
Malwares
Users personal
information
Data Security and Leakage prevention
Users information
and
personal data
are the main
targets today
#mm18nl | @RicTempesta
Data Security and Leakage prevention
And the number of hackers and
“hackers wannabe” has drastically
increased…
#mm18nl | @RicTempesta
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Are you asking why?
Data Security and Leakage prevention
The hacker cliché in 80s-90s
#mm18nl | @RicTempesta
No social life
Few friends
«Genious»
NOT so cool
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Only few movies had
cool hackers
#mm18nl | @RicTempesta
Data Security and Leakage prevention
«War Games»
If you do not remeber
this movie you are too
young or not enough
NERD to be here!
Data Security and Leakage prevention
The hacker cliché in 2010s
#mm18nl | @RicTempesta
Still no social life
Still few friends
Still genious
But cool!
Data Security and Leakage prevention
#mm18nl | @RicTempesta
And this is why,
today everybody
wants
to be a hacker
Data Security and Leakage prevention
#mm18nl | @RicTempesta
A considerable amount
of hacking tools are
available today.
Data Security and Leakage prevention
#mm18nl | @RicTempesta
It is incredible,
but they are
user friendly!
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Security issues are
only happening to
other people…
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Even if Magento 2 is one of the
MOST SECURE E-COMMERCE SOLUTIONS
We must be aware that we could
accidentally introduce security holes with:
• Unsecure 3rd party modules
• Bad programming
• Misconfigurations
Using Magento is not enough…
Data Security and Leakage prevention
#mm18nl | @RicTempesta
I will try to scare
you for the next 10
minutes with “real
examples”
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Example #1: Data leakage
Beware of unverified 3rd party modules
Data Security and Leakage prevention
#mm18nl | @RicTempesta
A Magento merchant
Installed a 3rd party extension from a famous
company providing e-commerce services.
After few days he experienced multiple
unauthorized backend accesses.
Data Security and Leakage prevention
#mm18nl | @RicTempesta
<?php
namespace SomeVendorModel;
...
class SomeClass implements SomeClassInterface
{
...
public function getSomething()
{
$connection = $this->getConnection();
$filter = $this->request->getParam('filter’);
$qry = "select body from some_table where=" . $filter;
return $connection->fetchAll($qry);
}
...
}
What we found:
Data Security and Leakage prevention
#mm18nl | @RicTempesta
<?php
namespace SomeVendorModel;
...
class SomeClass implements SomeClassInterface
{
...
public function getSomething()
{
$connection = $this->getConnection();
$filter = $this->request->getParam('filter’);
$qry = "select body from some_table where=" . $filter;
return $connection->fetchAll($qry);
}
...
}
What we found:
Blind SQL injection
Data Security and Leakage prevention
#mm18nl | @RicTempesta
http://mysite/my/awesome/module?filter=title%3da+story
Everything is fine if we use it in the expected way:
Data Security and Leakage prevention
#mm18nl | @RicTempesta
…?filter=title%3da+story;+drop+database+magento;
This will NOT work:
Because PHP does not allow multiple queries in one time
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Data Security and Leakage prevention
#mm18nl | @RicTempesta
…?filter=1+union+select+something+from+somewhere
But this will work:
This is called «union select attack»
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Let’s see what a malicious
user can do with SQLMap:
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Video #1
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Passwords are protected
Magento2 uses a SHA-256 hashing salt + pwd
algorithm to protect passwords.
But a malicious user can always run
a brute force off-line attack.
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Let’s see what can happen with “HashCat”
A tool able to run brute force attacks using the
Graphical Card GPU.
Up to 500MH/s with a standard video card
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Video #2
Data Security and Leakage prevention
#mm18nl | @RicTempesta
In 2015
56% of apps included at least one SQL injection
Source: https://thehackernews.com/2015/12/programming-language-security.html
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Most of the people will use the
same password both for PayPal
and your Magento store.
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Protecting passwords with BlindHash
Clear password SHA-256 hashed password
Fully encrypted password
https://www.blindhash.com/
Offline attacks complete protection
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Example #2: Full control
A common pitfall
Data Security and Leakage prevention
#mm18nl | @RicTempesta
A Magento merchant
Discovered something strange on his website.
Someone was able to change the pages content.
But no database/filesystem changes
were detected.
Data Security and Leakage prevention
#mm18nl | @RicTempesta
<?php
namespace SomeVendorBlock;
...
class SomeClass extends Template
{
...
public function getWelcomeText()
{
$name = $this->request->getParam(‘name’);
return __(‘Hello %1’, $name);
}
...
}
What we found:
Data Security and Leakage prevention
#mm18nl | @RicTempesta
<?php
/** @var SomeBlockClass $block */
?>
...
<?= $block->getWelcomeText() ?>
...
What we found:
Data Security and Leakage prevention
#mm18nl | @RicTempesta
http://mysite/my/awesome/module?name=Riccardo
Everything is fine if we use it in the expected way:
Data Security and Leakage prevention
#mm18nl | @RicTempesta
http://mysite/my/awesome/module?name=%3Cscript%3Eale
rt%28%27hello%20world%27%29%3C%2Fscript%3E
But, what if we replace it with a JavaScript code?
<script>alert('hello world')</script>
This code will run in your HTML document:
Data Security and Leakage prevention
#mm18nl | @RicTempesta
XSS injection:
Request containing the JavaScript
Response containing the Javascript
Data Security and Leakage prevention
#mm18nl | @RicTempesta
XSS injection (example):
Response containing the Javascript
Email with a link containing
the malicious JavaScript code
Click on the link
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Data Security and Leakage prevention
#mm18nl | @RicTempesta
One of your customers receives an email like this one:
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Data Security and Leakage prevention
#mm18nl | @RicTempesta
https://bit.ly/mm18demo
Data Security and Leakage prevention
#mm18nl | @RicTempesta
https://bit.ly/mm18demo-xss
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Video #3
Data Security and Leakage prevention
#mm18nl | @RicTempesta
In 2015
86% of apps included at least
one XSS vulnerability
Source: https://thehackernews.com/2015/12/programming-language-security.html
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Prevent and protect…
Data Security and Leakage prevention
#mm18nl | @RicTempesta
When you say «Magento», you
are not talking about a
software, you are talking about
a community.
No community can exist
without contributions.
When you say “Magento”:
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Detecting malwares
If you think you have been hacked:
https://github.com/gwillem/magento-malware-scanner
by Willem de Groot
ClamAV can be helpful for known PHP/JS malwares:
:~$ clamscan -r --bell -i /my/magento/path
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Our company’s contribution
to Magento 2 security:
● Two Factor Authentication
● Google reCaptcha
● Malicious IP filter
● Malware upload filter
● Admin IP restriction
● Magento IPS/IDS Shield
Our free contribution to security
Data Security and Leakage prevention
#mm18nl | @RicTempesta
Our company’s contribution
to Magento 2 security:
● Two Factor Authentication
● Google reCaptcha
● Malicious IP filter
● Malware upload filter
● Admin IP restriction
● Magento IPS/IDS Shield
Our free contribution to security
I can proudly say:
“They will be part of Magento 2.3”
Data Security and Leakage prevention
#mm18nl | @RicTempesta
MSP Notifier framework:
● Real Time notifications on:
● Telegram
● E-Mail
● Slack
● …
● Events based notifications
Another free contribution to security
Data Security and Leakage prevention
#mm18nl | @RicTempesta
MSP Notifier framework:
● Real Time notifications on:
● Telegram
● E-Mail
● Slack
● …
● Events based notifications
Another free contribution to security
Data Security and Leakage prevention
#mm18nl | @RicTempesta
I hope you enjoyed my speech
THANK YOU!
Data Security and Leakage prevention
#mm18nl | @RicTempesta
THANK YOU!
KEEP CALM
AND
KEEP HACKING
Github:
MageSpecialist
Twitter:
@RicTempesta
Please do not hack my accounts...

More Related Content

Similar to MeetMagento NL 2018 - Riccardo Tempesta - Magento 2 under siege

IT Risk Management
IT Risk ManagementIT Risk Management
IT Risk Management
Tudor Damian
 
Trend Micro 10 Minute Overview
Trend Micro 10 Minute OverviewTrend Micro 10 Minute Overview
Trend Micro 10 Minute Overview
John D. Haden
 
Security Opportunities A Silicon Valley VC Perspective
Security Opportunities  A Silicon Valley VC PerspectiveSecurity Opportunities  A Silicon Valley VC Perspective
Security Opportunities A Silicon Valley VC Perspective
Positive Hack Days
 
Must Know Cyber Security Stats of 2016
Must Know Cyber Security Stats of 2016Must Know Cyber Security Stats of 2016
Must Know Cyber Security Stats of 2016
DWP Information Architects Inc.
 
2016, A New Era of OS and Cloud Security - Tudor Damian
2016, A New Era of OS and Cloud Security - Tudor Damian2016, A New Era of OS and Cloud Security - Tudor Damian
2016, A New Era of OS and Cloud Security - Tudor Damian
ITCamp
 
Key note in nyc the next breach target and how oracle can help - nyoug
Key note in nyc   the next breach target and how oracle can help - nyougKey note in nyc   the next breach target and how oracle can help - nyoug
Key note in nyc the next breach target and how oracle can help - nyoug
Ulf Mattsson
 
CompTIA powered Cybersecurity Apprenticeships
CompTIA powered Cybersecurity ApprenticeshipsCompTIA powered Cybersecurity Apprenticeships
CompTIA powered Cybersecurity Apprenticeships
Zeshan Sattar
 
2016, A new era of OS and Cloud Security
2016, A new era of OS and Cloud Security2016, A new era of OS and Cloud Security
2016, A new era of OS and Cloud Security
Tudor Damian
 
chatgpt-privacy and security.pptx
chatgpt-privacy and security.pptxchatgpt-privacy and security.pptx
chatgpt-privacy and security.pptx
Deepak Kumar
 
Will Your Business Get Hacked - Peterborough (Apr 28)
Will Your Business Get Hacked - Peterborough (Apr 28)Will Your Business Get Hacked - Peterborough (Apr 28)
Will Your Business Get Hacked - Peterborough (Apr 28)
Kamarin Computers Ltd
 
Will Your Business Get Hacked - Hull (Apr 28)
Will Your Business Get Hacked - Hull (Apr 28)Will Your Business Get Hacked - Hull (Apr 28)
Will Your Business Get Hacked - Hull (Apr 28)
HBP Systems Ltd
 
Security Industry Overview
Security Industry OverviewSecurity Industry Overview
Security Industry Overview
Thomvest Ventures
 
Open Source Insight: Meltdown, Spectre Security Flaws “Impact Everything”
Open Source Insight: Meltdown, Spectre Security Flaws “Impact Everything”Open Source Insight: Meltdown, Spectre Security Flaws “Impact Everything”
Open Source Insight: Meltdown, Spectre Security Flaws “Impact Everything”
Black Duck by Synopsys
 
The rise of privacy & personal data in the IT business - Claudia Jelea
The rise of privacy & personal data in the IT business - Claudia JeleaThe rise of privacy & personal data in the IT business - Claudia Jelea
The rise of privacy & personal data in the IT business - Claudia Jelea
ITCamp
 
ITCamp 2016: The rise of privacy and personal data in the IT business
ITCamp 2016: The rise of privacy and personal data in the IT businessITCamp 2016: The rise of privacy and personal data in the IT business
ITCamp 2016: The rise of privacy and personal data in the IT business
claudiajelea
 
ITCamp 2018 - Walter Belgers - Lockpicking and IT security
ITCamp 2018 - Walter Belgers - Lockpicking and IT securityITCamp 2018 - Walter Belgers - Lockpicking and IT security
ITCamp 2018 - Walter Belgers - Lockpicking and IT security
ITCamp
 
The future of FinTech product using pervasive Machine Learning automation - A...
The future of FinTech product using pervasive Machine Learning automation - A...The future of FinTech product using pervasive Machine Learning automation - A...
The future of FinTech product using pervasive Machine Learning automation - A...
Shift Conference
 
Modern cybersecurity threats, and shiny new tools to help deal with them - T...
 Modern cybersecurity threats, and shiny new tools to help deal with them - T... Modern cybersecurity threats, and shiny new tools to help deal with them - T...
Modern cybersecurity threats, and shiny new tools to help deal with them - T...
ITCamp
 
Smash antivirus Slides
Smash antivirus SlidesSmash antivirus Slides
Smash antivirus Slides
NAVEED IQBAL
 
ITCamp 2018 - Tudor Damian - The cybersecurity landscape is changing. Are you...
ITCamp 2018 - Tudor Damian - The cybersecurity landscape is changing. Are you...ITCamp 2018 - Tudor Damian - The cybersecurity landscape is changing. Are you...
ITCamp 2018 - Tudor Damian - The cybersecurity landscape is changing. Are you...
ITCamp
 

Similar to MeetMagento NL 2018 - Riccardo Tempesta - Magento 2 under siege (20)

IT Risk Management
IT Risk ManagementIT Risk Management
IT Risk Management
 
Trend Micro 10 Minute Overview
Trend Micro 10 Minute OverviewTrend Micro 10 Minute Overview
Trend Micro 10 Minute Overview
 
Security Opportunities A Silicon Valley VC Perspective
Security Opportunities  A Silicon Valley VC PerspectiveSecurity Opportunities  A Silicon Valley VC Perspective
Security Opportunities A Silicon Valley VC Perspective
 
Must Know Cyber Security Stats of 2016
Must Know Cyber Security Stats of 2016Must Know Cyber Security Stats of 2016
Must Know Cyber Security Stats of 2016
 
2016, A New Era of OS and Cloud Security - Tudor Damian
2016, A New Era of OS and Cloud Security - Tudor Damian2016, A New Era of OS and Cloud Security - Tudor Damian
2016, A New Era of OS and Cloud Security - Tudor Damian
 
Key note in nyc the next breach target and how oracle can help - nyoug
Key note in nyc   the next breach target and how oracle can help - nyougKey note in nyc   the next breach target and how oracle can help - nyoug
Key note in nyc the next breach target and how oracle can help - nyoug
 
CompTIA powered Cybersecurity Apprenticeships
CompTIA powered Cybersecurity ApprenticeshipsCompTIA powered Cybersecurity Apprenticeships
CompTIA powered Cybersecurity Apprenticeships
 
2016, A new era of OS and Cloud Security
2016, A new era of OS and Cloud Security2016, A new era of OS and Cloud Security
2016, A new era of OS and Cloud Security
 
chatgpt-privacy and security.pptx
chatgpt-privacy and security.pptxchatgpt-privacy and security.pptx
chatgpt-privacy and security.pptx
 
Will Your Business Get Hacked - Peterborough (Apr 28)
Will Your Business Get Hacked - Peterborough (Apr 28)Will Your Business Get Hacked - Peterborough (Apr 28)
Will Your Business Get Hacked - Peterborough (Apr 28)
 
Will Your Business Get Hacked - Hull (Apr 28)
Will Your Business Get Hacked - Hull (Apr 28)Will Your Business Get Hacked - Hull (Apr 28)
Will Your Business Get Hacked - Hull (Apr 28)
 
Security Industry Overview
Security Industry OverviewSecurity Industry Overview
Security Industry Overview
 
Open Source Insight: Meltdown, Spectre Security Flaws “Impact Everything”
Open Source Insight: Meltdown, Spectre Security Flaws “Impact Everything”Open Source Insight: Meltdown, Spectre Security Flaws “Impact Everything”
Open Source Insight: Meltdown, Spectre Security Flaws “Impact Everything”
 
The rise of privacy & personal data in the IT business - Claudia Jelea
The rise of privacy & personal data in the IT business - Claudia JeleaThe rise of privacy & personal data in the IT business - Claudia Jelea
The rise of privacy & personal data in the IT business - Claudia Jelea
 
ITCamp 2016: The rise of privacy and personal data in the IT business
ITCamp 2016: The rise of privacy and personal data in the IT businessITCamp 2016: The rise of privacy and personal data in the IT business
ITCamp 2016: The rise of privacy and personal data in the IT business
 
ITCamp 2018 - Walter Belgers - Lockpicking and IT security
ITCamp 2018 - Walter Belgers - Lockpicking and IT securityITCamp 2018 - Walter Belgers - Lockpicking and IT security
ITCamp 2018 - Walter Belgers - Lockpicking and IT security
 
The future of FinTech product using pervasive Machine Learning automation - A...
The future of FinTech product using pervasive Machine Learning automation - A...The future of FinTech product using pervasive Machine Learning automation - A...
The future of FinTech product using pervasive Machine Learning automation - A...
 
Modern cybersecurity threats, and shiny new tools to help deal with them - T...
 Modern cybersecurity threats, and shiny new tools to help deal with them - T... Modern cybersecurity threats, and shiny new tools to help deal with them - T...
Modern cybersecurity threats, and shiny new tools to help deal with them - T...
 
Smash antivirus Slides
Smash antivirus SlidesSmash antivirus Slides
Smash antivirus Slides
 
ITCamp 2018 - Tudor Damian - The cybersecurity landscape is changing. Are you...
ITCamp 2018 - Tudor Damian - The cybersecurity landscape is changing. Are you...ITCamp 2018 - Tudor Damian - The cybersecurity landscape is changing. Are you...
ITCamp 2018 - Tudor Damian - The cybersecurity landscape is changing. Are you...
 

Recently uploaded

原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
gpww3sf4
 
ASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdfASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdf
ToshihiroIto4
 
Why Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdf
Why Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdfWhy Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdf
Why Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdf
Ben Linders
 
Disaster Management project for holidays homework and other uses
Disaster Management project for holidays homework and other usesDisaster Management project for holidays homework and other uses
Disaster Management project for holidays homework and other uses
RIDHIMAGARG21
 
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
OECD Directorate for Financial and Enterprise Affairs
 
The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...
The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...
The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...
OECD Directorate for Financial and Enterprise Affairs
 
The Intersection between Competition and Data Privacy – COLANGELO – June 2024...
The Intersection between Competition and Data Privacy – COLANGELO – June 2024...The Intersection between Competition and Data Privacy – COLANGELO – June 2024...
The Intersection between Competition and Data Privacy – COLANGELO – June 2024...
OECD Directorate for Financial and Enterprise Affairs
 
Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
gharris9
 
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
OECD Directorate for Financial and Enterprise Affairs
 
Artificial Intelligence, Data and Competition – OECD – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – OECD – June 2024 OECD discussionArtificial Intelligence, Data and Competition – OECD – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – OECD – June 2024 OECD discussion
OECD Directorate for Financial and Enterprise Affairs
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
Frederic Leger
 
XP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to LeadershipXP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to Leadership
samililja
 
IEEE CIS Webinar Sustainable futures.pdf
IEEE CIS Webinar Sustainable futures.pdfIEEE CIS Webinar Sustainable futures.pdf
IEEE CIS Webinar Sustainable futures.pdf
Claudio Gallicchio
 
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussionPro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
OECD Directorate for Financial and Enterprise Affairs
 
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij
 
Carrer goals.pptx and their importance in real life
Carrer goals.pptx  and their importance in real lifeCarrer goals.pptx  and their importance in real life
Carrer goals.pptx and their importance in real life
artemacademy2
 
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussionPro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
OECD Directorate for Financial and Enterprise Affairs
 
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsCollapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Rosie Wells
 
Using-Presentation-Software-to-the-Fullf.pptx
Using-Presentation-Software-to-the-Fullf.pptxUsing-Presentation-Software-to-the-Fullf.pptx
Using-Presentation-Software-to-the-Fullf.pptx
kainatfatyma9
 
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussionArtificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
OECD Directorate for Financial and Enterprise Affairs
 

Recently uploaded (20)

原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
 
ASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdfASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdf
 
Why Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdf
Why Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdfWhy Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdf
Why Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdf
 
Disaster Management project for holidays homework and other uses
Disaster Management project for holidays homework and other usesDisaster Management project for holidays homework and other uses
Disaster Management project for holidays homework and other uses
 
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
 
The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...
The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...
The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...
 
The Intersection between Competition and Data Privacy – COLANGELO – June 2024...
The Intersection between Competition and Data Privacy – COLANGELO – June 2024...The Intersection between Competition and Data Privacy – COLANGELO – June 2024...
The Intersection between Competition and Data Privacy – COLANGELO – June 2024...
 
Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
 
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
 
Artificial Intelligence, Data and Competition – OECD – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – OECD – June 2024 OECD discussionArtificial Intelligence, Data and Competition – OECD – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – OECD – June 2024 OECD discussion
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
 
XP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to LeadershipXP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to Leadership
 
IEEE CIS Webinar Sustainable futures.pdf
IEEE CIS Webinar Sustainable futures.pdfIEEE CIS Webinar Sustainable futures.pdf
IEEE CIS Webinar Sustainable futures.pdf
 
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussionPro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
 
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
 
Carrer goals.pptx and their importance in real life
Carrer goals.pptx  and their importance in real lifeCarrer goals.pptx  and their importance in real life
Carrer goals.pptx and their importance in real life
 
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussionPro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
 
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsCollapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
 
Using-Presentation-Software-to-the-Fullf.pptx
Using-Presentation-Software-to-the-Fullf.pptxUsing-Presentation-Software-to-the-Fullf.pptx
Using-Presentation-Software-to-the-Fullf.pptx
 
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussionArtificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
 

MeetMagento NL 2018 - Riccardo Tempesta - Magento 2 under siege

  • 1. #mm18nl | @RicTempesta Riccardo Tempesta - CTO @ MageSpecialist Magento addicted developer Magento 1 Certified Developer Plus Magento 2 Certified Professional Developer In the top Magento2 contributors list of 2017 Magento Stack Exchange 4% topmost Proud NERD and GEEK Something about me…
  • 3. Data Security and Leakage prevention #mm18nl | @RicTempesta 70s Phreaking 80s Worms / Viruses (network) Big companies EU/US governments public authorities Security threats timeline
  • 4. Data Security and Leakage prevention #mm18nl | @RicTempesta 70s Phreaking 80s Worms / Viruses (network) First 90s Worms / Viruses (floppy) Late 90s Email viruses Big companies EU/US governments public authorities Small business companies and final users Security threats timeline
  • 5. Data Security and Leakage prevention #mm18nl | @RicTempesta 70s Phreaking 80s Worms / Viruses (network) First 90s Worms / Viruses (floppy) Late 90s Email viruses Big companies EU/US governments public authorities Small business companies and final users Security threats timeline 2000s Spywares 2010s Websites Malwares Users personal information
  • 6. Data Security and Leakage prevention Users information and personal data are the main targets today #mm18nl | @RicTempesta
  • 7. Data Security and Leakage prevention And the number of hackers and “hackers wannabe” has drastically increased… #mm18nl | @RicTempesta
  • 8. Data Security and Leakage prevention #mm18nl | @RicTempesta Are you asking why?
  • 9. Data Security and Leakage prevention The hacker cliché in 80s-90s #mm18nl | @RicTempesta No social life Few friends «Genious» NOT so cool
  • 10. Data Security and Leakage prevention #mm18nl | @RicTempesta Only few movies had cool hackers
  • 11. #mm18nl | @RicTempesta Data Security and Leakage prevention «War Games» If you do not remeber this movie you are too young or not enough NERD to be here!
  • 12. Data Security and Leakage prevention The hacker cliché in 2010s #mm18nl | @RicTempesta Still no social life Still few friends Still genious But cool!
  • 13. Data Security and Leakage prevention #mm18nl | @RicTempesta And this is why, today everybody wants to be a hacker
  • 14. Data Security and Leakage prevention #mm18nl | @RicTempesta A considerable amount of hacking tools are available today.
  • 15. Data Security and Leakage prevention #mm18nl | @RicTempesta It is incredible, but they are user friendly!
  • 16. Data Security and Leakage prevention #mm18nl | @RicTempesta Security issues are only happening to other people…
  • 17. Data Security and Leakage prevention #mm18nl | @RicTempesta Even if Magento 2 is one of the MOST SECURE E-COMMERCE SOLUTIONS We must be aware that we could accidentally introduce security holes with: • Unsecure 3rd party modules • Bad programming • Misconfigurations Using Magento is not enough…
  • 18. Data Security and Leakage prevention #mm18nl | @RicTempesta I will try to scare you for the next 10 minutes with “real examples”
  • 19. Data Security and Leakage prevention #mm18nl | @RicTempesta Example #1: Data leakage Beware of unverified 3rd party modules
  • 20. Data Security and Leakage prevention #mm18nl | @RicTempesta A Magento merchant Installed a 3rd party extension from a famous company providing e-commerce services. After few days he experienced multiple unauthorized backend accesses.
  • 21. Data Security and Leakage prevention #mm18nl | @RicTempesta <?php namespace SomeVendorModel; ... class SomeClass implements SomeClassInterface { ... public function getSomething() { $connection = $this->getConnection(); $filter = $this->request->getParam('filter’); $qry = "select body from some_table where=" . $filter; return $connection->fetchAll($qry); } ... } What we found:
  • 22. Data Security and Leakage prevention #mm18nl | @RicTempesta <?php namespace SomeVendorModel; ... class SomeClass implements SomeClassInterface { ... public function getSomething() { $connection = $this->getConnection(); $filter = $this->request->getParam('filter’); $qry = "select body from some_table where=" . $filter; return $connection->fetchAll($qry); } ... } What we found: Blind SQL injection
  • 23. Data Security and Leakage prevention #mm18nl | @RicTempesta http://mysite/my/awesome/module?filter=title%3da+story Everything is fine if we use it in the expected way:
  • 24. Data Security and Leakage prevention #mm18nl | @RicTempesta …?filter=title%3da+story;+drop+database+magento; This will NOT work: Because PHP does not allow multiple queries in one time
  • 25. Data Security and Leakage prevention #mm18nl | @RicTempesta
  • 26. Data Security and Leakage prevention #mm18nl | @RicTempesta
  • 27. Data Security and Leakage prevention #mm18nl | @RicTempesta …?filter=1+union+select+something+from+somewhere But this will work: This is called «union select attack»
  • 28. Data Security and Leakage prevention #mm18nl | @RicTempesta Let’s see what a malicious user can do with SQLMap:
  • 29. Data Security and Leakage prevention #mm18nl | @RicTempesta Video #1
  • 30. Data Security and Leakage prevention #mm18nl | @RicTempesta Passwords are protected Magento2 uses a SHA-256 hashing salt + pwd algorithm to protect passwords. But a malicious user can always run a brute force off-line attack.
  • 31. Data Security and Leakage prevention #mm18nl | @RicTempesta Let’s see what can happen with “HashCat” A tool able to run brute force attacks using the Graphical Card GPU. Up to 500MH/s with a standard video card
  • 32. Data Security and Leakage prevention #mm18nl | @RicTempesta Video #2
  • 33. Data Security and Leakage prevention #mm18nl | @RicTempesta In 2015 56% of apps included at least one SQL injection Source: https://thehackernews.com/2015/12/programming-language-security.html
  • 34. Data Security and Leakage prevention #mm18nl | @RicTempesta Most of the people will use the same password both for PayPal and your Magento store.
  • 35. Data Security and Leakage prevention #mm18nl | @RicTempesta Protecting passwords with BlindHash Clear password SHA-256 hashed password Fully encrypted password https://www.blindhash.com/ Offline attacks complete protection
  • 36. Data Security and Leakage prevention #mm18nl | @RicTempesta Example #2: Full control A common pitfall
  • 37. Data Security and Leakage prevention #mm18nl | @RicTempesta A Magento merchant Discovered something strange on his website. Someone was able to change the pages content. But no database/filesystem changes were detected.
  • 38. Data Security and Leakage prevention #mm18nl | @RicTempesta <?php namespace SomeVendorBlock; ... class SomeClass extends Template { ... public function getWelcomeText() { $name = $this->request->getParam(‘name’); return __(‘Hello %1’, $name); } ... } What we found:
  • 39. Data Security and Leakage prevention #mm18nl | @RicTempesta <?php /** @var SomeBlockClass $block */ ?> ... <?= $block->getWelcomeText() ?> ... What we found:
  • 40. Data Security and Leakage prevention #mm18nl | @RicTempesta http://mysite/my/awesome/module?name=Riccardo Everything is fine if we use it in the expected way:
  • 41. Data Security and Leakage prevention #mm18nl | @RicTempesta http://mysite/my/awesome/module?name=%3Cscript%3Eale rt%28%27hello%20world%27%29%3C%2Fscript%3E But, what if we replace it with a JavaScript code? <script>alert('hello world')</script> This code will run in your HTML document:
  • 42. Data Security and Leakage prevention #mm18nl | @RicTempesta XSS injection: Request containing the JavaScript Response containing the Javascript
  • 43. Data Security and Leakage prevention #mm18nl | @RicTempesta XSS injection (example): Response containing the Javascript Email with a link containing the malicious JavaScript code Click on the link
  • 44. Data Security and Leakage prevention #mm18nl | @RicTempesta
  • 45. Data Security and Leakage prevention #mm18nl | @RicTempesta
  • 46. Data Security and Leakage prevention #mm18nl | @RicTempesta One of your customers receives an email like this one:
  • 47. Data Security and Leakage prevention #mm18nl | @RicTempesta
  • 48. Data Security and Leakage prevention #mm18nl | @RicTempesta https://bit.ly/mm18demo
  • 49. Data Security and Leakage prevention #mm18nl | @RicTempesta https://bit.ly/mm18demo-xss
  • 50. Data Security and Leakage prevention #mm18nl | @RicTempesta Video #3
  • 51. Data Security and Leakage prevention #mm18nl | @RicTempesta In 2015 86% of apps included at least one XSS vulnerability Source: https://thehackernews.com/2015/12/programming-language-security.html
  • 52. Data Security and Leakage prevention #mm18nl | @RicTempesta Prevent and protect…
  • 53. Data Security and Leakage prevention #mm18nl | @RicTempesta When you say «Magento», you are not talking about a software, you are talking about a community. No community can exist without contributions. When you say “Magento”:
  • 54. Data Security and Leakage prevention #mm18nl | @RicTempesta Detecting malwares If you think you have been hacked: https://github.com/gwillem/magento-malware-scanner by Willem de Groot ClamAV can be helpful for known PHP/JS malwares: :~$ clamscan -r --bell -i /my/magento/path
  • 55. Data Security and Leakage prevention #mm18nl | @RicTempesta Our company’s contribution to Magento 2 security: ● Two Factor Authentication ● Google reCaptcha ● Malicious IP filter ● Malware upload filter ● Admin IP restriction ● Magento IPS/IDS Shield Our free contribution to security
  • 56. Data Security and Leakage prevention #mm18nl | @RicTempesta Our company’s contribution to Magento 2 security: ● Two Factor Authentication ● Google reCaptcha ● Malicious IP filter ● Malware upload filter ● Admin IP restriction ● Magento IPS/IDS Shield Our free contribution to security I can proudly say: “They will be part of Magento 2.3”
  • 57. Data Security and Leakage prevention #mm18nl | @RicTempesta MSP Notifier framework: ● Real Time notifications on: ● Telegram ● E-Mail ● Slack ● … ● Events based notifications Another free contribution to security
  • 58. Data Security and Leakage prevention #mm18nl | @RicTempesta MSP Notifier framework: ● Real Time notifications on: ● Telegram ● E-Mail ● Slack ● … ● Events based notifications Another free contribution to security
  • 59. Data Security and Leakage prevention #mm18nl | @RicTempesta I hope you enjoyed my speech THANK YOU!
  • 60. Data Security and Leakage prevention #mm18nl | @RicTempesta THANK YOU! KEEP CALM AND KEEP HACKING Github: MageSpecialist Twitter: @RicTempesta Please do not hack my accounts...