Reputation: 943
I have, after a a hard work, managed to compose a functioning chat server that checks a SQL database for a username and password, and then let's you in if your authentication is good.
Alas, I present the password to the server...... in plaintext, with a sendto()
command.
Can you say man-in-the-middle attack?
In this very nascent stage, I can warn people to use a unique password, never use it for anything else, ect. But this is really unacceptable.
What popular methods exist for securely transporting data over sockets?
I hope this question is not unacceptably open-ended, but I can't be the only one who would benefit from such a list/resource!
Upvotes: 1
Views: 154
Reputation: 595320
Encrypt the connection, such as via the OpenSSL library, or Microsoft's SChannel framework. If that is not an option, then you will have to at least encrypt the password before sending it.
Upvotes: 2