Network: WoW Gold | WoW Accounts | MPS Games | FPSowned
MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides
Homepage »      Register »      Hall of Fame »      Ranks And Awards »      Advertise »      Marketplace »
 
Sign up



Do you like this excellent information? Then Donate HERE to remove ads and support the MMOwned community.


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > World of Warcraft > Bots and Programs > WoW Memory Editing

WoW Memory Editing WoW Memory Editing for learning purposes only.
This section is more advanced than others on MMOwned Read the section specific rules, infractions will be given out if u break them!That is including the expectations! - If you don't meet them then don't post

Reply
 
LinkBack Thread Tools
  #1  
Old 12-01-2008
Therrm's Avatar
Therrm is offline.
Master Sergeant
  
 
Join Date: Feb 2007
Posts: 86
Reputation: 8
Points: 964, Level: 2
Points: 964, Level: 2 Points: 964, Level: 2 Points: 964, Level: 2
Level up: 13%, 436 Points needed
Level up: 13% Level up: 13% Level up: 13%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

My failed try :)

Hi everyone !!!

First of all : please Cypher apologize for my dumb question yesterday in my PM ^^ It was really too silly after all

Well my current gold is to execute functions in order to control my char in game with DLL injection.

I wanted to start by jumping.

So I started IDA and look after "JumpOrAscendStart" into String
I found it at :
Code:
.rdata:0095BEC0 aJumporascendst db 'JumpOrAscendStart',0 ; DATA XREF: .data:off_FCCFD8o
I press Ctrl-x in order to see what calls this string and it leads to :
Code:
.data:00FCCFD8 off_FCCFD8      dd offset aJumporascendst ; DATA XREF: sub_552A00+9r
.data:00FCCFD8                                         ; sub_552A30:loc_552A33r
.data:00FCCFD8                                         ; "JumpOrAscendStart"
There are 2 functions : sub_552A00 and sub_552A30.

First of all : does those functions are used by WoW to Jump your char ? Moreover, I saw that some LUA functions (as JumpOrAscendStart) are disable by Blizzard. Is it only disable for addons or is it disable for using in memory ? (can I use them with DLL injection ?) Well they are not fully disable because WoW use them but perhaps they have to be enable before used.

Then I tried to use the first function with a DLL injection with :
Code:
#include <windows.h>

void (__stdcall *sub_552A00) () = (void(__stdcall *)()) 0x00552A00;

int WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
    switch(dwReason)
    {
    case DLL_PROCESS_ATTACH:
        MessageBox(NULL,L"DLL loaded successfuly",L"Sucess",MB_OK);
        sub_552A00;
        break;

    case DLL_PROCESS_DETACH:
        //Should have inserted something here but it was just for test
        break;
    }
    return true;
}
First in my code I declare the sub_552A00 function but I dont really think it is the right way... (I put stdcall but I didnt know what else I could put... there is nothing in IDA that call help me, or I dont know it)
Then I call the function but nothing happened in game...

To summarize :
Does the sub_552A00 is really used by WoW to jump ? If it's not, how could I find the correct function. I've read that I could call JumpOrAscendStart with DoString in order to call the function by LUA, but I wanted to find the direct function to jump.
Moreover : Sub functions never have parameters... Well those i saw in IDA... This is very strange and I think i'm missing something here...

This thread can be considered as a newb post and I apologize for it

And I apologize also for my crappy english ^^
Reply With Quote


Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx.

  #2  
Old 12-01-2008
Nesox's Avatar
Nesox is offline.
MaiN's Biatch
Legendary User
  
 
Join Date: Mar 2007
Location: VirtualAllocEx
Posts: 1,115
Nominated 26 Times in 3 Posts
Nominated TOTM/W Award(s): 1
Reputation: 727
Points: 36,171, Level: 28
Points: 36,171, Level: 28 Points: 36,171, Level: 28 Points: 36,171, Level: 28
Level up: 95%, 129 Points needed
Level up: 95% Level up: 95% Level up: 95%
Activity: 14.1%
Activity: 14.1% Activity: 14.1% Activity: 14.1%

isn't that releated to fall damage? to see if u have started falling or began a jump
edit: i fail it's for jumping but u still need to unprotect it xD
__________________
omg ive started a blog nao! what's wrong with MEH!? -> [Only registered and activated users can see links. ]

Last edited by Nesox; 12-08-2008 at 10:44 AM.
Reply With Quote
  #3  
Old 12-01-2008
Cypher's Avatar
Cypher is offline.
Kynox's sister's pimp
Legendary User
  
 
Join Date: Apr 2006
Location: ntdll.dll
Posts: 4,188
Nominated 63 Times in 4 Posts
Nominated TOTM/W Award(s): 1
Reputation: 1085
Points: 55,580, Level: 35
Points: 55,580, Level: 35 Points: 55,580, Level: 35 Points: 55,580, Level: 35
Level up: 16%, 3,120 Points needed
Level up: 16% Level up: 16% Level up: 16%
Activity: 47.0%
Activity: 47.0% Activity: 47.0% Activity: 47.0%

Its a LUA function, you can't call it like that. You have to use another of WoWs internal functions to 'proxy' the call. Furthermore, the string is part of an array, storing the LUA functions name, and its address, start at the top and whether the sub is above or below will be obvious.

WoW never calls those functions in the way you're implying, they're part of the publicly exposed API, a wrapper if you will. The actual implementation is in the functions that the wrapper calls.

You can call the LUA functions to do what you want, but as I said, you need to pass it through another layer to get WoW to parse and manage it.

EDIT: And your function declaration and calling is totally wrong, even if you could call the function like that.

Dude you need to learn ASM and C++ before you go around trying to reverse functions.
__________________
[Only registered and activated users can see links. ] Back online!

"Science is interesting, and if you don't agree you can **** off."
[Only registered and activated users can see links. ]


Leonard: "I'm just saying, you can catch more flies with honey than with vinegar."
Sheldon: "You can catch even more flies with manure, what's your point?"
Reply With Quote
  #4  
Old 12-01-2008
ostapus is offline.
Sergeant
  
 
Join Date: Nov 2008
Posts: 67
Reputation: 32
Points: 477, Level: 1
Points: 477, Level: 1 Points: 477, Level: 1 Points: 477, Level: 1
Level up: 16%, 423 Points needed
Level up: 16% Level up: 16% Level up: 16%
Activity: 3.3%
Activity: 3.3% Activity: 3.3% Activity: 3.3%

Quote:
Originally Posted by Therrm View Post
Hi everyone !!!

First of all : please Cypher apologize for my dumb question yesterday in my PM ^^ It was really too silly after all

Well my current gold is to execute functions in order to control my char in game with DLL injection.

I wanted to start by jumping.

So I started IDA and look after "JumpOrAscendStart" into String
I found it at :
Code:
.rdata:0095BEC0 aJumporascendst db 'JumpOrAscendStart',0 ; DATA XREF: .data:off_FCCFD8o
I press Ctrl-x in order to see what calls this string and it leads to :
Code:
.data:00FCCFD8 off_FCCFD8      dd offset aJumporascendst ; DATA XREF: sub_552A00+9r
.data:00FCCFD8                                         ; sub_552A30:loc_552A33r
.data:00FCCFD8                                         ; "JumpOrAscendStart"
There are 2 functions : sub_552A00 and sub_552A30.

First of all : does those functions are used by WoW to Jump your char ? Moreover, I saw that some LUA functions (as JumpOrAscendStart) are disable by Blizzard. Is it only disable for addons or is it disable for using in memory ? (can I use them with DLL injection ?) Well they are not fully disable because WoW use them but perhaps they have to be enable before used.

Then I tried to use the first function with a DLL injection with :
Code:
#include <windows.h>

void (__stdcall *sub_552A00) () = (void(__stdcall *)()) 0x00552A00;

int WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
    switch(dwReason)
    {
    case DLL_PROCESS_ATTACH:
        MessageBox(NULL,L"DLL loaded successfuly",L"Sucess",MB_OK);
        sub_552A00;
        break;

    case DLL_PROCESS_DETACH:
        //Should have inserted something here but it was just for test
        break;
    }
    return true;
}
First in my code I declare the sub_552A00 function but I dont really think it is the right way... (I put stdcall but I didnt know what else I could put... there is nothing in IDA that call help me, or I dont know it)
Then I call the function but nothing happened in game...

To summarize :
Does the sub_552A00 is really used by WoW to jump ? If it's not, how could I find the correct function. I've read that I could call JumpOrAscendStart with DoString in order to call the function by LUA, but I wanted to find the direct function to jump.
Moreover : Sub functions never have parameters... Well those i saw in IDA... This is very strange and I think i'm missing something here...

This thread can be considered as a newb post and I apologize for it

And I apologize also for my crappy english ^^
you right, JumpOrAscendStart function will cause you char starts to jump. this is "public" (visible from lua addon) function and you can call it.. the problem you will face is "blizzard function" only gui message... my advice - look at the function, inspect when/where it will fail and make suggestion (pretty easy to trace so consider it as exercise)... similar code will be in any "protected" functions.. like any movement/spell cast functions...
Reply With Quote
  #5  
Old 12-01-2008
Cypher's Avatar
Cypher is offline.
Kynox's sister's pimp
Legendary User
  
 
Join Date: Apr 2006
Location: ntdll.dll
Posts: 4,188
Nominated 63 Times in 4 Posts
Nominated TOTM/W Award(s): 1
Reputation: 1085
Points: 55,580, Level: 35
Points: 55,580, Level: 35 Points: 55,580, Level: 35 Points: 55,580, Level: 35
Level up: 16%, 3,120 Points needed
Level up: 16% Level up: 16% Level up: 16%
Activity: 47.0%
Activity: 47.0% Activity: 47.0% Activity: 47.0%

Quote:
Originally Posted by ostapus View Post
you right, JumpOrAscendStart function will cause you char starts to jump. this is "public" (visible from lua addon) function and you can call it.. the problem you will face is "blizzard function" only gui message... my advice - look at the function, inspect when/where it will fail and make suggestion (pretty easy to trace so consider it as exercise)... similar code will be in any "protected" functions.. like any movement/spell cast functions...

He's trying to call it from a DLL not in game, you don't face the protection check when calling the function via Blizzards LUA wrapper.

You only need to patch the protection check if you want to use it from an addon, which he's not trying to do.

Furthermore, he's calling it totally incorrectly.

Please don't post unless you understand the content matter.

EDIT: Quick edit. Upon inspection of the target function it doesn't take any params. You could PROBABLY pass it a null LUA stack structure and it would work but this is not something you want to get in the habbit of doing. You're better off implementing a generic LUA system so you can call functions without having to manually manage the LUA stack.

Either way, your function typedef is wrong.
__________________
[Only registered and activated users can see links. ] Back online!

"Science is interesting, and if you don't agree you can **** off."
[Only registered and activated users can see links. ]


Leonard: "I'm just saying, you can catch more flies with honey than with vinegar."
Sheldon: "You can catch even more flies with manure, what's your point?"

Last edited by Cypher; 12-01-2008 at 03:00 PM.
Reply With Quote
  #6  
Old 12-01-2008
Therrm's Avatar
Therrm is offline.
Master Sergeant
  
 
Join Date: Feb 2007
Posts: 86
Reputation: 8
Points: 964, Level: 2
Points: 964, Level: 2 Points: 964, Level: 2 Points: 964, Level: 2
Level up: 13%, 436 Points needed
Level up: 13% Level up: 13% Level up: 13%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

Thanks Cypher =]

I'm going to look around and dig a littler deeper into forums to achieve this =]

I'll be back to show you my new crappy code/IDA procedures lol ^^ (well if you want to check them once again lol)

cya
Reply With Quote
  #7  
Old 12-08-2008
Therrm's Avatar
Therrm is offline.
Master Sergeant
  
 
Join Date: Feb 2007
Posts: 86
Reputation: 8
Points: 964, Level: 2
Points: 964, Level: 2 Points: 964, Level: 2 Points: 964, Level: 2
Level up: 13%, 436 Points needed
Level up: 13% Level up: 13% Level up: 13%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

Hi it's me again !!!

So I'm always unable to use Lua functions with my DLL injection...

I've tested 2 other methods after reading/lookiing into forums and IDA (last function calling was effectively horrible lol):

The asm method :
Code:
#include <windows.h>

void Jumping()
{
    DWORD Jump = 0x00402A10;
    _asm
    {
        call Jump //there is no parameters for jump so I should be able to call it without any Push
    }
}


int WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
    switch(dwReason)
    {
    case DLL_PROCESS_ATTACH:
        Jumping();
        break;
    return true;
}
DLL inject correctly but nothing happen..

So I decided to use the Lua_DoString as you recommanded:

Code:
#include <windows.h>
typedef void ( __cdecl * tLua_Dostring )( char * pszString, char * pszString2, void * pState );
tLua_DoString String_function = (tLua_DoString)(0x0077DEF0); 

int WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
    switch(dwReason)
    {
    case DLL_PROCESS_ATTACH:
        String_function("JumpOrAscendStart()","JumpOrAscendStart()",0);
        break;
    return true;
}
And it doesn't work either...

Any help ?

BTW : WoWX is a gold mine !!!! I didn't have enough time to look at the whole code but it's inscredible !!!
Reply With Quote
  #8  
Old 12-10-2008
Therrm's Avatar
Therrm is offline.
Master Sergeant
  
 
Join Date: Feb 2007
Posts: 86
Reputation: 8
Points: 964, Level: 2
Points: 964, Level: 2 Points: 964, Level: 2 Points: 964, Level: 2
Level up: 13%, 436 Points needed
Level up: 13% Level up: 13% Level up: 13%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

No one can help with to deal with this ? ^^
Reply With Quote
  #9  
Old 12-10-2008
Xarg0's Avatar
Xarg0 is offline.
Knight-Lieutenant
  
 
Join Date: Jan 2008
Location: South Pole
Posts: 319
Reputation: 40
Points: 1,389, Level: 2
Points: 1,389, Level: 2 Points: 1,389, Level: 2 Points: 1,389, Level: 2
Level up: 98%, 11 Points needed
Level up: 98% Level up: 98% Level up: 98%
Activity: 1.1%
Activity: 1.1% Activity: 1.1% Activity: 1.1%

What are you expecting it to do?
__________________
I hacked 127.0.0.1
Reply With Quote
  #10  
Old 12-10-2008
Shynd's Avatar
Shynd is offline.
Contributor
  
 
Join Date: May 2008
Posts: 387
Reputation: 87
Points: 906, Level: 2
Points: 906, Level: 2 Points: 906, Level: 2 Points: 906, Level: 2
Level up: 2%, 494 Points needed
Level up: 2% Level up: 2% Level up: 2%
Activity: 0.9%
Activity: 0.9% Activity: 0.9% Activity: 0.9%

Maybe you should put a __asm __emit 0xCC; somewhere in your code and inject the DLL into a WoW process that has a debugger attached. See where your INT3 breakpoint is hit, step through the code, see what happens or what doesn't happen, etc. 'Course, you'll probably have to learn a few things first, but...
Reply With Quote
  #11  
Old 12-10-2008
Cypher's Avatar
Cypher is offline.
Kynox's sister's pimp
Legendary User
  
 
Join Date: Apr 2006
Location: ntdll.dll
Posts: 4,188
Nominated 63 Times in 4 Posts
Nominated TOTM/W Award(s): 1
Reputation: 1085
Points: 55,580, Level: 35
Points: 55,580, Level: 35 Points: 55,580, Level: 35 Points: 55,580, Level: 35
Level up: 16%, 3,120 Points needed
Level up: 16% Level up: 16% Level up: 16%
Activity: 47.0%
Activity: 47.0% Activity: 47.0% Activity: 47.0%

Quote:
Originally Posted by Shynd View Post
Maybe you should put a __asm __emit 0xCC; somewhere in your code and inject the DLL into a WoW process that has a debugger attached. See where your INT3 breakpoint is hit, step through the code, see what happens or what doesn't happen, etc. 'Course, you'll probably have to learn a few things first, but...
I noticed you were using __emit to drop breakpoints in your code.

This works just as well and is the 'correct' way to do what you want afaik:
__asm int 3

(Breakpoints are interrupt code 3)
__________________
[Only registered and activated users can see links. ] Back online!

"Science is interesting, and if you don't agree you can **** off."
[Only registered and activated users can see links. ]


Leonard: "I'm just saying, you can catch more flies with honey than with vinegar."
Sheldon: "You can catch even more flies with manure, what's your point?"
Reply With Quote
  #12  
Old 12-11-2008
Shynd's Avatar
Shynd is offline.
Contributor
  
 
Join Date: May 2008
Posts: 387
Reputation: 87
Points: 906, Level: 2
Points: 906, Level: 2 Points: 906, Level: 2 Points: 906, Level: 2
Level up: 2%, 494 Points needed
Level up: 2% Level up: 2% Level up: 2%
Activity: 0.9%
Activity: 0.9% Activity: 0.9% Activity: 0.9%

Hmm, maybe I was neglecting the space between the int and the 3 when I tried that with VC++. I don't remember which compiler I started learning C on--I want to say lcc, but I'm not sure--but its syntax was AT&T and there was no space between int and 3, and int3 didn't work with VC++, so I resorted to using __emit instead of doing any research whatsoever. I appreciate the correction, as that was bothering me slightly =p
Reply With Quote
  #13  
Old 12-11-2008
Cypher's Avatar
Cypher is offline.
Kynox's sister's pimp
Legendary User
  
 
Join Date: Apr 2006
Location: ntdll.dll
Posts: 4,188
Nominated 63 Times in 4 Posts
Nominated TOTM/W Award(s): 1
Reputation: 1085
Points: 55,580, Level: 35
Points: 55,580, Level: 35 Points: 55,580, Level: 35 Points: 55,580, Level: 35
Level up: 16%, 3,120 Points needed
Level up: 16% Level up: 16% Level up: 16%
Activity: 47.0%
Activity: 47.0% Activity: 47.0% Activity: 47.0%

Haha. Np.

P.S. AT&T syntax is for jews (like Kynox).
__________________
[Only registered and activated users can see links. ] Back online!

"Science is interesting, and if you don't agree you can **** off."
[Only registered and activated users can see links. ]


Leonard: "I'm just saying, you can catch more flies with honey than with vinegar."
Sheldon: "You can catch even more flies with manure, what's your point?"
Reply With Quote
  #14  
Old 12-11-2008
Therrm's Avatar
Therrm is offline.
Master Sergeant
  
 
Join Date: Feb 2007
Posts: 86
Reputation: 8
Points: 964, Level: 2
Points: 964, Level: 2 Points: 964, Level: 2 Points: 964, Level: 2
Level up: 13%, 436 Points needed
Level up: 13% Level up: 13% Level up: 13%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

Well I was able to use functions with injection. In fact the JumporAscentStart() has changed and I saw on wiki that movement functions requiere a keypressed... Not very efficient to move character etc. I guess I'll have to use CInputControl.

But I tried with other functions as logouy and it's working perfectly

One more question : I tought that with injection, there was no check if the function was protected or not but when I use ForceLogout() after Logout() it says that I dont have the permission to do that... Guess I'll have to work around this to ^^

Anyway thanks all for your answers ! (nice trick shynd i'll look for this in the future)
Reply With Quote
  #15  
Old 12-11-2008
Cypher's Avatar
Cypher is offline.
Kynox's sister's pimp
Legendary User
  
 
Join Date: Apr 2006
Location: ntdll.dll
Posts: 4,188
Nominated 63 Times in 4 Posts
Nominated TOTM/W Award(s): 1
Reputation: 1085
Points: 55,580, Level: 35
Points: 55,580, Level: 35 Points: 55,580, Level: 35 Points: 55,580, Level: 35
Level up: 16%, 3,120 Points needed
Level up: 16% Level up: 16% Level up: 16%
Activity: 47.0%
Activity: 47.0% Activity: 47.0% Activity: 47.0%

The reason you can't use ForceLogout is because the check for that is serverside.
__________________
[Only registered and activated users can see links. ] Back online!

"Science is interesting, and if you don't agree you can **** off."
[Only registered and activated users can see links. ]


Leonard: "I'm just saying, you can catch more flies with honey than with vinegar."
Sheldon: "You can catch even more flies with manure, what's your point?"
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On



All times are GMT -4. The time now is 12:02 PM.




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.1

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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493