Solved Reverse Engineering and hooks

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

nb81

Newbie
Full Member
Oct 26, 2013
29
238
0
Hello,

I just started looking into reverse engineering, hooks and things like that.

So I would have some questions about these things. I tried to search after these but I couldn't find any description/tutorial that could help me :/.

1. What is hooking exactly? What do we do when we are hooking, and what kind of hooking methods can I use/which is the "best"?
2. What is detouring, and how can I do it?


I have a very basic knowledge of reverse engineering.

Thanks in advance!
 
Last edited by a moderator:

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,187
12,638
76
Hooking = detouring. Which means modifying the programs flow to your own code.
 
Last edited by a moderator:

till0sch

Respected Hacker
Dank Tier VIP
Dank Tier Donator
Oct 14, 2012
1,104
12,593
51
Hello,

I just started looking into reverse engineering, hooks and things like that.

So I would have some questions about these things. I tried to search after these but I couldn't find any description/tutorial that could help me :/.

1. What is hooking exactly? What do we do when we are hooking, and what kind of hooking methods can I use/which is the "best"?
2. What is detouring, and how can I do it?


I have a very basic knowledge of reverse engineering.

Thanks in advance!
Hooking and detouring is basically the same I think, you can hook through E9 jumps, calls and modifying IAT or VTBL I think. So you either modify function pointers or the function itself by placing a jump or call into it (to your function)
 

Szaka

Coder
Full Member
Nobleman
Mar 14, 2013
161
718
3
Generally hook is a jump to your code. Id doesnt have to be in the first API bytes, but you can for example gather interesting register value in some moment of programs flow, for example when function resolves player pointer you can just jump out and store it. Thats the basic option
You can also hook entire functions. Professional way is about reconstructing the function params and call convention, writing own function to handle the real api call and decide what to do (if you want execute normally, or if you want to spoof smth).
 

till0sch

Respected Hacker
Dank Tier VIP
Dank Tier Donator
Oct 14, 2012
1,104
12,593
51
I think there are also system-wide (global) and specific hooks for just 1 program.

You could make a hook everywhere in the function, in the beginning,mid-hook or when it's about to return.
 

Szaka

Coder
Full Member
Nobleman
Mar 14, 2013
161
718
3
The way im hooking is allowing the function to run inside my hook function and then analyze the result :)
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods