[mac] (could be linux) How do you determine where a module is stored in memory? menu

Shout-Out

User Tag List

Results 1 to 5 of 5
  1. #1
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [mac] (could be linux) How do you determine where a module is stored in memory?

    So if I fire up GDB, hook wow, and type "info shared" it will list out all of the modules that wow loaded, as well as where their starting point is in memory.

    Well, I'd like to figure out where the warden module is stored (I prevent it from being private by editing the NSLinkModule parameters). I was going to use this to then dynamically hook some function calls.

    Anyone have any ideas? I downloaded the GDB source code + looked @ "info shared" and it didn't help me at all, I couldn't trace it back to any system calls that provide this information.

    Example of "info shared":
    Code:
    114 RawCamera                    B 0x927c6000        dyld Y Y /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera at 0x927c6000 (offset 0x927c6000)
    115 AudioIPCPlugIn               B 0x16ed3000        dyld Y Y /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn at 0x16ed3000 (offset 0x16ed3000)
    116 AppleHDAHALPlugIn            B 0x16edc000        dyld Y Y /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn at 0x16edc000 (offset 0x16edc000)
    117 CoreAudio                    - 0x70000000        dyld Y Y /System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio at 0x70000000 (offset 0x0)
    118 Battle.net.bundle            - 0x25900000        dyld Y Y /Volumes/HD/Applications/World of Warcraft/World of Warcraft.app/Contents/Frameworks/Battle.net.bundle at 0x25900000 (offset 0x25900000)
    119 LDAP                         F 0x96417000        dyld Y Y /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP at 0x96417000 (offset 0x96417000)
    120 libssl.0.9.8.dylib           - 0x913bc000        dyld Y Y /usr/lib/libssl.0.9.8.dylib at 0x913bc000 (offset 0x913bc000)
    121 MachOLoader2                 - 0x2e7e6000        dyld Y Y MachOLoader2 at 0x2e7e6000 (offset 0x2e7e6000)
                                                     (objfile is) [memory object "MachOLoader2" at 0x2e7e6000]
    Another random question, anyone know why hooking memcpy would fail (the game locks up)?
    https://tanaris4.com

    [mac] (could be linux) How do you determine where a module is stored in memory?
  2. #2
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm only speaking for the Windows client here, but I assume it also goes for Mac.
    The module is on Windows not actually loaded like a normal library. WoW allocates memory for it, and then manually maps it into the allocated memory and does all relocations etc. manually. The module is therefore not a normal module, just a bunch of normal allocated memory.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  3. #3
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's a normal module on OS X - it's linked using NSLinkModule, but none of the functions involved actually mention WHERE it's mapped into memory once it's loaded as a module vs. it being raw data. So I have to like manually re-compile my injected module w/the address after I attach w/GDB to type "info shared", it sucks :/
    https://tanaris4.com

  4. #4
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Tanaris4 View Post
    It's a normal module on OS X - it's linked using NSLinkModule, but none of the functions involved actually mention WHERE it's mapped into memory once it's loaded as a module vs. it being raw data. So I have to like manually re-compile my injected module w/the address after I attach w/GDB to type "info shared", it sucks :/
    Just check the Warden functions. They use it all the time.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  5. #5
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by MaiN View Post
    Just check the Warden functions. They use it all the time.
    wow good call I'm an idiot, I'll just find a function that is passed the address when it calls a module func... TY sir
    https://tanaris4.com

Similar Threads

  1. Replies: 7
    Last Post: 09-02-2012, 02:41 AM
  2. How do you determine if a node is an herb or mine?
    By Tanaris4 in forum WoW Memory Editing
    Replies: 9
    Last Post: 08-04-2011, 12:59 PM
  3. How do you determine which .M2 to use?
    By Nitric in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 08-11-2010, 07:56 PM
  4. Replies: 6
    Last Post: 09-17-2009, 07:38 AM
  5. + 2 REP if you could tell me how to fix this for my server
    By mafiaboy in forum World of Warcraft Emulator Servers
    Replies: 21
    Last Post: 12-23-2007, 03:07 PM
All times are GMT -5. The time now is 07:36 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