Subject: | EasyTCP Encryption |
I took a look at EasyTCP, and noticed 4 serious security flaws in its encryption implementation. I'm not an expert on crypto, but I do know that each of these alone is deadly.
1) If Crypt::RSA is not used, symmetric encryption keys are sent across the network in the clear. Anyone who can see the data can also decrypt it, so encryption is worthless in this case.
2) An active attacker (one who can modify packets on the network) can undetectably prevent Crypt::RSA from being used. He simply needs to remove Crypt::RSA from the list of supported encryption modules.
3) A man-in-the-middle attacker can defeat the Crypt::RSA mode by replacing the RSA keys with his own. Here are a couple of tools that automate such an attack against other protocols:
http://monkey.org/~dugsong/dsniff/
http://ettercap.sourceforge.net/
Why don't you use SSL? It has already fixed the problems listed above.
4) Perl's built-in (insecure) rand() function is used to generate cryptographic keys. An attacker could connect to the server, discover its internal random number generator state from the session key the server sends back, and use that information to guess the encryption key used with other clients.
http://perlmonks.org/index.pl?node_id=151595