ssldump debugging encrypted traffic

Translation of the original in Catalan. Read it in: CatalàCastellano

Everyone knows

TCPdump

and there are even people like me who use it daily, in fact, not long ago I rediscovered

TCPflow

(I had already

discovered it before

, but I made the big mistake of forgetting about it). Well then, the problem with these tools is that they're very useful for unencrypted traffic but when it comes to traffic encrypted with SSL/TLS such as HTTPs or other protocols that travel encrypted and we want to know why they don't work we have to resort to tools like ssldump.

SSLdump

allows following the flow of the TCP connections encrypted with SSLv3/TLS. Obviously to be able to decrypt the content of the link we have to provide the tool with the corresponding certificates. But it not only allows us to debug at the level of the data that runs over TCP but also gives us information about the encryption protocol itself described in a

human

way. That is, we can know whether the problem of the link happens during the

handshake

process,

ChangeCipherSpec

or inside the protocol.

What I did until now to be able to analyze the content of a protocol that travels encrypted is to help myself with the

sslproxy

tool. Which acted as a

bouncer

to the protocol server or to the client, so I got a stretch of the connection that wasn't encrypted and through tcpflow or tcpdump I could get the traffic in the clear. The technique is clever and useful but cumbersome compared to ssldump.