mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-13 19:28:56 +00:00
Merge branch 'master' of https://github.com/hashcat/hashcat
This commit is contained in:
commit
d431874cef
@ -794,6 +794,7 @@ typedef struct wpa
|
||||
u32 eapol[64 + 16];
|
||||
u16 eapol_len;
|
||||
u8 message_pair;
|
||||
int message_pair_chgd;
|
||||
u8 keyver;
|
||||
u8 orig_mac_ap[6];
|
||||
u8 orig_mac_sta[6];
|
||||
|
@ -8,6 +8,7 @@
|
||||
- Added support for decompressing LZMA1/LZMA2 data for -m 11600 = 7-Zip to validate the CRC
|
||||
- Added support for showing all user names with --show and --left if --username was specified
|
||||
- Added support for loading hccapx files
|
||||
- Added support for filtering hccapx message pairs using --hccapx-message-pair
|
||||
- Added support for GPU temperature management on cygwin build
|
||||
- Added support for automatic merge of LM halfes in case --show and --left is used
|
||||
|
||||
|
@ -178,6 +178,7 @@ _hashcat ()
|
||||
|
||||
local HASH_MODES="0 10 11 12 20 21 22 23 30 40 50 60 100 101 110 111 112 120 121 122 124 130 131 132 133 140 141 150 160 200 300 400 500 501 900 1000 1100 1400 1410 1411 1420 1421 1430 1440 1441 1450 1460 1500 1600 1700 1710 1711 1720 1722 1730 1731 1740 1750 1760 1800 2100 2400 2410 2500 2600 2611 2612 2711 2811 3000 3100 3200 3710 3711 3800 3910 4010 4110 4300 4400 4500 4520 4521 4522 4700 4800 4900 5000 5100 5200 5300 5400 5500 5600 5700 5800 6000 6100 6211 6212 6213 6221 6222 6223 6231 6232 6233 6241 6242 6243 6300 6400 6500 6600 6700 6800 6900 7000 7100 7200 7300 7400 7500 7700 7800 7900 8000 8100 8200 8300 8400 8500 8600 8700 8800 8900 9000 9100 9200 9300 9400 9500 9600 9700 9710 9720 9800 9810 9820 9900 10000 10100 10200 10300 10400 10410 10420 10500 10600 10700 10800 10900 11000 11100 11200 11300 11400 11500 11600 11700 11800 11900 12000 12100 12200 12300 12400 12500 12600 12700 12800 12900 13000 13100 13200 13300 13400 13500 13600 13800 13900 14000 14100 14700 14800 14900 15000"
|
||||
local ATTACK_MODES="0 1 3 6 7"
|
||||
local HCCAPX_MESSAGE_PAIR="0 1 2 3 4 5"
|
||||
local OUTFILE_FORMATS="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"
|
||||
local OPENCL_DEVICE_TYPES="1 2 3"
|
||||
local OPENCL_VECTOR_WIDTH="1 2 4 8 16"
|
||||
@ -188,7 +189,7 @@ _hashcat ()
|
||||
local BUILD_IN_CHARSETS='?l ?u ?d ?a ?b ?s ?h ?H'
|
||||
|
||||
local SHORT_OPTS="-m -a -V -v -h -b -t -o -p -c -d -w -n -u -j -k -r -g -1 -2 -3 -4 -i -I -s -l"
|
||||
local LONG_OPTS="--hash-type --attack-mode --version --help --quiet --benchmark --hex-salt --hex-wordlist --hex-charset --force --status --status-timer --machine-readable --loopback --weak-hash-threshold --markov-hcstat --markov-disable --markov-classic --markov-threshold --runtime --session --speed-only --progress-only --restore --restore-file-path --restore-disable --outfile --outfile-format --outfile-autohex-disable --outfile-check-timer --outfile-check-dir --separator --show --left --username --remove --remove-timer --potfile-disable --potfile-path --debug-mode --debug-file --induction-dir --segment-size --bitmap-min --bitmap-max --cpu-affinity --opencl-info --opencl-devices --opencl-platforms --opencl-device-types --opencl-vector-width --workload-profile --kernel-accel --kernel-loops --nvidia-spin-damp --gpu-temp-disable --gpu-temp-abort --gpu-temp-retain --powertune-enable --skip --limit --keyspace --rule-left --rule-right --rules-file --generate-rules --generate-rules-func-min --generate-rules-func-max --generate-rules-seed --custom-charset1 --custom-charset2 --custom-charset3 --custom-charset4 --increment --increment-min --increment-max --logfile-disable --scrypt-tmto --truecrypt-keyfiles --stdout --keep-guessing"
|
||||
local LONG_OPTS="--hash-type --attack-mode --version --help --quiet --benchmark --hex-salt --hex-wordlist --hex-charset --force --status --status-timer --machine-readable --loopback --weak-hash-threshold --markov-hcstat --markov-disable --markov-classic --markov-threshold --runtime --session --speed-only --progress-only --restore --restore-file-path --restore-disable --outfile --outfile-format --outfile-autohex-disable --outfile-check-timer --outfile-check-dir --separator --show --left --username --remove --remove-timer --potfile-disable --potfile-path --debug-mode --debug-file --induction-dir --segment-size --bitmap-min --bitmap-max --cpu-affinity --opencl-info --opencl-devices --opencl-platforms --opencl-device-types --opencl-vector-width --workload-profile --kernel-accel --kernel-loops --nvidia-spin-damp --gpu-temp-disable --gpu-temp-abort --gpu-temp-retain --powertune-enable --skip --limit --keyspace --rule-left --rule-right --rules-file --generate-rules --generate-rules-func-min --generate-rules-func-max --generate-rules-seed --custom-charset1 --custom-charset2 --custom-charset3 --custom-charset4 --increment --increment-min --increment-max --logfile-disable --scrypt-tmto --truecrypt-keyfiles --stdout --keep-guessing --hccapx-message-pair"
|
||||
local OPTIONS="-m -a -t -o -p -c -d -w -n -u -j -k -r -g -1 -2 -3 -4 -s -l --hash-type --attack-mode --status-timer --weak-hash-threshold --markov-hcstat --markov-threshold --runtime --session --timer --outfile --outfile-format --outfile-check-timer --outfile-check-dir --separator --remove-timer --potfile-path --restore-file-path --debug-mode --debug-file --induction-dir --segment-size --bitmap-min --bitmap-max --cpu-affinity --opencl-devices --opencl-platforms --opencl-device-types --opencl-vector-width --workload-profile --kernel-accel --kernel-loops --nvidia-spin-damp --gpu-temp-abort --gpu-temp-retain -disable --skip --limit --rule-left --rule-right --rules-file --generate-rules --generate-rules-func-min --generate-rules-func-max --generate-rules-seed --custom-charset1 --custom-charset2 --custom-charset3 --custom-charset4 --increment-min --increment-max --scrypt-tmto --truecrypt-keyfiles"
|
||||
|
||||
COMPREPLY=()
|
||||
@ -222,6 +223,11 @@ _hashcat ()
|
||||
return 0
|
||||
;;
|
||||
|
||||
--hccapx-message-pair)
|
||||
COMPREPLY=($(compgen -W "${HCCAPX_MESSAGE_PAIRS}" -- ${cur}))
|
||||
return 0
|
||||
;;
|
||||
|
||||
--outfile-format)
|
||||
COMPREPLY=($(compgen -W "${OUTFILE_FORMATS}" -- ${cur}))
|
||||
return 0
|
||||
|
@ -178,6 +178,7 @@ typedef struct wpa
|
||||
u32 eapol[64 + 16];
|
||||
u16 eapol_len;
|
||||
u8 message_pair;
|
||||
int message_pair_chgd;
|
||||
u8 keyver;
|
||||
u8 orig_mac_ap[6];
|
||||
u8 orig_mac_sta[6];
|
||||
|
101
include/types.h
101
include/types.h
@ -455,6 +455,7 @@ typedef enum parser_rc
|
||||
PARSER_LUKS_HASH_CIPHER = -30,
|
||||
PARSER_HCCAPX_SIGNATURE = -31,
|
||||
PARSER_HCCAPX_VERSION = -32,
|
||||
PARSER_HCCAPX_MESSAGE_PAIR = -33,
|
||||
PARSER_UNKNOWN_ERROR = -255
|
||||
|
||||
} parser_rc_t;
|
||||
@ -499,6 +500,7 @@ typedef enum user_options_defaults
|
||||
GPU_TEMP_DISABLE = false,
|
||||
GPU_TEMP_RETAIN = 75,
|
||||
HASH_MODE = 0,
|
||||
HCCAPX_MESSAGE_PAIR = 0,
|
||||
HEX_CHARSET = false,
|
||||
HEX_SALT = false,
|
||||
HEX_WORDLIST = false,
|
||||
@ -571,73 +573,74 @@ typedef enum user_options_map
|
||||
IDX_GPU_TEMP_DISABLE = 0xff07,
|
||||
IDX_GPU_TEMP_RETAIN = 0xff08,
|
||||
IDX_HASH_MODE = 'm',
|
||||
IDX_HCCAPX_MESSAGE_PAIR = 0xff09,
|
||||
IDX_HELP = 'h',
|
||||
IDX_HEX_CHARSET = 0xff09,
|
||||
IDX_HEX_SALT = 0xff0a,
|
||||
IDX_HEX_WORDLIST = 0xff0b,
|
||||
IDX_HEX_CHARSET = 0xff0a,
|
||||
IDX_HEX_SALT = 0xff0b,
|
||||
IDX_HEX_WORDLIST = 0xff0c,
|
||||
IDX_INCREMENT = 'i',
|
||||
IDX_INCREMENT_MAX = 0xff0c,
|
||||
IDX_INCREMENT_MIN = 0xff0d,
|
||||
IDX_INDUCTION_DIR = 0xff0e,
|
||||
IDX_KEEP_GUESSING = 0xff0f,
|
||||
IDX_INCREMENT_MAX = 0xff0d,
|
||||
IDX_INCREMENT_MIN = 0xff0e,
|
||||
IDX_INDUCTION_DIR = 0xff0f,
|
||||
IDX_KEEP_GUESSING = 0xff10,
|
||||
IDX_KERNEL_ACCEL = 'n',
|
||||
IDX_KERNEL_LOOPS = 'u',
|
||||
IDX_KEYSPACE = 0xff10,
|
||||
IDX_LEFT = 0xff11,
|
||||
IDX_KEYSPACE = 0xff11,
|
||||
IDX_LEFT = 0xff12,
|
||||
IDX_LIMIT = 'l',
|
||||
IDX_LOGFILE_DISABLE = 0xff12,
|
||||
IDX_LOOPBACK = 0xff13,
|
||||
IDX_MACHINE_READABLE = 0xff14,
|
||||
IDX_MARKOV_CLASSIC = 0xff15,
|
||||
IDX_MARKOV_DISABLE = 0xff16,
|
||||
IDX_MARKOV_HCSTAT = 0xff17,
|
||||
IDX_LOGFILE_DISABLE = 0xff13,
|
||||
IDX_LOOPBACK = 0xff14,
|
||||
IDX_MACHINE_READABLE = 0xff15,
|
||||
IDX_MARKOV_CLASSIC = 0xff16,
|
||||
IDX_MARKOV_DISABLE = 0xff17,
|
||||
IDX_MARKOV_HCSTAT = 0xff18,
|
||||
IDX_MARKOV_THRESHOLD = 't',
|
||||
IDX_NVIDIA_SPIN_DAMP = 0xff18,
|
||||
IDX_NVIDIA_SPIN_DAMP = 0xff19,
|
||||
IDX_OPENCL_DEVICES = 'd',
|
||||
IDX_OPENCL_DEVICE_TYPES = 'D',
|
||||
IDX_OPENCL_INFO = 'I',
|
||||
IDX_OPENCL_PLATFORMS = 0xff19,
|
||||
IDX_OPENCL_VECTOR_WIDTH = 0xff1a,
|
||||
IDX_OUTFILE_AUTOHEX_DISABLE = 0xff1b,
|
||||
IDX_OUTFILE_CHECK_DIR = 0xff1c,
|
||||
IDX_OUTFILE_CHECK_TIMER = 0xff1d,
|
||||
IDX_OUTFILE_FORMAT = 0xff1e,
|
||||
IDX_OPENCL_PLATFORMS = 0xff1a,
|
||||
IDX_OPENCL_VECTOR_WIDTH = 0xff1b,
|
||||
IDX_OUTFILE_AUTOHEX_DISABLE = 0xff1c,
|
||||
IDX_OUTFILE_CHECK_DIR = 0xff1d,
|
||||
IDX_OUTFILE_CHECK_TIMER = 0xff1e,
|
||||
IDX_OUTFILE_FORMAT = 0xff1f,
|
||||
IDX_OUTFILE = 'o',
|
||||
IDX_POTFILE_DISABLE = 0xff1f,
|
||||
IDX_POTFILE_PATH = 0xff20,
|
||||
IDX_POWERTUNE_ENABLE = 0xff21,
|
||||
IDX_QUIET = 0xff22,
|
||||
IDX_REMOVE = 0xff23,
|
||||
IDX_REMOVE_TIMER = 0xff24,
|
||||
IDX_RESTORE = 0xff25,
|
||||
IDX_RESTORE_DISABLE = 0xff26,
|
||||
IDX_RESTORE_FILE_PATH = 0xff27,
|
||||
IDX_POTFILE_DISABLE = 0xff20,
|
||||
IDX_POTFILE_PATH = 0xff21,
|
||||
IDX_POWERTUNE_ENABLE = 0xff22,
|
||||
IDX_QUIET = 0xff23,
|
||||
IDX_REMOVE = 0xff24,
|
||||
IDX_REMOVE_TIMER = 0xff25,
|
||||
IDX_RESTORE = 0xff26,
|
||||
IDX_RESTORE_DISABLE = 0xff27,
|
||||
IDX_RESTORE_FILE_PATH = 0xff28,
|
||||
IDX_RP_FILE = 'r',
|
||||
IDX_RP_GEN_FUNC_MAX = 0xff28,
|
||||
IDX_RP_GEN_FUNC_MIN = 0xff29,
|
||||
IDX_RP_GEN_FUNC_MAX = 0xff29,
|
||||
IDX_RP_GEN_FUNC_MIN = 0xff2a,
|
||||
IDX_RP_GEN = 'g',
|
||||
IDX_RP_GEN_SEED = 0xff2a,
|
||||
IDX_RP_GEN_SEED = 0xff2b,
|
||||
IDX_RULE_BUF_L = 'j',
|
||||
IDX_RULE_BUF_R = 'k',
|
||||
IDX_RUNTIME = 0xff2b,
|
||||
IDX_SCRYPT_TMTO = 0xff2c,
|
||||
IDX_RUNTIME = 0xff2c,
|
||||
IDX_SCRYPT_TMTO = 0xff2d,
|
||||
IDX_SEGMENT_SIZE = 'c',
|
||||
IDX_SEPARATOR = 'p',
|
||||
IDX_SESSION = 0xff2d,
|
||||
IDX_SHOW = 0xff2e,
|
||||
IDX_SESSION = 0xff2e,
|
||||
IDX_SHOW = 0xff2f,
|
||||
IDX_SKIP = 's',
|
||||
IDX_STATUS = 0xff2f,
|
||||
IDX_STATUS_TIMER = 0xff30,
|
||||
IDX_STDOUT_FLAG = 0xff31,
|
||||
IDX_SPEED_ONLY = 0xff32,
|
||||
IDX_PROGRESS_ONLY = 0xff33,
|
||||
IDX_TRUECRYPT_KEYFILES = 0xff34,
|
||||
IDX_USERNAME = 0xff35,
|
||||
IDX_VERACRYPT_KEYFILES = 0xff36,
|
||||
IDX_VERACRYPT_PIM = 0xff37,
|
||||
IDX_STATUS = 0xff30,
|
||||
IDX_STATUS_TIMER = 0xff31,
|
||||
IDX_STDOUT_FLAG = 0xff32,
|
||||
IDX_SPEED_ONLY = 0xff33,
|
||||
IDX_PROGRESS_ONLY = 0xff34,
|
||||
IDX_TRUECRYPT_KEYFILES = 0xff35,
|
||||
IDX_USERNAME = 0xff36,
|
||||
IDX_VERACRYPT_KEYFILES = 0xff37,
|
||||
IDX_VERACRYPT_PIM = 0xff38,
|
||||
IDX_VERSION_LOWER = 'v',
|
||||
IDX_VERSION = 'V',
|
||||
IDX_WEAK_HASH_THRESHOLD = 0xff38,
|
||||
IDX_WEAK_HASH_THRESHOLD = 0xff39,
|
||||
IDX_WORKLOAD_PROFILE = 'w'
|
||||
|
||||
} user_options_map_t;
|
||||
@ -1403,6 +1406,7 @@ typedef struct user_options
|
||||
bool runtime_chgd;
|
||||
bool workload_profile_chgd;
|
||||
bool segment_size_chgd;
|
||||
bool hccapx_message_pair_chgd;
|
||||
|
||||
bool benchmark;
|
||||
bool force;
|
||||
@ -1464,6 +1468,7 @@ typedef struct user_options
|
||||
u32 gpu_temp_abort;
|
||||
u32 gpu_temp_retain;
|
||||
u32 hash_mode;
|
||||
u32 hccapx_message_pair;
|
||||
u32 increment_max;
|
||||
u32 increment_min;
|
||||
u32 kernel_accel;
|
||||
|
@ -776,6 +776,14 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
|
||||
if (hashconfig->esalt_size)
|
||||
{
|
||||
memset (hashes_buf[hashes_cnt].esalt, 0, hashconfig->esalt_size);
|
||||
|
||||
if (user_options->hccapx_message_pair_chgd == true)
|
||||
{
|
||||
wpa_t *wpa = (wpa_t *) hashes_buf[hashes_cnt].esalt;
|
||||
|
||||
wpa->message_pair_chgd = (int) user_options->hccapx_message_pair_chgd;
|
||||
wpa->message_pair = (u8) user_options->hccapx_message_pair;
|
||||
}
|
||||
}
|
||||
|
||||
if (hashconfig->hook_salt_size)
|
||||
|
@ -73,6 +73,7 @@ static const char PA_029[] = "Invalid LUKS key AF stripes count";
|
||||
static const char PA_030[] = "Invalid combination of LUKS hash type and cipher type";
|
||||
static const char PA_031[] = "Invalid hccapx signature";
|
||||
static const char PA_032[] = "Invalid hccapx version";
|
||||
static const char PA_033[] = "Invalid hccapx message pair";
|
||||
static const char PA_255[] = "Unknown error";
|
||||
|
||||
static const char HT_00000[] = "MD5";
|
||||
@ -2780,6 +2781,11 @@ int wpa_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED
|
||||
memcpy (wpa->orig_nonce_ap, in.nonce_ap, 32);
|
||||
memcpy (wpa->orig_nonce_sta, in.nonce_sta, 32);
|
||||
|
||||
if (wpa->message_pair_chgd == true)
|
||||
{
|
||||
if (wpa->message_pair != in.message_pair) return (PARSER_HCCAPX_MESSAGE_PAIR);
|
||||
}
|
||||
|
||||
wpa->message_pair = in.message_pair;
|
||||
|
||||
wpa->keyver = in.keyver;
|
||||
@ -14826,6 +14832,7 @@ char *strparser (const u32 parser_status)
|
||||
case PARSER_LUKS_HASH_CIPHER: return ((char *) PA_030);
|
||||
case PARSER_HCCAPX_SIGNATURE: return ((char *) PA_031);
|
||||
case PARSER_HCCAPX_VERSION: return ((char *) PA_032);
|
||||
case PARSER_HCCAPX_MESSAGE_PAIR: return ((char *) PA_033);
|
||||
}
|
||||
|
||||
return ((char *) PA_255);
|
||||
|
@ -66,6 +66,7 @@ static const char *USAGE_BIG[] =
|
||||
" --induction-dir | Dir | Specify the induction directory to use for loopback | --induction=inducts",
|
||||
" --outfile-check-dir | Dir | Specify the outfile directory to monitor for plains | --outfile-check-dir=x",
|
||||
" --logfile-disable | | Disable the logfile |",
|
||||
" --hccapx-message-pair | Num | Load only message pairs from hccapx matching X | --hccapx-message-pair=2",
|
||||
" --truecrypt-keyfiles | File | Keyfiles used, separate with comma | --truecrypt-key=x.png",
|
||||
" --veracrypt-keyfiles | File | Keyfiles used, separate with comma | --veracrypt-key=x.txt",
|
||||
" --veracrypt-pim | Num | VeraCrypt personal iterations multiplier | --veracrypt-pim=1000",
|
||||
|
@ -38,6 +38,7 @@ static const struct option long_options[] =
|
||||
{"gpu-temp-disable", no_argument, 0, IDX_GPU_TEMP_DISABLE},
|
||||
{"gpu-temp-retain", required_argument, 0, IDX_GPU_TEMP_RETAIN},
|
||||
{"hash-type", required_argument, 0, IDX_HASH_MODE},
|
||||
{"hccapx-message-pair", required_argument, 0, IDX_HCCAPX_MESSAGE_PAIR},
|
||||
{"help", no_argument, 0, IDX_HELP},
|
||||
{"hex-charset", no_argument, 0, IDX_HEX_CHARSET},
|
||||
{"hex-salt", no_argument, 0, IDX_HEX_SALT},
|
||||
@ -132,6 +133,7 @@ int user_options_init (hashcat_ctx_t *hashcat_ctx)
|
||||
user_options->gpu_temp_disable = GPU_TEMP_DISABLE;
|
||||
user_options->gpu_temp_retain = GPU_TEMP_RETAIN;
|
||||
user_options->hash_mode = HASH_MODE;
|
||||
user_options->hccapx_message_pair = HCCAPX_MESSAGE_PAIR;
|
||||
user_options->hex_charset = HEX_CHARSET;
|
||||
user_options->hex_salt = HEX_SALT;
|
||||
user_options->hex_wordlist = HEX_WORDLIST;
|
||||
@ -313,6 +315,8 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
|
||||
case IDX_GPU_TEMP_RETAIN: user_options->gpu_temp_retain = atoi (optarg); break;
|
||||
case IDX_POWERTUNE_ENABLE: user_options->powertune_enable = true; break;
|
||||
case IDX_LOGFILE_DISABLE: user_options->logfile_disable = true; break;
|
||||
case IDX_HCCAPX_MESSAGE_PAIR: user_options->hccapx_message_pair = atoi (optarg);
|
||||
user_options->hccapx_message_pair_chgd = true; break;
|
||||
case IDX_TRUECRYPT_KEYFILES: user_options->truecrypt_keyfiles = optarg; break;
|
||||
case IDX_VERACRYPT_KEYFILES: user_options->veracrypt_keyfiles = optarg; break;
|
||||
case IDX_VERACRYPT_PIM: user_options->veracrypt_pim = atoi (optarg); break;
|
||||
@ -386,6 +390,23 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (user_options->hccapx_message_pair_chgd == true)
|
||||
{
|
||||
if (user_options->remove == true)
|
||||
{
|
||||
event_log_error (hashcat_ctx, "Mixing remove parameter not allowed with hccapx-message-pair parameter");
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (user_options->hccapx_message_pair >= 6)
|
||||
{
|
||||
event_log_error (hashcat_ctx, "Invalid hccapx-message-pair specified");
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (user_options->runtime_chgd == true && user_options->runtime == 0)
|
||||
{
|
||||
event_log_error (hashcat_ctx, "Invalid runtime specified");
|
||||
|
Loading…
Reference in New Issue
Block a user