In the previous post, a demonstration was shown of how Chrome’s soon to be default behaviour (if the same site attribute is not explicitly set) will affect CSRF in this instance. Also, to show Chrome’s exception that will happen alongside it.

In this post, there will be a further demonstration showing each of the attribute values. The first one we will talk about is Lax. To recap, Lax would allow cookies to be sent along with any top-level navigation via a safe HTTP method (e.g. GET) only.

However, Chrome’s default behaviour has a 2-minute exception (as previously shown in the last post), which allows cookies to be sent along with the unsafe POST request. If the Lax value is explicitly set, then 2- minute exception doesn’t apply.  Except for this exception, this will be the same as the last demonstration, but here it will be shown again. To try this for yourself go to https://samesite2-demo.herokuapp.com/.

Here shows the second demonstration application and we’ll be using the first text box:

Second demonstration application

Once a value has been entered and submitted, we have the following displayed just like the first demonstration application showed. But note, the cookie now shows Lax explicitly set:

cookie now shows Lax explicitly set

Use the same POC from the last application, except for adding the anchor tag which just references the same URL which is shown in the screenshot:

anchor tag

From here, when clicking the POC POST request, this returns “No cookie found”. With the 2-minute exception Chrome allows, this would have gone through. However, this did not, meaning the cookie didn’t get sent along with the request:

No cookie found

However, when going back and clicking the anchor tag, we get the cookie value displayed, meaning the cookie was sent along with the request. This is because this was a top-level navigation GET request, which Lax allows:

cookie value

Now on to Strict. When entering a value into the second text field and submitting it will show the same as before, except having the cookie explicitly set to Strict:

cookie explicitly set to Strict

When trying the POC POST request, this will show the same message “No cookies found” as no cookie were sent along with the request:

Now, when we click the anchor tag, Lax allowed this so the cookie value was displayed. However, clicking this with Strict doesn’t send the cookie via GET either. Thus, displaying that default page:

default page

The last one None, will turn the safeguard off. There are two fields for this, both are the same except for the last None in which Chrome will display a warning that in a future release Chrome will only send cookies with the ‘None’ value if Secure is set:

None’ value

When clicking the POC POST request, this goes through fine and changes the cookie value. Here you can see that the requested cookie value was Test, and the response value is CSRF:

CSRF

Also, no warnings are shown within Chrome having the ‘None’ value set along with Secure attribute set:

Secure attribute

Doing this with the last text field will give the same result. However, there will be a warning as previously mentioned:

Cookie warning

A new discussion / demonstration will be presented in the next article.

Join us in a partnership founded in research, education and execution

Our success is built on protecting our clients’ success. We have a distinguished track record of supporting our clients in building secure by design environments. Our consultants have successfully ushered in new security practices in leading pharmaceutical, energy and retail institutions. Bramfitt has over 50 specialists around the world and we are committed to forging long-term relationships with our clients, providing them with genuine insight and practical advice, and supporting them as they navigate the everchanging security landscape.

Let us be your partner for the next phase of your security journey.

EMEA Headquarters
Tower 42, 25 Old Broad Street London, EC2N 1HN
+44 (0) 208 187 4234
AMER Headquarters
45 Rockefeller Plaza, 20th Floor New York, NY 10111
+1 (800) 468-6046
APAC Headquarters
96 Wanneroo Rd, Yokine WA 6060, Australia
Social
iasme consortium
iasme consortium
cyber essentials
cyber essentials plus
iot security assured
pentest
ukas iso 9001ukas iso 27001
Back to top
Get in touch