problem in Unicode hashes
#1
hi

i produced hashes from string "1" with following C# code:

public byte[] HashData(string InputText)
{
SHA512Managed managed = new SHA512Managed();
byte[] bytes = Encoding.Unicode.GetBytes(InputText);
return managed.ComputeHash(bytes);
}
public void ByteArrayToString(byte[] ba)
{
StringBuilder hex = new StringBuilder(ba.Length * 2);
foreach (byte b in ba)
hex.AppendFormat("{0:x2}", b);
File.AppendAllText(Environment.CurrentDirectory+"\\"+"hash.txt", hex.ToString());
}
OUTPUT is like this
849b2f3f63322343fddc5a3c8da8f07e4034ee4d5eb210a5ad9db9e33b6aec18dea81836a87f9226a4636c6c77893b0bd3408f6d1fe225bb0907c556a8111355

and another one with this code:
public byte[] HashData(string InputText)
{
SHA512Managed managed = new SHA512Managed();
byte[] bytes = Encoding.ASCII.GetBytes(InputText);
return managed.ComputeHash(bytes);
}
public void ByteArrayToString(byte[] ba)
{
StringBuilder hex = new StringBuilder(ba.Length * 2);
foreach (byte b in ba)
hex.AppendFormat("{0:x2}", b);
File.AppendAllText(Environment.CurrentDirectory+"\\"+"hash.txt", hex.ToString());
}
output:
4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a


hashcat only can find ASCII hashes. there is a way for Unicode hashes??
can i do this with sha256($salt.unicode($pass)) ??
#2
hashcat does not only crack ascii hashes, that is false. hashcat does not care one bit about encoding, all it cares about are the bytes. if the password is unicode, then your candidates should also be unicode. ascii in, ascii out. unicode in, unicode out.

Code:
epixoip@token:~/oclHashcat-1.02$ echo -n 1 | iconv -t utf16le | sha512sum
849b2f3f63322343fddc5a3c8da8f07e4034ee4d5eb210a5ad9db9e33b6aec18dea81836a87f9226a4636c6c77893b0bd3408f6d1fe225bb0907c556a8111355  -

epixoip@token:~/oclHashcat-1.02$ echo -n 1 | iconv -t utf16le >1.txt

epixoip@token:~/oclHashcat-1.02$ xxd -p 1.txt
3100

epixoip@token:~/oclHashcat-1.02$ ./oclHashcat64.bin -m 1700 849b2f3f63322343fddc5a3c8da8f07e4034ee4d5eb210a5ad9db9e33b6aec18dea81836a87f9226a4636c6c77893b0bd3408f6d1fe225bb0907c556a8111355 1.txt

oclHashcat v1.02 starting...
<snip>
849b2f3f63322343fddc5a3c8da8f07e4034ee4d5eb210a5ad9db9e33b6aec18dea81836a87f9226a4636c6c77893b0bd3408f6d1fe225bb0907c556a8111355:$HEX[3100]

Session.Name...: oclHashcat
Status.........: Cracked
Input.Mode.....: File (1.txt)
<snip>