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 


"Safer" Trampolining

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Thu Feb 12, 2009 1:18 am    Post subject: Reply with quote

And you just call PostMessage? or is it a variant of it?
_________________
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Thu Feb 12, 2009 9:03 am    Post subject: Reply with quote

Good work as always, Irwin! This will definitely come in handy.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
slippppppppp
Grandmaster Cheater
Reputation: 0

Joined: 08 Aug 2006
Posts: 929

PostPosted: Thu Feb 12, 2009 9:46 pm    Post subject: Reply with quote

very good, never thought of that
Back to top
View user's profile Send private message AIM Address MSN Messenger
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Fri Feb 13, 2009 12:34 am    Post subject: Reply with quote

But if it doesn't have the prologue and you only jump over 3 bytes, won't it try to execute the last 2 bytes of the hook?
_________________
Back to top
View user's profile Send private message
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Fri Feb 13, 2009 12:49 am    Post subject: Reply with quote

Would this allow trampolining for any start of a function even if it doesn't use mov ebp, esp, etc?
Code:
__declspec(naked) BOOL WINAPI _PostMessage(__in HWND hWnd, __in UINT Msg, __in WPARAM wParam, __in LPARAM lParam)
{
  __asm {
    //20 or so nops lol
    jmp   [ulPostMessage]
  }
}

__inline BOOL InitializeTrampoline(void)
{
  __try {
    ulPostMessage  = (ULONG_PTR)PostMessage;
    do{
        ulPostMessage += anArrayOfOpcodeLengths[*(BYTE*)PostMessage];}
    while(ulPostMessage < (ULONG_PTR)PostMessage+5)
    *(BYTE[ulPostMessage-(ULONG_PTR)PostMessage]*)_PostMessage = *(BYTE[ulPostMessage-(ULONG_PTR)PostMessage]*)(ULONG_PTR)PostMessage;
    return TRUE;
  }
  __except(EXCEPTION_EXECUTE_HANDLER) {
    return FALSE;
  }
}

_________________
Back to top
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Fri Feb 13, 2009 1:47 pm    Post subject: Reply with quote

Can't you just make a function that disassembles first few bytes of the API and copy the appropriate number of bytes for the trampoline?
Back to top
View user's profile Send private message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Sat Feb 14, 2009 5:52 pm    Post subject: Reply with quote

It's really weird how whenever Irwin creates something and posts it, the upload always has to have a homosexual description included no matter what it is.
Back to top
View user's profile Send private message
BanMe
Master Cheater
Reputation: 0

Joined: 29 Nov 2005
Posts: 375
Location: Farmington NH, USA

PostPosted: Sat Feb 14, 2009 7:10 pm    Post subject: Reply with quote

good job irwin mlde32 is a invaluable length disasmbler Wink
few others work with such ease of use Wink

but be forewarned the original engine has a few bugs in it Wink
i suggest the updated one on openrce messageboard.. or is it woodmann's forum.. damn i should stop smoking weed.. memory soo bad... Rolling Eyes

regards BanMe

_________________
don't +rep me..i do not wish to have "status" or "recognition" from you or anyone.. thank you.
Back to top
View user's profile Send private message MSN Messenger
Aviar³
Grandmaster Cheater
Reputation: 50

Joined: 03 Jan 2008
Posts: 655
Location: Canada

PostPosted: Mon Mar 09, 2009 4:36 am    Post subject: Reply with quote

Thank you for the example, while I do not truly understand it, I have bookmarked it for later reference in hopes of one day successfully being able to implement/understand a trampoline.
_________________
This is the inception of deception, checking the depth of your perception.
Back to top
View user's profile Send private message
khongminh9
How do I cheat?
Reputation: 0

Joined: 17 Dec 2007
Posts: 1

PostPosted: Sat Apr 04, 2009 4:54 am    Post subject: Reply with quote

@Irwin: File example.zip don't exist
can you reupload ???
thanks
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Sat Apr 04, 2009 5:37 am    Post subject: Reply with quote

CEF has been hacked recently, all attachments are not available.
_________________
Back to top
View user's profile Send private message
Overload
Master Cheater
Reputation: 0

Joined: 08 Feb 2008
Posts: 293

PostPosted: Sat Apr 04, 2009 2:02 pm    Post subject: Reply with quote

sponge wrote:
CEF has been hacked recently, all attachments are not available.
Figured.

Has someone made some kind of announcement yet?

_________________
Blog

Quote:
Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that
Back to top
View user's profile Send private message MSN Messenger
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Sat Apr 04, 2009 2:27 pm    Post subject: Reply with quote

Overload wrote:
sponge wrote:
CEF has been hacked recently, all attachments are not available.
Figured.

Has someone made some kind of announcement yet?


Not officially.

_________________
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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