Re: Civilization 3 Conquest Winsock 2 Interception Idea. (OS:Win64)
- From: Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@xxxxxxxxxxx>
- Date: Thu, 26 Jul 2007 18:40:21 -0400
Skybuck Flying wrote:
Hello,where have you been.
In the past I successfully intercept Winsock 1 calls, this is for the gamespy/game setup,phase.
The in-game phase uses Winsock 2 and DirectPlay for communication.
1. Writing and Winsock 2 LSP is way too much work.
2. Reverse enginering and modifieing Winsock 2 is though too.
So I just had a simple idea:
The plan:
1. Inject a dll into the DirectPlay server thingy.
2. Get the module handle for ws2_32.dll.
3. Use GetProcAddress to get the address of sendto, recvfrom produces.
4. Replace the instructions at those locations with a jump to interception routines, which then finally call original instructions.
5. During unload of injectable dll restore everything etc.
The part I haven't figured out yet is how to get the module handle...
Maybe GetModuleHandle will work inside the injected dll ;)
Then I still have to figure the exact details for the instructions etc.
But seems like a good and doable plan.. much better plan then 1 and 2... because this plan should require much less work.
And it's has the adventage that only in memory copies are effected and only the game of civilization and not the rest of the windows system which is a very big plus !!!
The only thing which I haven't figured out is:
How the mix of Windows 32 bit and Windows 64 bit is working. The system is Windows XP x64 Professional Edition.
There are multiple system folders, WOW on WOW folders and god knows what.
I am not sure if ws2_32.dll is a 32 bit dll, a 64 bit dll, or both ?
So maybe the DLL is 64 bit ? Which could create problems. ?
Can a 32 bit application call a 64 bit dll ?
Maybe through WOW translation ?!?!?
Weird stuff...
Bye,
Skybuck.
In process hooking of calls been around for ages.
--
"I'm never wrong, once i thought i was, but was mistaken"
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
.
- Follow-Ups:
- Re: Civilization 3 Conquest Winsock 2 Interception Idea. (OS:Win64)
- From: Skybuck Flying
- Re: Civilization 3 Conquest Winsock 2 Interception Idea. (OS:Win64)
- References:
- Civilization 3 Conquest Winsock 2 Interception Idea. (OS:Win64)
- From: Skybuck Flying
- Civilization 3 Conquest Winsock 2 Interception Idea. (OS:Win64)
- Prev by Date: Re: How to implement two's complement on a two's complement cpu ?
- Next by Date: Re: Civilization 3 Conquest Winsock 2 Interception Idea. (OS:Win64)
- Previous by thread: Re: Civilization 3 Conquest Winsock 2 Interception Idea. (OS:Win64)
- Next by thread: Re: Civilization 3 Conquest Winsock 2 Interception Idea. (OS:Win64)
- Index(es):
Relevant Pages
|