Packet Aleration While in Transit

hello guys,
Look at this senario,
1) I have made multiserver -multiclient chat service that has limited number of users, but i beleive that some users are able to do things, that they are not supposed to ,by editing the packets before they leave their pcs, this edit is sometimes randomal, or sometimes in specific place.
2) How do i make sure that the packets made and Sent by my client, is not altered before sending to the buffers (and then network card wires) , and then while in trasit
3) What can i do to ensure, that such altered packets get rejected



Answer this question

Packet Aleration While in Transit

  • foxmcf

    Users own their PCs. 

    So instead of using your applicaiton they can create a clone and generate any traffic they wish . Not much that you can do.

    But to make this a little bit complicated - to make it hard to change values (without application alteration/cloning ) once they leave your app -  use System.Net.Security.SslStream  in NET2.0 or  SSL Socket library from mentalis.

     

    As a general advice - make sure your server keep track that your users can do and they can not. Do validation at server side in addition to client side.


  • Healer

    can you explain how a bit shift is done
    I am not that familiar with bitshif

  • cafeshopkeeper

    I'm not absolutely sure in every way but what I do know is it just takes the ASCII value of a character and "shifts" it up (or down if u use a negative number). So if you have the character A and you bitshift it with a value of 3 it'll take A's ASCII value and add three. I think that's how it works. It's very basic encryption but should help to prevent people from messing around. The one thing I'm thinking, however, is in packet sniffers it gives you hex code so I started wondering if it's really gunna work.

    There's people on this forum who have so much more knowledge in this type of thing so it's probably best for one of them to come along and verify what I said in case it's wrong.


  • radh

    I have no idea if I'm being helpful (probably not), but maybe upon logging on you can have the server apply a random number to the user (0-999) and then bitshift every packet sent from the server to the client and vice versa using the random number. Since this random number is stored both in the client and server, the system would work.

    This probably isn't what you need, but I'm just trying to help.


  • dhurwitz

    every packet that is sent or recived is encrypted, with strong encryption.
    However they change bites in the stream, they intercepted at the tcp level and change it before they reply to the server.

    I have a system that prevents them from using a clone application, a dynamic Serial number, that has randomness in its structure, similar to the 3 handshake in SSL. I send a serial number and the client processes this, and send me another serial number (After randomal mathematical manipulatin) and then the serial number sent to the server is processed using a method, and that method then decides if the client is a genuine one or not. if not the user is told that they are using a corrupt version of the client and they have to redownload it.

    However, the problem is that, for example in the banning system, you have to use serial numbers that are related to the hardware, like hard drive, or processorID, or somthing like that. Now they are able to send altered packets containing this kind of information at logon by altering the packets carrying this infomration, and thus overcomming the banning system.
    Another example is sending a packet that allows them to have Admin perviligaes in rooms for example. by changeing something ... (this i have solved using checking at server side).

    But the main problem exist, i need a way to know if this packet has been altered or not. How do i do that I mean if i tag each packet with a serial number from the client , like a key, that my client sends with each packet, if this does not fit a function, then this would mean the packet is altered (much like a Checksum or something like that).
    I am lost, can you help me out here

    thanks


  • Packet Aleration While in Transit