IP Library Granted Patent US 12,461,846
Granted Patent B2
US 12,461,846 · App. 18/150,637 · Granted Nov 4, 2025

Extracting code patches from binary code for independent fuzz testing

Inventors: Shachar Menashe (Herzliya, IL); Ilya Khivrich (Rehovot, IL); Asaf Karas (Ramat Gan, IL)
Assignee: JFROG LTD
G06F11/3696G06F11/3684G06F11/3688G06F11/3692G06F21/577G06F2221/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 12,461,846
App. No.
18/150,637
Granted
Nov 4, 2025
Kind
B2
Abstract

A method, system and product comprising determining a characterization of a terminal within a binary code based on influences of the terminal, the characterization of the terminal indicates a role of the terminal in the binary code; based on the characterization of the terminal, determining that the terminal is potentially affected by external input to a device executing the binary code; determining for the terminal a corresponding propagation path within the binary code indicating a terminal reachability within the binary code; locating in the binary code a code patch associated with a functionality of the binary code, the code patch is associated with the propagation path of the terminal, the code patch can be executed independently from the binary code; extracting the code patch from the binary code for testing; generating an emulation of the code patch to enable fuzz testing of the emulation, the code patch is tested independently.

Claims (60)

1 . A method comprising:

obtaining a binary code of an embedded device;

performing static analysis of the binary code to identify a potentially vulnerable code region, wherein the potentially vulnerable code region is associated with providing input or output from code units of the binary code;

identifying propagation paths associated with the potentially vulnerable code region in the binary code;

analyzing the propagation paths to identify a potentially exploitable propagation path, wherein the potentially exploitable propagation path is potentially affected by external input that is inputted to a device executing the binary code;

determining a code patch associated with the potentially exploitable propagation path;

performing fuzz testing on the code patch independently from the binary code, whereby detecting vulnerabilities of the code patch; and

wherein said performing the fuzz testing comprises:

generating an emulation of the code patch independently from the binary code;

detecting vulnerabilities of the code patch by fuzz testing the emulation;

wherein the static analysis comprises:

determining a characterization of the potentially vulnerable code region based on influences between the potentially vulnerable code region and at least another code region in the binary code, wherein the characterization of the potentially vulnerable code region indicates a role of the potentially vulnerable code region in the binary code;

based on the characterization of the potentially vulnerable code region, determining that the potentially vulnerable code region is potentially affected by external input that is inputted to the device executing the binary code;

wherein said identifying the potentially exploitable propagation path comprises:

determining for the potentially vulnerable code region a corresponding potentially exploitable propagation path within the binary code, wherein the corresponding potentially exploitable propagation path indicates a reachability of the potentially vulnerable code region within the binary code;

locating in the binary code the code patch, wherein the code patch is associated with a functionality of interest of the binary code, wherein the code patch is associated with the potentially exploitable propagation path of the code region, wherein the code patch comprises the code region, wherein the code patch can be executed independently from the binary code.

2 . The method of claim 1 , wherein the emulation is generated based on the characterization of the code region indicating the role of the code region in the binary code, wherein the emulation is generated based on influences between the code region and other code regions in the binary code.

3 . The method of claim 1 wherein the code patch comprises at least a first code element from a first code unit associated with a first hierarchy level of the binary code and a second code element from a second code unit associated with a second hierarchy level of the binary code, whereby crossing through different code hierarchy levels, wherein the code patch excludes at least a third code element of the first code unit.

4 . The method of claim 3 , wherein the first code unit is a first function, wherein the second code unit is a second function, whereby the code patch comprises at least two portions of two separate functions of the binary code.

5 . The method of claim 3 , wherein the first code unit is a first code file, wherein the second code unit is a second code file, whereby the code patch comprises at least two portions of two separate files of the binary code.

6 . The method of claim 3 , wherein each of the influences comprises an influence between an influencing code region and an influenced code region, wherein the influence indicates a change of a first value that is associated with the influenced code region with a second value that is associated with the influencing code region.

7 . The method of claim 1 , comprising determining the characterization of the code region to indicate that the code region is an input, in response to a determination that the code region only influences other code regions without being influenced by the other code regions, and determining the characterization of the code region to indicate that the code region is an output in response to a determination that the code region is only influenced by other code region s without influencing the other code regions.

8 . The method of claim 1 , wherein the code patch comprises one or more code regions that match a pattern of interest.

9 . The method of claim 1 , wherein the code patch comprises the potentially exploitable propagation path.

10 . The method of claim 1 , wherein the code region comprises at least one of: a function argument, a return value, a condition branch, a global variable, and an offset of a buffer.

11 . The method of claim 1 , wherein the code region is characterized by a role thereof in the binary code.

12 . The method of claim 1 , wherein the potentially exploitable propagation path indicates a reachability of the code region within the binary code.

13 . The method of claim 1 , wherein the code patch excludes at least one code element from the binary code that is not utilized for performing the functionality of interest of the code patch.

14 . A system comprising a processor and coupled memory, the processor being adapted to:

obtain a binary code of an embedded device;

performing static analysis of the binary code to identify a potentially vulnerable code region, wherein the potentially vulnerable code region is associated with providing input or output from code units of the binary code;

identify propagation paths associated with the potentially vulnerable code region in the binary code;

analyze the propagation paths to identify a potentially exploitable propagation path, wherein the potentially exploitable propagation path is potentially affected by external input that is inputted to a device executing the binary code;

determine a code patch associated with the potentially exploitable propagation path;

perform fuzz testing on the code patch independently from the binary code, whereby detecting embedded code vulnerabilities; and

wherein said perform the fuzz testing comprises:

generating an emulation of the code patch independently from the binary code;

detecting vulnerabilities of the code patch by fuzz testing the emulation;

wherein the static analysis comprises:

determining a characterization of the code region based on influences between the code region and at least another code region in the binary code, wherein the characterization of the code region indicates a role of the code region in the binary code;

based on the characterization of the code region, determining that the code region is potentially affected by external input that is inputted to the device executing the binary code;

wherein said identifying the potentially exploitable propagation path comprises:

determining for the code region a corresponding potentially exploitable propagation path within the binary code, wherein the corresponding potentially exploitable propagation path indicates a reachability of the code region within the binary code;

locating in the binary code the code patch, wherein the code patch is associated with a functionality of interest of the binary code, wherein the code patch is associated with the potentially exploitable propagation path of the code region, wherein the code patch comprises the code region, wherein the code patch can be executed independently from the binary code.

15 . The system of claim 14 , wherein the emulation is generated based on a characterization of the code region indicating the role of the code region in the binary code, wherein the emulation is generated based on influences between the code region and other code regions in the binary code.

16 . A computer program product comprising a non-transitory computer readable storage medium retaining program instructions, which program instructions when read by a processor, cause the processor to perform: obtaining a binary code of an embedded device;

performing static analysis of the binary code to identify a potentially vulnerable code region, wherein the potentially vulnerable code region is associated with providing input or output from code units of the binary code;

identifying propagation paths associated with the potentially vulnerable code region in the binary code;

analyzing the propagation paths to identify a potentially exploitable propagation path, wherein the potentially exploitable propagation path is potentially affected by external input that is inputted to a device executing the binary code;

determining a code patch associated with the potentially exploitable propagation path;

performing fuzz testing on the code patch independently from the binary code, whereby detecting embedded code vulnerabilities; and

wherein said performing the fuzz testing comprises:

generating an emulation of the code patch independently from the binary code;

detecting vulnerabilities of the code patch by fuzz testing the emulation;

wherein the static analysis comprises:

determining a characterization of the code region based on influences between the code region and at least another code region in the binary code, wherein the characterization of the code region indicates a role of the code region in the binary code;

based on the characterization of the code region, determining that the code region is potentially affected by external input that is inputted to the device executing the binary code;

wherein said identifying the potentially exploitable propagation path comprises:

determining for the code region a corresponding potentially exploitable propagation path within the binary code, wherein the corresponding potentially exploitable propagation path indicates a reachability of the code region within the binary code;

locating in the binary code the code patch, wherein the code patch is associated with a functionality of interest of the binary code, wherein the code patch is associated with the potentially exploitable propagation path of the code region, wherein the code patch comprises the code region, wherein the code patch can be executed independently from the binary code.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 31, 2023
From: MENASHE, SHACHAR; KHIVRICH, ILYA; KARAS, ASAF
To: VDOO CONNECTED TRUST LTD.
Reel/Frame 062553/0875 →
MERGER Recorded Jan 31, 2023
From: VDOO CONNECTED TRUST LTD
To: JFROG LTD
Reel/Frame 062553/0900 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 5, 2023
From: MENASHE, SHACHAR; KHIVRICH, ILYA; KARAS, ASAF
To: VDOO CONNECTED TRUST LTD.
Reel/Frame 062288/0926 →
Continuity (2)
Continuation 16953500 · Nov 20, 2020
Related Publication 20230141948A1 · May 11, 2023
References Cited (8)
US 8438553B2 · Komatsu · 2013 [cited by examiner]
US 20100138810A1 · Komatsu · 2010 [cited by examiner]
US 20210191845A1 · Bach et al. · 2021 [cited by applicant]
US 20210350006A1 · Krupp · 2021 [cited by examiner]
US 20210397148A1 · Ota et al. · 2021 [cited by applicant]
Lanzi, A., et al. “A Smart Fuzzer for x86 Executables”, 29th Int'l Conf. on Software Engineering Workshops [online], 2007 [retrieved Nov. 30, 2024], Retrieved from Internet: <URL: https://citeseerx.ist.psu.edu/document?… [cited by examiner]
Kolbitsch, C., et al., “Inspector Gadget: Automated Extraction of Proprietary Gadgets from Malware Binaries”, 2010 IEEE Symposium on Security and Privacy [online], 2010 [retrieved Nov. 30, 2024], Retrieved from Internet… [cited by examiner]
Deng, Z et al: “BISTRO: Ninary Component Extraction and Embedding for Software Security Applications”: Lecture Notes in Computer Science, vol. 8134, 2013, pp. 200-218, published Mar. 2013. [cited by applicant]