[Wow] WorldFrameTraceline crash and how to involk main thread using c# menu

User Tag List

Results 1 to 6 of 6
  1. #1
    tommingc's Avatar Active Member
    Reputation
    18
    Join Date
    Nov 2022
    Posts
    19
    Thanks G/R
    8/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Wow] WorldFrameIntersect crash and how to invoke main thread using c#

    Hello everyone,

    New to here, I got the Traceline function using this signature.
    //48 83 EC 58 8B 42 08 F2 0F 10 02 48 8D 54 24 ?? 89 44 24 28 41 8B 40 08 89 44 24 34 48 8B 84 24 ?? ?? ?? ?? 48 89 44 24 ?? 48 8B 84 24 ?? ?? ?? ?? F2 0F 11 44 24 ?? F2 41 0F 10 00 48 89 44 24 ?? F2 0F 11 44 24 ?? 4C 89 4C 24 ?? E8 ?? ?? ?? ?? 48 83 C4 58 C3


    by looking at the structure it apears this function requires (worldptr &end, &start, &hit, &distance, intersectFlags)

    I then get the worldptr using
    ulong worldPtr = Client.Read<ulong>(MainModule.BaseAddress + WorldFrameOffset)

    applied the end/start/hit and distance code cave in the memory.

    I then use CreateRemoteThread to execute below shell code,

    Code:
           string[] mnemonics =
                {
    
                    "mov rax, " + (uint)IntersectFlags.LineOfSight, //0x5D,//0b01011011  
                    "mov [rsp+0x28], rax",
                    "mov rax, " + distanceCave,
                    "mov [rsp+0x20], rax", 
                    "mov r9, " + hitCave,
                    "mov r8, " + startCave,
                    "mov rdx, " + endCave,
                    "mov rcx, " + worldPtr,
                    "mov rbx, " + ((long)ps.MainModule.BaseAddress + (long)caddr.WorldFrameIntersect),
    
                    "sub rsp, 0x28",
                    "call rbx",
                    "mov [" + resultCollisionCave + "], rax"
                    "add rsp, 0x28",
    
                    "ret"
                };
    the client froze for 1 second and disappeared, unlike other calls, if i call using a wrong parameter it will crash by #138 or such.

    and this is how it looks like in the memory
    Code:
      
                000002098C260000                  | 48:C74424 28 11001000                   | mov qword ptr ss:[rsp+28],100011                        |
                000002098C260009                  | 48:B8 2A00248C09020000                  | mov rax,2098C24002A                                     |
                000002098C260013                  | 48:894424 20                            | mov qword ptr ss:[rsp+20],rax                           |
                000002098C260018                  | 49:B9 1E00248C09020000                  | mov r9,2098C24001E                                      |
                000002098C260022                  | 49:B8 1C00248C09020000                  | mov r8,2098C24001C                                      |
                000002098C26002C                  | 48:BA 1000248C09020000                  | mov rdx,2098C240010                                     |
                000002098C260036                  | 48:B9 A098BAF709020000                  | mov rcx,209F7BA98A0                                     |
                000002098C260040                  | 48:B8 90B3B9C5F77F0000                  | mov rax,wowclassict.7FF7C5B9B390                        |
                000002098C26004A                  | 48:83EC 28                              | sub rsp,28                                              |
                000002098C26004E                  | FFD0                                    | call rax                                                |
                000002098C260050                  | 48:83C4 28                              | add rsp,28                                              |
                000002098C260054                  | C3                                      | ret
    I have done similar calls using createremotethread for functions like click move, spell cast, etc, for the intersect I tried hard and never succeeded.

    I'm new to the Shellcode, I believe I did something wrong to the above processes, and I don't know how to invoke the main thread using C#, do we have to execute in the main thread? how to?
    Kindly please review and give suggestions.


    Cheers!.
    Last edited by tommingc; 11-04-2022 at 04:03 AM.

    [Wow] WorldFrameTraceline crash and how to involk main thread using c#
  2. #2
    tommingc's Avatar Active Member
    Reputation
    18
    Join Date
    Nov 2022
    Posts
    19
    Thanks G/R
    8/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oops, correct the typo in the subject.
    Last edited by tommingc; 11-04-2022 at 04:04 AM.

  3. #3
    air999's Avatar Contributor
    Reputation
    131
    Join Date
    Nov 2014
    Posts
    102
    Thanks G/R
    9/62
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Prototype should be WorldIntersect(INT_PTR currentWorldFrame, INT_PTR start, INT_PTR end, INT_PTR result, INT_PTR distance, unsigned int flags, INT_PTR hitTestResult)
    you missed INT_PTR hitTestResult

  4. #4
    tommingc's Avatar Active Member
    Reputation
    18
    Join Date
    Nov 2022
    Posts
    19
    Thanks G/R
    8/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by air999 View Post
    Prototype should be WorldIntersect(INT_PTR currentWorldFrame, INT_PTR start, INT_PTR end, INT_PTR result, INT_PTR distance, unsigned int flags, INT_PTR hitTestResult)
    you missed INT_PTR hitTestResult
    Thanks, I tried to look into again, it appears there is no hittestresult parameter, it has return value to RAX, I'm working on wow classic by the way.
    there is also the possible I found the wrong call. I will look into it further.
    Snipaste_2022-11-05_21-36-10.jpg

  5. #5
    ChrisIsMe's Avatar Contributor
    Reputation
    164
    Join Date
    Apr 2017
    Posts
    210
    Thanks G/R
    67/100
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    aaaaaaaaaaaaaaaaaaaa
    Last edited by ChrisIsMe; 11-01-2023 at 04:57 PM.
    no war

  6. Thanks tommingc (1 members gave Thanks to ChrisIsMe for this useful post)
  7. #6
    tommingc's Avatar Active Member
    Reputation
    18
    Join Date
    Nov 2022
    Posts
    19
    Thanks G/R
    8/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ChrisIsMe View Post
    Code:
    Vector3 TraceLine(Vector3 from, Vector3 to, int32_t hitFlags)
    {
        uintptr_t S_CurWorldFrame = *(uintptr_t*)(base + CUR_WORLD_FRAME);
        Vector3 res = { 0, 0, 0 };
        float distance = 1;
        Hit test = {
            from,
            to,
            &res,
            &distance,
            hitFlags,
        };
        WorldIntersect(*(uintptr_t*)(S_CurWorldFrame + 8LL * *(unsigned int*)(S_CurWorldFrame + 32) + 16), &test);
        return res;
    }
    You can find intersect easy because you know the common hitflags used in the client.

    in ida search immediate value `9437521`
    Appreciate, this is indeed a much easier way to find the call. Appears I found the correct one. I will keep working on it,
    Cheers!

Similar Threads

  1. [Tool] [HELP] i need wow luncher to work on LAN and how to set up server
    By metalooo in forum WoW EMU Programs
    Replies: 0
    Last Post: 08-04-2011, 06:25 AM
  2. [How-To] Which language for wow hacks/bots and how to do em?
    By B0unty in forum Programming
    Replies: 6
    Last Post: 01-19-2011, 04:36 PM
  3. The essentials of the WoW Economy, and how to dominate it
    By zealot505 in forum World of Warcraft Guides
    Replies: 5
    Last Post: 03-30-2010, 11:08 PM
  4. Stealth Tools and how to use it to hide keyloggers,to get WoW accounts
    By Liquid Malfunction in forum WoW Scam Prevention
    Replies: 3
    Last Post: 01-11-2009, 03:08 PM
All times are GMT -5. The time now is 05:55 PM. 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