Questions tagged [easyhook]

Use this tag when your code uses the EasyHook open-source library that supports hooking unmanaged APIs with managed code.

Use this tag when your code uses the EasyHook open-source library that supports hooking unmanaged APIs with managed code.

EasyHook makes it possible to extend (via hooking) unmanaged code APIs with pure managed functions, from within a fully managed environment on 32- or 64-bit Windows. EasyHook supports injecting assemblies built for .NET Framework as well as native DLLs.

108 questions
11
votes
1 answer

Capture screenshot of fullscreen DX11 program using SharpDX and EasyHook

Before anybody mentions it, I refered to this link to find out how I needed to copy the backbuffer to a bitmap. Current situation I am injected to the target process Target process' FeatureLevel = Level_11_0 Target SwapChain is being made with…
Neijwiert
  • 985
  • 6
  • 19
10
votes
3 answers

EasyHook alternatives for C#

after much searching of a way to create a hook into an external application in C#, I stumbled upon EasyHook, which would be ideal. Unfortunately there is zero community around, the software is not maintained since 2008, does not seem to work under…
Steve Vedovelli
  • 363
  • 1
  • 4
  • 6
8
votes
3 answers

Simple API Hook for prevent file deletion?

I would like to intercept when the user deletes a file on ANY directory by hooking the needed API function(s) with the availability of asking a simple boolean question in a mesagebox "Really Would you like to Delete this file?", the question is an…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
6
votes
1 answer

A x64-DLL injected into a x64-process hooking a x86-DLL fails using C++ and EasyHook

A x64-DLL injected into a x64-process hooking a x86-DLL fails using C++ and EasyHook. It works if Loader, InjectionLibrary and InjectionTarget(it's available in both versions and i need both to be hooked) are x86. Getting the address of the exported…
zEh
  • 77
  • 1
  • 9
6
votes
0 answers

C# Easyhook Winsock WS2_32.dll,connect hook Socks5

I'm trying to hook the winsock connect function and route the TCP connection through socks5 proxy /w auth. This works if the socket is a blocking socket, but while using firefox ( nonblocking sockets ) I get a lot of 10035, 10022 winsock Errors. How…
duketwo
  • 4,865
  • 1
  • 11
  • 9
6
votes
1 answer

How to hook a method from ANY thread within a process using unmanaged EasyHook?

I've been having some issues getting my method hooks to work. I can get the hook to work if "I" call the method that's being hooked. But when it occurs naturally during the processes operation, it doesn't get hooked. My problem is probably…
Ultratrunks
  • 2,464
  • 5
  • 28
  • 48
5
votes
1 answer

How do I strongly name an Unmanaged C++ Dll?

I'm working on a C# application which uses the EasyHook library for DLL Injection. EasyHook requires that any application using it be strongly named. In order to strongly name the application I need to make sure that all the libraries I use are…
Luke Belbina
  • 5,708
  • 12
  • 52
  • 75
5
votes
4 answers

Catch when java process has been terminated

How can I catch when somebody kills my application (java, but it is not important) by taskmanager or by taskkill console command? I understand that I cannot catch this IN my application but maybe I can do this by some hook with OS (windows of…
Mikhail
  • 1,583
  • 5
  • 22
  • 34
4
votes
3 answers

EasyHook recv doesn't "hook" all packets

I managed to write a semiworking EasyHook example that hooks recv function. I wrote a form, added a WebBrowser component, and started the application. The problem is, I get the HTTP packets, but if there's a socket, it seems that recv stops…
kaharas
  • 597
  • 2
  • 17
  • 39
4
votes
1 answer

Can I hook functions in linked libraries?

Using EasyHook I have successfully hooked both exported functions and known vtable functions for various C++ classes. In all these cases target programs have used DLLs. Provided I know the address of a function's entry point, is it possible to do…
4
votes
3 answers

EasyHook The given 32-Bit library does not exist , user library does not export a proper Run

If I do: try { try { Config.Register( "anydescription", "myprogram.exe", "inject.dll"); } catch…
сами J.D.
  • 483
  • 2
  • 5
  • 19
4
votes
0 answers

Drawing Overlay inside DX11 Game (CryEngine) with C# and EasyHook

What I want to do: I have a Game based on CrySDK which is DirectX11 and I want to draw an ingame overlay like the steam overlay. -> I write C# since I don't know any C++, so I'm looking for ways to do this in C#. -> I use EasyHook and SharpDX…
radonthetyrant
  • 1,346
  • 1
  • 8
  • 13
4
votes
1 answer

EasyHook kernel mode hooking

Can I use EasyHook to hook some API(NtOpenProcess) from kernel mode? I am not interested in user mode hooking via process wide dll injection, but as I see easy hook has a driver developed with code related to kernel mode hooking. Or am I…
sfireman
  • 183
  • 4
  • 9
4
votes
1 answer

Easyhook: unmanaged hooking, how to call original function / change return status?

So I have a hook function at winspool.drv!WritePrinter, which is successfully hooked with unmanaged C++ remotely injected to spoolsv.exe. Currently, the hook seems to either replace original function, or corrupt the stack in an undetectable way:…
kagali-san
  • 2,964
  • 7
  • 48
  • 87
3
votes
1 answer

throw exit code 0xC0000005 when using easyhook in python

i am trying to work on easyhook in python and here is my code # Hook/EasyHook.py from ctypes import * from ctypes.util import find_library from pathlib import Path c_ulong_p = POINTER(c_ulong) c_void_pp=POINTER(c_void_p) res_path =…
nyao
  • 81
  • 1
  • 1
  • 5
1
2 3 4 5 6 7 8