training: best practices for drupal security

34
Training: Best Practices for Drupal Security Cash Williams Technical Consultant Acquia Ben Jeavons Sr. Software Engineer Acquia David Stoline Technical Consultant Acquia

Upload: acquia

Post on 07-May-2015

2.751 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Training: Best Practices for Drupal Security

Training: Best Practices for Drupal Security

Cash WilliamsTechnical ConsultantAcquia

Ben JeavonsSr. Software EngineerAcquia

David StolineTechnical ConsultantAcquia

Page 2: Training: Best Practices for Drupal Security

Drupal Security

Vulnerabilities and risks on the web

Understanding user input and evaluating trust

Tips and further best practices for security

Page 3: Training: Best Practices for Drupal Security

Principle ideas

Don’t trust user input

Stay up-to-date

Defense in depth

Page 4: Training: Best Practices for Drupal Security

http://www.forbes.com/sites/cherylsnappconner/2013/09/14/are-you-prepared-71-of-cyber-attacks-hit-small-business/

Page 5: Training: Best Practices for Drupal Security

“traffic at Target tanked after news that hackers stole data from 40 million credit and debit cards used at Target“

http://qz.com/181703/shoppers-decided-to-avoid-target-after-its-giant-data-breach

https://www.flickr.com/photos/roadsidepictures/2923629922

Page 6: Training: Best Practices for Drupal Security

Massive vulnerability Affecting ~66% of the internetAllowed arbitrary memory leaks exposingusernames, passwords, certificate private keys, etc

Heartbleed

Page 7: Training: Best Practices for Drupal Security

Hands-on training

DrupalCon Austin, Monday June 2nd

austin2014.drupal.org/node/1118

Register before May 2nd to save $75

Page 8: Training: Best Practices for Drupal Security

Drupal vulnerabilities and risks

Page 9: Training: Best Practices for Drupal Security

reported in core and contrib SAs from June 1 2005 through October 1 2013, drupalsecurityreport.com

Vulnerabilities by popularity

Page 10: Training: Best Practices for Drupal Security

reported in SAs June 1 2005 through October 1 2013, drupalsecurityreport.com

Vulnerabilities by type

Page 11: Training: Best Practices for Drupal Security

Drupal in the wild

Most vulnerabilities exist

In custom code (modules or themes)

Insecure configuration or practices

Out-of-date code

Page 12: Training: Best Practices for Drupal Security

66% likeliness a website

is vulnerable to Cross-Site Scripting

http://whitehatsec.com/home/assets/presentations/09PPT/PPT_statsfall09_8th.pdf

Page 13: Training: Best Practices for Drupal Security

User input is the root of all evil

Page 14: Training: Best Practices for Drupal Security

User input

What pages have forms?

Nodes and comments

Webforms

Other properties of HTTP requests

Page 15: Training: Best Practices for Drupal Security

Rawuserinput

Output

Page 16: Training: Best Practices for Drupal Security

Trust

Page 17: Training: Best Practices for Drupal Security

Trust

Know your site’s Drupal roles and permissions

Evaluate permissions of new modules

Maintain strong passwords

Page 18: Training: Best Practices for Drupal Security

Trust

Principle of least privilege

Give only the necessary permissions to complete the required work

Page 19: Training: Best Practices for Drupal Security

Admin permissions

Administer permissions

Administer users

Administer filters

Administer content types

Administer site configuration

contrib module admin permissions?

Page 20: Training: Best Practices for Drupal Security

Strong passwords

Ensure administrators have strong passwords

drupal.org/project/password_policy

Page 21: Training: Best Practices for Drupal Security

Best practices

Page 22: Training: Best Practices for Drupal Security

Stay up to date

Follow release schedules

Update Manager

@drupalcore & @drupalsecurity

Apply appropriate updates

Page 23: Training: Best Practices for Drupal Security

Update process

Stage and dev environments for testing changes

Page 24: Training: Best Practices for Drupal Security

Update process

Stage and dev environments for testing changes

drush pm-updatecode

VCS (git) for quick deploys

Page 25: Training: Best Practices for Drupal Security

Backups

If it isn’t tested then it doesn’t work

Page 26: Training: Best Practices for Drupal Security

Backups

How complicated is your restore process?Is every step documented?Can a restore be done by someone filling in for a position?Are there any technical barriers to performing a restore?Are the backups and procedure regularly tested?How long will the restore take?

Page 27: Training: Best Practices for Drupal Security

Logs

Enable logging and save log dataFix application errors and warnings to remove noiseAggregate log data to better analyze

Page 28: Training: Best Practices for Drupal Security

10

PM

DO YOUKNOW WHERE

YOUR DATAARE?

Page 29: Training: Best Practices for Drupal Security

Sensitive Data

Where is sensitive data and is it protected?Ensure a project repo does not have sensitive dataIncluding the repo historyNon-Production databases should be sanitizedUse encryption

Page 30: Training: Best Practices for Drupal Security

Principle ideasfrom today

Page 31: Training: Best Practices for Drupal Security

Principle ideas

Don’t trust user input

Stay up-to-date

Defense in depth

Page 32: Training: Best Practices for Drupal Security

More resources

drupalsecurityreport.com

drupal.org/developing/best-practices

drupal.org/security/secure-configuration

drupal.org/writing-secure-code

Page 33: Training: Best Practices for Drupal Security

Hands-on Training

DrupalCon Austin, Monday June 2DrupalCon Austin, Monday June 2

austin2014.drupal.org/node/1118austin2014.drupal.org/node/1118

Register before May 2nd to save $75Register before May 2nd to save $75

Page 34: Training: Best Practices for Drupal Security

Thank you

Cash Williams@cashwilliams

Ben Jeavons@benswords

David Stoline@unncola