IP Library Granted Patent US 10,521,587
Granted Patent B1
US 10,521,587 · App. 15/665,330 · Granted Dec 31, 2019

Detecting code obfuscation using recurrent neural networks

Inventors: Arie Agranonik (Herzelia, IL); Zohar Duchin (Brookline, MA)
Assignee: EMC IP Holding Company LLC
G06F21/563G06F21/554G06N3/0445G06F2221/034
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,521,587
App. No.
15/665,330
Granted
Dec 31, 2019
Kind
B1
Abstract

A method includes generating an index representation of characters of code of a given file and mapping the index representation to a vector space providing contextual representation of the characters utilizing an embedding layer of a recurrent neural network (RNN). The method also includes identifying one or more code features in the mapped index representation utilizing at least one hidden layer of the RNN, detecting sequences of the identified code features in the mapped index representation utilizing a plurality of memory units of a recurrent layer of the RNN, and generating a classification result for the given file based on the detected sequences of code features utilizing one or more classification layers of the RNN. The method further comprises utilizing the classification result to determine if the given file contains code of a designated code type, and modifying access by a given client device to the given file responsive to the determination.

Claims (61)

1. A method comprising:

generating an index representation of characters in at least a given portion of code of a given file;

mapping the index representation to a vector space providing contextual representation of the characters utilizing an embedding layer of a recurrent neural network, the embedding layer representing each of a plurality of characters in the given portion of the given code file as an entry in a vector of scalars, the vector of scalars assigning a given value to a given entry for a given character based at least in part on a probability of the given character following or being followed by another character having a designated code type;

identifying one or more code features in the mapped index representation utilizing at least one hidden layer of the recurrent neural network;

detecting sequences of the identified code features in the mapped index representation utilizing a plurality of memory units of a recurrent layer of the recurrent neural network;

generating a classification result for the given file based on the detected sequences of code features utilizing one or more classification layers of the recurrent neural network;

utilizing the classification result to determine if the given file contains code of the designated code type; and

modifying access by a given client device to the given file responsive to determining that the given file contains code of the designated code type;

wherein the at least one hidden layer comprises a sequence of two or more hidden layers;

wherein a given one of the sequence of two or more hidden layers comprises a set of filters configured to detect one or more features in the mapped index representation; and

wherein the method is performed by at least one processing device comprising a processor coupled to a memory.

2. The method of claim 1 wherein the designated code type comprises obfuscated code.

3. The method of claim 1 wherein the given file comprises a script file.

4. The method of claim 1 wherein generating the index representation comprises:

creating a corpus of each character in the code of a plurality of files including the given file;

assigning an index to each character in the corpus; and

generating an array comprising indexes of the corpus which correspond to the characters in the given portion of the code of the given file.

5. The method of claim 1 wherein the given portion of the code of the given file comprises a designated number of characters of the code of the given file less than all of the characters of the code of the given file.

6. The method of claim 1 wherein at least a given one of the sequence of two or more hidden layers comprises a convolutional layer.

7. The method of claim 6 wherein the convolutional layer comprises two or more convolution filters configured to detect one or more features in the mapped index representation.

8. The method of claim 7 wherein the convolutional layer applies Rectified Linear Units (ReLU) activation functions to its output.

9. The method of claim 7 wherein the given hidden layer further comprises a dropout layer configured to drop out random sets of activations in the convolutional layer.

10. The method of claim 7 wherein the given hidden layer further comprises a pooling layer configured to provide non-linear down-sampling of the output of the convolutional layer.

11. The method of claim 1 wherein the plurality of memory units of the recurrent layer comprise a plurality of long short-term memory (LSTM) cells arranged in a bi-directional network.

12. The method of claim 1 wherein the one or more classification layers comprise:

a fully connected layer comprising neurons with connections to each of the memory units in the recurrent layer; and

an output layer comprising at least one neuron that generates a representation of a confidence level of the recurrent neural network in classifying the given portion of the code of the given file as comprising code of the designated code type.

13. The method of claim 1 wherein modifying access by the given client device to the given file comprises at least one of:

removing the given file from a memory or storage of the given client device;

preventing the given client device from obtaining the given file; and

causing the given file to be opened in a sandboxed application environment on the given client device.

14. A computer program product comprising a non-transitory processor-readable storage medium having stored therein program code of one or more software programs, wherein the program code when executed by at least one processing device cause the at least one processing device:

to generate an index representation of characters in at least a given portion of code of a given file;

to map the index representation to a vector space providing contextual representation of the characters utilizing an embedding layer of a recurrent neural network, the embedding layer representing each of a plurality of characters in the given portion of the given code file as an entry in a vector of scalars, the vector of scalars assigning a given value to a given entry for a given character based at least in part on a probability of the given character following or being followed by another character having a designated code type;

to identify one or more code features in the mapped index representation utilizing at least one hidden layer of the recurrent neural network;

to detect sequences of the identified code features in the mapped index representation utilizing a plurality of memory units of a recurrent layer of the recurrent neural network;

to generate a classification result for the given file based on the detected sequences of code features utilizing one or more classification layers of the recurrent neural network;

to utilize the classification result to determine if the given file contains code of the designated code type; and

to modify access by a given client device to the given file responsive to determining that the given file contains code of the designated code type;

wherein the at least one hidden layer comprises a sequence of two or more hidden layers; and

wherein a given one of the sequence of two or more hidden layers comprises a set of filters configured to detect one or more features in the mapped index representation.

15. The computer program product of claim 14 wherein the designated code type comprises obfuscated code.

16. The computer program product of claim 14 wherein the given file comprises a script file.

17. An apparatus comprising:

at least one processing device comprising a processor coupled to a memory;

the at least one processing device being configured:

to generate an index representation of characters in at least a given portion of code of a given file;

to map the index representation to a vector space providing contextual representation of the characters utilizing an embedding layer of a recurrent neural network, the embedding layer representing each of a plurality of characters in the given portion of the given code file as an entry in a vector of scalars, the vector of scalars assigning a given value to a given entry for a given character based at least in part on a probability of the given character following or being followed by another character having a designated code type;

to identify one or more code features in the mapped index representation utilizing at least one hidden layer of the recurrent neural network;

to detect sequences of the identified code features in the mapped index representation utilizing a plurality of memory units of a recurrent layer of the recurrent neural network;

to generate a classification result for the given file based on the detected sequences of code features utilizing one or more classification layers of the recurrent neural network;

to utilize the classification result to determine if the given file contains code of the designated code type; and

to modify access by a given client device to the given file responsive to determining that the given file contains code of the designated code type;

wherein the at least one hidden layer comprises a sequence of two or more hidden layers; and

wherein a given one of the sequence of two or more hidden layers comprises a set of filters configured to detect one or more features in the mapped index representation.

18. The apparatus of claim 17 wherein the designated code type comprises obfuscated code.

19. The apparatus of claim 17 wherein the given file comprises a script file.

20. The method of claim 1 wherein assigning the given value to the given entry for the given character comprises:

identifying a given probability of the given character following or being followed by another character of the designated code type;

comparing the given probability with one or more additional probabilities of one or more additional characters following or being followed by another character having the designated code type; and

assigning the given value such that a distance between the given value and each of one or more additional values for the one or more additional characters is proportional to differences between the given probability and the one or more additional probabilities.

Assignments (8)
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (053546/0001) Recorded Jun 23, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL MARKETING L.P. (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO CREDANT TECHNOLOGIES, INC.); DELL INTERNATIONAL L.L.C.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; DELL MARKETING CORPORATION (SUCCESSOR-IN-INTEREST TO FORCE10 NETWORKS, INC. AND WYSE TECHNOLOGY L.L.C.); EMC IP HOLDING COMPANY LLC
Reel/Frame 071642/0001 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (043775/0082) Recorded May 20, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC
Reel/Frame 060958/0468 →
RELEASE OF SECURITY INTEREST AT REEL 043772 FRAME 0750 Recorded Nov 2, 2021
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
To: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC
Reel/Frame 058298/0606 →
SECURITY AGREEMENT Recorded Apr 22, 2020
From: CREDANT TECHNOLOGIES INC.; DELL INTERNATIONAL L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A.
Reel/Frame 053546/0001 →
SECURITY AGREEMENT Recorded Mar 21, 2019
From: CREDANT TECHNOLOGIES, INC.; DELL INTERNATIONAL L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A.
Reel/Frame 049452/0223 →
PATENT SECURITY AGREEMENT (CREDIT) Recorded Sep 6, 2017
From: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 043772/0750 →
PATENT SECURITY AGREEMENT (NOTES) Recorded Sep 6, 2017
From: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
Reel/Frame 043775/0082 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 9, 2017
From: AGRANONIK, ARIE; DUCHIN, ZOHAR
To: EMC IP HOLDING COMPANY LLC
Reel/Frame 043496/0130 →
Cited By (10)
US 12,248,572 US 12,299,124 US 12,339,962 US 12,411,953 US 12,430,429 US 12,437,067 US 12,437,239 US 12,462,025 US 12,688,287 US 12,717,920