HTTP Digest Auth
Hey all,

I have looked but i can't seem to find what I am looking for...if it exists...

Does hashcat have a way to work on http digest auths?

I read things that SIP Digest is basically the same thing..but I can't seem to find out the format to put the information in.  I have the user, realm, nonce, uri, nc, qop, and cnonce and just need to brute force the password.  I have a test python script based on info from ( response #5) and it works for a known's just sooooo slow when looking for a unknown password....

Any help?
It's hash type -m 11400 = SIP digest authentication (MD5)
The format is:

An example can be found here:
I am confused what to put for some of the sections.  I only have 1 uri entry to work with for example but there is ALOT of places with uri info in that string.

I have the following:


That is it.  There are more entries in that example then I have so that was my main question.

Thanks, for the help!
OK, this is what i have: ($ is my info above in 3rd post)


I have tried many iterations of this but always get the same error:

Hashfile 'camerahash.txt' on line 1 ($sip$*): Salt-length exception

No matter what I put, the error is always ($sip$*WHATEVER IS AFTER THE FIRST STAR)
Well, i "think" I have the line runs now anyways  However, it will not crack a known password in my test.


The uri is one star over now and it runs.

Can someone tell me how SIP Digest auth works in hashcat?

Here is my sample python program that works with the data I have:


import hashlib, itertools, sys
def gen_passwords(universe,l):
        # use itertools to create a list of all password permutations
        wl = []
        for i in itertools.product(universe,repeat=l):
        return wl
def gen_response_unspec(username, password, nonce, realm, uri):
        hash1 = hashlib.md5(username+':'+realm+':'+password).hexdigest()
        hash2 = hashlib.md5('GET:'+uri).hexdigest()
        response = hashlib.md5(hash1+':'+nonce+':'+hash2).hexdigest()
        return response
def gen_response_auth(username, password, nonce, realm, uri,nonceCount,clientNonce,qop):
        # this remains the same unless directive is MD5-sess, there is no algorithm directive indicated so MD5 assumed
        hash1 = hashlib.md5(username+':'+realm+':'+password).hexdigest()
        # qop = 'auth' which is default, so this is still good
        hash2 = hashlib.md5('GET:'+uri).hexdigest()
        # qop = 'auth' so this one is different
        response = hashlib.md5(hash1+':'+nonce+':'+nonceCount+':'+clientNonce+':'+qop+':'+hash2).hexdigest()
        return response
def crack_digest(username):
        if len(sys.argv) < 2:
                wl = gen_passwords("abcdefghijklmnopqrstuvwxyz1234567890",4)
                wl = [sys.argv[1]]
        # the following is from the pcap
        nonce = ' '
        realm = ' '
        uri = ' '
        nonceCount = ' '
        clientNonce = ' '
        qop = ' '
        for pw in wl:
                response = gen_response_auth(username,pw,nonce,realm,uri,nonceCount,clientNonce,qop)
                print pw," \r",
                if response == ' ':
                        print 'Success!'
                        print 'Username: %s Password: %s'%(username,pw)


Is there a way in hashcat to do the above?...or am i looking in the wrong place?

Again, thanks for the help!
In my opinion it should be very obvious if you know what the HTTP Digest Authentication fields mean and for what they are used for. Anyway here is how you would format it in your *very* specific example (yeah, I agree, the format itself is more flexible to allow a very large set of different applications, including but not limited to SIP/HTTP etc, and therefore someone that has no clue what a nonce, qop, URI etc is, might get confused, but in all other cases it should be very intuitive):

the example hash from the example you linked ( for instance should be formated like this:

(also note: in this case your python code need to be changed like this: hash2 = hashlib.md5('REGISTER:'+uri).hexdigest() i.e. replace "GET:" -> "REGISTER:")
Thank you.

I'll be honest, I have a vague understanding of what is going on but the nomenclature I am still learning.  I do appreciate your help and i was able to retrieve the lost password. (employee left and forgot "yea right" the password to all of our security cameras...all 954 of them!!  There was no way we could of manually reset them all.)

I appreciate your patience with this noob :-)
Hi! Can someone help me plzzzz to make a right hash string for sip? I have next respose from server (redundant strings are deleted):
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Digest realm="Configuration", nonce="some_md5_hash", qop="auth"
Server: lighttpd/1.4.32
and here from request:
GET /monitor.html HTTP/1.1
Authorization: Digest username="root", realm="Configuration", nonce="some_md5_hash", uri="/monitor.html", response="some_md5_hash", qop=auth, nc=00000001, cnonce="some_md5_half_length_hash"

it's my local webserver at 192.168.0.N ip and login:pass is root:12345 I just waana try to understand how make right hash string for hashcat(-m 11400)