Recent

Author Topic: Hooking CreateProcess?  (Read 8480 times)

Logic_Bomb

  • New Member
  • *
  • Posts: 41
Hooking CreateProcess?
« on: February 12, 2013, 06:33:49 pm »
Hey Guys,

A short(ish) question from me - I am trying to work out how to hook the windows CreateProcess routines so that I can detour through the code in my application before any new processes are created on a system. Examples of this can be seen in programs such as ZoneAlarm where you are asked to Allow or Deny a new process to run before it is actually spawned. I have played around with Suspending/Resuming the process using PsAPI and tlhelp32 (jwatlhelp32), but neither of these are responsive enough to be of any use, since using those requires me to loop through all the running processes and check for new ones. It would be a lot easier and quicker if I could simply hook the windows 7 createprocess routines and detour through my code before the process is created.

Any ideas? Suggestions? Or a better method of doing this?

Thanks and Regards,

Logic_

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Hooking CreateProcess?
« Reply #1 on: February 12, 2013, 07:13:48 pm »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018