How can I secure the serialized object if I send the serialized object over the network? I doubt that hackers may interrupt/hack my data.
can anyone tell in detail about how to implement this?
How can I secure the serialized object if I send the serialized object over the network? I doubt that hackers may interrupt/hack my data.
can anyone tell in detail about how to implement this?
This presentation give ideas on how effectively attackers can tamper a Java serialized stream:
https://www.owasp.org/images/e/eb/OWASP_IL_2008_Shai_Chen_PT_to_Java_Client_Server_Apps.ppt
There is also the risk of injecting unsuspected behavior and inject code in case a vulnerable class exists on the server's classpath. See this article:
[Look-ahead Java deserialization][3]
You can encrypt or hash it, but java serialization format is a poot choice for sending over network - better solution would be JSON / XML ( encrypted or signed with some cryptographic algorythm)
Look into encryption as said before, but more specifically look at hte SSL/TLS libraries for network communication in java.
http://juliusdavies.ca/commons-ssl/ssl.html
No need to try and implement secure encryption communication when there is a very powerful library built into Java.
In my opinion, you can use either use SSLSocket or SealedObject. However, it will make things a bit heavy for you. However, one of the option is described in this article as well. http://www.ibm.com/developerworks/library/j-5things1/
You can use the signed object and sealed object to secure the serialisation object
I add a useful resource to the thread here, Oracle's Secure Coding Guidelines for Java SE (particularly, in this case section 8 in the guidelines, "Serialization and Deserialization"):
https://www.oracle.com/java/technologies/javase/seccodeguide.html#8