safetyhook icon indicating copy to clipboard operation
safetyhook copied to clipboard

C++23 procedure hooking library.

Results 19 safetyhook issues
Sort by recently updated
recently updated
newest added

Add support for building `safetyhook` as a shared library by utilizing the CMake `BUILD_SHARED_LIBS` variable. Note: In order to silence warnings regarding adding a dll-interface to STL classes, the `C4251`...

Will update with more info. First glance looks like an exception occurs inside of trap_threads, causing a nested acquisition of the trap mutex.

It would be nice to see this library in the vcpkg registry, I hate having deps as a target inside Visual Studio. Anyway, this is a great library, thanks for...

This is a POC/WIP PR that replaces thread freezing with a technique I'm calling thread trapping. The idea is to remove execute access from the pages of memory we're modifying...

I think functions with RIP-relative instructions at the start are common enough to justify such a feature. I did a bunch of research, and it looks like PolyHook was able...

Sorry if this isn't enough information, threading is not my strong suit. Please let me know. I'll occasionally get access violation errors when using a midhook for an x64 program....

This adds a fallback "allocation" method to the allocator which scans forward for the nearest sequence of INT3 instructions that is >= 10 bytes and >= size of allocation requested....

I noticed a freeze when calling safetyhook::create_inline, and I assume this is where the problem came from. Either that or it was one of my many calls to execute_while_frozen.

Example: ```asm mov rcx, [rax+330h] mov edx, 8003h ``` Let's say I want to get the rcx register address, with the current implementation, I need to hook ``mov edx, 8003h``...

I'm looking for a new hooking library replacement and this one seems to suit my purposes except for 1 issue. There doesn't seem to be a way to quickly toggle...