BlackMagic & api hooking menu

Shout-Out

User Tag List

Results 1 to 9 of 9
  1. #1
    roxaz911's Avatar Member
    Reputation
    1
    Join Date
    Jun 2009
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    BlackMagic & api hooking

    I noticed that lots of you guys are using this BlackMagic lib, but couldnt find it anywhere.. maybe my searching skills suck.. but anyway.. what i aim to do is to hook wow api. now i have mixed mode dll in action, works just fine. reason its mixed mode just because i like making GUI in .NET. however if there was possibility to make whole project in .NET that would be even better, cause mixed mode dll feels like some additional unnecessary work (wrappers and stuff to interact between managed <-> unmanaged).

    so can BlackMagic actually hook api and where do i get this bloody lib from?

    BlackMagic &amp; api hooking
  2. #2
    ~OddBall~'s Avatar Contributor
    Reputation
    207
    Join Date
    Jan 2008
    Posts
    1,156
    Thanks G/R
    4/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    https://www.mmowned.com/forums/world-of-warcraft/guides/278302-selecting-bot-you.html - SELECTING THE BOT FOR YOU

    PHWOOOOAAAAAR - Parog was here. <3 <----Wtf's a Parog?

  3. #3
    roxaz911's Avatar Member
    Reputation
    1
    Join Date
    Jun 2009
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah ha! thanks. seems it doesnt rly support api hooking. i guess ill stay with my mixed mode dll idea. c++ gives more control over everything anyway. thanks

  4. #4
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could write your own .NET detours library. It wouldn't be difficult at all.

    Though, being .NET its not exactly gonna be pretty to write.

  5. #5
    roxaz911's Avatar Member
    Reputation
    1
    Join Date
    Jun 2009
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well i can think of making one global hook (all in unmanaged dll) that like detects what custom function to call depending on return address on the stack, but there is a problem - what if i dont hook a call? what if i need to reimplement instructions i overwrote? that might get ugly in the process. i guess writing such lib quite defeats purpose - would still be a mess with limited functionallity.. i saw a lib tho, that lets to execute asm code in .NET, but that required supplying raw bytes of assemble code what is no good..

  6. #6
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by roxaz911 View Post
    well i can think of making one global hook (all in unmanaged dll) that like detects what custom function to call depending on return address on the stack, but there is a problem - what if i dont hook a call? what if i need to reimplement instructions i overwrote? that might get ugly in the process. i guess writing such lib quite defeats purpose - would still be a mess with limited functionallity.. i saw a lib tho, that lets to execute asm code in .NET, but that required supplying raw bytes of assemble code what is no good..

    What in the world are you rambling about?

    Would you mind rephrasing that in a coherent and well thought-out manner so I don't have to spend 10 minutes trying to decipher what you're saying?

  7. #7
    roxaz911's Avatar Member
    Reputation
    1
    Join Date
    Jun 2009
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    haha ok, ill try =D well we can not hook a managed function to native code (using jmp/call). so in order to hook a managed function to unmanaged code we need unmanaged hook that calls managed function. making wrapper function for each hook isnt that sexy if you have many hooks (would definitely work tho). i was thinking about sort of hook manager where manager hooks its own function same for all hooks. then it stores expected return address and managed function callback in some kind of the list. then when execution hits unmanaged manager hook it checks return address on the stack, then picks managed callback from the list and calls it passing certain params. when i thought of this tho... its possible to make manager to hook anything we want, it was just me not thinking far enough... eh nvm ^_^

  8. #8
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by roxaz911 View Post
    haha ok, ill try =D well we can not hook a managed function to native code (using jmp/call). so in order to hook a managed function to unmanaged code we need unmanaged hook that calls managed function. making wrapper function for each hook isnt that sexy if you have many hooks (would definitely work tho). i was thinking about sort of hook manager where manager hooks its own function same for all hooks. then it stores expected return address and managed function callback in some kind of the list. then when execution hits unmanaged manager hook it checks return address on the stack, then picks managed callback from the list and calls it passing certain params. when i thought of this tho... its possible to make manager to hook anything we want, it was just me not thinking far enough... eh nvm ^_^
    Big post, with a whopping two sentences.

    Also, if I'm reading correctly, you have your managed, and unmanaged definitions mixed up. Anything .NET is managed code. WoW (or native code) is unmanaged.

    Also, hooking unmanaged code is not as hard as you think. It does require a sort of runaround, but nothing hard at all. Do some research about how to call managed code from unmanaged code.

  9. #9
    roxaz911's Avatar Member
    Reputation
    1
    Join Date
    Jun 2009
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i have nothing mixed up as i am running mixed mode dll which contains both - managed and unmanaged code ;] anyway that is trivial to me right now as i decided to use native wow UI for what i do ;]

Similar Threads

  1. [Sample Code] EndScene Hook with ASM and blackmagic
    By RivaLfr in forum WoW Memory Editing
    Replies: 90
    Last Post: 4 Weeks Ago, 04:06 PM
  2. my hook using blackmagic doesn't work after MOP releasing
    By lechris29 in forum WoW Memory Editing
    Replies: 4
    Last Post: 11-12-2012, 03:51 AM
  3. [Src/C#] BananaHook - Simple abstracted API hooking library
    By Bananenbrot in forum WoW Memory Editing
    Replies: 2
    Last Post: 02-18-2012, 02:08 PM
  4. x64 API Hooking - VC++
    By Master674 in forum WoW Memory Editing
    Replies: 6
    Last Post: 01-18-2012, 11:45 AM
  5. View what API functions are hooked by Wow
    By barthen in forum WoW Memory Editing
    Replies: 8
    Last Post: 10-26-2008, 11:25 PM
All times are GMT -5. The time now is 10:56 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search