K
Kornél Pál
Hi,
There are different Common Language Infrastructure implementations in
addition to Microsoft .NET Framework. Examples include Mono,
Portable.NET, Rotor, VMKit, Parrot, ILDJIT, etc.
I would like to use test my software with other implementations as well.
One of the unique features of .NET Framework is that it integrates with
the loader component of the operating system that results in improved
security.
When creating a process form a managed executable the operating system
(Windows XP and later) directly calls mscoree.dll without usual import
address table and entry point resolving. This means that
_CorValidateImage is called after the image is mapped and if that
succeeds _CorExeMain is called regardless of the entry point specified
in the executable.
This integration prevents me from using usual DLL/function redirection
techniques for loading an alternate runtime.
By replacing mscoree.dll I could take advantage of the loader
integration but I don't want to do this as it would make me unable to
use Microsoft .NET Framework.
I could detour mscoree.dll for processes I want to run using an
alternative runtime. When I use CreateProcess with CREATE_SUSPENDED I am
able to modify memory and/or execute code in the remote process but that
is pretty much useless because the loader is not optimized yet. I can't
even use CreateRemoteThread that would initialize the loader because the
loader initialization code calls _CorExeMain without calling process or
thread entry point function and Microsoft .NET Framework is loaded to
the new process.
I would appreciate your help in creating a managed process using a
custom runtime.
Thanks.
Best regards,
Kornél Pál
There are different Common Language Infrastructure implementations in
addition to Microsoft .NET Framework. Examples include Mono,
Portable.NET, Rotor, VMKit, Parrot, ILDJIT, etc.
I would like to use test my software with other implementations as well.
One of the unique features of .NET Framework is that it integrates with
the loader component of the operating system that results in improved
security.
When creating a process form a managed executable the operating system
(Windows XP and later) directly calls mscoree.dll without usual import
address table and entry point resolving. This means that
_CorValidateImage is called after the image is mapped and if that
succeeds _CorExeMain is called regardless of the entry point specified
in the executable.
This integration prevents me from using usual DLL/function redirection
techniques for loading an alternate runtime.
By replacing mscoree.dll I could take advantage of the loader
integration but I don't want to do this as it would make me unable to
use Microsoft .NET Framework.
I could detour mscoree.dll for processes I want to run using an
alternative runtime. When I use CreateProcess with CREATE_SUSPENDED I am
able to modify memory and/or execute code in the remote process but that
is pretty much useless because the loader is not optimized yet. I can't
even use CreateRemoteThread that would initialize the loader because the
loader initialization code calls _CorExeMain without calling process or
thread entry point function and Microsoft .NET Framework is loaded to
the new process.
I would appreciate your help in creating a managed process using a
custom runtime.
Thanks.
Best regards,
Kornél Pál