The wrapper, tools, and info you need to get games working


PostPosted by justjohnny » Tue Dec 14, 2010 6:44 am
Innovative systems research hinges on the ability to easily instrument and extend existing operating system and application functionality. With access to appropriate source code, it is often trivial to insert new instrumentation or extensions by rebuilding the OS or application. However, in today's world systems researchers seldom have access to all relevant source code.

Detours is a library for instrumenting arbitrary Win32 functions on x86, x64, and IA64 machines. Detours intercepts Win32 functions by re-writing the in-memory code for target functions. The Detours package also contains utilities to attach arbitrary DLLs and data segments (called payloads) to any Win32 binary.

Detours preserves the un-instrumented target function (callable through a trampoline) as a subroutine for use by the instrumentation. Our trampoline design enables a large class of innovative extensions to existing binary software.

We have used Detours to create an automatic distributed partitioning system, to instrument and analyze the DCOM protocol stack, and to create a thunking layer for a COM-based OS API. Detours is used widely within Microsoft and within the industry.

Software packaged for detouring Win32 and application APIs.

What's New?
Detours 2.1 is now available. Detours 2.1 includes the following new features:

  • Complete documentation of the Detours API.
  • Transactional model for attaching and detaching detours.
  • Support for updating peer threads when attaching or detaching detours.
  • Unification of dynamic and static detours into a single API.
  • Support for detection of detoured processes.
  • Significant robustness improvements in APIs that start a process with a DLL containing detour functions.
  • New APIs to copy payloads into target processes.
  • Support for 64-bit code on x64 and IA64 processors (available in Professional edition only).
  • Supports building detours with Visual Studio 2005, Visual Studio .NET 2003, Visual Studio .NET (VC8), and Visual Studio (VC7).

Perhaps a new way of building wrappers?
Posts: 217
Joined: Mon Apr 12, 2010 7:25 am

Re: Detours

PostPosted by justjohnny » Tue Dec 14, 2010 7:11 am
EasyHook - The reinvention of Windows API Hooking

Project Description
EasyHook starts where Microsoft Detours ends.
This project supports extending (hooking) unmanaged code (APIs) with pure managed ones, from within a fully managed environment like C# using Windows 2000 SP4 and later, including Windows XP x64, Windows Vista x64 and Windows Server 2008 x64. Also 32- and 64-bit kernel mode hooking is supported as well as an unmanaged user-mode API which allows you to hook targets without requiring a NET Framework on the customers PC. An experimental stealth injection hides hooking from most of the current AV software.

The following is an incomplete list of features:
  • A so called "Thread Deadlock Barrier" will get rid of many core problems when hooking unknown APIs; this technology is unique to EasyHook
  • You can write managed hook handlers for unmanaged APIs
  • You can use all the convenience managed code provides, like NET Remoting, WPF and WCF for example
  • A documented, pure unmanaged hooking API
  • Support for 32- and 64-bit kernel mode hooking (also check out my PatchGuard 3 bypass driver which can be found in the release list)
  • No resource or memory leaks are left in the target
  • Experimental stealth injection mechanism that won't raise attention of any current AV Software
  • EasyHook32.dll and EasyHook64.dll are pure unmanaged modules and can be used without any NET framework installed!
  • All hooks are installed and automatically removed in a stable manner
  • Support for Windows Vista SP1 x64 and Windows Server 2008 SP1 x64 by utilizing totally undocumented APIs, to still allow hooking into any terminal session.
  • Managed/Unmanaged module stack trace inside a hook handler
  • Get calling managed/unmanaged module inside a hook handler
  • Create custom stack traces inside a hook handler
  • You will be able to write injection libraries and host processes compiled for AnyCPU, which will allow you to inject your code into 32- and 64-Bit processes from 64- and 32-Bit processes by using the very same assembly in all cases.
  • EasyHook supports RIP-relative addressing relocation for 64-Bit targets.
  • No unpacking/installation necessary.
  • The Visual Studio Redistributable is not required.
Posts: 217
Joined: Mon Apr 12, 2010 7:25 am

Return to Tools & Info

Who is online

Users browsing this forum: No registered users and 0 guests