IP Library Granted Patent US 7,380,269
Granted Patent B2
US 7,380,269 · App. 11/404,448 · Granted May 27, 2008

Changing code execution path using kernel mode redirection

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 7,380,269
App. No.
11/404,448
Granted
May 27, 2008
Kind
B2
Abstract

A mechanism for redirecting a code execution path in a running process. A one-byte interrupt instruction (e.g., INT 3) is inserted into the code path. The interrupt instruction passes control to a kernel handler, which after executing a replacement function, returns to continue executing the process. The replacement function resides in a memory space that is accessible to the kernel handler. The redirection mechanism may be applied without requiring a reboot of the computing device on which the running process is executing. In addition, the redirection mechanism may be applied without overwriting more than one byte in the original code.

Claims (30)

1. A method of redirecting a code execution path in a running process, comprising:

injecting a one-byte interrupt instruction into said code execution path of said process while said process is running, wherein said injecting comprises overwriting an instruction associated with said running process, said instruction existing in memory;

passing control to a kernel handler upon execution of said one-byte interrupt instruction;

executing a replacement function called by said kernel handler; and

returning to said running process.

2. The method of claim 1 , wherein said one-byte interrupt instruction is an INT 3 interrupt instruction.

3. The method of claim 1 , wherein said kernel handler includes a mechanism to cause a return from said interrupt instruction to continue into said replacement function.

4. The method of claim 1 , further comprising inserting said one-byte interrupt instruction such that no more than one byte of the original code in said code execution path is overwritten.

5. The method of claim 1 , further comprising loading said replacement function into a memory space accessible by said kernel handler.

6. The method of claim 1 , further comprising evaluating a license prior to executing said replacement function.

7. The method of claim 1 , further comprising decrypting said replacement function.

8. A method of changing a code execution path by using a one-byte interrupt to replace an existing function in a process, comprising:

injecting said one-byte interrupt into said existing function while said process is running, wherein said injecting comprises overwriting an instruction associated with said process, said instruction existing in memory;

passing control to a kernel handler upon execution of said one-byte interrupt;

executing a replacement function called by said kernel handler; and

returning to said code execution path.

9. The method of claim 8 , wherein said one-byte interrupt is an INT 3 interrupt instruction.

10. The method of claim 9 , wherein said kernel handler includes a mechanism to cause a return from said one-byte interrupt instruction to continue into said replacement function.

11. The method of claim 8 , further comprising inserting said one-byte interrupt such that no more than one byte in the original code in said code execution path is overwritten.

12. The method of claim 8 , further comprising loading said replacement function into a memory space accessible by said kernel handler.

13. The method of claim 8 , further comprising performing said method without requiring a reboot of a computing device on which a process executing said existing function said is running.

14. A computer readable storage medium having computer executable instructions thereon for redirecting a code execution path in a running process, said computer executable instructions performing a method, comprising:

injecting a one-byte interrupt instruction into said code execution path while said process is running, wherein said injecting comprises overwriting an instruction associated with said process, said instruction existing in memory;

passing control to a kernel handler upon execution of said one-byte interrupt instruction;

executing a replacement function called by said kernel handler; and

returning to said code execution path.

15. The computer readable storage medium of claim 14 , wherein said one-byte interrupt is an INT 3 interrupt instruction.

16. The computer readable storage medium of claim 14 , wherein said kernel handler includes a mechanism to cause a return from said one-byte interrupt instruction to continue into said replacement function.

17. The computer readable storage medium of claim 14 , further comprising instructions for inserting said one-byte interrupt instruction such that no more than one byte in the original code in said code execution path is overwritten.

18. The computer readable storage medium of claim 14 , further comprising instructions for loading said replacement function into a memory space accessible by said kernel handler.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034542/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 13, 2006
From: ZVI, NIR BEN; HATLELID, KRISTJAN E.; LELIKOV, ANDREY V.
To: MICROSOFT CORPORATION
Reel/Frame 018245/0095 →