IP Library Granted Patent US 12,373,603
Granted Patent B2
US 12,373,603 · App. 18/516,830 · Granted Jul 29, 2025

Methods and systems for recursive descent parsing

Inventors: Karen Heart (Forest Park, IL); Alexander Rasin (Chicago, IL)
Assignee: Secure Computing, LLC
G06F21/629G06F21/6227
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,373,603
App. No.
18/516,830
Granted
Jul 29, 2025
Kind
B2
Abstract

Methods, systems, and devices for parsing text are described herein. A method of securing executable files is performed at a computing device having one or more processors and memory. The memory stories one or more programs configured for execution by the one or more processors. The computing device obtains source text that comprises a disassembled executable file and identifies, via a general parser module, the syntax of the source text by performing a recursive descent parsing of the source text. The device generates an abstract syntax tree (AST) for the source text based on the identified syntax and generates a transformed AST from the generated AST by replacing one or more system calls with respective protected system functions. The device also generates a secured executable file by assembling the transformed AST.

Claims (48)

1. A method of securing executable files, performed at a computing device having one or more processors and memory storing one or more programs configured for execution by the one or more processors, the method comprising:

receiving an executable file;

disassembling the executable file to form source text;

identifying syntax of the source text by performing a recursive descent parsing of the source text, including matching grammar rules to the source text;

generating an abstract syntax tree (AST) for the source text based on the identified syntax;

generating a transformed AST from the generated AST by replacing each of one or more calls to kernel system functions with a respective call to a respective protected system function that performs security checks and calls the respective kernel system function when the security checks are passed; and

generating a secured executable file by assembling the transformed AST.

2. The method of claim 1 , wherein identifying the syntax of the source text further comprises:

recognizing a plurality of language tokens in the source text; and

recognizing corresponding identifier strings for the plurality of language tokens, wherein the syntax of the source text is identified based on the plurality of language tokens and the corresponding identifier strings.

3. The method of claim 1 , further comprising storing the AST to a file having a secure protocol format.

4. The method of claim 3 , further comprising:

reconstructing the AST in memory from the file having the secure protocol format.

5. The method of claim 3 , wherein the file is a binary file.

6. The method of claim 1 , wherein identifying the syntax of the source text further comprises identifying one or more structural statements and one or more substructural statements in the source text.

7. The method of claim 6 , wherein generating the AST comprises identifying a respective production rule for each of one or more structural statements.

8. The method of claim 1 , wherein the transformed AST is digitally signed prior to assembly.

9. The method of claim 1 , wherein the one or more calls to kernel system functions comprise a first call to a file and a second call to a socket.

10. A computing device, comprising:

one or more processors;

memory; and

one or more programs stored in the memory and configured for execution by the one or more processors, the one or more programs comprising instructions for:

receiving an executable file;

disassembling the executable file to form source text;

identifying syntax of the source text by performing a recursive descent parsing of the source text, including matching grammar rules to the source text;

generating an abstract syntax tree (AST) for the source text based on the identified syntax;

generating a transformed AST from the generated AST by replacing each of one or more calls to kernel system functions with a respective call to a respective protected system function that performs security checks and calls the respective kernel system function when the security checks are passed; and

generating a secured executable file by assembling the transformed AST.

11. The computing device of claim 10 , wherein identifying the syntax of the source text further comprises:

recognizing a plurality of language tokens in the source text; and

recognizing corresponding identifier strings for the plurality of language tokens, wherein the syntax of the source text is identified based on the plurality of language tokens and the corresponding identifier strings.

12. The computing device of claim 10 , wherein the one or more programs further comprise instructions for storing the AST to a file having a secure protocol format.

13. The computing device of claim 10 , wherein identifying the syntax of the source text further comprises identifying one or more structural statements and one or more substructural statements in the source text.

14. The computing device of claim 13 , wherein generating the AST comprises identifying a respective production rule for each of one or more structural statements.

15. The computing device of claim 10 , wherein the transformed AST is digitally signed prior to assembly.

16. A non-transitory computer-readable storage medium storing one or more programs configured for execution by a computing device having one or more processors and memory, the one or more programs comprising instructions for:

receiving an executable file;

disassembling the executable file to form source text;

identifying syntax of the source text by performing a recursive descent parsing of the source text, including matching grammar rules to the source text;

generating an abstract syntax tree (AST) for the source text based on the identified syntax;

generating a transformed AST from the generated AST by replacing each of one or more calls to kernel system functions with a respective call to a respective protected system function that performs security checks and calls the respective kernel system function when the security checks are passed; and

generating a secured executable file by assembling the transformed AST.

17. The non-transitory computer-readable storage medium of claim 16 , wherein identifying the syntax of the source text further comprises:

recognizing a plurality of language tokens in the source text; and

recognizing corresponding identifier strings for the plurality of language tokens, wherein the syntax of the source text is identified based on the plurality of language tokens and the corresponding identifier strings.

18. The non-transitory computer-readable storage medium of claim 16 , wherein the one or more programs further comprise instructions for storing the AST to a file having a secure protocol format.

19. The non-transitory computer-readable storage medium of claim 16 , wherein identifying the syntax of the source text further comprises identifying one or more structural statements and one or more substructural statements in the source text.

20. The non-transitory computer-readable storage medium of claim 19 , wherein generating the AST comprises identifying a respective production rule for each of one or more structural statements.

Continuity (7)
Continuation 17824860 · May 25, 2022
Provisional Application 63338823 · May 5, 2022
Provisional Application 63301032 · Jan 19, 2022
Provisional Application 63276546 · Nov 5, 2021
Provisional Application 63271274 · Oct 25, 2021
Provisional Application 63270449 · Oct 21, 2021
Related Publication 20240095402A1 · Mar 21, 2024
References Cited (57)
US 6336175B1 · Shaath et al. · 2002 [cited by applicant]
US 7814554B1 · Ragner · 2010 [cited by applicant]
US 7849509B2 · Venkatapathy · 2010 [cited by examiner]
US 8387047B1 · Mazin et al. · 2013 [cited by applicant]
US 8484734B1 · Tsai et al. · 2013 [cited by applicant]
US 8613045B1 · Shigapov · 2013 [cited by applicant]
US 8751493B2 · Procopio et al. · 2014 [cited by applicant]
US 8863299B2 · Sharma et al. · 2014 [cited by applicant]
US 9098363B2 · Schmidt et al. · 2015 [cited by applicant]
US 9111071B2 · Kerschbaum · 2015 [cited by examiner]
US 9195840B2 · Day-Richter et al. · 2015 [cited by applicant]
US 9213541B2 · Araya · 2015 [cited by examiner]
US 10042637B1 · Foster · 2018 [cited by examiner]
US 10073710B2 · Tsirkin · 2018 [cited by applicant]
US 10127318B2 · Chakra et al. · 2018 [cited by applicant]
US 10628560B1 · Siranni et al. · 2020 [cited by applicant]
US 10877748B2 · Bucuvalas · 2020 [cited by examiner]
US 11657154B2 · Conikee · 2023 [cited by examiner]
US 11775866B2 · Paterson et al. · 2023 [cited by applicant]
US 11822699B1 · Heart et al. · 2023 [cited by applicant]
US 11983288B1 · Heart et al. · 2024 [cited by applicant]
US 20020033838A1 · Krueger et al. · 2002 [cited by applicant]
US 20050033975A1 · Lahti et al. · 2005 [cited by applicant]
US 20060041942A1 · Edwards · 2006 [cited by applicant]
US 20060136446A1 · Hughes et al. · 2006 [cited by applicant]
US 20060272021A1 · Marinescu et al. · 2006 [cited by applicant]
US 20070157287A1 · Lim · 2007 [cited by applicant]
US 20080209551A1 · Treacy et al. · 2008 [cited by applicant]
US 20080229428A1 · Camiel · 2008 [cited by applicant]
US 20090193074A1 · Lee · 2009 [cited by applicant]
US 20100154038A1 · Natarajan · 2010 [cited by applicant]
US 20100211879A1 · Tsao · 2010 [cited by applicant]
US 20120016861A1 · Edwards et al. · 2012 [cited by applicant]
US 20140137252A1 · Zheng et al. · 2014 [cited by applicant]
US 20150058286A1 · Leibovici et al. · 2015 [cited by applicant]
US 20150113655A1 · Strahm · 2015 [cited by applicant]
US 20160231941A1 · Oh et al. · 2016 [cited by applicant]
US 20170090699A1 · Pennington et al. · 2017 [cited by applicant]
US 20170104599A1 · Ali et al. · 2017 [cited by applicant]
US 20170206371A1 · Kim et al. · 2017 [cited by applicant]
US 20180129821A1 · Havewala et al. · 2018 [cited by applicant]
US 20180144124A1 · Lahav et al. · 2018 [cited by applicant]
US 20180181723A1 · von Muhlen et al. · 2018 [cited by applicant]
US 20180285007A1 · Franklin et al. · 2018 [cited by applicant]
US 20190228153A1 · Scaife et al. · 2019 [cited by applicant]
US 20190332783A1 · Bhardwaj et al. · 2019 [cited by applicant]
US 20200394313A1 · Ionescu · 2020 [cited by examiner]
US 20200404007A1 · Singh · 2020 [cited by examiner]
US 20210056211A1 · Olson · 2021 [cited by examiner]
US 20220027110A1 · Abe et al. · 2022 [cited by applicant]
US 20220358216A1 · Qi et al. · 2022 [cited by applicant]
US 20230161824A1 · Pandit et al. · 2023 [cited by applicant]
US 20230244389A1 · Dai et al. · 2023 [cited by applicant]
Kang Wang et al., “File Hiding Based on Capacity Disguise and Double File System”, English-translation abstract, Journal of Computer Applications, (Apr. 10, 2016), vol. 36, No. 4, pp. 979-984, CODEN: JYIIDU, ISSN: 1001-… [cited by applicant]
Karen Heart, Notice of Allowance, U.S. Appl. No. 17/555,265, Apr. 1, 2024, 15 pgs. [cited by applicant]
Karen Heart, Notice of Allowance, U.S. Appl. No. 17/824,860, Sep. 29, 2023, 10 pgs. [cited by applicant]
Song Sanggeun et al., “The Effective Ransomware Prevention Technique Using Process Monitoring on Android Platform”, Hindawi Publishing Corporation, Mobile Information Systems, vol. 2016, Article ID 2946735, 9 pgs., Retr… [cited by applicant]