Resources

People often ask me "How did you learn how to hack?" The answer: by reading. This page is a collection of the blog posts and other articles that I have accumulated over the years of my journey. Enjoy!

The great SameSite confusion- 413

Julien CretelPosted 5 Years Ago
  • Cross-site request forgery (CSRF) is the drive-by attack of the web. By sending a request to a known website from a malicious website, the cookies will be used in the request. This can be used to force actions to occur that should NOT happen.
  • In order to help prevent this attack, browsers came up with the SameSite cookie flag. This flag prevents the sending of cookies across party lines. So, what do you mean by party lines? That is what this article is about!
  • There is a distinction between origin and site, which matters for the use of the cookie flag. Origin is defined as the same scheme (https), host (domain) and port (443). A site is domain in at the eTLD+1. The site is more confusing because there is a list of eTLDs that are used for this to determine the actual site.
  • For an attacker, this actually makes a large difference. The Same-Site cookie flag prevents a large class of cross-origin requests, but not all of them. The definition of site is quite important in this context.