IP Library Granted Patent US 12,321,453
Granted Patent B1
US 12,321,453 · App. 17/409,648 · Granted Jun 3, 2025

Machine learning-based malicious attachment detector

Inventors: Torsten Zeppenfeld (Emerald Hills, CA); Javier Castro (Kensington, MD); YenHsiang Chang (Hayward, CA)
Assignee: CLOUDFLARE, INC.
G06F21/566G06F18/24323G06F21/554G06F21/568G06N3/08
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 12,321,453
App. No.
17/409,648
Granted
Jun 3, 2025
Kind
B1
Abstract

A method includes receiving, from a pre-processor, an output file, the output file having been created by the pre-processor in response to input of an electronic file to the pre-processor, the electronic file being an attachment to an electronic mail message that is in-transit to a recipient computer on a network, the electronic file being a spreadsheet file, the output file containing features that are created by the pre-processor; receiving, from a machine learning-based classifier, malware classification data, the malware classification data being output by the machine learning-based classifier in response to the machine learning-based classifier determining whether the features are indicators of obfuscation, the data used to create the machine learning-based classifier including output files previously created by the pre-processor; in response to the malware classification data matching a criterion, causing the network to modify, delay, or block transmission of the electronic file to the recipient computer.

Claims (46)

1. A computer-implemented method comprising:

receiving, from a pre-processor, an output file, the output file having been created by the pre-processor in response to input of an electronic file to the pre-processor, the electronic file being an attachment to an electronic mail message that is in-transit to a recipient computer on a network, the electronic file being a spreadsheet file, the output file containing features that are created by the pre-processor analyzing one or more sub-features of the electronic file, including one or more of: a sheet count of the spreadsheet file, a word count from cells of the spreadsheet file, a character count from words in the cells of the spreadsheet file, and text entropy from text in the cells of the spreadsheet file;

receiving, from a machine learning-based classifier, malware classification data that indicates whether the electronic file does or does not contain malware, the malware classification data being output by the machine learning-based classifier in response to the machine learning-based classifier determining that the features are or are not indicators of obfuscation, the data used to create the machine learning-based classifier including output files previously created by the pre-processor; and

in response to the malware classification data matching a criterion, causing the network to modify, delay, or block transmission of the electronic file to the recipient computer.

2. The method of claim 1 , wherein the pre-processor performs any one or more of the following to create the output file: parsing the electronic file, pre-execution static analysis of the electronic file, and extracting script components from the electronic file.

3. The method of claim 1 , wherein the features comprises any one or more of the following: an occurrence count, an occurrence frequency, metadata, a string of interest, a warning, a classification, and a rule name.

4. The method of claim 1 , further comprising:

performing one or more of the following: reducing the features using mutual information criteria and transforming the features to a floating point vector.

5. The method of claim 1 , wherein a model used by the machine learning-based classifier is created using any one or more of the following: a tree-based algorithm, a random forest algorithm, a deep learning algorithm, a neural network, and a deep convolutional neural network.

6. The method of claim 1 , the features comprising any one or more of: sheet count, word count from all cells, character count from all words in all cells, editing time, text entropy from all text in all cells, overall entropy from all text in all cells and all field types, occurrence count for strings of interest, and occurrence count for field types of interest.

7. The method of claim 1 , comprising receiving the electronic file from a message transfer application on the network.

8. A computer program product comprising:

one or more non-transitory computer-readable storage media coupled to one or more processors, the one or more non-transitory computer-readable storage media storing instructions which, when executed by one or more processors, cause the one or more processors to perform operations comprising:

receiving, from a pre-processor, an output file, the output file having been created by the pre-processor in response to input of an electronic file to the pre-processor, the electronic file being an attachment to an electronic mail message that is in-transit to a recipient computer on a network, the electronic file being a spreadsheet file, the output file containing features that are created by the pre-processor analyzing one or more sub-features of the electronic file, including one or more of: a sheet count of the spreadsheet file, a word count from cells of the spreadsheet file, a character count from words in the cells of the spreadsheet file, and text entropy from text in the cells of the spreadsheet file;

receiving, from a machine learning-based classifier, malware classification data that indicates whether the electronic file does or does not contain malware, the malware classification data being output by the machine learning-based classifier in response to the machine learning-based classifier determining that the features are or are not indicators of obfuscation, the data used to create the machine learning-based classifier including output files previously created by the pre-processor; and

in response to the malware classification data matching a criterion, causing the network to modify, delay, or block transmission of the electronic file to the recipient computer.

9. The computer program product of claim 8 , wherein the pre-processor performs any one or more of the following to create the output file: parsing the electronic file, pre-execution static analysis of the electronic file, and extracting script components from the electronic file.

10. The computer program product of claim 8 , wherein the instructions, when executed by the one or more processors, cause the one or more processors to perform operations comprising:

performing one or more of the following: reducing the features using mutual information criteria and transforming the features to a floating point vector.

11. The computer program product of claim 8 , wherein a model used by the machine learning-based classifier is created using any one or more of the following: a tree-based algorithm, a random forest algorithm, a deep learning algorithm, a neural network, and a deep convolutional neural network.

12. The computer program product of claim 8 , the features comprising any one or more of: sheet count, word count from all cells, character count from all words in all cells, editing time, text entropy from all text in all cells, overall entropy from all text in all cells and all field types, occurrence count for strings of interest, and occurrence count for field types of interest.

13. The computer program product of claim 8 , the instructions, when executed by one or more processors, cause the one or more processors to perform operations comprising receiving the electronic file from a message transfer application on the network.

14. A computer-implemented method comprising:

receiving, from a pre-processor, a first output file, the first output file having been created by the pre-processor in response to input of a first electronic file to the pre-processor, the pre-processor creating the first output file by parsing and analyzing the first electronic file and extracting script components from the first electronic file, the first electronic file being a first attachment to a first electronic mail message that is in-transit to a first recipient computer on a network, the first output file containing features that are created by the pre-processor analyzing one or more sub-features of the first electronic file, the features comprising one or more of: an occurrence count, an occurrence frequency, metadata, a string of interest, a warning, a classification, and a rule name, and performing a feature reduction of a number of the features in the first output file by using mutual information criteria to merge a subset of the features that contain similar information;

receiving, from a machine learning-based classifier, malware classification data that indicates whether the first electronic file does or does not contain malware, the malware classification data being output by the machine learning-based classifier in response to the machine learning-based classifier determining that the features are or are not indicators of obfuscation, the data used to create the machine learning-based classifier including output files previously created by the pre-processor; and

in response to the malware classification data matching a criterion, causing the network to modify, delay, or block transmission of the first electronic file to the recipient computer.

15. The method of claim 14 , further comprising:

creating, by the pre-processor, a second output file based on input of a second electronic file, wherein the second output file indicates that the second electronic file contains Visual Basic for Application (VBA) code or programming code, wherein the second electronic file is a second attachment to a second message that is in-transit to a second recipient computer on the network, and wherein the second output file includes features that are created by the pre-processor analyzing one or more sub-features of the second electronic file, wherein the features comprises any one or more of the following: a word count, a 128 byte frequency, a 128 byte raw-count, a count of comment lines, a ratio of number of comment lines to code lines, a number of code lines, a length of document in characters, a count of VBA scripts, an average number of lines per VBA script, and a largest number of lines per VBA script;

receiving, from the machine learning-based classifier, malware classification data that indicates that the second electronic file includes malware; and

causing the network to modify, delay, or block transmission of the second electronic file to the second recipient computer.

16. The method of claim 14 , further comprising:

creating, by the pre-processor, a second output file based on input of a second electronic file, wherein the second output file indicates that the second electronic file is a Rich Text Format (RTF) file or a word processor-created document file that does not contain programming code, wherein the second electronic file is a second attachment to a second message that is in-transit to a second recipient computer on the network, and wherein the second output file includes features that are created by the pre-processor analyzing one or more sub-features of the second electronic file, wherein the features comprises any one or more of the following: a page count, a word count, a character count, an editing time, a classification, a warning, a text entropy, an overall entropy, a document size, parse tree data, a rule name, an indicator priority, and an indicator category;

receiving, from the machine learning-based classifier, malware classification data that indicates that the second electronic file includes malware; and

causing the network to modify, delay, or block transmission of the second electronic file to the second recipient computer.

17. The method of claim 14 , further comprising:

creating, by the pre-processor, a second output file based on input of a second electronic file, wherein the second output file indicates that the second electronic file is a Portable Document Format (PDF) file or an image file, wherein the second electronic file is a second attachment to a second message that is in-transit to a second recipient computer on the network, and wherein the second output file includes features that are created by the pre-processor analyzing one or more sub-features of the second electronic file, wherein the features comprises any one or more of the following: a version number, a number of colors, an occurrence count for a string of interest, a count of embedded objects, a minimum object identifier, a maximum object identifier, a trailer minimum size, a trailer maximum size, a count of trailer objects, a count of streams, a stream minimum size, a stream maximum size, a fraction of a file that is part of a stream, a total entropy, a non-stream entropy, a file size in bytes, a file size in bytes for non-stream parts, an end of file (EOF) count, a count for a top occurring variable, a count of xref tags, a count of startxref tags, a count of embedded Uniform Resource Locators (URLs), and a top occurring metadata item;

receiving, from the machine learning-based classifier, malware classification data that indicates that the second electronic file includes malware; and

causing the network to modify, delay, or block transmission of the second electronic file to the second recipient computer.

18. The method of claim 14 , further comprising:

creating, by the pre-processor, a second output file based on input of a second electronic file, wherein the second output file indicates that the second electronic file is a Portable Document Format (PDF) file, wherein the second electronic file is a second attachment to a second message that is in-transit to a second recipient computer on the network, and wherein the second output file includes features that are created by the pre-processor analyzing one or more sub-features of the second electronic file, wherein the machine learning-based classifier is created using a neural network and the malware classification data is produced by inputting a single image of the electronic file to the machine learning-based classifier;

receiving, from the machine learning-based classifier, malware classification data that indicates that the second electronic file includes malware; and

causing the network to modify, delay, or block transmission of the second electronic file to the second recipient computer.

19. The method of claim 14 , further comprising:

creating, by the pre-processor, a second output file based on input of a second electronic file, wherein the second output file indicates that the second electronic file is a Flash file or a Small Web Format (SWF) file or a multimedia file, wherein the second electronic file is a second attachment to a second message that is in-transit to a second recipient computer on the network, and wherein the second output file includes features that are created by the pre-processor analyzing one or more sub-features of the second electronic file, wherein the features comprises any one or more of the following: a version number, a file size, a count of scripts, a count for a word of interest, a decompiler message, a line count, a character count, a 128 byte frequency, and a 128 byte raw-count;

receiving, from the machine learning-based classifier, malware classification data that indicates that the second electronic file includes malware; and

causing the network to modify, delay, or block transmission of the second electronic file to the second recipient computer.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 15, 2022
From: AREA 1 SECURITY, LLC
To: CLOUDFLARE, INC.
Reel/Frame 059615/0665 →
MERGER Recorded Apr 11, 2022
From: AREA 1 SECURITY, INC.
To: ANGLER MERGER SUB II, LLC
Reel/Frame 059565/0414 →
CHANGE OF NAME Recorded Apr 11, 2022
From: ANGLER MERGER SUB II, LLC
To: AREA 1 SECURITY, LLC
Reel/Frame 059565/0653 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 2, 2021
From: ZEPPENFELD, TORSTEN; CASTRO, JAVIER; CHANG, YENHSIANG
To: AREA 1 SECURITY, INC.
Reel/Frame 057372/0499 →
Continuity (1)
Continuation In Part 16231838 · Dec 24, 2018
References Cited (20)
US 20140090061A1 · Avasarala et al. · 2014 [cited by applicant]
US 20150230108A1 · Sridhara · 2015 [cited by examiner]
US 20170262633A1 · Miserendino et al. · 2017 [cited by applicant]
US 20180159871A1 · Komashinskiy et al. · 2018 [cited by applicant]
US 20190065744A1 · Gaustad · 2019 [cited by examiner]
US 20190332769A1 · Fralick · 2019 [cited by examiner]
GB 2555859A · 2018 [cited by examiner]
GB 2557253A · 2018 [cited by applicant]
WO 2019075338A1 · 2019 [cited by applicant]
WO 2019168703A1 · 2019 [cited by applicant]
Nor Zakiah Gorment; Ali Selamat; Lim Kok Cheng; Ondrej Krejcar; “Machine Learning Algorithm for Malware Detection: Taxonomy, Current Challenges, and Future Directions”; IEEE Access; Year: Mar. 14, 2023; vol. 11; Journal… [cited by examiner]
Decalage, “oletools—Python Tools to Analyze OLE and MS Office Files”, https://www.decalage.info/python/oletools, dated Jun. 13, 2018, 4 pages. [cited by applicant]
Final Office Action, U.S. Appl. No. 16/231,838, Mar. 11, 2022, 13 pages. [cited by applicant]
Maryam Al-Janabi; Ahmad Mousa Altamimi; “A Comparative Analysis of Machine Learning Techniques for Classification and Detection of Malware”; 2020 21st International Arab Conference on Information Technology (ACIT); Year… [cited by applicant]
Non-Final Office Action, U.S. Appl. No. 16/231,838, Nov. 4, 2021, 11 pages. [cited by applicant]
Non-Final Office Action, U.S. Appl. No. 18/155,486, Apr. 19, 2024, 40 pages. [cited by applicant]
Notice of Allowance, U.S. Appl. No. 16/231,838, Sep. 14, 2022, 15 pages. [cited by applicant]
Titaniumcore, “Malware Analysis Solution”, https://www.reversinglabs.com/technology/malware-analysis-solution, last viewed on Apr. 1, 2019, 5 pages. [cited by applicant]
Giovanni Apruzzese, Hyrum S. Anderson, Savino Dambra, David Freeman, Fabio Pierazzi, Kevin Roundy; “Real Attackers Don't Compute Gradients: Bridging the Gap Between Adversarial ML Research and Practice”; 2023 IEEE Confe… [cited by applicant]
Notice of Allowance, U.S. Appl. No. 18/155,486, Sep. 16, 2024, 15 pages. [cited by applicant]