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 


Question about Connection redirection.

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

Joined: 11 Oct 2006
Posts: 412

PostPosted: Wed Jun 16, 2010 12:57 am    Post subject: Question about Connection redirection. Reply with quote

Hello,
As most of you used this packet editor made in dephi called rEdoX packet editor.

Recently it got detected by hackshield like a 2 weeks ago from this post.

Anyways my question is not relating to the packet editing capabilities of it. But just one feature it had..

You can Go to Extras->Connect->Capture Connects then run Redirect Connection.

Which was what I used to communicate with my hack tool which was just a proxy.

Now since rEdoX is not open source I believe only the GUI and strings were detected couldn't really make it undetected.

But I'm wondering if such a standalone program exists the has the ability to just do Capture Connects & Redirect Connection based on process.


Also I attempted to hook ws_32.dll's connect then on connectCallBack change the sockaddr ip to localhost but injecting dll's seems to be detected as well. What can i do?

_________________
Hacks I made for kongregate.
Kongregate Universal Badge Hack: http://forum.cheatengine.org/viewtopic.php?p=4129411
Kongreate Auto Rating/Voter hack: http://forum.cheatengine.org/viewtopic.php?t=263576
Took a test lol
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Wed Jun 16, 2010 8:35 am    Post subject: Reply with quote

There are two commonly used functions to prepare the connection structure in Winsock that is passed to 'connect' when a connection is being created:

inet_addr:
http://msdn.microsoft.com/en-us/library/ms738563%28VS.85%29.aspx

gethostbyname:
http://msdn.microsoft.com/en-us/library/ms738524%28VS.85%29.aspx

Your best bet is to debug the application, if you are able to, and locate which of these (or other) methods are used to create their connection structure for pass to 'connect' etc.

You could also hook connect itself and alter the second parameter as well if you wish to take that route. Hooking one of the first two would be a cleaner route if they are used though.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
pkedpker
Master Cheater
Reputation: 1

Joined: 11 Oct 2006
Posts: 412

PostPosted: Wed Jun 16, 2010 1:28 pm    Post subject: Reply with quote

ya i solved it, problem is I have to inject it before hackshield loads it takes a bit of timing haha but works perfectly.

Anyone wondering here is the source

Code:

int WINAPI __stdcall MyConnect(int socket, const struct sockaddr *address, int address_len)
{
   struct sockaddr_in * to;
   to = (struct sockaddr_in*)address;
   if(htons(to->sin_port) == 1234) {
      struct sockaddr_in sa;
      sa.sin_family = AF_INET;
      sa.sin_addr.s_addr = inet_addr( "127.0.0.1" );
      sa.sin_port = htons( 1234 );
      return ConnectOrig( socket, (struct sockaddr*)&sa, sizeof(struct sockaddr) );
   }
   return ConnectOrig(socket, address, address_len);
}

_________________
Hacks I made for kongregate.
Kongregate Universal Badge Hack: http://forum.cheatengine.org/viewtopic.php?p=4129411
Kongreate Auto Rating/Voter hack: http://forum.cheatengine.org/viewtopic.php?t=263576
Took a test lol
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 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