I would like to know how to verify that the TLS connection encrypts the sip registration or what I should check to verify that the registration authentication is secure.
You said that “encrypted is not sufficient for secure”. The question is how to be sure that I’m secure?
I have password complexity enabled on my extensions and also, I have configured tls.
My main issue is that I have checked the tcpdump and I have tls traffic on port tcp 5061 while my sip phone is registered, but after the registration I have traffic on udp port 5060 (SUBSCRIBE) which contains the authorization with username, realm, nonce, response and algorithm.
Is this correct?
For example, as you can seen bellow, I have the REGISTER with TLS and the SUBSCRIBE without tls.
There should be nothing on port 5060. It sounds like this is the fault of the phone, although one would need to see the responses to be sure.
The response parameter (as against he SIP response) contains a hash of the password, so is vulnerable to an offline dictionary attack.
To verify that the TLS session is effectively encrypted, you will need to examine the code, or at least use a known valid client. To verify that is secure, you will need to check that the client is being authenticated at the TLS level, and the authentication keys have not been compromised. This is independent of the SIP level authentication. Again you sill need to examine the code to make sure that the authentication is being implemented correctly.
I haven’t used TLS with Asterisk, so I’m not sure what authentication options it uses, but note that the general public has an inadequate understanding of the role of authentication in SSL and often tolerates unauthenticated connection warnings.