AppSec USA 2017 has ended
Back To Schedule
Friday, September 22 • 9:00am - 9:45am
Cookie Security – Myths and Misconceptions

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.

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


o Is there an ultimate cookie configuration?

avatar for David Johannson

David Johannson

Principal Consultant, Synopsys
David Johansson has worked as a security consultant for over 10 years. Among other things, he has worked with software development and architecture, threat modeling, web security testing, and training developers and testers in security. David lives in London where he works as a Principal... Read More →

Friday September 22, 2017 9:00am - 9:45am EDT
Coronado J