IP Library Granted Patent US 9,455,997
Granted Patent B2
US 9,455,997 · App. 13/472,391 · Granted Sep 27, 2016

System and method for preventing web frauds committed using client-scripting attacks

Inventors: Amichai Shulman (Tel Aviv, IL); Guy Karlebach (Tel Aviv, IL)
Assignee: IMPERVA, INC.
H04L63/1416H04L63/1441H04L63/0236
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,455,997
App. No.
13/472,391
Granted
Sep 27, 2016
Kind
B2
Abstract

A method for detecting and blocking Javascript hijacking attacks, comprising checking if an incoming request belongs to a valid session established between a client and a trusted server. When said incoming request does belong to a valid session, it is checked if a Referer header of said incoming request includes a valid domain name. The incoming request is marked as suspicious, when said incoming request does not include a valid domain name. It is checked if a respective response of said suspicious incoming request includes a script code. A preventive action responsive to a user input is taken when said respective response includes a script code.

Claims (40)

1. A method, performed by a sequence of instructions executing on a device, for detecting JavaScript hijacking attacks, comprising:

receiving, at the device, a HTTP request sent by a client to a trusted server responsive to a user visiting a page of an attacker-controlled web site that includes a script, wherein a valid authenticated session exists between the client and the trusted server, wherein the trusted server hosts a web-site in a domain, and wherein the request includes a Referer header field having a domain name of the attacker-controlled web site that is different than the domain of the trusted server in which the web-site is hosted;

sending the HTTP request to the trusted server;

receiving a response from the trusted server that includes a script code; and

sending the response to the client with special purpose script code to run on a web browser of the client to allow the user to stop a JavaScript hijacking attack by preventing content from the response that was sent by the trusted server from being processed by the script of the page of the attacker-controlled web site, wherein the special purpose script code was selectively added responsive to:

the HTTP request belonging to the valid authenticated session between the client and the trusted server,

the domain in the Referer header field of the HTTP request being different than the domain in which the web-site is hosted, and

the response including the script code.

2. The method of claim 1 , wherein the special purpose script code does not invoke any function that can be overridden by the attacker.

3. The method of claim 1 , wherein the special purpose script code, when executed by the client, notifies the user of a potential JavaScript hijacking attack.

4. The method of claim 3 , wherein the special purpose script code further allows the user to allow or deny processing of the script code of the response.

5. The method of claim 3 , wherein the special purpose script code notifies the user by displaying a pop-up window.

6. The method of claim 1 , wherein the script code of the response comprises JavaScript code including a call to a client-side function, and wherein the script of the page of the attacker-controlled web site includes another function that attempts to override the client-side function.

7. A non-transitory computer-readable medium comprising instructions for a processor, which, when executed by the processor, cause the processor to detect JavaScript hijacking attacks by performing the following operations:

receiving a HTTP request sent by a client to a trusted server responsive to a user visiting a page of an attacker-controlled web site that includes a script, wherein a valid authenticated session exists between the client and the trusted server, wherein the trusted server hosts a web-site in a domain, and wherein the request includes a Referer header field having a domain name of the attacker-controlled web site that is different than the domain of the trusted server in which the web-site is hosted;

sending the HTTP request to the trusted server;

receiving a response from the trusted server that includes a script code; and

sending the response to the client with special purpose script code to run on a web browser of the client to allow the user to stop a JavaScript hijacking attack by preventing content from the response that was sent by the trusted server from being processed by the script of the page of the attacker-controlled web site, wherein the special purpose script code was selectively added responsive to:

the HTTP request belonging to the valid authenticated session between the client and the trusted server,

the domain in the Referer header field of the HTTP request being different than the domain in which the web-site is hosted, and

the response including the script code.

8. The non-transitory computer-readable medium of claim 7 , wherein the special purpose script code does not invoke any function that can be overridden by the attacker.

9. The non-transitory computer-readable medium of claim 7 , wherein the special purpose script code, when executed by the client, notifies the user of a potential JavaScript hijacking attack.

10. The non-transitory computer-readable medium of claim 9 , wherein the special purpose script code further allows the user to allow or deny processing of the script code of the response.

11. The non-transitory computer-readable medium of claim 9 , wherein the special purpose script code is to notify the user by displaying a pop-up window.

12. The non-transitory computer-readable medium of claim 7 , wherein the script code of the response comprises JavaScript code including a call to a client-side function, and wherein the script of the page of the attacker-controlled web site includes another function that attempts to override the client-side function.

13. An apparatus, comprising:

a secure gateway device to detect JavaScript hijacking attacks, the secure gateway device configured to:

receive a HTTP request sent by a client to a trusted server responsive to a user visiting a page of an attacker-controlled web site that includes a script, wherein a valid authenticated session exists between the client and the trusted server, wherein the trusted server hosts a web-site in a domain, and wherein the request includes a Referer header field having a domain name of the attacker-controlled web site that is different than the domain of the trusted server in which the web-site is hosted;

send the HTTP request to the trusted server;

receive a response from the trusted server that includes a script code; and

send the response to the client with special purpose script code to be run on a web browser of the client to allow the user to stop a JavaScript hijacking attack by preventing content from the response that was sent by the trusted server from being processed by the script of the page of the attacker-controlled web site, wherein the special purpose script code was selectively added responsive to:

the HTTP request belonging to the valid authenticated session between the client and the trusted server,

the domain in the Referer header field of the HTTP request being different than the domain in which the web-site is hosted, and

the response including the script code.

14. The apparatus of claim 13 , wherein the special purpose script code is configured to not invoke any function that can be overridden by the attacker.

15. The apparatus of claim 13 , wherein the special purpose script code is configured to, when executed by the client, notify the user of a potential JavaScript hijacking attack.

16. The apparatus of claim 15 , wherein the special purpose script code is further configured to allow the user to allow or deny processing of the script code of the response.

17. The apparatus of claim 15 , wherein the special purpose script code is configured to notify the user by displaying a pop-up window.

18. The apparatus of claim 13 , wherein the script code of the response comprises JavaScript code including a call to a client-side function, and wherein the script of the page of the attacker-controlled web site includes another function that attempts to override the client-side function.

Assignments (4)
RELEASE OF FIRST LIEN SECURITY INTEREST IN INTELLECTUAL PROPERTY RECORDED AT R/F 048077/0672 Recorded Dec 1, 2023
From: BANK OF AMERICA, N.A., AS AGENT
To: IMPERVA, INC.
Reel/Frame 065743/0832 →
RELEASE OF SECOND LIEN SECURITY INTEREST IN INTELLECTUAL PROPERTY RECORDED AT R/F 049676/0451 Recorded Dec 1, 2023
From: GOLDMAN SACH BANK USA, AS AGENT
To: IMPERVA, INC.
Reel/Frame 065743/0905 →
SECOND LIEN INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded Jan 15, 2019
From: IMPERVA, INC.
To: GOLDMAN SACHS BANK USA, AS COLLATERAL AGENT
Reel/Frame 049676/0451 →
FIRST LIEN INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded Jan 15, 2019
From: IMPERVA, INC.
To: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
Reel/Frame 048077/0672 →
Continuity (3)
Continuation 12143168 · Jun 20, 2008
Provisional Application 60945123 · Jun 20, 2007
Related Publication 20120227106A1 · Sep 6, 2012