Patent ID: 7243340

Claim:
A method for obfuscation of computer program execution flow to increase computer program security, the method comprising: (a) partitioning the computer program into one or more non-critical code segments and one or more critical code segments to be obfuscated; (b) removing at least one of the critical code segments and embedding the critical code segments within one or more exception handlers; (c) providing the computer program with an exception set-up handler to set up operation of the exception handlers during the execution of the computer program; (d) providing the computer program with one or more in-line code segments inserted within at least one of the non-critical code segments, wherein each of the in-line code segments forces an exception when executed and wherein the in-line code segments are placed in the computer program at points where the critical segments need to execute in order to maintain execution flow of the computer program; and (e) executing the computer program on a computer having an operating system that provides kernel-level and user-level execution modes, and debug resources to support generation and processing of exceptions at specified addresses, wherein execution flow of computer program is maintained with the non-critical code segments executing in the user-level execution mode, but when one of the in-line code segments is executed, an exception is forced and the kernel-level execution mode is entered whereby control is transferred to the one or more of the exception handlers previously set-up by the exception set-up handler for execution of the critical code segments, and when the exception handlers complete execution, control is returned to non-critical code segments, whereby program execution flow is obfuscated from other programs running in user-level execution mode, thereby increasing difficulty of reverse engineering the computer program.