BigHands79
BigHands79

Reputation: 249

Protecting TCP server

I've been thinking about possible attacks on my server software recently and am looking for information on how others have solved this problem.

Let's say I have a server listening on port 1000 for connections. I can write code to connect to this port and start sending bad data very easily. What is an effective way to protect against this? If you look at a Wireshark capture the first 3 packets are the TCP 3-way handshake; everything after that is application data.

Validating incoming data seems to make sense, but then I started thinking about World of Warcraft. I assume there is some kind of mechanism in place to make sure that what's connecting to a WOW server is indeed a WOW client (or maybe there's not).

Thanks for any information on this topic.

Upvotes: 2

Views: 294

Answers (1)

TypeIA
TypeIA

Reputation: 17248

Validating incoming data is the answer. If your program detects invalid data, disconnect the client.

Low-level TCP and DOS/DDOS attacks are better handled at the system level by a dedicated firewall application or device. They are specifically designed to detect and handle this sort of thing.

Upvotes: 3

Related Questions