IP Library Granted Patent US 10,637,881
Granted Patent B2
US 10,637,881 · App. 15/678,451 · Granted Apr 28, 2020

Javascript security testing

Inventors: Kevin Allen Williams (Alpharetta, GA); Brian Charles King (Alpharetta, GA); Steve Alan Millar (Dawsonville, GA)
Assignee: MICRO FOCUS LLC
H04L63/1433G06F8/35G06F8/41G06F21/566
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,637,881
App. No.
15/678,451
Granted
Apr 28, 2020
Kind
B2
Abstract

In one example in accordance with the present disclosure, a method may include receiving an initial document object model (DOM) corresponding to an HTML page structure including a plurality of executable JavaScript code and simulating user interaction with an executable JavaScript code belonging to the plurality in the HTML page structure. The method may include adjusting the initial DOM based on the simulated user interaction, generating byte code corresponding to the adjust DOM and analyzing the byte code using a set of static rules.

Claims (75)

1. A method performed by a system comprising a hardware processor, comprising:

receiving an initial document object model (DOM) corresponding to a HyperText Markup Language (HTML) page structure including a plurality of executable JavaScript code;

simulating a user interaction with a first executable JavaScript code of the plurality of executable JavaScript code in the HTML page structure;

tracking, using a browser in the system, state changes to the initial DOM by recording adjustments made to the initial DOM based on the simulated user interaction;

adjusting, by DOM adjuster instructions in the system, the initial DOM based on the tracked state changes, to form an adjusted DOM;

generating a first byte code corresponding to the adjusted DOM;

analyzing the first byte code using a set of static rules;

after forming the adjusted DOM, restoring, by the DOM adjuster instructions, the initial DOM;

further adjusting, by the DOM adjuster instructions, the initial DOM based on a second simulated user interaction;

creating a second adjusted DOM based on the further adjusting; and

generating a second byte code corresponding to the second adjusted DOM.

2. The method of claim 1 , wherein the browser is a headless browser, and wherein the simulating is performed by the headless browser that emulates functionality of a browser without generating a graphic user interface.

3. The method of claim 1 , wherein the generating of the first byte code comprises:

collecting JavaScript code from the HTML page structure;

converting the collected JavaScript code into an executable format; and

executing the collected JavaScript code in the executable format until a lifecycle event is reached.

4. The method of claim 3 , wherein the lifecycle event is a page load event.

5. The method of claim 1 , comprising:

creating a state graph representation including the first executable JavaScript code and data in the initial DOM.

6. The method of claim 5 , comprising:

translating a plurality of global functions and events included in the state graph representation into a model; and

determining a first portion of the initial DOM where an assignment from a user interaction may be stored.

7. The method of claim 6 , comprising:

comparing the first portion to the set of static rules to determine that the first portion matches a sink; and

identifying the first portion as a vulnerability.

8. The method of claim 6 , comprising:

determining that the first portion is transferred to a second portion of the initial DOM; and

adding the second portion to a list of potential portions of the initial DOM where an assignment from a user interaction may be stored.

9. The method of claim 8 , comprising:

transferring the first portion to a JavaScript engine;

applying a value to the first portion; and

executing the first portion using the value on the JavaScript engine.

10. A system comprising:

a processor; and

a non-transitory storage medium storing instructions executable on the processor to:

receive an initial document object model (DOM) corresponding to a HyperText Markup Language (HTML) page structure;

simulate a user input on an element of the HTML page structure;

track, using a browser in the system, state changes to the initial DOM by recording adjustments made to the initial DOM based on the simulated user input;

adjust, by DOM adjuster instructions in the system, the initial DOM based on the tracked state changes, to form an adjusted DOM;

generate a first byte code corresponding to the adjusted DOM;

analyze the first byte code using a set of rules;

after forming the adjusted DOM, restore the initial DOM;

further adjust the initial DOM based on a second simulated user input;

create a second adjusted DOM based on the further adjusting; and

generate a second byte code corresponding to the second adjusted DOM.

11. The system of claim 10 , wherein the generating of the first byte code comprises:

collecting JavaScript code from the HTML page structure; and

converting the collected JavaScript code into an executable format, and

wherein the instructions are executable on the processor to execute the collected JavaScript code in the executable format until a lifecycle event is reached.

12. A non-transitory machine-readable storage medium comprising instructions that upon execution cause a system to:

receive an initial document object model (DOM) corresponding to a HyperText Markup Language (HTML) page structure including executable JavaScript code;

simulate a user interaction with the executable JavaScript code in a browser;

track, using the browser, state changes to the initial DOM by recording adjustments made to the initial DOM based on the simulated user interaction;

adjust, by DOM adjuster instructions in the system, the initial DOM based on the tracked state changes, to form an adjusted DOM;

generate a first byte code corresponding to the adjusted DOM;

analyze the first byte code using a set of static rules;

after forming the adjusted DOM, restore the initial DOM;

further adjust the initial DOM based on a second simulated user interaction;

create a second adjusted DOM based on the further adjusting; and

generate a second byte code corresponding to the second adjusted DOM.

13. The non-transitory machine-readable storage medium of claim 12 , wherein the instructions upon execution further cause the system to:

create a state graph representation including the executable JavaScript code and data in the initial DOM;

translate a plurality of global functions and events included in the state graph representation into a model; and

determine a first portion of the initial DOM where an assignment from a user interaction may be stored.

14. The non-transitory machine-readable storage medium of claim 13 , wherein the instructions upon execution further cause the system to:

determine that the first portion is transferred to a second portion of the initial DOM; and

add the second portion to a list of potential portions of the initial DOM where an assignment from a user may be stored.

15. The non-transitory machine-readable storage medium of claim 13 , wherein the instructions upon execution further cause the system to:

transfer the first portion to a JavaScript engine;

apply a value to the first portion; and

execute the first portion using the value at the JavaScript engine.

16. The system of claim 10 , wherein the instructions are executable on the processor to:

identify a vulnerability of the HTML page structure based on the analyzing.

17. The non-transitory machine-readable storage medium of claim 12 , wherein the instructions upon execution further cause the system to:

identify a vulnerability of the HTML page structure based on the analyzing.

Assignments (8)
RELEASE OF SECURITY INTEREST REEL/FRAME 052294/0522 Recorded Feb 2, 2023
From: JPMORGAN CHASE BANK, N.A.
To: MICRO FOCUS LLC; MICRO FOCUS SOFTWARE INC. (F/K/A NOVELL, INC.); NETIQ CORPORATION
Reel/Frame 062624/0449 →
RELEASE OF SECURITY INTEREST REEL/FRAME 052295/0041 Recorded Feb 2, 2023
From: JPMORGAN CHASE BANK, N.A.
To: MICRO FOCUS LLC; MICRO FOCUS SOFTWARE INC. (F/K/A NOVELL, INC.); NETIQ CORPORATION
Reel/Frame 062625/0754 →
SECURITY AGREEMENT Recorded Apr 2, 2020
From: MICRO FOCUS LLC; BORLAND SOFTWARE CORPORATION; MICRO FOCUS SOFTWARE INC.; NETIQ CORPORATION; MICRO FOCUS (US), INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 052294/0522 →
SECURITY AGREEMENT Recorded Apr 2, 2020
From: MICRO FOCUS LLC; BORLAND SOFTWARE CORPORATION; MICRO FOCUS SOFTWARE INC.; NETIQ CORPORATION; MICRO FOCUS (US), INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 052295/0041 →
CHANGE OF NAME Recorded Aug 8, 2019
From: ENTIT SOFTWARE LLC
To: MICRO FOCUS LLC
Reel/Frame 050004/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 12, 2018
From: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
To: ENTIT SOFTWARE LLC
Reel/Frame 045311/0605 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 25, 2017
From: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
To: ENTIT SOFTWARE LLC
Reel/Frame 043675/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 25, 2017
From: WILLIAMS, KEVIN ALLEN; KING, BRIAN CHARLES; MILLAR, STEVE ALAN
To: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
Reel/Frame 043677/0181 →
Continuity (2)
Provisional Application 62380178 · Aug 26, 2016
Related Publication 20180063180A1 · Mar 1, 2018
Cited By (1)
US 12,506,764