Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


dynamic code injection auto assembly

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
thenewcomer
Newbie cheater
Reputation: 0

Joined: 09 Mar 2013
Posts: 22
Location: Behind you

PostPosted: Sat Jul 19, 2014 8:38 pm    Post subject: dynamic code injection auto assembly Reply with quote

i was wondering if such a thing is plausible. what i was thinking of doing something like this.

one part to label the address required as so
Code:
LuaCall(registerSymbol ("gottaGoFast", FindAOBEntryX("f1 ?? ?? ?? f0 ?? ?? d0 30 f0 ?? ?? d0 66 ?? ?? 12 08 00 00 f0 ?? ?? d0 4f ?? ?? ?? f0 ?? ?? d0 5d ?? ?? 25 e8 07 d0 66 ?? ?? 4a ?? ?? ?? 68 ?? ?? f0 ?? ?? d0 66 ?? ?? 60 ?? 66 ?? ?? ?? d0 66 ?? ?? 27 24 00 26 4f ?? ?? 05 f0 ?? ?? d0 66 ?? ?? 4f ?? ?? 00 f0 ?? ?? 47",1)))

//with the FindAOBEntryX function already in the lua section


and another part for the code injection
Code:
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //put my code in here with gottaGoFast somewhere

originalcode:
cmp ecx,[FlashPlayerPlugin_14_0_0_145.exe+170FC0]

exit:
jmp returnhere

"FlashPlayerPlugin_14_0_0_145.exe"+9EFF6:
jmp newmem
nop
returnhere:


the reason for this method is to add in my own functions, without it breaking after every update/patch

_________________
-TNC
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sun Jul 20, 2014 12:47 am    Post subject: Reply with quote

More info?
Lua script?
Adding your own functions? can you explain a bit on that? do you mean insert your own AS3 functions? if so, that's not gonna work... and it'll be hard to do.

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
thenewcomer
Newbie cheater
Reputation: 0

Joined: 09 Mar 2013
Posts: 22
Location: Behind you

PostPosted: Sun Jul 20, 2014 4:38 pm    Post subject: Reply with quote

DaSpamer wrote:
Adding your own functions? can you explain a bit on that? do you mean insert your own AS3 functions? if so, that's not gonna work... and it'll be hard to do.


im going to use a combination of the FindAOBEntryX function from above, along with readmem to grab the bytes required to write my own as3 functions.

but my question is if im able to use code injection like this so that it always injects into the proper address.

_________________
-TNC
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Mon Jul 21, 2014 7:45 am    Post subject: Reply with quote

Take a look in this, if you want to create your own functions (or OVERRIDE with long ones)
http://www.fortiguard.com/files/CanSecWest2011_Flash_ActionScript.pdf .
In order to create your own function.

Take a look in the last 2 cases.
This will help you to create your own functions (Try to hook your function where the it verifies the functions).

Now check the whole PDF, you'll have to check which class it's checking (page 56), so you won't fail verification (e.g calling non existent functions in the current class, try to modify non-existent variable in the current class), you may also override the values directly (as long as the values are static) (Page 61).

The PDF contains lot's of useful information on how the AVM works, and it shows it's vulnerability.

So your steps:
allocate memory and build up your function.
Hook the verification function.
Check the current class, if matches, call your allocated memory address (else call eax).
And you're good to go.


If you want to make your own functions, and unsure if they're correct, do this:
find some long script, override it with your function, then just dump the .swf from the memory, and open it with any swf decomplier.



This method can allow a lot more of hacks, for any game as you won't be limited by space.


If this is not what you meant, please explain a bit more.

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites