mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-09 15:20:59 +00:00
update SolarWinds Orion patch (3)
This commit is contained in:
parent
5f44ce06f6
commit
e921fbdf19
@ -30,7 +30,7 @@ typedef struct pbkdf2_sha1_tmp
|
|||||||
|
|
||||||
typedef struct pbkdf2_sha1
|
typedef struct pbkdf2_sha1
|
||||||
{
|
{
|
||||||
u32 salt_buf[5];
|
u32 salt_buf[64];
|
||||||
|
|
||||||
} pbkdf2_sha1_t;
|
} pbkdf2_sha1_t;
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ KERNEL_FQ void m21500_comp (KERN_ATTR_TMPS_ESALT (pbkdf2_sha1_tmp_t, pbkdf2_sha1
|
|||||||
|
|
||||||
sha512_init (&ctx);
|
sha512_init (&ctx);
|
||||||
|
|
||||||
sha512_update (&ctx, (const u32 *)tmps[gid].out, 1024);
|
sha512_update_global (&ctx, tmps[gid].out, 1024);
|
||||||
|
|
||||||
sha512_final (&ctx);
|
sha512_final (&ctx);
|
||||||
|
|
||||||
|
@ -279,7 +279,6 @@ NVIDIA GPUs require "NVIDIA Driver" (418.56 or later) and "CUDA Toolkit" (10.1 o
|
|||||||
- Ethereum Wallet, SCRYPT
|
- Ethereum Wallet, SCRYPT
|
||||||
- Ethereum Pre-Sale Wallet, PBKDF2-HMAC-SHA256
|
- Ethereum Pre-Sale Wallet, PBKDF2-HMAC-SHA256
|
||||||
- Ansible Vault
|
- Ansible Vault
|
||||||
- SolarWinds Orion, SHA512(PBKDF2-HMAC-SHA1)
|
|
||||||
- Plaintext
|
- Plaintext
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
##
|
##
|
||||||
|
|
||||||
SHARED := 0
|
SHARED := 0
|
||||||
DEBUG := 1
|
DEBUG := 0
|
||||||
PRODUCTION := 0
|
PRODUCTION := 0
|
||||||
PRODUCTION_VERSION := v5.1.0
|
PRODUCTION_VERSION := v5.1.0
|
||||||
ENABLE_BRAIN := 1
|
ENABLE_BRAIN := 1
|
||||||
|
@ -58,7 +58,7 @@ typedef struct pbkdf2_sha1_tmp
|
|||||||
|
|
||||||
typedef struct pbkdf2_sha1
|
typedef struct pbkdf2_sha1
|
||||||
{
|
{
|
||||||
u32 salt_buf[5];
|
u32 salt_buf[64];
|
||||||
|
|
||||||
} pbkdf2_sha1_t;
|
} pbkdf2_sha1_t;
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
|||||||
|
|
||||||
// salt
|
// salt
|
||||||
|
|
||||||
const u8 *salt_pos = token.buf[1];
|
const char *salt_pos = (char *) token.buf[1];
|
||||||
|
|
||||||
int salt_len = token.len[1];
|
int salt_len = token.len[1];
|
||||||
|
|
||||||
@ -148,14 +148,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
|||||||
|
|
||||||
memset (custom_salt, 0, sizeof (custom_salt));
|
memset (custom_salt, 0, sizeof (custom_salt));
|
||||||
|
|
||||||
for (int i = 0; i < salt_len; i++, salt_pos++)
|
strncpy (custom_salt, salt_pos, salt_len);
|
||||||
{
|
|
||||||
if (*salt_pos >= 'A' && *salt_pos <= 'Z') {
|
lowercase ((u8 *) custom_salt, salt_len);
|
||||||
custom_salt[i] = *salt_pos + 32;
|
|
||||||
} else {
|
|
||||||
custom_salt[i] = *salt_pos;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (salt_len < 8)
|
if (salt_len < 8)
|
||||||
{
|
{
|
||||||
@ -163,7 +158,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
|||||||
salt_len = 8;
|
salt_len = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy (pbkdf2_sha1->salt_buf, custom_salt, salt_len);
|
memcpy ((char *) pbkdf2_sha1->salt_buf, custom_salt, salt_len);
|
||||||
|
memcpy (salt->salt_buf, custom_salt, salt_len);
|
||||||
|
|
||||||
salt->salt_len = salt_len;
|
salt->salt_len = salt_len;
|
||||||
|
|
||||||
@ -196,32 +192,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
|||||||
|
|
||||||
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
|
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
|
||||||
{
|
{
|
||||||
const u64 *digest = (u64 *) digest_buf;
|
return snprintf (line_buf, line_size, "%s", hash_info->orighash);
|
||||||
|
|
||||||
const pbkdf2_sha1_t *pbkdf2_sha1 = (const pbkdf2_sha1_t *) esalt_buf;
|
|
||||||
|
|
||||||
// hash
|
|
||||||
|
|
||||||
u64 tmp[9];
|
|
||||||
|
|
||||||
tmp[0] = byte_swap_64 (digest[0]);
|
|
||||||
tmp[1] = byte_swap_64 (digest[1]);
|
|
||||||
tmp[2] = byte_swap_64 (digest[2]);
|
|
||||||
tmp[3] = byte_swap_64 (digest[3]);
|
|
||||||
tmp[4] = byte_swap_64 (digest[4]);
|
|
||||||
tmp[5] = byte_swap_64 (digest[5]);
|
|
||||||
tmp[6] = byte_swap_64 (digest[6]);
|
|
||||||
tmp[7] = byte_swap_64 (digest[7]);
|
|
||||||
tmp[8] = 0;
|
|
||||||
|
|
||||||
char hash_enc[256] = { 0 };
|
|
||||||
|
|
||||||
base64_encode (int_to_base64, (const u8 *) tmp, 64, (u8 *) hash_enc);
|
|
||||||
|
|
||||||
// output
|
|
||||||
const int line_len = snprintf (line_buf, line_size, "%s%s$%s", SIGNATURE_SOLARWINDS_ORION, (const u8 *) pbkdf2_sha1->salt_buf, hash_enc);
|
|
||||||
|
|
||||||
return line_len;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void module_init (module_ctx_t *module_ctx)
|
void module_init (module_ctx_t *module_ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user