[Tutorial] Hooking API's using C#

07/13/2013 21:19 arkade#1
Hello epvp, today i'm going to teach you how to hook MessageBox using C# ;)


[ Requirement‎s & information ]

[Only registered and activated users can see links. Click Here To Register...]
Visual Studio 20XX
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
Hooking - Wikipedia, the free encyclopedia
C# Skills ;)

[ Practice ]

[ Screens ]

[ DLL Code ]

[ Inj3ct0r Code ]

[ Virustotal ]

Have fun ^^
05/06/2014 12:26 cablehead#2
Sorry...very new at this. If I change the cfg to hook Notepad...it doesn't catch the save file msgbox when closing. Is that a real msgbox? Also...will the example work on a managed exe throwing a msgbox?

Nevermind..Got it! This is THE only easyhook C# example on the net that makes sense for newbie hooking.
Thanks. Now on to a ntquerryinformation hook for C#.
06/08/2014 19:10 DatSik.#3
Thank you for this, Very helpful
08/04/2014 09:31 OutcastLordofBacon#4
nice! thanks for sharing.

could a person use this to override/replace a method with their own method that returns a Boolean answer?
10/25/2015 06:43 SScattered#5
nice hooking man (y)
05/17/2018 11:12 fl380#6
Apologies for replying to an old thread but this is the only understandable tutorial that I have found.

I’m trying to hook a dll which is only loaded by the target when the API is required.

Does anyone have suggestions for delaying creating the hook until the dll is loaded?

Thanks
08/17/2020 14:37 ColeThedeveloper#7
Thank you, thats interesting!:kappa: