Skip to main content

Questions tagged [function-hooking]

Correspond to all the techniques used to intercept function calls and to attach a piece of code before or/and after the execution of the function itself.

40 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
381 views

Static Address in Dynamically Loaded DLL

I am trying to re-write the following function in my injected DLL. mov edi,edi push ebp mov ebp,esp mov eax, [sound.dll+1AE0] push eax mov ecx,[ebp+08] mov eax,[ecx] mov eax,[eax+0C] push eax call ...
fred26's user avatar
  • 319
3 votes
0 answers
131 views

How can I find out which system functions are used in applications using dynamic loading?

I'm trying to make an application that tries to hook a specific function. but I realized something while working, I can't hook functions of applications that use dynamic loading using the detours ...
DertliSelo's user avatar
2 votes
0 answers
196 views

How can I detect which Android native function that is hooked by Mobile Substrate: MSHookFunction?

I want to detect hook behavior of MSHookFunction on Android. This is Mobile Substrate I use in my test app https://github.com/Breathleas/Android-Hooking-Template-Cydia-Substrate/tree/master/jni/...
Ken Kem's user avatar
  • 121
2 votes
0 answers
155 views

statically placing hooks on PE file's IAT

recently I started writing my own PE library for C++, and wanted to implement static IAT/EAT hooking, (basically hooking by patching the file instead of hooking at runtime), I managed to successfully ...
VEIL's user avatar
  • 21
2 votes
0 answers
53 views

Redirect exception handler?

I'm working on a localization project and have a few trampoline hooks to translate some text in an online game. Periodically throughout gameplay, there are checks that run in the background to ensure ...
isuckatreversing's user avatar
2 votes
0 answers
1k views

How can I enumerate and hook all non-exported functions in lib.so using frida?

I was reverse engineering an apk and just found out it is using native functions for such operations. there are some exported and non-exported functions. wanted to get and hook those non-exported ...
hanan's user avatar
  • 309
2 votes
0 answers
120 views

Cant hook into native lib with script?

im doing some practice stuff about hooking android native lib. I wrote this script: function processJniOnLoad(libraryName) { const funcSym = "...
Brian MJ's user avatar
2 votes
0 answers
9k views

How to step to specific function call?

I'm reverse engineering an application and I identified a specific function call that has an output that I need to capture. For the actual capture, I'll do a memory dump, so that I can handle. However,...
Axel Munoz's user avatar
2 votes
0 answers
1k views

frida hook jni not work

I want to trace Android Telegram app(open-source) to learn its protocol. From the source code these two functions AES_set_encrypt_key and AES_ctr128_encrypt are used to do the encryption, and I can ...
aj3423's user avatar
  • 209
2 votes
0 answers
497 views

Calling original function that uses unconventional calling convention

I'm using MinHook to hook a static function with the following signature: float __usercall RadarManager::Add_Blip@<xmm0>(int position@<ecx>, int shape@<edx>, int colorId, float ...
Neijwiert's user avatar
  • 133
2 votes
0 answers
423 views

What encryption/compression is this, and how to encode/decode from it?

I've been trying to reverse engineer an Android app's communication protocol using a combination of Xposed and Packet sniffing. Most of the packets the app sends have this header set: Content-Type: ...
dylanpdx's user avatar
1 vote
0 answers
56 views

How to hook or call "non-native/non-exported functions"?

I wrote this simple application in C++ to learn about reverse engineering: #include <iostream> #include <windows.h> void PrintMessage(const char *message) { std::cout << message ...
Unknown X's user avatar
1 vote
0 answers
381 views

Read value from frida hooked native method Jlong parameter

I am new to using frida for hooking native android code i.e lib.so, so I have load the lib into ghidra and can find the native function. the native function is getting 5 params including jnienv and ...
hanan's user avatar
  • 309
1 vote
0 answers
33 views

Anyway to hook to change file content and return for application keep read it?

is there anyway to modify v2 before statement if(v2) happen?
user3082026's user avatar
1 vote
0 answers
166 views

problem with hooking __usercall function and asm code

I need a hook function with the __usercall convention. I already hooked functions that were defined as __usercall and __userpurge, but this time it's __usercall with arguments that are also passed ...
user42122's user avatar
1 vote
0 answers
75 views

Is there any Android application that can manipulate the http response?

Is there any android app to manipulate http response body without vpn? for example: from "0|{random_string}|Wrong" Becomes "1|{random_string}|True" Thanks in advance
akunguti's user avatar
1 vote
0 answers
109 views

Problem to hook a parameter with _thiscall function

I have hooked correctly many games using detours without problems but now I have a problem with this __thiscall function: .text:00488DA0 ; =============== S U B R O U T I N E ==========================...
user3449922's user avatar
1 vote
0 answers
119 views

SetPixel seem not work on some external window

I have succefully hooked a game and I need to do read and write with GetPixel and SetPixel to the game window. To do a test I have created this code: Here my hooked function: My_hooked_function(int a3)...
user3449922's user avatar
1 vote
0 answers
87 views

Why do some antiviruses hook x64 Ntdll in WOW64 process?

Why do some antiviruses hook x64 Ntdll in WOW64 process? However, the same antiviruses do not hook Ntdll in the native x64 processes.
DBenson's user avatar
  • 131
1 vote
1 answer
236 views

Function pointer reference

I need to hook 10/20 functions like these: static void* __cdecl HookFunction1(char *FileName, int a2, int a3, int a4); __declspec(naked) void HookFunction2(char *Src, int pedx, int a3, ...
user3449922's user avatar
1 vote
0 answers
172 views

Easy way to attach a DLL to a Game

I like to attach a dll to a game to add more features. The DLL is 95% done, the problem is find the best and easy way to load this dll from the Game. My idea is use this technique: dinput_ori.dll (...
user3449922's user avatar
1 vote
0 answers
144 views

Alternative to MS Detours (32 bit)

I have used MS Detours for one project in c++ and work perfectly. I have created a clone of this application (95% of the some code) to hook another file (a GOG game with DRM free), but this time crash ...
user3449922's user avatar
1 vote
0 answers
280 views

How to hook eval function in node.js

As the eval() function of JavaScript is an evil, I want to hook or monkey-patch eval() function of JavaScript in node.js. I want to intercept all arguments passed in eval() function. Please guide me ...
sumit_suthar's user avatar
1 vote
0 answers
991 views

How to hook into OpenSSL shared library?

To preface, I am not a well-versed developer in the whole business of reverse engineering or even most basic programming. This is a project I made with the goal of attempting to replicate an existing ...
J. Doe's user avatar
  • 11
1 vote
0 answers
770 views

Hook function in Linux SO file

I'm working on reverse engineering an Android application where the native code opens TLS connections using a built-in copy of mbedtls with certificate pinning. I'd like to decrypt that traffic and ...
rsaxvc's user avatar
  • 111
1 vote
0 answers
159 views

Call again function with new parameters

I developing online game. I have full sources for server, but game client I am using is closed-source so I need to do some reverse engineering there. So for 2 weeks I am trying to properly call ...
Piodo's user avatar
  • 109
1 vote
1 answer
446 views

Addresses of dlls in Kernel Space

I wrote a code that hooks the SSDT. Currently I can hook functions exported only from ntdll: NtCreateFile, NtClose etc. since they are the only ones that have entries in SSDT. I wanna know if there is ...
rustam Shirinov's user avatar
1 vote
0 answers
480 views

Resources for API Hooking and DLL Injection

What are great resources and essential skills needed to become a proficient reverse engineer regarding API Hooking and DLL Injection? I would like to use a comprehensive book instead of scattered ...
sluijs's user avatar
  • 111
1 vote
0 answers
77 views

Creating shared object library to switch out loaded methods

Is it possible to create a dynamic library libXXX.so with android ndk that has a function that switches out methods in loaded classes in the dvm and call it from any apk ? There are functions within ...
0x41's user avatar
  • 11
1 vote
1 answer
530 views

frida - The specified child already has a parent. You must call removeView() on the child's parent first when hooking, how do you solve it?

I wanted to hook the method A1f in the below code but frida returns the following exceptions: Found instance: MyHomeFragment{9bbd8d5} (0965bca9-4838-4ca1-a835-d99639ae15f1)} java.lang....
hanan's user avatar
  • 309
0 votes
0 answers
28 views

How to trigger calls and attach to functions on a running process?

I'm a software developer, with some knowledge in memory management but near zero experience in reverse engineering. I wonder if there is a way to detect which function a program calls at certain ...
Unknown X's user avatar
0 votes
0 answers
42 views

How does it calculate a backup checksum

in Ghidra I found a function that calculates a checksum and checks it against a checksum in a protobuf I'm stuck in this function for days and I tried using frida to get the ret value but it doesn't ...
Arito No's user avatar
0 votes
0 answers
99 views

finding a not-so-straightforward game's function

I am working on Mad Max game [ APEX engine ] I do my best to explain the situation. so my target executes function like this: there are commands like " call [eax+XX] " or " call RX &...
shetal's user avatar
  • 51
0 votes
0 answers
145 views

What's the way to find a function on a unity game and how I call it after I find?

I'm a newbye, so sorry for the basic questions, before anyone downvote the question. I'm Learning reverse engineering, I've already learned assembly for mips on the computer science underdegree and I ...
Luiz's user avatar
  • 1
0 votes
0 answers
227 views

Crash after hook a function

I have hooked a sound function that work within the game menu after, when the battle start, the game will crash. The function at the first parameter get correctly the sound file name, before the ...
user3449922's user avatar
0 votes
0 answers
521 views

DLL injection (Failed to inject)

I have found this complete and easy example to test the function hook: https://github.com/Zer0Mem0ry/Detour #include <Windows.h> #include <iostream> #include "detours.h" #...
user3449922's user avatar
0 votes
0 answers
275 views

Detouring function cause exception access violation

i am learning to detouring functions, but i run into one that i cannot be resolved. I use the Detour lib from microsoft, and a custom method. Both cause the same problem, the function is hooked and ...
Israel's user avatar
  • 101
0 votes
0 answers
374 views

How Do i create a simple Detour Library

Quite new to Reverse Engineering and making Detour Functions, Just need some form of clarification here, i am trying to make a Simple x86 Detour library and i have worked on something using some ...
Josh's user avatar
  • 1
0 votes
0 answers
355 views

x64 hook Fails on Messagebox

Quite new to the intels so i might not know much , I just need some form of direction here. I am trying to do a simple 64 bit hook detour for function hooking I do it like so : The detour hook ...
Daniel's user avatar
  • 1
0 votes
1 answer
276 views

Hooking flash player dll

Lately I came to game-bot for browser flash-game which gets data from flashplayer dll. The main point of doing this was to get decrypted data(JSON) sent from game server to client through TCP. Do ...
user175989's user avatar