8.1.0 RemapViewOfSection 0x80 causing ACCESS_VIOLATION menu

User Tag List

Results 1 to 6 of 6
  1. #1
    sendeos23's Avatar Active Member

    Reputation
    16
    Join Date
    Oct 2009
    Posts
    65
    Thanks G/R
    22/10
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    8.1.0 RemapViewOfSection 0x80 causing ACCESS_VIOLATION

    Hi,

    First off I'm relatively new to the reversing / botting scene (3~ months).

    These forums have been really helpful with getting me to where I am now so thank you all!

    A few months back I wrote a really basic internal bot for 8.0.1.27980.

    As I wanted to call in game functions from the main thread I found a function to detour.

    Once my DLL is injected I make a call to RemapViewOfSection with 0x40 to allow memory writes (using the code found here : Force-Page-Protection/memory.cpp at master . changeofpace/Force-Page-Protection . GitHub ) then use MinHook to install my detour.

    Everything was working perfectly, had my fishing bot running on multiple clients for hours on end making calls to Interact and FrameExecuteBuffer with no exceptions. Happy botting...

    Now, 8.1.0( 28768 ) has dropped and wow is crashing about a 1/3 of the time when the bot gets injected.

    I originally thought it might be something to do with my dll injection process or the detour being installed.

    However, through a process of elimination I'm almost 100% sure the issue is the remap (RemapViewOfSection).

    I wrote a simple test that starts Wow.exe and calls remap with 0x40 , no DLL injection or hooking.

    Confirmed that 1/3 of the time the call to remap causes Wow.exe to crash with :
    [15816] ACCESS_VIOLATION : error 138: ERROR #138 (0x8510008a) Fatal exception!
    [15816] The instruction at "0x0000000000000000" referenced memory at "0x0000000000000000".
    [15816] The memory could not be "executed".

    My only guess is there is something in wow process that is checking for a change in memory protection and crashing the game.

    Note : I have also tried remapping the memory with 0x80 as suggested here (https://www.ownedcore.com/forums/wor...-coming-8.html (The Free Lunch Is Over - Obfuscation is Coming)) by king48488 but still running into the same issue.

    Question :
    I'm pretty sure I need to make this RemapViewOfSection call in order to write my detour but after reading the 'free lunch is over thread' I'm starting to think that there is another way around this.
    Has anyone else recently (8.0.1->8.1.0) started getting these ACCESS_VIOLATION exceptions when remapping, or if not , how are you guys able to write detours without remapping?

    I appreciate that many of you might not want your methods to become public - in which case please PM me.

    Cheers
    sendeos23
    Last edited by sendeos23; 12-15-2018 at 03:01 PM.

    8.1.0 RemapViewOfSection 0x80 causing ACCESS_VIOLATION
  2. #2
    ynyzyfy's Avatar Member
    Reputation
    3
    Join Date
    Jan 2018
    Posts
    10
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you try to create process manually(suspend) , and hook NtCreateSection(syscall) to change the protection type?(I used in 8.0.1).
    Finally, you can try writing a driver
    Last edited by ynyzyfy; 12-15-2018 at 09:13 PM.

  3. Thanks sendeos23 (1 members gave Thanks to ynyzyfy for this useful post)
  4. #3
    doityourself's Avatar ★ Elder ★
    Reputation
    1424
    Join Date
    Nov 2008
    Posts
    843
    Thanks G/R
    35/448
    Trade Feedback
    0 (0%)
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    That is not a new error. It happens since 7.3.0. If you didn't get it you was just lucky.

  5. #4
    sendeos23's Avatar Active Member

    Reputation
    16
    Join Date
    Oct 2009
    Posts
    65
    Thanks G/R
    22/10
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ynyzyfy View Post
    Can you try to create process manually(suspend) , and hook NtCreateSection(syscall) to change the protection type?(I used in 8.0.1).
    Finally, you can try writing a driver
    Thanks, will give these a try.
    I have been waiting for a reason to get my lazy ass to learn about drivers / write my own.

  6. #5
    ynyzyfy's Avatar Member
    Reputation
    3
    Join Date
    Jan 2018
    Posts
    10
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh,yes.Wow has some integrity checks.If you modified the watched .text section or opened some programs,It will crash after a while.

  7. #6
    sendeos23's Avatar Active Member

    Reputation
    16
    Join Date
    Oct 2009
    Posts
    65
    Thanks G/R
    22/10
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Update :

    After a day of looking at disassembly near the function I was originally detouring I found a call to a function pointer defined in the data segment.

    From there it was simply a case of modifying the pointer to point at my function. This 'DetourFunc' first runs my bot code, then finally calls the original function.

    As this function pointer is in the .data segment I don't need to do any remapping or patching of .text segment. win win.

    pseudocode
    Code:
    typedef int64(__fastcall *HookFunction)(int, int, int);
    HookFunction OriginalFunc = 0;
    HookFunction* FunctionPointer = 0;
    
    int64 DetourFunc(int a, int b, int c)
    {
    	DoBotStuff();
            return OriginalFunc(a, b, c);
    }
    
    int InstallHook()
    {
    	FunctionPointer = (HookFunction*)(wowBaseAddress + Offsets::detourFunctionPointer); //Pointer to data segment we are going to modify
    
    	OriginalFunc = *FunctionPointer; //save the original function so we can replace it in RemoveHook
    
    	*FunctionPointer = DetourFunc;
    
    	return 1;
    }
    
    void RemoveHook()
    {
    	*FunctionPointer = OriginalFunc;
    }

Similar Threads

  1. [Question] Does MEing cause lag or..
    By Tenni-T in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 10-09-2007, 10:07 AM
  2. Help The Cause
    By maikash in forum Community Chat
    Replies: 2
    Last Post: 02-22-2007, 11:18 PM
  3. Cause enemy Faction to loose Cenarion Expedition rep
    By KuRIoS in forum World of Warcraft Exploits
    Replies: 7
    Last Post: 02-03-2007, 03:20 PM
  4. OMG WoW Causes sound problem?!
    By Anterogo2010 in forum World of Warcraft General
    Replies: 0
    Last Post: 01-17-2007, 03:04 PM
  5. weird glitch causing invincibilty after dieing while in AB
    By thestupidguy in forum World of Warcraft Exploits
    Replies: 2
    Last Post: 11-06-2006, 12:04 PM
All times are GMT -5. The time now is 02:59 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search