Questions tagged [detours]

This tag is about the Microsoft Detours library for intercepting arbitrary Win32 binary functions on x86, x64, and ARM machines.

Detours is a library for intercepting arbitrary Win32 binary functions on x86, x64, and ARM machines.

245 questions
3
votes
0 answers

Prevent detouring functions. Avoid cracking

There is an application that checks for activation using DLL Check function. Check returns 1 if application is activated and 0 otherwise. I create simple application and DLL containing function MyCheck (which always returns 1) with the same…
axe
  • 2,331
  • 4
  • 31
  • 53
3
votes
3 answers

MS Detours 3.0 on Win 7 x64?

I want to get into detail with win api hooking. This is a cite from the download page of MS Detours 3.0: Detours Express 3.0 is available for immediate download under a no-fee, click-through license for research, non-commercial, and non-production…
ManuelSchneid3r
  • 15,850
  • 12
  • 65
  • 103
3
votes
1 answer

injecting a dll is not working on windows XP

so am trying to make an injector to inject my dll that's uses Detours to hook a game client , it's simple , but there is a problem I don't know what's is wrong it works fine on Windows Vista+ but not working on XP... here is my codes //the…
Abanoub
  • 3,623
  • 16
  • 66
  • 104
3
votes
4 answers

Detouring a member-function via an injected DLL

Original Post: I'm trying to detour a member-function from within my injected DLL. I've got the address of the function I'm trying to hook, but cannot figure out the proper syntax or way about hooking it via detours library. I've commented the line…
xian
  • 4,657
  • 5
  • 34
  • 38
2
votes
2 answers

Hook FindWindow

I'm trying to hook FindWindowA and FindWindowW using Detours 3.0. This two functions hooked successfully and I can see requested class and window title. But when I try to access to any word some like if ( lpWindowName[0] == buf ) or something…
user922871
  • 435
  • 2
  • 6
  • 17
2
votes
3 answers

Is it possible to Hook into any time retrieving function

I need to hook any function that tries to retrieve the system time in order to generate "time independent" replays for different applications. Some events like pseudorandom number generation depend on calls to time(), but for example some others…
cloudraven
  • 2,484
  • 1
  • 24
  • 49
2
votes
1 answer

Threads spawned by a detoured pthread_create do not execute instructions

I've got a custom implementation of detours on macOS and a test application using it, which is written in C, compiled for macOS x86_64, running on an Intel i9 processor. The implemention works fine with a multitude of functions. However, if I detour…
Eustace
  • 313
  • 5
  • 12
2
votes
1 answer

How to inject DLL making a Detours-enabled hook?

I need any advice how to continue CreateFile() hooking after getting code as follows: #include #include "C:\Detours\Detours-4.0.1\include\detours.h" static HANDLE(WINAPI* TrueCreateFileW)(LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD…
Max_ReFactor
  • 67
  • 2
  • 7
2
votes
0 answers

Prevent recursive hooking when using detours

I wanted to build some sort of API monitor by hooking all ntdll functions using Detours API. Each hooked function will call the original implementation and than add notice for this call inside std base data structure. However, I encountered a…
Irad K
  • 867
  • 6
  • 20
2
votes
1 answer

Where is my memory going?

We have been using Vmmap, and Processexplorer and MS Detours to analyze the memory usage in our program. Our goal was to validate our program's memory usage. For example, we know that we have X MB of data which we load from disk into memory, we want…
ultralazer
  • 21
  • 1
2
votes
0 answers

Hook a function without a dll

So I am on a windows computer and it is pretty simple to hook a function using a standard .dll. My question is tho, I am pretty sure it is possible to hook a function from a kernel mode driver, I was wondering if someone could please point me in…
2
votes
1 answer

how to create a trampoline function using DetourAttachEx? (with MS detours)

I have a dll and i wish to create a detour to one of its exported functions, The dll is not part of windows. I need to be able to call the real function after my detour (call the real function from a detoured one) I know the exact signature of the…
user527744
  • 29
  • 1
  • 3
2
votes
1 answer

How to patch TControlCanvas.CreateHandle (FreeDeviceContexts issue)?

The question is related to my previous question: access violation at address in module ntdll.dll - RtlEnterCriticalSection with TCanvas.Lock Apparently there is a bug in Delphi's code (see QC 64898: Access violation in FreeDeviceContexts). This bug…
zig
  • 4,524
  • 1
  • 24
  • 68
2
votes
0 answers

How can I hook/inject a method of a dll knowing just its RVA address by using C++

I am not sure if hook/inject is the correct term for what I'm actually looking for I want to extend a x86 asm function of a game client using C++ to provide me this functionality: currently: lets assume that the target function is something like…
Nick94
  • 21
  • 1
2
votes
1 answer

Hooking Python code using Detours

I built a simple Python gui application("App.py") that I am trying to hook using detours. My understanding is that Python should use Windows dll's at some point and I am trying to hook these function calls. For that purpose I am using detours…
Ibrahim
  • 203
  • 2
  • 11
1 2
3
16 17