0

I have a hash which was generated by concatenating a password to a salt, then repeating hashing 10000 times.

The description for salted sha256 in the output of hashcat -h is

1410 | sha256($pass.$salt)                              | Raw Hash, Salted and/or Iterated

but I was unable to find any examples online as to specifying an iteration count for iterated salted sha256. Is this possible with hashcat? If it is, how would I specify the command line options to hashcat for this?

2
  • 2
    Are you looking at a Kaspersky tool by some chance? This blog post shows how to modify hashcat for the 10,000 rounds, and you can prepend the fixed salt to your brute force pattern.
    – David
    Commented Apr 7, 2019 at 19:47
  • Good link, but important to realize that the above link is NOT discussing iterated hashing, ie sha256(sha256(sha256(...(input)...)))), but rather hashing a repeated input, ie sha256(input+input+input+...). sha256(sha256(sha256("abc"))) != sha256("abcabcabc"). I went down a bit of a wild goose chase trying to understand the code there before realizing this. Commented Oct 23, 2023 at 21:34

1 Answer 1

1

There's currently no support for arbitrary iteration in hashcat.

The iterations that hashcat does support are either only exactly as shown in the hash type:

2600 | md5(md5($pass))
4500 | sha1(sha1($pass))

.... or else - for the subset of hashes that natively support it - as embedded in the hashes themselves (rounds=10000, etc.)

It sounds like your salt is only concatenated once, not on every iteration? If so, you can concatenate it manually - and then you only need to find a tool that has support for simple iterations.

If you know enough C, you could add your rounds to the appropriate hashcat module.

You can also do arbitrary iteration with MDXfind, using its -i parameter.

$ cat test.hash
2f9b999e6ec7fe0964bc3827baf33eda331f154056c9c9686bcd77c5395ec597

$ cat test.list
PASSWORDPARTsaltpart

# MDXfind hash type (-h) is a rough regex filter, so you have to anchor the regex
# at both ends to only include exactly that hashtype (and not other hash types
# that happen to include the string 'SHA256')

$ mdxfind -h '^SHA256$' -f test.hash -i 10000 test.list
Iterations set to 10000
Working on hash types: SHA256 
Took 0.00 seconds to read hashes
Searching through 1 unique hashes from test.hash
Maximum hash chain depth is 1
Minimum hash length is 64 characters
Using 4 cores
SHA256x10000 2f9b999e6ec7fe0964bc3827baf33eda331f154056c9c9686bcd77c5395ec597:PASSWORDPARTsaltpart

Done - 1 threads caught
1 lines processed in 0 seconds
1.00 lines per second
0.01 seconds hashing, 10,000 total hash calculations
0.85M hashes per second (approx)
1 total files
1 SHA256x10000 hashes found
1 Total hashes found
2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .