Cookie Security Myths and Misconceptions - David Johansson - AppSecUSA 2017
Channel: OWASP Foundation
Date: 2017-10-09

Cookie Security – Myths and Misconceptions
(better sound at 4:00)

Cookies are an integral part of any web application and secure management of cookies is essential to web security. However, during my years as a security consultant I've often encountered various myths and misconceptions regarding cookie security from both developers as well as other security professionals. This talk will dive into the details of cookie security and highlight some of the lesser known facts about well-known cookie attributes. For example, we will see why the ‘Secure’ attribute doesn’t make a cookie immune against active man-in-the-middle attacks, how JavaScript can manipulate cookies marked with ‘HttpOnly’, why setting the ‘Domain’ attribute to the origin host may make it less secure and how other applications on the same host still can access cookies scoped to a path outside their application. This talk will also cover many of the recent improvements to cookie security implemented in modern browsers, such as ‘Strict secure cookie’, ‘Cookie prefixes’, and the ‘SameSite’ attribute. This talk will give you a solid understanding of the pitfalls affecting cookie security, the risks associated with these, and how you can leverage modern security specifications to enhance the protection of cookies in your web application.

 

Tentative outline (subject to change):

-Cookie Basics

-Cookie Lifetime

o Persistent vs. non-persistent cookies

o Expires and Max-Age Attribute

o Security implications

-Cookie Scope vs. Same-origin Policy

-Secure Attribute

o What it protects against

o What it doesn’t protect against

o Targeting ‘Secure’ cookies in MiTM attacks

o Demo

-HttpOnly Attribute

o What it protects against

o What it doesn’t protect against

o Attacking ‘HttpOnly’ cookies from JavaScript

o Demo

-Path Attribute

o Isolating cookies between applications on same domain

o Compromising cookies scoped to another application’s path

o Demo

-Domain Attribute

o Broadly scoped domains

o Narrowly scoped domains

o Risks with setting the domain attribute

-Modern Cookie Protections

o SameSite Attribute

o Cookie Prefixes

o Strict Secure Cookie

-Summary

o Is there an ultimate cookie configuration?



David Johansson
Associate Principal Consultant, Synopsys
David Johansson has 10 years of experience in software security, working as a consultant for several different companies. A large part of his work has been focused on secure software development in general and web security in particular.

-

Managed by the official OWASP Media Project https://www.owasp.org/index.php/OWASP_Media_Project