IP Library Granted Patent US 8,479,295
Granted Patent B2
US 8,479,295 · App. 13/076,378 · Granted Jul 2, 2013

Method and apparatus for transparently instrumenting an application program

Inventors: Ravi L. Sahita (Portland, OR); David M. Durham (Beaverton, OR); Prashant Dewan (Hillsboro, OR); Manohar R. Castelino (Sunnyvale, CA)
Assignee: Intel Corporation
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 8,479,295
App. No.
13/076,378
Granted
Jul 2, 2013
Kind
B2
Abstract

Generally, this disclosure describes systems and methods for transparently instrumenting a computer process. The systems and methods are configured to allow instrumenting executable code while permitting legacy memory scanning tools to monitor corresponding uninstrumented executable code stored in memory.

Claims (68)

1. A method, comprising:

storing, by a processor, at least a portion of an executable application program in a host system physical memory at a first host physical address;

instrumenting, by the processor, a copy of said portion of said executable application program and storing said instrumented copy in said host system physical memory at a second host physical address;

setting, by the processor, a corresponding access permission to read only for said first host physical address and setting a corresponding access permission to execute only for said second host physical address;

executing, by the processor, said instrumented copy or reading said portion of said executable application program based, at least in part, on said access permissions;

generating, by the processor, a first extended page table associated with said first host physical address and a second extended page table associated with said second host physical address; and

instrumenting, by the processor, a memory scanner with a first instruction, said first instruction configured to select said first extended page table,

wherein said memory scanner is configured to read said portion of said executable application program and said first instruction is configured to be executed prior to said memory scanner reading said portion of said executable application program.

2. The method of claim 1 , further comprising:

generating, by the processor, a page fault in response to an attempt to read said second host physical address or an attempt to execute said portion of said executable application program stored at said first host physical address.

3. The method of claim 2 , further comprising:

determining, by the processor, a type of said page fault; and

updating, by the processor, an extended page table entry to correspond to said second host physical address if said page fault is an execute fault or to correspond to said first host physical address if said page fault is a read fault.

4. The method of claim 1 , wherein a memory scanner is configured to read said portion of said executable application program.

5. The method of claim 1 , further comprising:

instrumenting, by the processor, said memory scanner with a second instruction, said second instruction configured to select said second extended page table,

wherein said second instruction is configured to be executed after said memory scanner has read said portion of said executable application program.

6. The method of claim 1 , further comprising:

monitoring, by the processor, execution of said executable application program using said instrumented copy, wherein said monitoring is configured to detect malware.

7. The method of claim 1 , further comprising:

generating, by the processor, a first extended page table associated with said first host physical address and a second extended page table associated with said second host physical address;

generating, by the processor, a page fault in response to an attempt to read said second host physical address or an attempt to execute said portion of said executable application program stored at said first host physical address; and

selecting, by the processor, one of said first and second extended page tables in response to the page fault.

8. system comprising:

one or more processors;

one or more storage devices having stored thereon, individually or in combination, instructions that, when executed by one or more processors, result in the following operations comprising:

storing at least a portion of an executable application program in a host system physical memory at a first host physical address;

instrumenting a copy of said portion of said executable application program and storing said instrumented copy in said host system physical memory at a second host physical address;

setting a corresponding access permission to read only for said first host physical address and setting a corresponding access permission to execute only for said second host physical address;

executing said instrumented copy or reading said portion of said executable application program based, at least in part, on said access permissions;

generating a first extended page table associated with said first host physical address and a second extended page table associated with said second host physical address; and

instrumenting a memory scanner with a first instruction, said first instruction configured to select said first extended page table,

wherein said memory scanner is configured to read said portion of said executable application program and said first instruction is configured to be executed prior to said memory scanner reading said portion of said executable application program.

9. The system of claim 8 , wherein the instructions result in the following additional operations comprising:

generating a page fault in response to an attempt to read said second host physical address or an attempt to execute said portion of said executable application program stored at said first host physical address.

10. The system of claim 9 , wherein the instructions result in the following additional operations comprising:

determining a type of said page fault; and

updating an extended page table entry to correspond to said second host physical address if said page fault is an execute fault or to correspond to said first host physical address if said page fault is a read fault.

11. The system of claim 8 , wherein a memory scanner is configured to read said portion of said executable application program.

12. The system of claim 8 , wherein the instructions result in the following additional operations comprising:

instrumenting said memory scanner with a second instruction, said second instruction configured to select said second extended page table,

wherein said second instruction is configured to be executed after said memory scanner has read said portion of said executable application program.

13. The system of claim 8 , wherein the instructions result in the following additional operations comprising:

monitoring execution of said executable application program using said instrumented copy wherein said monitoring is configured to detect malware.

14. The system of claim 8 , wherein the instructions result in the following additional operations comprising:

generating a first extended page table associated with said first host physical address and a second extended page table associated with said second host physical address;

generating a page fault in response to an attempt to read said second host physical address or an attempt to execute said portion of said executable application program stored at said first host physical address; and

selecting one of said first and second extended page tables in response to the page fault.

15. A system, comprising:

host physical memory; and

a processor configured to:

store at least a portion of an executable application program in said host system physical memory at a first host physical address;

instrument a copy of said portion of said executable application program and store said instrumented copy in said host system physical memory at a second host physical address;

set a corresponding access permission to read only for said first host physical address and set a corresponding access permission to execute only for said second host physical address; and

execute said instrumented copy or read said portion of said executable application program based, at least in part, on said access permissions;

generate a first extended page table associated with said first host physical address and a second extended page table associated with said second host physical address; and

instrument a memory scanner with a first instruction, said first instruction configured to select said first extended page table,

wherein said memory scanner is configured to read said portion of said executable application program and said first instruction is configured to be executed prior to said memory scanner reading said portion of said executable application program.

16. The system of claim 15 , wherein the processor is further configured to:

generate a page fault in response to an attempt to read said second host physical address or an attempt to execute said portion of said executable application program stored at said first host physical address.

17. The system of claim 16 , wherein the processor is further configured to:

determine a type of said page fault; and

updating an extended page table entry to correspond to said second host physical address if said page fault is an execute fault or to correspond to said first host physical address if said page fault is a read fault.

18. The system of claim 15 , wherein the processor is further configured to:

instrument said memory scanner with a second instruction, said second instruction configured to select said second extended page table,

wherein said second instruction is configured to be executed after said memory scanner has read said portion of said executable application program.

19. The system of claim 15 , wherein the processor is further configured to:

monitor execution of said executable application program using said instrumented copy, said monitoring is configured to detect malware.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 22, 2011
From: SAHITA, RAVI L.; DURHAM, DAVID M.; DEWAN, PRASHANT; CASTELINO, MANOHAR R.
To: INTEL CORPORATION
Reel/Frame 026950/0907 →
Continuity (1)
Related Publication 20120255015A1 · Oct 4, 2012