Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TCP secured connection - only via my client

so I have this TCP connections between my server and client, and anyone can connect to my server. But I want to make sure that the client is really using MY client application and not just faking messages from a fake TCP client. What would be the ways to do that, check that the connection really is from my game client?

Thanks!

EDIT If I'm gonna use TLS, can I solve that problem?

like image 467
Eli Avatar asked Nov 21 '25 14:11

Eli


1 Answers

There will probably not be a complete solution to your problem, since whatever you do, the other party might always take your program, run it in a monitored environment, manipulate the runtime data and let it use its "secure" network protocol. Since the client application is in uncontrollable hands, you can never be sure that it is your own program.

Baby example: My application runs your application and plays back the data to your server, and forwards your response back to the application. How can you tell?

That said, it might be a very promising "99%" approach to use SSL and hardcode the client's private key into the application -- with some trickery you can try and make it hard to find (e.g. see how Skype does it). If you then also build integrity checks into your program that figure out whether anyone is manipulating the memory or debugging into your program, you can try and make it a bit harder for a potential adversary. (But note that you will always have to ship the private key with your application, so it isn't really safe from discovery.)

like image 59
Kerrek SB Avatar answered Nov 23 '25 04:11

Kerrek SB



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!