Re: Get SectionHandle from PEPROCESS?
From: Don Burn (burn_at_stopspam.acm.org)
Date: 05/15/04
- Next message: john klosak: "CreateWiaDeviceManager"
- Previous message: Maxim S. Shatskih: "Re: NDIS miniport driver question"
- In reply to: afei: "Re: Get SectionHandle from PEPROCESS?"
- Next in thread: afei: "Re: Get SectionHandle from PEPROCESS?"
- Reply: afei: "Re: Get SectionHandle from PEPROCESS?"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 15 May 2004 07:46:40 -0400
Load your driver at boot time, build your own mapping table use the
PsSetLoadImageNotifyRoutine's callback (first image loaded for a process is
its executable) to populate the table, and PsSetCreateProcessNotifyRoutine's
callback to free entries in the table. This is 100% approved safe and
legal. Note I have never encountered any complaints of hitting the limit on
these calls that was in some versions of the OS.
-- Don Burn (MVP, Windows DDK) Windows 2k/XP/2k3 Filesystem and Driver Consulting Remove StopSpam from the email to reply "afei" <afei@sbcglobal.net> wrote in message news:68000f4f.0405131123.2392871e@posting.google.com... > Hi George & Don, thanks for the response. > > Yes, I tried the offset 0x1d4 on WinXp and it works. I will use it > before find a better way. > > To get the path name from Section, the idea is to find out the related > FileObject then ObQueryNameString() to get the file name. In the > SectionObject, offset +0x14 is a pointer pointed to some structure > which contain the FileObject at offset +0x24. It's lucky that these > didn't changed on Win2000, WinXP and Win2003, so I can use it before a > documented method was found. > ObReferenceObjectByHandle( ...SectionHandle... pSectionPointer ... ) > mov eax, pSectionPointer > mov ecx, [eax+14h] > mov eax, [ecx] > mov ecx, [eax+24h] > mov pFileObj, ecx > ObQueryNameString( ... pFileObj ... ) > > As Don said, this is not a good solution, but what can we do without a > better choice. > > Rgds.
- Next message: john klosak: "CreateWiaDeviceManager"
- Previous message: Maxim S. Shatskih: "Re: NDIS miniport driver question"
- In reply to: afei: "Re: Get SectionHandle from PEPROCESS?"
- Next in thread: afei: "Re: Get SectionHandle from PEPROCESS?"
- Reply: afei: "Re: Get SectionHandle from PEPROCESS?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|