SYSTEM AND METHOD FOR BRANCH EXTRACTION OBFUSCATION
First Claim
1. A method of obfuscating code, the method comprising:
- extracting a conditional statement from a computer program;
creating a function equivalent to the conditional statement;
creating a pointer that points to the function;
storing the pointer in an array of pointers;
replacing the conditional statement with a call to the function using the pointer at an index in the array; and
during runtime of the computer program, dynamically calculating the index corresponding to the pointer in the array.
2 Assignments
0 Petitions
Accused Products
Abstract
Disclosed herein are systems, methods, and computer readable-media for obfuscating code. The method includes extracting a conditional statement from a computer program, creating a function equivalent to the conditional statement, creating a pointer that points to the function, storing the pointer in an array of pointers, replacing the conditional statement with a call to the function using the pointer at an index in the array, and during runtime of the computer program, dynamically calculating the index corresponding to the pointer in the array. In one aspect, a subset of instructions is extracted from a path associated with the conditional statement and the subset of instructions is placed in the function to evaluate the conditional statement. In another aspect, the conditional statement is replaced with a call to a select function that (1) calculates the index into the array, (2) retrieves the function pointer from the array using the index, and (3) calls the function using the function pointer. Calls can be routed through a select function before the function pointer is used to call the function evaluating the conditional statement. Each step in the method can be applied to source code of the computer program, an intermediate representation of the computer program, and assembly code of the computer program.
-
Citations
20 Claims
-
1. A method of obfuscating code, the method comprising:
-
extracting a conditional statement from a computer program; creating a function equivalent to the conditional statement; creating a pointer that points to the function; storing the pointer in an array of pointers; replacing the conditional statement with a call to the function using the pointer at an index in the array; and during runtime of the computer program, dynamically calculating the index corresponding to the pointer in the array. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system for obfuscating code, the system comprising:
-
a module configured to extract a conditional statement from a computer program; a module configured to create a function equivalent to the conditional statement; a module configured to create a pointer that points to the function; a module configured to store the pointer in an array of pointers; a module configured to replace the conditional statement with a call to the function using the pointer at an index in the array; and a module configured to, during runtime of the computer program, dynamically calculate the index corresponding to the pointer in the array. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer-readable medium storing a computer program having instructions for obfuscating code, the instructions comprising:
-
extracting a conditional statement from a computer program; creating a function equivalent to the conditional statement; creating a pointer that points to the function; storing the pointer in an array of pointers; replacing the conditional statement with a call to the function using the pointer at an index in the array; and during runtime of the computer program, dynamically calculating the index corresponding to the pointer in the array. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification