Results 1 to 4 of 4
  1. #1
    aanthonyz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Hitler's Minivan
    Posts
    483
    Reputation
    27
    Thanks
    83
    My Mood
    Relaxed

    [Help]Hooking Functions

    Does hooking a function have to do anything with ASM?

    If not where would be a good place to start learning?
    "The best way to predict your future is to create it."

    Contributions I made:

    DirectX E-Books
    Hacking Tools
    Hacking into a PC

    Need Help?
    Send me a PM, or send me a email at : aanthonyz10@gmail.com

    Click My Dragon:


  2. #2
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    No, though you can use assembly to hook. It involves finding the address of a function and hooking it by jumping to your own code and back again. Most hackers use Detours Library to do this since that way all we have to worry about is finding the address and then arguments it takes so we can create a function to handle those arguments. Though Hooking is extremely easy even without classes. It essentially involves writing EB 0xAddress in the beginning of the function call to jump to your function which would be 0xAddress.

    There's lots of different ways to hook though. For certain Windows API, and common functions that show up in the IAT, its possible to overwrite the IAT to jump to your own code. I've also seen patching the jump thunk table, using execptions, Hardware breakpoint hooks, etc. But though the techniques can change the basic principle is the same.
    Last edited by why06; 02-04-2011 at 07:16 PM.

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  3. #3
    NexonShock's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Posts
    44
    Reputation
    12
    Thanks
    3
    Not At All i guess.

  4. #4
    aanthonyz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Hitler's Minivan
    Posts
    483
    Reputation
    27
    Thanks
    83
    My Mood
    Relaxed
    Quote Originally Posted by why06 View Post
    No, though you can use assembly to hook. It involves finding the address of a function and hooking it by jumping to your own code and back again. Most hackers use Detours Library to do this since that way all we have to worry about is finding the address and then arguments it takes so we can create a function to handle those arguments. Though Hooking is extremely easy even without classes. It essentially involves writing EB 0xAddress in the beginning of the function call to jump to your function which would be 0xAddress.

    There's lots of different ways to hook though. For certain Windows API, and common functions that show up in the IAT, its possible to overwrite the IAT to jump to your own code. I've also seen patching the jump thunk table, using execptions, Hardware breakpoint hooks, etc. But though the techniques can change the basic principle is the same.
    Ok thanks im going to start off small and hook into Notepad or minesweeper and slowly advance. If I can do it perfectly I will post a tutorial as well.
    "The best way to predict your future is to create it."

    Contributions I made:

    DirectX E-Books
    Hacking Tools
    Hacking into a PC

    Need Help?
    Send me a PM, or send me a email at : aanthonyz10@gmail.com

    Click My Dragon: