Hack-proof Your Drupal App. Key Habits of Secure Drupal Coding



Similar documents
Hack-proof Your Drupal App. Key Habits of Secure Drupal Coding

DIPLOMA IN WEBDEVELOPMENT

Adobe Systems Incorporated

(WAPT) Web Application Penetration Testing

What about MongoDB? can req.body.input 0; var date = new Date(); do {curdate = new Date();} while(curdate-date<10000)

Hack Proof Your Webapps

5 Mistakes to Avoid on Your Drupal Website

Web Application Security

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

Exploiting Web 2.0 Next Generation Vulnerabilities

Creating Stronger, Safer, Web Facing Code. JPL IT Security Mary Rivera June 17, 2011

Attack Vector Detail Report Atlassian

SQL Injection Vulnerabilities in Desktop Applications

Is Drupal secure? A high-level perspective on web vulnerabilities, Drupal s solutions, and how to maintain site security

Drupal 8. Core and API Changes Shabir Ahmad MS Software Engg. NUST Principal Software Engineser PHP/Drupal

Check list for web developers

Magento Security and Vulnerabilities. Roman Stepanov

Web Application Security. Vulnerabilities, Weakness and Countermeasures. Massimo Cotelli CISSP. Secure

Web Application Vulnerability Testing with Nessus

SECURE APPLICATION DEVELOPMENT CODING POLICY OCIO TABLE OF CONTENTS

Developing ASP.NET MVC 4 Web Applications MOC 20486

We protect you applications! No, you don t. Digicomp Hacking Day 2013 May 16 th 2013

Testing the OWASP Top 10 Security Issues

Cross Site Scripting (XSS) and PHP Security. Anthony Ferrara NYPHP and OWASP Security Series June 30, 2011

Web-Application Security

Secure Application Development with the Zend Framework

Implementation of Web Application Security Solution using Open Source Gaurav Gupta 1, B. K. Murthy 2, P. N. Barwal 3

OWASP TOP 10 ILIA

No SQL! no injection? A talk on the state of NoSQL security

SQL INJECTION ATTACKS By Zelinski Radu, Technical University of Moldova

External Network & Web Application Assessment. For The XXX Group LLC October 2012

Advanced Web Technology 10) XSS, CSRF and SQL Injection 2

Drupal Security. A High-Level Perspective on Web Vulnerabilities, Solutions and Tips for Securing Your Drupal Website

Web Application Guidelines

Cracking the Perimeter via Web Application Hacking. Zach Grace, CISSP, CEH January 17, Mega Conference

Using PHPIDS to Understand Attacks

State of The Art: Automated Black Box Web Application Vulnerability Testing. Jason Bau, Elie Bursztein, Divij Gupta, John Mitchell

How to break in. Tecniche avanzate di pen testing in ambito Web Application, Internal Network and Social Engineering

Web Application Security Considerations

Enterprise Application Security Workshop Series

OWASP Top Ten Tools and Tactics

NO SQL! NO INJECTION?

MatriXay WEB Application Vulnerability Scanner V Overview. (DAS- WEBScan ) The best WEB application assessment tool

Security Testing with Selenium

Bank Hacking Live! Ofer Maor CTO, Hacktics Ltd. ATC-4, 12 Jun 2006, 4:30PM

External Vulnerability Assessment. -Technical Summary- ABC ORGANIZATION

Security vulnerabilities in new web applications. Ing. Pavol Lupták, CISSP, CEH Lead Security Consultant

Application Layer Encryption: Protecting against Application Logic and Session Theft Attacks. Whitepaper

Automating Security Testing. Mark Fallon Senior Release Manager Oracle

This course provides students with the knowledge and skills to develop ASP.NET MVC 4 web applications.

From Rivals to BFF: WAF & VA Unite OWASP The OWASP Foundation

Ruby on Rails Secure Coding Recommendations

The Prevalence of Flash Vulnerabilities on the Web

FormAPI, AJAX and Node.js

Hacking Web Apps. Detecting and Preventing Web Application Security Problems. Jorge Blanco Alcover. Mike Shema. Technical Editor SYNGRESS

Web Application Attacks and Countermeasures: Case Studies from Financial Systems

Development. Resilient Software. Secure and. Mark S. Merkow Lakshmikanth Raghavan. CRC Press. Taylor& Francis Croup. Taylor St Francis Group,

Thomas Röthlisberger IT Security Analyst

A SQL Injection : Internal Investigation of Injection, Detection and Prevention of SQL Injection Attacks

Adobe ColdFusion 11 Enterprise Edition

MASTER DRUPAL 7 MODULE DEVELOPMENT

Developing ASP.NET MVC 4 Web Applications

Web Application Security Assessment and Vulnerability Mitigation Tests

Build Your Knowledge!

Adobe ColdFusion (2016 release) Enterprise Edition

Security in the Sauce Labs Cloud. Practices and protocols used in Sauce s infrastructure and Sauce Connect

Bug Report. Date: March 19, 2011 Reporter: Chris Jarabek

Security in the Sauce Labs Cloud

CSE598i - Web 2.0 Security OWASP Top 10: The Ten Most Critical Web Application Security Vulnerabilities

2013 MONITORAPP Co., Ltd.

Hacking the WordpressEcosystem

Web Application Penetration Testing

HackMiami Web Application Scanner 2013 PwnOff

ASP.NET MVC Secure Coding 4-Day hands on Course. Course Syllabus

Security Products Development. Leon Juranic

Exploring the Relationship Between Web Application Development Tools and Security

Intro to Web App Builder. Mark Scott, Solutions Engineer, Esri County Government Team

5 Simple Steps to Secure Database Development

Lavastorm Resolution Center 2.2 Release Frequently Asked Questions

Integrating Web Application Security into the IT Curriculum

WHITE PAPER FORTIWEB WEB APPLICATION FIREWALL. Ensuring Compliance for PCI DSS 6.5 and 6.6

Common Security Vulnerabilities in Online Payment Systems

Hack Yourself First. Troy troyhunt.com

Cloud Security Framework (CSF): Gap Analysis & Roadmap

Additional information >>> HERE <<< Online Book Premium WordPress Plugin Developer - Plugin Dynamo

Recon and Mapping Tools and Exploitation Tools in SamuraiWTF Report section Nick Robbins

Cyber Security Challenge Australia 2014

DEVELOP ROBOTS DEVELOPROBOTS. We Innovate Your Business

Securing and Accelerating Databases In Minutes using GreenSQL

The Evolution of Enterprise Application Security. Why enterprises need runtime application self-protection

Project 2: Web Security Pitfalls

Transcription:

Hack-proof Your Drupal App Key Habits of Secure Drupal Coding

Introductions CommonPlaces Erich Beyrent, V.P. of Engineering Amanda Giovanni, Director of Enterprise Risk Management

Introductions WhiteHat Security Arian Evans, Operations Director

Introductions Katalyst Strategies Matthew J. Nash, Director of Cyber Risk Management

Security? Who cares?

Have you ever been hacked?

Web Application Security Analysts estimate that 75% of attacks against web servers enter at the application, not the network level As many as 15% of these attacks are due to poor coding practices

Case Study: Greenopolis.com

Case Study: Greenopolis.com Modules Theme Flash and Flex Security Audit Results

Greenopolis Modules Greenopolis currently uses 92 modules

Greenopolis Modules Greenopolis currently uses 92 modules 20% of those modules are custom

Greenopolis Theme Greenopolis uses a custom theme template.php, lots of individual templates

Flash and Flex Greenopolis has Flex widgets that can be embedded on any site, which get data via Services

Flash and Flex Greenopolis has Flex widgets that can be embedded on any site, which get data via Services Greenopolis has an interactive Flash map of the US that gets data from Services

Flash and Flex Greenopolis has Flex widgets that can be embedded on any site, which get data via Services Greenopolis has an interactive Flash map of the US that gets data from Services Greenopolis has a Flex TiltingPane widget that displays partner logos, populated via Services

Security Audit Results WhiteHat Security performed an audit of the application layer

Security Audit Results 120 vulnerabilities were discovered in the following categories: XSS CSRF SQL Injection Session fixation Insufficient Authorization

What We Learned: 90% of the vulnerabilities existed in the theme

Fixing The Problems: Completely reviewed the theme, implementing Drupal output filters

Fixing The Problems: Completely reviewed the theme, implementing Drupal output filters Code was audited to ensure sanitization of all user generated data

Fixing The Problems: Completely reviewed the theme, implementing Drupal output filters Code was audited to ensure sanitization of all user data Rewrote the search forms to sanitize user generated data

Fixing The Problems: Completely reviewed the theme, implementing Drupal output filters Code was audited to ensure sanitization of all user data Rewrote the search forms to sanitize user data Implemented web services proxy

Key Habits of Secure Drupal Coding

We are going to discuss: Sanitize Your Output

We are going to discuss: Sanitize Your Output Protect Your Database

We are going to discuss: Sanitize Your Output Protect Your Database User Input

We are going to discuss: Sanitize Your Output Protect Your Database User Input AJAX Risks

Sanitize Your Output: check_plain() check_markup() filter_xss() filter_xss_admin()

Correct Usage: Sanitize Your Output: echo check_plain($node->field_fname[0][ value ]); echo content_format( field_fname, $node->field_fname[0][ value ]); echo t( %fname, array( %fname => $node->field_fname[0][ value ])); echo t( @fname, array( @fname => $node->field_fname[0][ value ])); Incorrect Usage: echo $node->field_fname[0][ value ];

Protect Your Database: db_query() db_rewrite_sql()

Correct usage: Protect Your Database: $result = db_query( SELECT foo FROM {bar} WHERE foo = %s, $unsafe_var); Incorrect usage: $result = db_query( SELECT foo FROM {bar} WHERE foo = $unsafe_var );

Use the Form API User Input:

User Input: Use the Form API Sanitize $_POST (and $_GET) data

Javascript and AJAX: Rule #1 Javascript can be disabled Don t assume data to AJAX postback functions are coming from your javascript Don t assume AJAX transactions are private and cannot be observed by users Re-encode and escape all output

Don t Trust User Input!

Things That Will Bite You: Outputting raw values Modifying data with $_GET Parameterized queries? WTF? Hacking core and killing kittens

Drupal Security Resources Drupal.org http://drupal.org/writing-secure-code http://drupal.org/node/28984 Drupal Security Team http://drupal.org/node/32750 Pro Drupal Development book http://drupalbook.com

Drupal Tools Update module http://drupal.org/project/update_status Coder module http://drupal.org /project/coder Interactive debuggers (Zend, XDebug)

Participate! Subscribe to the Drupal Security RSS feed Send vulnerabilities and patches to the Drupal Security Team

Q & A Erich Beyrent, erich@commonplaces.com Arian Evans, arian.evans@whitehatsec.com