Post Pacific  

Go Back   Post Pacific > MFO Section > MFO Planning
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 06.09.2006, 17:56   #1
Met45
Архивный участник
 
Join Date: Jan 2006
Posts: 281
Default MFO – Basics of Security (Server/Client)

Generally:

Obviously, the users cannot be trusted.
Under no circumstances we can assume that the users will not be able to
defeat our cleverly-designed encryption scheme (if we use one), or our protocols.

Server:

Everything the user sends to the server has to be validated.
Most likely, on our server, we will have fixed buffers.
For example, it is common to have a small (maybe 4K) buffer
for the incoming data (from the sockets).
A malicious user can send a really long data sequence.
If not checked, this will overflow the buffer, resulting in a server crash,
or, worse, the user being able to hack our server, executing arbitrary code.
It’s important to assign ID’s when a player is trying to Log on
(imo we should use unique ID’s)

If you have some form of path finding on your server, and the clients move
by clicking on a position on the ground, make sure they do not click
outside of the map.


Logging (nothing new ):

I will say it again: It is extremely important to validate all the data.
Whenever there is a violation, we’ll log it along with the username, IP, time
and date, and the nature of the violation.
Every once in a while, we have to check that log.
If we find few violations from many users, this is usually a bug in the client,
or a network problem.
However, if we find a lot of violations from the same user or IP, this is a
good indication that someone is toying with the server, trying either to
hack it, or running a macro/script.

Check the Distance. If a player attempts to trade with another player that
is 10 billion kilometres away (or even on another map) we have to log that.
If a player attempts to look at, or use a map object that is far away, we
have to log that too.

Client:

Also, we should never store data on the client.
The client should receive it's data from the server.
In other words, It should not send things such as: "Ok, this is my list of
items" or "my strength is 10, my mana is 200, and my life is 2000 out of
2000". Also, the client should not receive more data than it needs.
For example, the client should not know where other players are, except if
they are nearby.

Other things to consider, when it comes to security: The player walk speed
should be enforced on the server, not on the client. The server should keep
track of the time (in milliseconds) when a client last moved, and if a move
request comes faster than the normal threshold, this request should be
discarded. Do not log such bogus requests, because they can result in
network latency (i.e. the player lags, and all the data he sent in the last 10
seconds comes at once).

...that's the way how it should work...
Obviously this isn't new to the "Advanced" Post Pacific Members, but
we have some new Members who are helping us with the Project
and it's a good info for them...

MEt45
Met45 is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 14:45.