Results 1 to 6 of 6

Thread: Hooking functions with code-injection

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2005
    Location
    Cleveland, Ohio
    Posts
    255

    Hooking functions with code-injection

    I wanted to know if it was possible to hook a certain function in this program. The function is WriteProcessMemory. Is it possible that I could MessageBox() the parameters of this function every time its called?

  2. #2
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Okinawa, Japan
    Posts
    271

    Re: Hooking functions with code-injection

    Yes,
    Done it with other API's. WriteProcessMemory would be the same.
    Web Search for Import address table patching.
    Actuall I got an example on my site under Projects. Look at IAT patching.

    http://www.martinm.net/

  3. #3
    New Member
    Join Date
    May 2005
    Location
    Love... :)
    Posts
    6

    Re: Hooking functions with code-injection

    I'm not good at Assembly.. but i've learnt about hooking with vb... i'm just curious if it's possible to alter the ouput of a function in a process after hooking to it...
    like changing the output of a process that is supposed to make some calculation.

  4. #4
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Hooking functions with code-injection

    Quote Originally Posted by bashterror
    I'm not good at Assembly.. but i've learnt about hooking with vb... i'm just curious if it's possible to alter the ouput of a function in a process after hooking to it...
    like changing the output of a process that is supposed to make some calculation.
    As I understand it, you may be able to just re-write a whole function. I think I saw in parts of the Half-Life 1 SDK, that the functions used hooked the actual HL Engine functions, to re-write functions to make team-based games possible. I could possibly be wrong. Without looking at the Half-Life 1 engine source right now (which I suppose I could just download the Quake engine source!), I wouldn't know.

    Looks suspiciously like it though,

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  5. #5
    Lively Member Brandito's Avatar
    Join Date
    Nov 2000
    Location
    Here, There, Every Where!
    Posts
    106

    Re: Hooking functions with code-injection

    Hmmm... where can I find more information on hooking.
    Is hooking where my application "attaches" to a process and waits for an event to trigger?

    I primarily develop under linux... asm, c/c++. VB examples may not help as much.

    thanks!
    Master of Cyber Fu - A Temple of Digital Chi

  6. #6
    Addicted Member
    Join Date
    Aug 2005
    Location
    York
    Posts
    197

    Re: Hooking functions with code-injection

    No i don't think so.....what hooking is:
    An application calls a function. <---and you want don't want it to call that function only
    1.) You can change the pointer to that function and call the old one again.
    2.) You want it to call a new function.
    3.) You want to modify the function at that pointer.

    I believe all these circumstances come under hooking.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width