Leveraging Magento 2 to Combat the OWASP Top

Leveraging Magento 2 to Combat the OWASP Top

Sample Title Leveraging Magento 2 to defend against The OWASP Top Ten 2016 / Opatija / Croatia Talesh Seeparsan Magento Security podcast – magedef.com http://tale.sh/croatia-16 2016 / Opatija / Croatia Average total organizational cost of a data breach Measured in US $ (millions) “While the cost of data breach stayed relatively constant for most industries, the retail sector experienced a significant increase…in 2015.” -2015 Cost of Data Breach Study: Global Analysis http://tale.sh/ponemon-2015 2016 / Opatija / Croatia Prevention vs Cure The OWASP Top Ten • Flagship publication of the OWASP Foundation • OWASP are the unsung heroes of web security Important: This talk does not suggest that OWASP Foundation endorses anything I say or certify compliance of the Magento platform 2016 / Opatija / Croatia Our Approach • What are the top ten? • Features built into Magento 2 you should be using. 2016 / Opatija / Croatia A1 Injection 2016 / Opatija / Croatia https://xkcd.com/327/ A2 Broken Authentication & Session Management • Breaking in through the front door 2016 / Opatija / Croatia A3 Cross Site Scripting : XSS Unauthorized scripts running on your site. HTTP 2016 / Opatija / Croatia A4 Insecure Direct Object References https://mage2.com/customer/address/edit/id/52/ 2016 / Opatija / Croatia A4 Insecure Direct Object References https://mage2.com/customer/address/edit/id/53/ 2016 / Opatija / Croatia A5 Security Misconfiguration • Attack to your application stack • Attack to unnecessary features • Surface of attack 2016 / Opatija / Croatia A6 Sensitive Data Exposure 2016 / Opatija / Croatia A6 Sensitive Data Exposure 2016 / Opatija / Croatia A7 Missing Function-Level Access Control 2016 / Opatija / Croatia A7 Missing Function-Level Access Control 2016 / Opatija / Croatia A8 Cross-Site Request Forgery (CSRF) • Trick an authenticated user to POST information on your site 2016 / Opatija / Croatia A8 Cross-Site Request Forgery (CSRF) • Trick an authenticated user to POST information on your site POST 2016 / Opatija / Croatia A9 Using Components with Known Vulnerabilities A10 Unvalidated Redirects and Forwards 2016 / Opatija / Croatia Magento 2 Builtin Defenses Use the Magento 2 ORM • Handcoded SQL queries • Robust framework that facilitates Server side input validation Defends against Injection and XSS 2016 / Opatija / Croatia The Magento 2 Escaper Implementation: /lib/internal/Magento/Framework/Escaper.php Usage: <?php echo $this->escapeHtml(__($this->variable); ?> Defends against XSS 2016 / Opatija / Croatia CSRF Defense : Anti Forgery Tokens <?php echo $this->getBlockHtml('formkey')?> Defends against CSRF 2016 / Opatija / Croatia A8 Cross-Site Request Forgery (CSRF) • Trick an authenticated user to POST information on your site POST 2016 / Opatija / Croatia Defends against CSRF 2016 / Opatija / Croatia Pay attention to cookie permissions • “HttpOnly” flag is set on some important cookies eg: • “admin” cookie • “PHPSESSID” cookie • “X-Magento-Vary” cookie • “Secure” flag is set on some important cookies eg: • “admin” cookie • “X-Magento-Vary” cookie Defends against Broken Authentication 2016 / Opatija / Croatia Rely on the CustomerSession Object public function __construct( Context $context, CustomerSession $customerSession ) { parent::__construct($context, $customerSession); } Defends against risks: Insecure Direct object references Missing function Access control 2016 / Opatija / Croatia Don’t roll your own Crypto! <field id="password" translate="label" type="obscure" showInStore="0“> <label>Password</label> <backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model> </field> Defends against risks: Security Misconfigurations Sensitive data exposure 2016 / Opatija / Croatia Missing function level access control Don’t roll your own Crypto! <field id="password" translate="label" type="obscure" showInStore="0“> <label>Password</label> <backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model> </field> Defends against risks: Security Misconfigurations Sensitive data exposure 2016 / Opatija / Croatia Missing function level access control Use Composer Defends against using vulnerable components 2016 / Opatija / Croatia A plea Defends against using vulnerable components 2016 / Opatija / Croatia Thank You! https://community.magento.com/ https://magento.stackexchange.com/ https://owasp.org/ https://twitter.com/_Talesh Questions? 2016 / Opatija / Croatia.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    32 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us