Re: CreateProcess parameter interception at NtCreateSection
- From: "Skywing" <skywing_NO_SPAM_@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 11 May 2006 16:50:23 -0400
I don't think that there will be a very elegant / reliable solution to this
problem, BTW, simply due to how process creation works.
The Win32 layer provides the illusion that creating the process, pushing
parameters into it, and creating the first thread are all an atomic
operation, but this is really broken up into multiple distinct steps, and
there is no single kernel call that will receive all of the information you
would need.
The usual flow would be something like this (in the current implementation
and subject to change in future releases):
NtCreateFile(ExePath)
NtCreateSection(File)
NtCreateProcess/NtCreateProcessEx(...)
.... write parameters into the process with NtAllocateVirtualMemory /
NtWriteVirtualMemory, including RTL_USER_PROCESS_PARAMETERS ...
NtCreateThread() // create the first thread
NtResumeThread() // start the first thread running unless we are using
CREATE_SUSPENDED
So, as you can see, there isn't really any one kernel call to intercept that
will just handily give you the information that you are looking for anyway -
and in any case, the process parameters structure isn't even built in the
typical case of kernel32 creating a process for CreateProcess until after
the process is created.
I think perhaps you shouldd rethink what you are trying to accomplish.
<cehupper@xxxxxxxxx> wrote in message
news:1147374861.897193.237700@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Very good point. Thanks.
.
- Follow-Ups:
- Re: CreateProcess parameter interception at NtCreateSection
- From: cehupper
- Re: CreateProcess parameter interception at NtCreateSection
- References:
- CreateProcess parameter interception at NtCreateSection
- From: cehupper
- Re: CreateProcess parameter interception at NtCreateSection
- From: Skywing
- Re: CreateProcess parameter interception at NtCreateSection
- From: cehupper
- Re: CreateProcess parameter interception at NtCreateSection
- From: Skywing
- Re: CreateProcess parameter interception at NtCreateSection
- From: cehupper
- CreateProcess parameter interception at NtCreateSection
- Prev by Date: There are no more endpoints available from the endpoint mapper
- Next by Date: Re: mutex question
- Previous by thread: Re: CreateProcess parameter interception at NtCreateSection
- Next by thread: Re: CreateProcess parameter interception at NtCreateSection
- Index(es):
Relevant Pages
|