[Windows] Debugging - Getting Started menu

Shout-Out

User Tag List

Results 1 to 4 of 4
  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)

    [Windows] Debugging - Getting Started

    So I'm used to using GDB on OS X to tinker w/wow, and I'm just starting to do the same on windows.

    I actually installed GDB and am able to hook the process just fine. Now what I realized is that I can't just break on a function address, since the binary's start address is always different.

    Just curious how I should go about hooking functions etc...

    Thanks!
    https://tanaris4.com

    [Windows] Debugging - Getting Started
  2. #2
    Verletzer's Avatar Private
    Reputation
    11
    Join Date
    Apr 2011
    Posts
    11
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your enemy has a name, "Address Space Layout Randomization"

    Luckily your enemy has a weakness. ASLR is enabled by a single byte (well the field is two bytes) in the PE header. Specifically, IMAGE_NT_HEADERS -> IMAGE_OPTIONAL_HEADER -> DllCharacteristics. The flag is named, "IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE" and has a value of 0x40.

    To disable ASLR, you can parse the PE header to get the location of this field; although I think it will almost always be in the same place. Fire up a hex editor and go to file offset 0x17E - you should see 0x40 0x81 - change the first byte from 0x40 to 0x00. ASLR has now been disabled and WoW should always load at the default address of 0x400000. If you use the launcher instead of running WoW.exe directly, it might hash WoW and complain about the change; I never use the launcher so I cannot confirm if it will complain or even notice. I have run with ASLR disabled for quite some time and have never drawn any attention from Blizzard (as far as I know). Have fun!

  3. #3
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Verletzer View Post
    Your enemy has a name, "Address Space Layout Randomization"

    Luckily your enemy has a weakness. ASLR is enabled by a single byte (well the field is two bytes) in the PE header. Specifically, IMAGE_NT_HEADERS -> IMAGE_OPTIONAL_HEADER -> DllCharacteristics. The flag is named, "IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE" and has a value of 0x40.

    To disable ASLR, you can parse the PE header to get the location of this field; although I think it will almost always be in the same place. Fire up a hex editor and go to file offset 0x17E - you should see 0x40 0x81 - change the first byte from 0x40 to 0x00. ASLR has now been disabled and WoW should always load at the default address of 0x400000. If you use the launcher instead of running WoW.exe directly, it might hash WoW and complain about the change; I never use the launcher so I cannot confirm if it will complain or even notice. I have run with ASLR disabled for quite some time and have never drawn any attention from Blizzard (as far as I know). Have fun!
    Totally unnecessary, just add the offset to the base module address.

    Process.MainModule.BaseAddress

  4. #4
    sitnspinlock's Avatar Elite User CoreCoins Purchaser
    Reputation
    398
    Join Date
    Sep 2010
    Posts
    439
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    Totally unnecessary, just add the offset to the base module address.

    Process.MainModule.BaseAddress
    I think you might be missing the point slightly , haven't used gdb but if he is trying to break on a location with an imagebase of 00400000, he is either going to have to rebase the entire program or disable aslr. most go with the latter. rebasing with ida on my craptop takes almost 15 minutes.
    Last edited by sitnspinlock; 05-29-2011 at 04:19 AM.

Similar Threads

  1. (WINDOWS HACK) Changing Start Menu Text
    By friendofdar in forum Community Chat
    Replies: 7
    Last Post: 11-22-2007, 08:40 PM
  2. Boting: Need help getting started
    By grond in forum World of Warcraft General
    Replies: 3
    Last Post: 10-30-2007, 02:19 PM
  3. Getting Started?
    By Dax in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 06-23-2007, 12:23 AM
  4. Getting Started
    By masonps3 in forum World of Warcraft General
    Replies: 3
    Last Post: 06-15-2007, 02:05 PM
All times are GMT -5. The time now is 08:42 PM. 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