IP Library Granted Patent US 10,642,980
Granted Patent B1
US 10,642,980 · App. 16/687,044 · Granted May 5, 2020

Detecting cross-origin malicious code existing in internet advertisements

Inventors: Seth Demsey (New York, NY); Alexey Stoletny (New York, NY); Iván Soroka (New York, NY)
Assignee: CLEAN.IO, INC.
G06F21/566G06F21/53G06F21/563G06F21/564G06F2221/2119
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 10,642,980
App. No.
16/687,044
Granted
May 5, 2020
Kind
B1
Abstract

There are disclosed devices, system and methods for detecting cross-origin malicious code existing in an internet advertisement (ad) requested by a published webpage viewed by a user. First, receipt of the ad is detected, where that ad includes cross-origin malicious code that causes a browser cross-origin unwanted action without user action. The ad is then executed in a browser sandbox that displays the cross-origin malicious code and intercepts the cross-origin unwanted action. When a cross-origin security error results from this execution, the cross-origin malicious code is discontinued and the cross-origin unwanted action is intercepted.

Claims (81)

1. A method for detecting cross-origin malicious code existing in third party internet advertisements, the method comprising:

detecting receipt of an internet advertisement (ad) promoting goods and/or services requested from a third party advertiser by a published webpage being displayed to a user, the internet ad configured to return a count impression for the third party advertiser when the ad is executed, the internet ad having cross-origin malicious code configured to cause a browser cross-origin unwanted action when executed;

stripping an image script of the ad to avoid double count impressions for the third party advertiser when the stripped ad is executed in a behavior sandbox;

executing the stripped ad in the behavior sandbox that does not send the double-count impression for the stripped ad;

executing the ad and the cross-origin malicious code in a browser sandbox that activates the cross-origin unwanted action, that displays the internet ad to the user during execution of the cross-origin malicious code, and that stops execution of the cross-origin unwanted action if a cross-origin security error is detected;

wherein the activated cross-origin unwanted action causes the browser cross-origin unwanted action without user action and causes the cross-origin type security error when the cross-origin unwanted action occurs;

returning a single count impression for the internet ad for the third party advertiser during executing;

detecting whether the cross-origin security error resulting from the cross-origin unwanted action exists; and

when the cross-origin security error exists, discontinuing executing the cross-origin malicious code in the browser sandbox, discontinuing displaying of the internet ad on the display, and stopping execution of the cross-origin unwanted action.

2. The method of claim 1 , wherein the cross-origin unwanted action is a function to run code in a callback and the security error is also a cross-origin type of security error.

3. The method of claim 1 , wherein executing the ad and the cross-origin malicious code in a browser sandbox include executing the ad and the cross-origin malicious code and displaying the internet ad in a display area of a browser of a computing device.

4. The method of claim 1 , further comprising:

detecting receipt of one of a website scripting language closure, a website scripting language source code (SRC) or a website scripting language document;

creating a website scripting language wrapped version of the detected website scripting language closure, website scripting language SRC or website scripting language SRC document; and

executing the website scripting language wrapped version of the detected website scripting language closure, website scripting language SRC or website scripting language SRC document in the browser sandbox.

5. The method of claim 1 , wherein:

the cross-origin unwanted action is a cross-origin script or a cross-origin iframe having malicious code including one of a settimeout function, a setinterval function or an adeventlistener function; and

stopping execution of the cross-origin type of error event includes capturing that a script on a uniform resource locator (URL) attempted to cause the browser to perform a cross-origin unwanted action.

6. The method of claim 5 , further comprising building a dynamic blacklist having a limited number of entries by;

adding the cross-origin script or cross-origin iframe malicious code as an entry;

intercepting a future cross-origin error event by comparing a future cross-origin script or cross-origin iframe malicious code with the dynamic blacklist; and

removing an entry when for a certain amount of time cross-origin script or cross-origin iframe malicious code of that entry has not been executed on the webpage.

7. The method of claim 1 , wherein activating the cross-origin malicious code requests, downloads and attempts to display harmful content downloaded in response to the activation of the cross-origin malicious code;

wherein the cross-origin malicious code is malware and includes a call to download harmful content from a harmful content source.

8. The method of claim 1 , further comprising:

detecting receipt of a plurality of the cross-origin malicious codes of internet advertisements (ads) requested from various third party advertisers by the webpage;

returning a first count impression for the internet ad to the various third party advertisers;

executing the between 1 and 10 percent of the cross-origin malicious codes in the browser sandbox;

detecting whether a cross-origin type of security error resulting from the cross-origin type of cross-origin unwanted action exists for the between 1 and 10 percent of the cross-origin malicious codes.

9. The method of claim 1 , further comprising:

prior to detecting receipt of the internet ad:

executing a user requested protected published webpage having a call to a protection code source for protection code and a call to a third party for the internet advertisement for good and/or services and having cross-origin malicious code existing in the ad;

executing the call to the protection code source for and downloading the protection code;

executing the protection code; then

executing the call to the third party for and downloading the internet ad; and

after detecting the cross-origin malicious code, reporting to the protection code source, detecting information that is based on the detecting of the cross-origin malicious code.

10. A non-transitory machine readable medium storing a program having instructions which when executed by a processor will cause the processor to detect cross-origin malicious code existing in third party internet advertisements, the instructions of the program for:

detecting receipt of an internet advertisement (ad) promoting goods and/or services requested from a third party advertiser by a published webpage being displayed to a user, the internet ad configured to return a count impression for the third party advertiser when the ad is executed, the internet ad having cross-origin malicious code configured to cause a browser cross-origin unwanted action when executed;

stripping an image script of the ad to avoid double count impressions for the third party advertiser when the stripped ad is executed in a behavior sandbox;

executing the stripped ad in the behavior sandbox that does not send the double-count impression for the stripped ad;

executing the ad and the cross-origin malicious code in a browser sandbox that activates the cross-origin unwanted action, that displays the internet ad to the user during execution of the cross-origin malicious code, and that stops execution of the cross-origin unwanted action if a cross-origin security error is detected;

wherein the activated cross-origin unwanted action causes the browser cross-origin unwanted action without user action and causes the cross-origin type security error when the cross-origin unwanted action occurs;

returning a single count impression for the internet ad for the third party advertiser during executing;

detecting whether the cross-origin security error resulting from the cross-origin unwanted action exists; and

when the cross-origin security error exists, discontinuing executing the cross-origin malicious code in the browser sandbox, discontinuing displaying of the internet ad on the display, and stopping execution of the cross-origin unwanted action.

11. The medium of claim 10 , wherein the cross-origin unwanted action is a function to run code in a callback and the security error is also a cross-origin type of security error.

12. The medium of claim 11 , wherein executing the ad and the cross-origin malicious code in a browser sandbox include executing the ad and the cross-origin malicious code and displaying the internet ad in a display area of a browser of a computing device.

13. The medium of claim 11 , the instructions of the program further for:

detecting receipt of one of a website scripting language closure, a website scripting language source code (SRC) or a website scripting language document;

creating a website scripting language wrapped version of the detected website scripting language closure, website scripting language SRC or website scripting language SRC document; and

executing the website scripting language wrapped version of the detected website scripting language closure, website scripting language SRC or website scripting language SRC document in the browser sandbox.

14. The medium of claim 10 , wherein:

the unwanted action is a cross-origin script or a cross-origin iframe having malicious code including one of a settimeout function, a setinterval function or an adeventlistener function; and

intercepting the error event includes capturing that a script on a uniform resource locator (URL) attempted to unwanted action the browser; and

further comprising building a dynamic blacklist having a limited number of entries by;

adding the cross-origin script or cross-origin iframe malicious code as an entry;

intercepting a future cross-origin error event by comparing a future cross-origin script or cross-origin iframe malicious code with the dynamic blacklist; and

removing an entry when for a certain amount of time cross-origin script or cross-origin iframe malicious code of that entry has not been executed on the webpage.

15. The medium of claim 10 , further comprising:

prior to detecting receipt of the internet ad:

executing a user requested protected published webpage having a call to a protection code source for protection code and a call to a third party for the internet advertisement for good and/or services and having cross-origin malicious code existing in the ad;

executing the call to the protection code source for and downloading the protection code;

executing the protection code; then

executing the call to the third party for and downloading the internet ad; and

after detecting the cross-origin malicious code, reporting to the protection code source, detecting information that is based on the detecting of the cross-origin malicious code.

16. A system for detecting cross-origin malicious code existing in third party internet advertisements, the system comprising:

a user device having protection code instructions to:

detect receipt of an internet advertisement (ad) promoting goods and/or services requested from a third party advertiser by a published webpage being displayed to a user, the internet ad configured to return a count impression for the third party advertiser when the ad is executed, the internet ad having cross-origin malicious code configured to cause a browser cross-origin unwanted action when executed;

strip an image script of the ad to avoid double count impressions for the third party advertiser when the stripped ad is executed in a behavior sandbox;

execute the stripped ad in the behavior sandbox that does not send the double-count impression for the stripped ad;

execute the ad and the cross-origin malicious code in a browser sandbox that activates the cross-origin unwanted action, that displays the internet ad to the user during execution of the cross-origin malicious code, and that stops execution of the cross-origin unwanted action if a cross-origin security error is detected;

wherein the activated cross-origin unwanted action causes the browser cross-origin unwanted action without user action and causes the cross-origin type security error when the cross-origin unwanted action occurs;

return a single count impression for the internet ad for the third party advertiser during executing;

detect whether the cross-origin security error resulting from the cross-origin unwanted action exists; and

when the cross-origin security error exists, discontinuing executing the cross-origin malicious code in the browser sandbox, discontinuing displaying of the internet ad on the display, and stopping execution of the cross-origin unwanted action.

17. The system of claim 16 , the system further comprising:

a user input device

a display device

a processor

a memory

wherein the processor and the memory comprise circuits and software for performing the detecting cross-origin malicious code.

Assignments (8)
RELEASE OF SECURITY INTEREST Recorded Aug 5, 2025
From: ALTER DOMUS (US) LLC
To: HUMAN SECURITY, INC.; SINGULARITY BUYER LLC
Reel/Frame 071935/0384 →
RELEASE OF SECURITY INTEREST Recorded Aug 5, 2025
From: SILICON VALLEY BANK, A DIVISION OF FIRST-CITIZENS BANK & TRUST COMPANY
To: HUMAN SECURITY, INC.; SINGULARITY BUYER LLC; PERIMETERX, INC.
Reel/Frame 071935/0486 →
INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded Jul 25, 2025
From: HUMAN SECURITY, INC.
To: WILMINGTON TRUST, NATIONAL ASSOCIATION, AS COLLATERAL AGENT
Reel/Frame 072253/0310 →
SUPPLEMENT NO. 1 TO INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded Nov 9, 2023
From: HUMAN SECURITY, INC.; PERIMETERX, INC.
To: FIRST-CITIZENS BANK & TRUST COMPANY
Reel/Frame 065532/0512 →
FIRST AMENDMENT TO INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded May 4, 2023
From: HUMAN SECURITY, INC.; SINGULARITY BUYER LLC
To: ALTER DOMUS (US) LLC, AS COLLATERAL AGENT
Reel/Frame 063906/0041 →
MERGER AND CHANGE OF NAME Recorded Jan 13, 2023
From: COMET MERGER SUB II LLC; HUMAN SECURITY, INC.
To: HUMAN SECURITY, INC.
Reel/Frame 062372/0229 →
MERGER AND CHANGE OF NAME Recorded Jan 11, 2023
From: CLEAN.IO, INC.; COMET MERGER SUB II LLC
To: COMET MERGER SUB II LLC
Reel/Frame 062346/0153 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 18, 2019
From: DEMSEY, SETH; STOLETNY, ALEXEY; SOROKA, IVÁN
To: CLEAN.IO, INC.
Reel/Frame 051041/0704 →
Cited By (1)
US 12,645,845