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 


Walking the stack

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Nazgul
How do I cheat?
Reputation: 0

Joined: 01 Jan 2016
Posts: 4

PostPosted: Fri Jan 01, 2016 4:33 pm    Post subject: Walking the stack Reply with quote

Hi,

Currently I am hooking some win api functions. Tho there are checks for this. They are not checking any bytes, but they check if the 'ret' addy is equal to theirs. Since using detours makes life much easier, I prefer using that instead of using assembly (annoying for 20 apis), so I have to bypass their checks. My guess would be in the end of my detours to have some assembly to fake the ret addy. Tho I do not know in what register it is, since when I place a bp on the return addy, I do not see the 'ret' addy in the stack

func()
{
// func
ret bytes // this address I would like to have
}

main()
{
call func
// bp poss
}

In what register should I change to have my detours wall working again. Or is there maybe an even better method. I do not know how they detect the 'ret' address.

Gr
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Fri Jan 01, 2016 5:57 pm    Post subject: Reply with quote

The address for the return is stored at the top of the stack ([esp]/[rsp]) when you execute the CALL instruction.
The value in it is the address of the next instruction after the call statement, normally EIP/RIP plus 5.
Back to top
View user's profile Send private message
Nazgul
How do I cheat?
Reputation: 0

Joined: 01 Jan 2016
Posts: 4

PostPosted: Fri Jan 01, 2016 6:22 pm    Post subject: Reply with quote

Zanzer wrote:
The address for the return is stored at the top of the stack ([esp]/[rsp]) when you execute the CALL instruction.
The value in it is the address of the next instruction after the call statement, normally EIP/RIP plus 5.


But I would to fake the address that returns the function(), since it seems they are checking that

func()
{
//function
ret // I want to fake this
}
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Fri Jan 01, 2016 6:31 pm    Post subject: Reply with quote

So hack their check and make it always match.
Where is this check? Inside each function?
Back to top
View user's profile Send private message
Nazgul
How do I cheat?
Reputation: 0

Joined: 01 Jan 2016
Posts: 4

PostPosted: Fri Jan 01, 2016 9:17 pm    Post subject: Reply with quote

Zanzer wrote:
So hack their check and make it always match.
Where is this check? Inside each function?


I do not know how they are doing it. Thats kinda the problem
Back to top
View user's profile Send private message
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Sat Jan 02, 2016 10:05 pm    Post subject: Reply with quote

If you don't know the checks they are using how can you be sure they use checks at all ?
I find this odd for winapi's, usually the game's mem integrity checks stop at the game module boundaries, one of the reason for this being that API are not loaded at the same address (except user kernel and ntdl) every time.

So what makes you say they check the APIs ? I hope you do not base this affirmation solely on crashs.
Back to top
View user's profile Send private message
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