Skip to content
This repository was archived by the owner on Sep 1, 2019. It is now read-only.
/ gdetour Public archive

C detour helper DLL for redirection of functions in a process at the assembly level.

Notifications You must be signed in to change notification settings

pyhack/gdetour

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 

Repository files navigation

gdetour

gdetour is a barebones detour API. It allows for redirection of code execution via very basic assembly jumps.

It is similiar to several other projects:

Features

  • Only one callback no matter what detour is hit
  • Can detour functions without knowing the types of the arguments
  • No function typedef for every detour
  • Is thread safe for incoming calls (applying / removing detours is not thread safe)
  • Allows 'infinite' recursion. All details about the detour's state is stored on the stack.
  • Allows inspection / modification of every register. No registers are overwritten.

Usage

To create a detour, only three pieces of information need to be known:

  • Function address
  • Number of bytes that should be overwritten at address (must be 5 or greater)
  • Number of bytes to pop on return (related to calling convention - mostly for stdcall)

Known Issues

  • Only supports x86 platforms (notably, no x64 support)
  • Currently only supports Windows (uses VirtualProtect, etc)

About

C detour helper DLL for redirection of functions in a process at the assembly level.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published