The essence of the task is as follows: from an application, you need to start in any possible way a client program (a standalone application) that works with the network and intercept (copy) its socket so that later on (on behalf of the client) it отсылать necessary packets to the server so that the server does not I guessed about changing the sender and did not break the connection. Or, inject a DLL into the client's process to manipulate its socket. Путь решения не важен важен результат . Anyone who can prompt or share smart links on this topic will be very grateful.

PS: The result of all this should be a small gaming bot that sends the static packets to the server (script system boost :: python), OS Windows XP.

  • The program in which you want to take your? Can you make changes to its code? - Nicolas Chabanovsky
  • maybe it's easier to write your "proxy"? - KoVadim
  • I really do not understand what you want. Suppose this is TCP. You need to run a program (.exe) that does connect () and perhaps the initialization of the application layer (I suspect that everything is being started for its sake). After that you want to exchange with the server the packets in the header of which are host: port received from the OS by this program. So ? Or else in the application protocol are there any unknown to you subtleties that this program provides? - avp
  • there would have been no client program of my (or the availability of its source) questions ... subtleties as such, apart from the package structure, I don’t know what and what is most likely ... I don’t need to intercept everything that happens with the client’s socket, I just need to send via it has its own packets .. Ie, it is necessary to enter into the client-socket and through it, the SLAT packets (socket-> send) will continue to be processed by the client itself. - Alexander Molofeev

1 answer 1

In the case of win the easiest way is to put hooks on the send and receive functions of the winsock library. In this case, you can simply hook them, for example, using the detours library, or, for example, use the asm trampoline.


It is clear that the problem is generally complicated by different versions of winsock , as well as the fact that games are usually not fools and SSL encryption is used. In the second case, sometimes (especially if you can patch the source game client), you can perform a sly MITM (Man-In-The-Middle) attack MITM (Man-In-The-Middle) with X509 certificate spoofing and writing an intermediate server.

Learn more about this (but this is completely ice) - using the example of a PokerStars client - http://daeken.com/reversing-the-pokerstars-protocol-part-1-comp , the source of the corresponding intermediate server is also available there, and is described as A certificate substitution is made.

  • As for hooks, this is interesting, but with the intermediate server I'm afraid nothing will come of it, but in any case I will study the information provided. Thank you. - Alexander Molofeev