IP Library Granted Patent US 11,874,924
Granted Patent B2
US 11,874,924 · App. 17/517,262 · Granted Jan 16, 2024

Malicious JS detection based on automated user interaction emulation

Inventors: Jin Chen (San Jose, CA); Tao Yan (San Jose, CA); Taojie Wang (San Jose, CA); Bo Qu (Saratoga, CA)
Assignee: Palo Alto Networks, Inc.
G06F21/566G06F21/53G06F2221/033
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 11,874,924
App. No.
17/517,262
Granted
Jan 16, 2024
Kind
B2
Abstract

Detection of malicious JavaScript based on automated user interaction emulation is disclosed. A malware sample is executed in an instrumented virtual environment. Dynamic behavior is triggered based on emulated user interactions.

Claims (108)

1. A system, comprising:

a processor configured to:

execute a malware sample in an instrumented virtual environment; and

trigger dynamic behavior based on emulated user interactions, comprising to:

perform one or more of the following:

A) perform a uniform resource locator (URL) path check, comprising to:

determine that the malware sample requires being executed in a special URL path before triggering the dynamic behavior, wherein in the event that the malware sample is not being executed in the special URL path, the malware sample fails to execute; and

execute the malware sample in a customized specialized URL path that corresponds with the special URL path;

B) perform a Document Object Model (DOM) element check, comprising to:

determine that the malware sample requires one or more DOM elements to exist in a webpage before triggering the dynamic behavior, wherein the one or more DOM elements includes an input form, a submit button, or a combination thereof; and

create the one or more required DOM elements before executing the malware sample;

C) perform an input value check, comprising to:

determine that the malware sample requires a correct value of one or more DOM elements before triggering the dynamic behavior, wherein the correct value corresponds with a word that has a length of at least one character, corresponds with a number that has at least a predetermined number of digits, is equal to a predetermined number of digits in length, or any combination thereof; and

create the correct value for the one or more DOM elements before executing the malware sample;

D) perform an event trigger, comprising to:

determine that a special event is triggered before triggering the dynamic behavior; and

hook an event handler to send a submit button event to trigger the special event in the event that the malware sample adds the event handler to be triggered before executing the malware sample;

E) perform a special event trigger, comprising to:

determine that a timer event is triggered before triggering the dynamic behavior; and

reduce a time out of a timer mechanism for the malware sample to allow the malware sample to be executed sooner before executing the malware sample, wherein the malware sample executes a wait time timer before executing; or

F) perform a library dependency check, comprising to:

determine that the malware sample requires one or more javascript libraries before triggering the dynamic behavior; and

loading the one or more required javascript libraries before executing the malware sample, wherein the loading of the one or more required javascript libraries comprises omitting to load a non-required javascript library; and

a memory coupled to the processor and configured to provide the processor with instructions.

2. The system of claim 1 , wherein the triggering of the dynamic behavior comprises to:

perform three or more of the following:

A) perform a uniform resource locator (URL) path check, comprising to:

determine that the malware sample requires being executed in a special URL path before triggering the dynamic behavior, wherein in the event that the malware sample is not being executed in the special URL path, the malware sample fails to execute; and

execute the malware sample in a customized specialized URL path that corresponds with the special URL path;

B) perform a Document Object Model (DOM) element check, comprising to:

determine that the malware sample requires one or more DOM elements to exist in a webpage before triggering the dynamic behavior, wherein the one or more DOM elements includes an input form, a submit button, or a combination thereof; and

create the one or more required DOM elements before executing the malware sample;

C) perform an input value check, comprising to:

determine that the malware sample requires a correct value of one or more DOM elements before triggering the dynamic behavior, wherein the correct value corresponds with a word that has a length of at least one character, corresponds with a number that has at least a predetermined number of digits, is equal to a predetermined number of digits in length, or any combination thereof; and

create the correct value for the one or more DOM elements before executing the malware sample;

D) perform an event trigger, comprising to:

determine that a special event is triggered before triggering the dynamic behavior; and

hook an event handler to send a submit button event to trigger the special event in the event that the malware sample adds the event handler to be triggered before executing the malware sample;

E) perform a special event trigger, comprising to:

determine that a timer event is triggered before triggering the dynamic behavior; and

reduce a time out of a timer mechanism for the malware sample to allow the malware sample to be executed sooner before executing the malware sample, wherein the malware sample executes a wait time timer before executing; or

F) perform a library dependency check, comprising to:

determine that the malware sample requires one or more javascript libraries before triggering the dynamic behavior; and

loading the one or more required javascript libraries before executing the malware sample, wherein the loading of the one or more required javascript libraries comprises omitting to load a non-required javascript library.

3. The system of claim 1 , wherein the triggering of the dynamic behavior comprises to:

perform the following:

A) perform a uniform resource locator (URL) path check, comprising to:

determine that the malware sample requires being executed in a special URL path before triggering the dynamic behavior, wherein in the event that the malware sample is not being executed in the special URL path, the malware sample fails to execute; and

execute the malware sample in a customized specialized URL path that corresponds with the special URL path;

B) perform a Document Object Model (DOM) element check, comprising to:

determine that the malware sample requires one or more DOM elements to exist in a webpage before triggering the dynamic behavior, wherein the one or more DOM elements includes an input form, a submit button, or a combination thereof; and

create the one or more required DOM elements before executing the malware sample;

C) perform an input value check, comprising to:

determine that the malware sample requires a correct value of one or more DOM elements before triggering the dynamic behavior, wherein the correct value corresponds with a word that has a length of at least one character, corresponds with a number that has at least a predetermined number of digits, is equal to a predetermined number of digits in length, or any combination thereof; and

create the correct value for the one or more DOM elements before executing the malware sample;

D) perform an event trigger, comprising to:

determine that a special event is triggered before triggering the dynamic behavior; and

hook an event handler to send a submit button event to trigger the special event in the event that the malware sample adds the event handler to be triggered before executing the malware sample;

E) perform a special event trigger, comprising to:

determine that a timer event is triggered before triggering the dynamic behavior; and

reduce a time out of a timer mechanism for the malware sample to allow the malware sample to be executed sooner before executing the malware sample, wherein the malware sample executes a wait time timer before executing; and

F) perform a library dependency check, comprising to:

determine that the malware sample requires one or more javascript libraries before triggering the dynamic behavior; and

loading the one or more required javascript libraries before executing the malware sample, wherein the loading of the one or more required javascript libraries comprises omitting to load a non-required javascript library.

4. A method, comprising:

executing, using a processor, a malware sample in an instrumented virtual environment; and

triggering, using the processor, dynamic behavior based on emulated user interactions, comprising:

performing one or more of the following:

A) performing a uniform resource locator (URL) path check, comprising:

determining that the malware sample requires being executed in a special URL path before triggering the dynamic behavior, wherein in the event that the malware sample is not being executed in the special URL path, the malware sample fails to execute; and

executing the malware sample in a customized specialized URL path that corresponds with the special URL path;

B) performing a Document Object Model (DOM) element check, comprising:

determining that the malware sample requires one or more DOM elements to exist in a webpage before triggering the dynamic behavior, wherein the one or more DOM elements includes an input form, a submit button, or a combination thereof; and

creating the one or more required DOM elements before executing the malware sample;

C) performing an input value check, comprising:

determining that the malware sample requires a correct value of one or more DOM elements before triggering the dynamic behavior, wherein the correct value corresponds with a word that has a length of at least one character, corresponds with a number that has at least a predetermined number of digits, is equal to a predetermined number of digits in length, or any combination thereof; and

creating the correct value for the one or more DOM elements before executing the malware sample;

D) performing an event trigger, comprising:

determining that a special event is triggered before triggering the dynamic behavior; and

hooking an event handler to send a submit button event to trigger the special event in the event that the malware sample adds the event handler to be triggered before executing the malware sample;

E) performing a special event trigger, comprising:

determining that a timer event is triggered before triggering the dynamic behavior; and

reducing a time out of a timer mechanism for the malware sample to allow the malware sample to be executed sooner before executing the malware sample, wherein the malware sample executes a wait time timer before executing; or

F) performing a library dependency check, comprising:

determining that the malware sample requires one or more javascript libraries before triggering the dynamic behavior; and

loading the one or more required javascript libraries before executing the malware sample, wherein the loading of the one or more required javascript libraries comprises omitting to load a non-required javascript library.

5. A computer program product embodied in a non-transitory computer readable medium and comprising computer instructions for:

executing a malware sample in an instrumented virtual environment; and

triggering dynamic behavior based on emulated user interactions, comprising:

performing one or more of the following:

A) performing a uniform resource locator (URL) path check, comprising:

determining that the malware sample requires being executed in a special URL path before triggering the dynamic behavior, wherein in the event that the malware sample is not being executed in the special URL path, the malware sample fails to execute; and

executing the malware sample in a customized specialized URL path that corresponds with the special URL path;

B) performing a Document Object Model (DOM) element check, comprising:

determining that the malware sample requires one or more DOM elements to exist in a webpage before triggering the dynamic behavior, wherein the one or more DOM elements includes an input form, a submit button, or a combination thereof; and

creating the one or more required DOM elements before executing the malware sample;

C) performing an input value check, comprising:

determining that the malware sample requires a correct value of one or more DOM elements before triggering the dynamic behavior, wherein the correct value corresponds with a word that has a length of at least one character, corresponds with a number that has at least a predetermined number of digits, is equal to a predetermined number of digits in length, or any combination thereof; and

creating the correct value for the one or more DOM elements before executing the malware sample;

D) performing an event trigger, comprising:

determining that a special event is triggered before triggering the dynamic behavior; and

hooking an event handler to send a submit button event to trigger the special event in the event that the malware sample adds the event handler to be triggered before executing the malware sample;

E) performing a special event trigger, comprising:

determining that a timer event is triggered before triggering the dynamic behavior; and

reducing a time out of a timer mechanism for the malware sample to allow the malware sample to be executed sooner before executing the malware sample, wherein the malware sample executes a wait time timer before executing; or

F) performing a library dependency check, comprising:

determining that the malware sample requires one or more javascript libraries before triggering the dynamic behavior; and

loading the one or more required javascript libraries before executing the malware sample, wherein the loading of the one or more required javascript libraries comprises omitting to load a non-required javascript library.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 28, 2022
From: CHEN, JIN; YAN, TAO; WANG, TAOJIE; QU, BO
To: PALO ALTO NETWORKS, INC.
Reel/Frame 059411/0664 →
Continuity (1)
Related Publication 20230138013A1 · May 4, 2023
Cited By (5)
US 12,190,292 US 12,229,726 US 12,602,660 US 12,619,954 US 12,682,322