Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 358
  • Last Modified:

SIP digest authentication cloning

I'm looking into the possibility of extracting the secret key of a SIP client that does challenge/response authentication with a server. My knowledge of the SIP protocol is somewhat limited, but as I understand it, it does the following:
1: client initiiates connection with REGISTER
2: server says "401 unauthorized" and provides a challenge (8 hex chars). Field is called "nonce"
3: client sends another REGISTER, with some hash value computed on the server's hex value (one field is called "cnonce", there is also a longer field called "response" that is fairly long).
4: hopefully, server says "200 OK"

This is where my problem comes in. I have no control over the server, and neither do I have control over the client (although I can spy on the traffic using e.g. tcpdump or ethereal). I have let tcpdump run for a few days and I now have a lot of these hash pairs.

The question is, simply, can I use these pairs to make a copy of the original secret? I know that breaking hashes can be difficult. On the other hand, the size of the fields suggest only 2^32 possible values. I have, however, no idea how difficult such a thing would be. For starters, I have no idea what kind of info except the "nonce" field that gets thrown into the hash machine.
 
Just to clarify, I might add that all this is for a legitimate purpose :)
0
rpz
Asked:
rpz
  • 2
  • 2
1 Solution
 
Dr-IPCommented:
The death of all encryption techniques is repetition, and the potential man in the middle is Digest-MD5 authentications primary Achilles' heel. So with enough hashes you can extrapolate the original secret. The real determination of how many you will need depends on the size of the original secret, for which there are mechanisms within Digest-MD5 to obscure, making it harder to determine the secret, but given enough samples these protective measures break down.

If you really want to dwell into the depths of cryptography, and Digest-MD5 authentication, below are links to some reference documents on it.    

http://java.sun.com/products/jndi/tutorial/ldap/security/digest.html
http://www.ietf.org/rfc/rfc2831.txt
http://www.ietf.org/rfc/rfc2829.txt
0
 
rpzAuthor Commented:
Yes, that is what I guessed :)

After some googling, it seems that SIP digest auth is closely related to HTTP auth.
http://www.potaroo.net/ietf/idref/rfc2617
http://www.potaroo.net/ietf/idref/draft-ietf-sip-digest-aka

Does anyone know how to break this? If there is a program that can do this, it would be great. If not, some general ideas about how to make one.

0
 
Dr-IPCommented:
This program claims it can break MD5 hashes.

http://www.insidepro.com/eng/passwordspro.shtml#400
0
 
rpzAuthor Commented:
Sorry for not getting back to this question until now. Thank you Dr-IP for your hint. I tried the program, but unfortunately it does not break SIP hashes, it is used for retrieving lost passwords from HTTP digest (something similar but not exactly the same I'm afraid).
I guess hopes for another post is about zero as of now. My original question remains unanswered.
0
 
moduloCommented:
PAQed with points refunded (250)

modulo
Community Support Moderator
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now