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 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.
Attacker 可以利用 MiTM 拦截所有 http req, 让 https 直接通过. 然后在拦截的 http req, 增加一个 set cookies, 强制添加 cookie value 到他想要的 value.结果利用 double-submit cookie 的 anti-CSRF 就会被 bypass.
原则上, 只要 cookie set 了 HttpOnly, js 是无法访问它的. 但是演讲者通过运行一个 script, 将 cookie.jar 满泄, 将大量的 cookie 写入 cookie.jar, 旧 cookie 将从 cookie.jar 流出, 新增的 cookie 中没有了 httponly, js就可以访问它了.
NIN: 可惜 script 并没有公布.