Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 02 Nov 2013 18:23:04 +0100
From: Nicolas RUFF <nicolas.ruff@...il.com>
To: john-users@...ts.openwall.com
Subject: Citrix Netscaler 10 password hash format

	Hello list,

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 )
---------------------------------------

Regards,
- Nicolas RUFF

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.