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
  #31  
Old 10-10-2009
Ellesar1 is offline.
Site Donator
  
 
Join Date: Feb 2009
Posts: 75
Reputation: 14
Points: 765, Level: 1
Points: 765, Level: 1 Points: 765, Level: 1 Points: 765, Level: 1
Level up: 73%, 135 Points needed
Level up: 73% Level up: 73% Level up: 73%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

it just means that the whole TLS rewriting which noone knows what it is for doesn't break something.

since the address for the lua function seems to be okay, i think that you push the arguments in a wrong order or push wrong arguments. maybe you should push the location of the 2nd last byte from your lua string instead of 0. so, luastr addr + luastr length - 1
Reply With Quote


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

  #32  
Old 10-10-2009
furang's Avatar
furang is offline.
Master Sergeant
  
 
Join Date: Jul 2009
Posts: 84
Reputation: 19
Points: 364, Level: 1
Points: 364, Level: 1 Points: 364, Level: 1 Points: 364, Level: 1
Level up: 91%, 36 Points needed
Level up: 91% Level up: 91% Level up: 91%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

Nope... Checked that. luastr length doesn't help.

As you can see function takes 3 parameters. But there's a variable (global as i understand). Can it be so my code overwrites it so it crashes wow?
__________________
i did it 4 lulz
Reply With Quote
  #33  
Old 10-10-2009
Ellesar1 is offline.
Site Donator
  
 
Join Date: Feb 2009
Posts: 75
Reputation: 14
Points: 765, Level: 1
Points: 765, Level: 1 Points: 765, Level: 1 Points: 765, Level: 1
Level up: 73%, 135 Points needed
Level up: 73% Level up: 73% Level up: 73%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

nope since it works without calling the function actually. if it would make something bad, wow would also crash when it trys to call dostring().


call() just pushes the current IP on the stack and moves the instruction pointer to the given location.
Reply With Quote
  #34  
Old 10-10-2009
flo8464's Avatar
flo8464 is offline.
Knight-Lieutenant
  
 
Join Date: Apr 2009
Location: Germany
Posts: 348
Reputation: 13
Points: 1,427, Level: 3
Points: 1,427, Level: 3 Points: 1,427, Level: 3 Points: 1,427, Level: 3
Level up: 4%, 673 Points needed
Level up: 4% Level up: 4% Level up: 4%
Activity: 9.1%
Activity: 9.1% Activity: 9.1% Activity: 9.1%

Huh? You don't have to overwrite any globals...

The way to go is:

1. Get the address of the TLS of WoWs Mainthread
2. Write that address to your threads TLS-pointer so your thread accesses the mainthreads storage
3. Simply call lua_doString
Reply With Quote
  #35  
Old 10-10-2009
furang's Avatar
furang is offline.
Master Sergeant
  
 
Join Date: Jul 2009
Posts: 84
Reputation: 19
Points: 364, Level: 1
Points: 364, Level: 1 Points: 364, Level: 1 Points: 364, Level: 1
Level up: 91%, 36 Points needed
Level up: 91% Level up: 91% Level up: 91%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

Ok. TLS is at fs:[0x2C] (judging by this [Only registered and activated users can see links. ]).
So it should be:

1.
Code:
mov EDX, [0x012705B0]
mov EDX, [EDX+0x00002D94]// edx = wow's main thread's tls
2.
Code:
mov EAX, FS:[0x2C]
mov EAX, [EAX]
add EAX, 8 //eax = this thread tls
mov [EAX], EDX
3.
Code:
call 0x007CF6B0
retn
Right? And what about luastr?
__________________
i did it 4 lulz

Last edited by furang; 10-10-2009 at 01:54 PM.
Reply With Quote
  #36  
Old 10-10-2009
flo8464's Avatar
flo8464 is offline.
Knight-Lieutenant
  
 
Join Date: Apr 2009
Location: Germany
Posts: 348
Reputation: 13
Points: 1,427, Level: 3
Points: 1,427, Level: 3 Points: 1,427, Level: 3 Points: 1,427, Level: 3
Level up: 4%, 673 Points needed
Level up: 4% Level up: 4% Level up: 4%
Activity: 9.1%
Activity: 9.1% Activity: 9.1% Activity: 9.1%

lua_doString is a cdecl-call. So call it pushing parameters from right to left.

Code:
push 0 //lua-state
push address-of-your-lua-string
push address-of-your-lua-string //again
call lua_doString
Reply With Quote
  #37  
Old 10-10-2009
furang's Avatar
furang is offline.
Master Sergeant
  
 
Join Date: Jul 2009
Posts: 84
Reputation: 19
Points: 364, Level: 1
Points: 364, Level: 1 Points: 364, Level: 1 Points: 364, Level: 1
Level up: 91%, 36 Points needed
Level up: 91% Level up: 91% Level up: 91%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

So what we've got?
Code:
mov EDX, [0x012705B0]
mov EDX, [EDX+0x00002D94]// edx = wow's main thread's tls. right?
mov EAX, FS:[0x2C]
mov EAX, [EAX]
add EAX, 8 //eax = this thread tls. right?
mov [EAX], EDX
push 0
push offset luastr
push offset luastr
call 0x007CF6B0// lua_DoString addr
add esp, 0xC//fixing stack
retn
Is that right? Correct me please if i'm mistaken.
__________________
i did it 4 lulz
Reply With Quote
  #38  
Old 10-10-2009
Ellesar1 is offline.
Site Donator
  
 
Join Date: Feb 2009
Posts: 75
Reputation: 14
Points: 765, Level: 1
Points: 765, Level: 1 Points: 765, Level: 1 Points: 765, Level: 1
Level up: 73%, 135 Points needed
Level up: 73% Level up: 73% Level up: 73%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

thanks flo, your explanation gives this whole TLS thing a sense.

Since we run an additional (!) thread with our code, it doesn't have access to wow's main process memory. due to this fact, we get the TLS or our new thread from FS:[0x2] and change the pointer to WoW's main TLS.

makes perfectly sense. +rep!
Reply With Quote
  #39  
Old 10-10-2009
furang's Avatar
furang is offline.
Master Sergeant
  
 
Join Date: Jul 2009
Posts: 84
Reputation: 19
Points: 364, Level: 1
Points: 364, Level: 1 Points: 364, Level: 1 Points: 364, Level: 1
Level up: 91%, 36 Points needed
Level up: 91% Level up: 91% Level up: 91%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

Ya. Thats why TLS is called Thread's Local Storage.
But can anyone please tell me is my code correct and if it's not can anyone tell what am i doing wrong?
__________________
i did it 4 lulz

Last edited by furang; 10-10-2009 at 03:18 PM.
Reply With Quote
  #40  
Old 10-10-2009
flo8464's Avatar
flo8464 is offline.
Knight-Lieutenant
  
 
Join Date: Apr 2009
Location: Germany
Posts: 348
Reputation: 13
Points: 1,427, Level: 3
Points: 1,427, Level: 3 Points: 1,427, Level: 3 Points: 1,427, Level: 3
Level up: 4%, 673 Points needed
Level up: 4% Level up: 4% Level up: 4%
Activity: 9.1%
Activity: 9.1% Activity: 9.1% Activity: 9.1%

Quote:
Originally Posted by furang View Post
Ya. Thats why TLS is called Thread's Local Storage.
But can anyone please tell me is my code correct and if it's not can anyone tell what am i doing wrong?
Your code seems pretty ok, did you test it?
Btw, if you are using C/C++ its possible to do it out-of-process without using any asm, take a look at Cyphers RtlRemoteCall-Rewrite. With some modifications (you have to fix the TLS before) it should work perfectly.
Reply With Quote
  #41  
Old 10-10-2009
furang's Avatar
furang is offline.
Master Sergeant
  
 
Join Date: Jul 2009
Posts: 84
Reputation: 19
Points: 364, Level: 1
Points: 364, Level: 1 Points: 364, Level: 1 Points: 364, Level: 1
Level up: 91%, 36 Points needed
Level up: 91% Level up: 91% Level up: 91%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

Nope...(((
Here's they real code i'm using
Code:
mov         edx,[0012705B0]
mov         edx,[edx][000002D94]
mov         eax,fs:[00000002C]
mov         eax,[eax]
add         eax,8
mov         [eax],edx
push        0
mov         eax,12345678
push        eax
push        eax
call        0007CF6B0 
add         esp,00C
retn
nop
When i allocate memory for luastr i rewrite 12345678 with it. Checked and debuged it. The address is rewritten corectly. But it crashes wow(
Don't know what to do. I enabled break on new thread. But i haven't find my code near breakpoint. I'm confused.
__________________
i did it 4 lulz
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 09:06 PM.




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

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 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524