×

Cross-site request forgery defense

  • US 9,660,809 B2
  • Filed: 08/07/2015
  • Issued: 05/23/2017
  • Est. Priority Date: 08/07/2015
  • Status: Active Grant
First Claim
Patent Images

1. A computer-implemented method for defending against a cross-site request forgery (CSRF) attack, the method comprising:

  • serving a content item to a client computing device, wherein the content item includes an embedded executable script;

    receiving a first asynchronous request for a first CSRF token from the client computing device, wherein the first asynchronous request is generated as a result of running the embedded executable script at the client computing device;

    generating the first CSRF token in response to the first asynchronous request, wherein the first CSRF token is generated using a hash message authentication code (HMAC) key, and wherein the first CSRF token is subject to an expiration event;

    sending the first CSRF token to the client computing device;

    receiving a second asynchronous request for an updated CSRF token from the client computing device, wherein the second asynchronous request is received after network connectivity with the client computing device is temporarily lost after sending the first CSRF token to the client computing device;

    generating the updated CSRF token in response to the second asynchronous request, wherein the updated CSRF token is also generated using the HMAC key;

    receiving, from the client computing device, a request to access a resource provided by a server computing device, wherein the request includes a received CSRF token; and

    determining whether the received CSRF token can be authenticated using the HMAC key.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×