Add -m 14600 module
This commit is contained in:
@@ -237,21 +237,7 @@ typedef struct electrum_wallet
|
||||
|
||||
} electrum_wallet_t;
|
||||
|
||||
typedef struct luks_tmp
|
||||
{
|
||||
u32 ipad32[8];
|
||||
u64 ipad64[8];
|
||||
|
||||
u32 opad32[8];
|
||||
u64 opad64[8];
|
||||
|
||||
u32 dgst32[32];
|
||||
u64 dgst64[16];
|
||||
|
||||
u32 out32[32];
|
||||
u64 out64[16];
|
||||
|
||||
} luks_tmp_t;
|
||||
|
||||
typedef struct pdf14_tmp
|
||||
{
|
||||
@@ -630,7 +616,6 @@ typedef enum hash_type
|
||||
HASH_TYPE_ORACLET = 48,
|
||||
HASH_TYPE_BSDICRYPT = 49,
|
||||
HASH_TYPE_PLAINTEXT = 54,
|
||||
HASH_TYPE_LUKS = 55,
|
||||
HASH_TYPE_ITUNES_BACKUP_9 = 56,
|
||||
HASH_TYPE_ITUNES_BACKUP_10 = 57,
|
||||
HASH_TYPE_SKIP32 = 58,
|
||||
@@ -836,7 +821,6 @@ typedef enum rounds_count
|
||||
ROUNDS_AXCRYPT = 10000,
|
||||
ROUNDS_KEEPASS = 6000,
|
||||
ROUNDS_ZIP2 = 1000,
|
||||
ROUNDS_LUKS = 163044, // this equal to jtr -test
|
||||
ROUNDS_ITUNES9_BACKUP = 10000,
|
||||
ROUNDS_ITUNES101_BACKUP = 10000000, // wtf, i mean, really?
|
||||
ROUNDS_ITUNES102_BACKUP = 10000,
|
||||
@@ -977,7 +961,6 @@ int win8phone_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_bu
|
||||
int opencart_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);
|
||||
int plaintext_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);
|
||||
int sha1cx_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);
|
||||
int luks_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig, const int keyslot_idx);
|
||||
int itunes_backup_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);
|
||||
int skip32_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);
|
||||
int fortigate_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED hashconfig_t *hashconfig);
|
||||
@@ -1011,117 +994,3 @@ typedef struct tc
|
||||
|
||||
} tc_t;
|
||||
|
||||
static const u32 KERN_TYPE_LUKS_SHA1_AES = 14611;
|
||||
static const u32 KERN_TYPE_LUKS_SHA1_SERPENT = 14612;
|
||||
static const u32 KERN_TYPE_LUKS_SHA1_TWOFISH = 14613;
|
||||
static const u32 KERN_TYPE_LUKS_SHA256_AES = 14621;
|
||||
static const u32 KERN_TYPE_LUKS_SHA256_SERPENT = 14622;
|
||||
static const u32 KERN_TYPE_LUKS_SHA256_TWOFISH = 14623;
|
||||
static const u32 KERN_TYPE_LUKS_SHA512_AES = 14631;
|
||||
static const u32 KERN_TYPE_LUKS_SHA512_SERPENT = 14632;
|
||||
static const u32 KERN_TYPE_LUKS_SHA512_TWOFISH = 14633;
|
||||
static const u32 KERN_TYPE_LUKS_RIPEMD160_AES = 14641;
|
||||
static const u32 KERN_TYPE_LUKS_RIPEMD160_SERPENT = 14642;
|
||||
static const u32 KERN_TYPE_LUKS_RIPEMD160_TWOFISH = 14643;
|
||||
static const u32 KERN_TYPE_LUKS_WHIRLPOOL_AES = 14651;
|
||||
static const u32 KERN_TYPE_LUKS_WHIRLPOOL_SERPENT = 14652;
|
||||
static const u32 KERN_TYPE_LUKS_WHIRLPOOL_TWOFISH = 14653;
|
||||
|
||||
// original headers from luks.h
|
||||
|
||||
#define LUKS_CIPHERNAME_L 32
|
||||
#define LUKS_CIPHERMODE_L 32
|
||||
#define LUKS_HASHSPEC_L 32
|
||||
#define LUKS_DIGESTSIZE 20 // since SHA1
|
||||
#define LUKS_HMACSIZE 32
|
||||
#define LUKS_SALTSIZE 32
|
||||
#define LUKS_NUMKEYS 8
|
||||
// Minimal number of iterations
|
||||
#define LUKS_MKD_ITERATIONS_MIN 1000
|
||||
#define LUKS_SLOT_ITERATIONS_MIN 1000
|
||||
#define LUKS_KEY_DISABLED_OLD 0
|
||||
#define LUKS_KEY_ENABLED_OLD 0xCAFE
|
||||
#define LUKS_KEY_DISABLED 0x0000DEAD
|
||||
#define LUKS_KEY_ENABLED 0x00AC71F3
|
||||
#define LUKS_STRIPES 4000
|
||||
// partition header starts with magic
|
||||
#define LUKS_MAGIC {'L','U','K','S', 0xba, 0xbe};
|
||||
#define LUKS_MAGIC_L 6
|
||||
/* Actually we need only 37, but we don't want struct autoaligning to kick in */
|
||||
#define UUID_STRING_L 40
|
||||
/* Offset to keyslot area [in bytes] */
|
||||
#define LUKS_ALIGN_KEYSLOTS 4096
|
||||
|
||||
struct luks_phdr {
|
||||
char magic[LUKS_MAGIC_L];
|
||||
uint16_t version;
|
||||
char cipherName[LUKS_CIPHERNAME_L];
|
||||
char cipherMode[LUKS_CIPHERMODE_L];
|
||||
char hashSpec[LUKS_HASHSPEC_L];
|
||||
uint32_t payloadOffset;
|
||||
uint32_t keyBytes;
|
||||
char mkDigest[LUKS_DIGESTSIZE];
|
||||
char mkDigestSalt[LUKS_SALTSIZE];
|
||||
uint32_t mkDigestIterations;
|
||||
char uuid[UUID_STRING_L];
|
||||
struct {
|
||||
uint32_t active;
|
||||
/* parameters used for password processing */
|
||||
uint32_t passwordIterations;
|
||||
char passwordSalt[LUKS_SALTSIZE];
|
||||
/* parameters used for AF store/load */
|
||||
uint32_t keyMaterialOffset;
|
||||
uint32_t stripes;
|
||||
} keyblock[LUKS_NUMKEYS];
|
||||
/* Align it to 512 sector size */
|
||||
char _padding[432];
|
||||
};
|
||||
|
||||
// not from original headers start with hc_
|
||||
|
||||
typedef enum hc_luks_hash_type
|
||||
{
|
||||
HC_LUKS_HASH_TYPE_SHA1 = 1,
|
||||
HC_LUKS_HASH_TYPE_SHA256 = 2,
|
||||
HC_LUKS_HASH_TYPE_SHA512 = 3,
|
||||
HC_LUKS_HASH_TYPE_RIPEMD160 = 4,
|
||||
HC_LUKS_HASH_TYPE_WHIRLPOOL = 5,
|
||||
|
||||
} hc_luks_hash_type_t;
|
||||
|
||||
typedef enum hc_luks_key_size
|
||||
{
|
||||
HC_LUKS_KEY_SIZE_128 = 128,
|
||||
HC_LUKS_KEY_SIZE_256 = 256,
|
||||
HC_LUKS_KEY_SIZE_512 = 512,
|
||||
|
||||
} hc_luks_key_size_t;
|
||||
|
||||
typedef enum hc_luks_cipher_type
|
||||
{
|
||||
HC_LUKS_CIPHER_TYPE_AES = 1,
|
||||
HC_LUKS_CIPHER_TYPE_SERPENT = 2,
|
||||
HC_LUKS_CIPHER_TYPE_TWOFISH = 3,
|
||||
|
||||
} hc_luks_cipher_type_t;
|
||||
|
||||
typedef enum hc_luks_cipher_mode
|
||||
{
|
||||
HC_LUKS_CIPHER_MODE_CBC_ESSIV = 1,
|
||||
HC_LUKS_CIPHER_MODE_CBC_PLAIN = 2,
|
||||
HC_LUKS_CIPHER_MODE_XTS_PLAIN = 3,
|
||||
|
||||
} hc_luks_cipher_mode_t;
|
||||
|
||||
typedef struct luks
|
||||
{
|
||||
int hash_type; // hc_luks_hash_type_t
|
||||
int key_size; // hc_luks_key_size_t
|
||||
int cipher_type; // hc_luks_cipher_type_t
|
||||
int cipher_mode; // hc_luks_cipher_mode_t
|
||||
|
||||
u32 ct_buf[128];
|
||||
|
||||
u32 af_src_buf[((HC_LUKS_KEY_SIZE_512 / 8) * LUKS_STRIPES) / 4];
|
||||
|
||||
} luks_t;
|
||||
|
||||
+1
-1
@@ -55,7 +55,6 @@ bool module_warmup_disable (MAYBE_UNUSED const hashconfig_t *ha
|
||||
int module_hash_binary_count (MAYBE_UNUSED const hashes_t *hashes);
|
||||
int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, hashes_t *hashes);
|
||||
int module_hash_binary_save (MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const u32 salt_pos, MAYBE_UNUSED const u32 digest_pos, char **buf);
|
||||
bool module_hash_binary_verify (MAYBE_UNUSED const hashes_t *hashes);
|
||||
|
||||
int module_hash_decode_outfile (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len);
|
||||
int module_hash_decode_zero_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info);
|
||||
@@ -63,6 +62,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *ha
|
||||
int module_hash_encode_status (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);
|
||||
|
||||
u64 module_kern_type_dynamic (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);
|
||||
u64 module_extra_buffer_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param);
|
||||
u64 module_extra_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes);
|
||||
char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param);
|
||||
|
||||
+1
-1
@@ -2323,7 +2323,6 @@ typedef struct module_ctx
|
||||
int (*module_hash_binary_count) (const hashes_t *);
|
||||
int (*module_hash_binary_parse) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *, hashes_t *);
|
||||
int (*module_hash_binary_save) (const hashes_t *, const u32, const u32, char **);
|
||||
bool (*module_hash_binary_verify) (const hashes_t *);
|
||||
|
||||
int (*module_hash_decode_outfile) (const hashconfig_t *, void *, salt_t *, void *, void *, hashinfo_t *, const char *, const int);
|
||||
int (*module_hash_decode_zero_hash) (const hashconfig_t *, void *, salt_t *, void *, void *, hashinfo_t *);
|
||||
@@ -2331,6 +2330,7 @@ typedef struct module_ctx
|
||||
int (*module_hash_encode_status) (const hashconfig_t *, const void *, const salt_t *, const void *, const void *, const hashinfo_t *, char *, int);
|
||||
int (*module_hash_encode) (const hashconfig_t *, const void *, const salt_t *, const void *, const void *, const hashinfo_t *, char *, int);
|
||||
|
||||
u64 (*module_kern_type_dynamic) (const hashconfig_t *, const void *, const salt_t *, const void *, const void *, const hashinfo_t *);
|
||||
u64 (*module_extra_buffer_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *, const hashes_t *, const hc_device_param_t *);
|
||||
u64 (*module_extra_tmp_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *, const hashes_t *);
|
||||
char *(*module_jit_build_options) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *, const hashes_t *, const hc_device_param_t *);
|
||||
|
||||
Reference in New Issue
Block a user