Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 06 Nov 2013 00:16:20 +0100
From: magnum <john.magnum@...hmail.com>
To: john-users@...ts.openwall.com
Subject: Re: Citrix Netscaler 10 password hash format

On 2013-11-02 18:23, Nicolas RUFF wrote:
> Here is the hash format used by Citrix Netscaler, described in Python.
>
> Here are a few caveats:
>
> * Salt value is hashed as an hexadecimal string, not bytes.
>
> * The trailing NULL byte of password string is taken into account during
> hashing.
>
> * The leading '1' is actually the string length
> '1' = 49 = len('1') + len(hex_salt) + len(hex_sha1)
>
> I provided a test vector, but you can find many more by searching for
> 'ns.conf' files online :)
>
> Feel free to write a DYNAMIC script for it!
>
> ---------------------------------------
> import hashlib
>
> def netscaler_hash( rand_bytes, pwd ):
>      s = hashlib.sha1()
>      s.update( rand_bytes )
>      s.update( pwd )
>      return "1" + rand_bytes + s.hexdigest()
>
> # TEST VECTOR
> # 14dfca1e6c0f5f3d96526c3ce70849992b7fad3e324cf6b0f
>
> rand_bytes = "4dfca1e6"
> pwd = "nsroot\x00"
> print netscaler_hash( rand_bytes, pwd )
> ---------------------------------------

Thanks. I think it'll be a non-dynamic because some of the above can't 
be implemented without changing Dynamic, and Jim's not available for 
that right now. But I can whip up a format plugin in half an hour.

Is the salt length always 8 (so prefix always "1")? If not, is there a 
length we can count on being the maximum?

magnum


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.