MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides - Powered by vBulletin


Donate to remove ads, get special forum and shoutbawx access
+ Reply to Thread
Results 1 to 9 of 9
  1. #1

    New User
    Join Date: Jun 2009
    Posts: 8
    Rep: 1
    Cash: 600

    BlackMagic & api hooking

    Donate to remove ads, get special forum and shoutbawx access
    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?

  2. #2

    Contributor

    Join Date: Jan 2008
    Posts: 985
    Rep: 145
    Cash: 560
    http://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

    New User
    Join Date: Jun 2009
    Posts: 8
    Rep: 1
    Cash: 600
    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

    Kynox's Sister's Pimp

    Join Date: Apr 2006
    Location: ntdll.dll
    Posts: 4,771
    Rep: 1148
    Cash: 605
    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

    New User
    Join Date: Jun 2009
    Posts: 8
    Rep: 1
    Cash: 600
    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

    Kynox's Sister's Pimp

    Join Date: Apr 2006
    Location: ntdll.dll
    Posts: 4,771
    Rep: 1148
    Cash: 605
    Quote 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

    New User
    Join Date: Jun 2009
    Posts: 8
    Rep: 1
    Cash: 600
    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

    MMOwned WebDev


    Join Date: Jan 2008
    Posts: 2,555
    Rep: 1167
    Cash: 350
    Quote 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

    New User
    Join Date: Jun 2009
    Posts: 8
    Rep: 1
    Cash: 600
    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 ;]

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Go to the top of the page

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56