|
|
|
@ -537,67 +537,114 @@ void compress_terminal_line_length (char *out_buf, const size_t keep_from_beginn
|
|
|
|
|
*ptr1 = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void example_hashes (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
void hash_info_single (hashcat_ctx_t *hashcat_ctx, user_options_t *user_options)
|
|
|
|
|
{
|
|
|
|
|
folder_config_t *folder_config = hashcat_ctx->folder_config;
|
|
|
|
|
user_options_t *user_options = hashcat_ctx->user_options;
|
|
|
|
|
|
|
|
|
|
if (user_options->hash_mode_chgd == true)
|
|
|
|
|
if (hashconfig_init (hashcat_ctx) == 0)
|
|
|
|
|
{
|
|
|
|
|
if (hashconfig_init (hashcat_ctx) == 0)
|
|
|
|
|
hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
|
|
|
|
|
|
|
|
|
|
event_log_info (hashcat_ctx, "Hash mode #%u", hashconfig->hash_mode);
|
|
|
|
|
event_log_info (hashcat_ctx, " Name................: %s", hashconfig->hash_name);
|
|
|
|
|
event_log_info (hashcat_ctx, " Category............: %s", strhashcategory (hashconfig->hash_category));
|
|
|
|
|
event_log_info (hashcat_ctx, " Slow.Hash...........: %s", (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL) ? "No" : "Yes");
|
|
|
|
|
|
|
|
|
|
event_log_info (hashcat_ctx, " Password.Len.Min....: %d", hashconfig->pw_min);
|
|
|
|
|
event_log_info (hashcat_ctx, " Password.Len.Max....: %d", hashconfig->pw_max);
|
|
|
|
|
|
|
|
|
|
if (hashconfig->is_salted == true)
|
|
|
|
|
{
|
|
|
|
|
hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
|
|
|
|
|
u32 t = hashconfig->salt_type;
|
|
|
|
|
char *t_desc = (t == SALT_TYPE_EMBEDDED) ? "Embedded\0" : (t == SALT_TYPE_GENERIC) ? "Generic\0" : "Virtual\0";
|
|
|
|
|
event_log_info (hashcat_ctx, " Salt.Type...........: %s", t_desc);
|
|
|
|
|
event_log_info (hashcat_ctx, " Salt.Len.Min........: %d", hashconfig->salt_min);
|
|
|
|
|
event_log_info (hashcat_ctx, " Salt.Len.Max........: %d", hashconfig->salt_max);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
event_log_info (hashcat_ctx, " Hashes.Count.Min....: %d", hashconfig->hashes_count_min);
|
|
|
|
|
event_log_info (hashcat_ctx, " Hashes.Count.Max....: %u", hashconfig->hashes_count_max);
|
|
|
|
|
|
|
|
|
|
event_log_info (hashcat_ctx, "MODE: %u", hashconfig->hash_mode);
|
|
|
|
|
event_log_info (hashcat_ctx, "TYPE: %s", hashconfig->hash_name);
|
|
|
|
|
char kernel_types[15];
|
|
|
|
|
|
|
|
|
|
if ((hashconfig->st_hash != NULL) && (hashconfig->st_pass != NULL))
|
|
|
|
|
memset (kernel_types, 0, sizeof (kernel_types));
|
|
|
|
|
|
|
|
|
|
if (hashconfig->has_pure_kernel) strncat (kernel_types, "pure ", 5);
|
|
|
|
|
if (hashconfig->has_optimized_kernel) strncat (kernel_types, "optimized", 9);
|
|
|
|
|
|
|
|
|
|
event_log_info (hashcat_ctx, " Kernel.Type(s)......: %s", kernel_types);
|
|
|
|
|
|
|
|
|
|
if ((hashconfig->st_hash != NULL) && (hashconfig->st_pass != NULL))
|
|
|
|
|
{
|
|
|
|
|
if (hashconfig->opts_type & OPTS_TYPE_BINARY_HASHFILE)
|
|
|
|
|
{
|
|
|
|
|
if (hashconfig->opts_type & OPTS_TYPE_BINARY_HASHFILE)
|
|
|
|
|
{
|
|
|
|
|
event_log_info (hashcat_ctx, "HASH (hex-encoded): %s", hashconfig->st_hash);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
event_log_info (hashcat_ctx, "HASH: %s", hashconfig->st_hash);
|
|
|
|
|
}
|
|
|
|
|
event_log_info (hashcat_ctx, " Example.Hash.Format.: hex-encoded");
|
|
|
|
|
event_log_info (hashcat_ctx, " Example.Hash........: %s", hashconfig->st_hash);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
event_log_info (hashcat_ctx, " Example.Hash.Format.: plain");
|
|
|
|
|
event_log_info (hashcat_ctx, " Example.Hash........: %s", hashconfig->st_hash);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (need_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), user_options->separator, false))
|
|
|
|
|
{
|
|
|
|
|
char tmp_buf[HCBUFSIZ_LARGE] = { 0 };
|
|
|
|
|
if (need_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), user_options->separator, false))
|
|
|
|
|
{
|
|
|
|
|
char tmp_buf[HCBUFSIZ_LARGE] = { 0 };
|
|
|
|
|
|
|
|
|
|
int tmp_len = 0;
|
|
|
|
|
int tmp_len = 0;
|
|
|
|
|
|
|
|
|
|
tmp_buf[tmp_len++] = '$';
|
|
|
|
|
tmp_buf[tmp_len++] = 'H';
|
|
|
|
|
tmp_buf[tmp_len++] = 'E';
|
|
|
|
|
tmp_buf[tmp_len++] = 'X';
|
|
|
|
|
tmp_buf[tmp_len++] = '[';
|
|
|
|
|
tmp_buf[tmp_len++] = '$';
|
|
|
|
|
tmp_buf[tmp_len++] = 'H';
|
|
|
|
|
tmp_buf[tmp_len++] = 'E';
|
|
|
|
|
tmp_buf[tmp_len++] = 'X';
|
|
|
|
|
tmp_buf[tmp_len++] = '[';
|
|
|
|
|
|
|
|
|
|
exec_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), (u8 *) tmp_buf + tmp_len);
|
|
|
|
|
exec_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), (u8 *) tmp_buf + tmp_len);
|
|
|
|
|
|
|
|
|
|
tmp_len += strlen (hashconfig->st_pass) * 2;
|
|
|
|
|
tmp_len += strlen (hashconfig->st_pass) * 2;
|
|
|
|
|
|
|
|
|
|
tmp_buf[tmp_len++] = ']';
|
|
|
|
|
tmp_buf[tmp_len++] = 0;
|
|
|
|
|
tmp_buf[tmp_len++] = ']';
|
|
|
|
|
tmp_buf[tmp_len++] = 0;
|
|
|
|
|
|
|
|
|
|
event_log_info (hashcat_ctx, "PASS: %s", tmp_buf);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
event_log_info (hashcat_ctx, "PASS: %s", hashconfig->st_pass);
|
|
|
|
|
}
|
|
|
|
|
event_log_info (hashcat_ctx, " Example.Pass........: %s", tmp_buf);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
event_log_info (hashcat_ctx, "HASH: not stored");
|
|
|
|
|
event_log_info (hashcat_ctx, "PASS: not stored");
|
|
|
|
|
event_log_info (hashcat_ctx, " Example.Pass........: %s", hashconfig->st_pass);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
event_log_info (hashcat_ctx, " Example.Hash.Format.: N/A");
|
|
|
|
|
event_log_info (hashcat_ctx, " Example.Hash........: N/A");
|
|
|
|
|
event_log_info (hashcat_ctx, " Example.Pass........: N/A");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
event_log_info (hashcat_ctx, NULL);
|
|
|
|
|
if (hashconfig->benchmark_mask != NULL)
|
|
|
|
|
{
|
|
|
|
|
event_log_info (hashcat_ctx, " Benchmark.Mask......: %s", hashconfig->benchmark_mask);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
event_log_info (hashcat_ctx, " Benchmark.Mask......: N/A");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hashconfig_destroy (hashcat_ctx);
|
|
|
|
|
event_log_info (hashcat_ctx, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hashconfig_destroy (hashcat_ctx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void hash_info (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
{
|
|
|
|
|
folder_config_t *folder_config = hashcat_ctx->folder_config;
|
|
|
|
|
user_options_t *user_options = hashcat_ctx->user_options;
|
|
|
|
|
|
|
|
|
|
event_log_info (hashcat_ctx, "Hash Info:");
|
|
|
|
|
event_log_info (hashcat_ctx, "==========");
|
|
|
|
|
event_log_info (hashcat_ctx, NULL);
|
|
|
|
|
|
|
|
|
|
if (user_options->hash_mode_chgd == true)
|
|
|
|
|
{
|
|
|
|
|
hash_info_single (hashcat_ctx, user_options);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -611,53 +658,7 @@ void example_hashes (hashcat_ctx_t *hashcat_ctx)
|
|
|
|
|
|
|
|
|
|
if (hc_path_exist (modulefile) == false) continue;
|
|
|
|
|
|
|
|
|
|
if (hashconfig_init (hashcat_ctx) == 0)
|
|
|
|
|
{
|
|
|
|
|
hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
|
|
|
|
|
|
|
|
|
|
event_log_info (hashcat_ctx, "MODE: %u", hashconfig->hash_mode);
|
|
|
|
|
event_log_info (hashcat_ctx, "TYPE: %s", hashconfig->hash_name);
|
|
|
|
|
|
|
|
|
|
if ((hashconfig->st_hash != NULL) && (hashconfig->st_pass != NULL))
|
|
|
|
|
{
|
|
|
|
|
event_log_info (hashcat_ctx, "HASH: %s", hashconfig->st_hash);
|
|
|
|
|
|
|
|
|
|
if (need_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), user_options->separator, false))
|
|
|
|
|
{
|
|
|
|
|
char tmp_buf[HCBUFSIZ_LARGE] = { 0 };
|
|
|
|
|
|
|
|
|
|
int tmp_len = 0;
|
|
|
|
|
|
|
|
|
|
tmp_buf[tmp_len++] = '$';
|
|
|
|
|
tmp_buf[tmp_len++] = 'H';
|
|
|
|
|
tmp_buf[tmp_len++] = 'E';
|
|
|
|
|
tmp_buf[tmp_len++] = 'X';
|
|
|
|
|
tmp_buf[tmp_len++] = '[';
|
|
|
|
|
|
|
|
|
|
exec_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), (u8 *) tmp_buf + tmp_len);
|
|
|
|
|
|
|
|
|
|
tmp_len += strlen (hashconfig->st_pass) * 2;
|
|
|
|
|
|
|
|
|
|
tmp_buf[tmp_len++] = ']';
|
|
|
|
|
tmp_buf[tmp_len++] = 0;
|
|
|
|
|
|
|
|
|
|
event_log_info (hashcat_ctx, "PASS: %s", tmp_buf);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
event_log_info (hashcat_ctx, "PASS: %s", hashconfig->st_pass);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
event_log_info (hashcat_ctx, "HASH: not stored");
|
|
|
|
|
event_log_info (hashcat_ctx, "PASS: not stored");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
event_log_info (hashcat_ctx, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hashconfig_destroy (hashcat_ctx);
|
|
|
|
|
hash_info_single (hashcat_ctx, user_options);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hcfree (modulefile);
|
|
|
|
|