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
0
votes
1 answer

Trying to hook D3D EndScene

So I've been playing around with C++ and injecting DLLs, fairly new to this but learning fairly quickly. I'm trying to hook EndScene and just cannot get it working. I've tried using a pattern scan to find and then hook it, I've tried creating a…
user2487095
  • 15
  • 1
  • 6
0
votes
2 answers

Detour GetComputerNameW

Hello I'm trying to intercept GetComputerNameW with microsoft detours however it seems not possible. I've already managed to detour GetVolumeInforation but this one seems different. I'm trying to change the Computer name from DKKKK to ABCDE. Result…
Asmo
  • 27
  • 1
  • 9
0
votes
2 answers

Several programs crash when unhooking with UnhookWindowsHookEx()

I am doing a global hook to add my DLL to the hook chain: HHOOK handle = SetWindowsHookEx(WH_CALLWNDPROC, addr, dll, 0); Inside my DLL I am using Detours to intercept several WINAPI function calls. Everything works fine, except for…
moccajoghurt
  • 131
  • 6
0
votes
1 answer

Detours: Prevent task kill of my software via another software

I have found a code that promises to intercept and detour calls to the TerminateProcess function and thus prevent my software from being killed directly from other program. But this code is not working and I am still able to kill my process via…
user5329618
0
votes
0 answers

Detours Hook memcpy Not Working

I have programmed hook for memcpy but it only calls on the end of the program. Not each time, when was function called. Also the adresses are different. This is the hook: #include #include #include "detours\detours.h" #pragma…
lukas kiss
  • 381
  • 2
  • 15
0
votes
3 answers

Is there any way to override the drag/drop or copy/paste behavior of an existing app in Windows?

I would like to extend some existing applications' drag and drop behavior, and I'm wondering if there is any way to hack on drag and drop support or changes to drag and drop behavior by monitoring the app's message loop and injecting my own…
Luke
  • 18,585
  • 24
  • 87
  • 110
0
votes
0 answers

Hooking TClientSocket Delphi

I have an exe compiled in delphi, it connects to asocket that reads and recieves data. I would like to know if is possbile to hook the TClientSocket delphi class and use some library like detours to do that.
Alexxxx
  • 33
  • 6
0
votes
1 answer

Detours Hook: GetVolumeInformation Random Volume Serial

I'm trying to hook GetVolumeInformation, using Detours Express (3.0), to change the volume serial. The problem is each time the hooked function is called it returns a random volume serial. #include #include #include…
Asmo
  • 27
  • 1
  • 9
0
votes
0 answers

Trying to detour IUnknown_AddRef_Proxy & IUnknown_Release_Proxy without success

For some reason, I cannot get the address of IUnknown_AddRef_Proxy and IUnknown_Release_Proxy using the DetourFindFunction() or locate it using SymEnumSymbols(). I found another one in rpcrt4, but have determined that there is one in combase that…
Adrian
  • 10,246
  • 4
  • 44
  • 110
0
votes
1 answer

Detour function under Linux Ubuntu

I used Detours (http://research.microsoft.com/en-us/projects/detours/) under Windows, but now i using Linux Ubuntu and i want to Detour / Hook a function. I want to detour the function to mine, after that i want to call the original function. (I can…
Adam
  • 11
  • 8
0
votes
1 answer

MS detour MakeFile error

I downloaded Detour Express 3.0 via MS (http://research.microsoft.com/en-us/projects/detours/) My PC use Intel i3 CPU and Windows 7 32bit. In addition, I use Visual Studio 2015 Community. To install detour, I run Visual Studio 2015 Command…
0
votes
1 answer

How to hook an exe function with Detours?

I just started using the ms Detours library, and I would like to know how to hook an exe file using it. I got the function offset from IDA Pro, however i don't know what address should hook to. It gives a access violation if I hook to the offset…
Cool_er
  • 1
  • 5
0
votes
1 answer

C++ Detour on winsock recv hooking - custom packet

I'm trying to add additional packet in MyRecv function, but I don't know why it doesn't working. I tried to parse incoming packets and function works fine. So probably my way to sending custom packet to application isn't properly. In general…
h4b00
  • 13
  • 4
0
votes
2 answers

Dev-C++ and Detours compiling error

As title says I'm trying to compile with Dev-C++ a simple DLL using Detours, but I get this error: syntax error before token '&' on this lines: DetourAttach(&(PVOID &)trueMessageBox, hookedMessageBox) DetourDetach(&(PVOID &)trueMessageBox,…
Julio
  • 1
0
votes
1 answer

WSARecv Detour hook crypt

I'm writing a packet encryption for a friends gameserver. Client is using ws2_32 recv/send but server uses WSARecv/WSASend. I've managed to encrypt/decrypt send/recv/WSASend, but WSARecv seems impossible. I'm using the same method as on recv, but it…
Asmo
  • 27
  • 1
  • 9