Skip to content

Commit cbf7452

Browse files
committed
Initial revision.
0 parents  commit cbf7452

File tree

102 files changed

+19476
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+19476
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*~
2+
*.pyc
3+
rcracki.precalc.*
4+
*.rt

CL/crackalack.cl

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#include "rt.cl"
2+
#include "string.cl"
3+
4+
5+
__kernel void crackalack(
6+
__global unsigned int *g_hash_type,
7+
__global char *g_charset,
8+
__global unsigned int *g_plaintext_len_min,
9+
__global unsigned int *g_plaintext_len_max,
10+
__global unsigned int *g_reduction_offset,
11+
__global unsigned int *g_chain_len,
12+
__global unsigned long *g_indices,
13+
__global unsigned int *g_pos_start) {
14+
15+
unsigned int hash_type = *g_hash_type;
16+
char charset[MAX_CHARSET_LEN];
17+
unsigned int plaintext_len_min = *g_plaintext_len_min;
18+
unsigned int plaintext_len_max = *g_plaintext_len_max;
19+
unsigned int reduction_offset = *g_reduction_offset;
20+
unsigned int chain_len = *g_chain_len;
21+
unsigned long start_index = g_indices[get_global_id(0)];
22+
unsigned int pos = *g_pos_start;
23+
24+
unsigned int charset_len = g_strncpy(charset, g_charset, sizeof(charset));
25+
unsigned long plaintext_space_up_to_index[MAX_PLAINTEXT_LEN];
26+
unsigned char plaintext[MAX_PLAINTEXT_LEN];
27+
unsigned int plaintext_len = 0;
28+
unsigned char hash[MAX_HASH_OUTPUT_LEN];
29+
unsigned int hash_len;
30+
31+
unsigned long plaintext_space_total = fill_plaintext_space_table(charset_len, plaintext_len_min, plaintext_len_max, plaintext_space_up_to_index);
32+
33+
// Generate a chain, and store it in the local buffer.
34+
g_indices[get_global_id(0)] = generate_rainbow_chain(
35+
hash_type,
36+
charset,
37+
charset_len,
38+
plaintext_len_min,
39+
plaintext_len_max,
40+
reduction_offset,
41+
chain_len,
42+
start_index++,
43+
pos,
44+
plaintext_space_up_to_index,
45+
plaintext_space_total,
46+
plaintext,
47+
&plaintext_len,
48+
hash,
49+
&hash_len);
50+
return;
51+
}

CL/crackalack_ntlm8.cl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include "ntlm8_functions.cl"
2+
3+
4+
/* TODO: specify array length in definition...somehow? */
5+
__kernel void crackalack_ntlm8(
6+
__global unsigned int *unused1,
7+
__global char *unused2,
8+
__global unsigned int *unused3,
9+
__global unsigned int *unused4,
10+
__global unsigned int *unused5,
11+
__global unsigned int *unused6,
12+
__global unsigned long *g_indices,
13+
__global unsigned int *unused7) {
14+
unsigned long index = g_indices[get_global_id(0)];
15+
unsigned char plaintext[8];
16+
17+
18+
for (unsigned int pos = 0; pos < 421999; pos++) {
19+
index_to_plaintext_ntlm8(index, charset, plaintext);
20+
index = hash_to_index_ntlm8(hash_ntlm8(plaintext), pos);
21+
}
22+
23+
g_indices[get_global_id(0)] = index;
24+
return;
25+
}

CL/crackalack_ntlm9.cl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include "ntlm9_functions.cl"
2+
3+
4+
/* TODO: specify array length in definition...somehow? */
5+
__kernel void crackalack_ntlm9(
6+
__global unsigned int *unused1,
7+
__global char *unused2,
8+
__global unsigned int *unused3,
9+
__global unsigned int *unused4,
10+
__global unsigned int *unused5,
11+
__global unsigned int *unused6,
12+
__global unsigned long *g_indices,
13+
__global unsigned int *unused7) {
14+
unsigned long index = g_indices[get_global_id(0)];
15+
unsigned char plaintext[9];
16+
17+
18+
for (unsigned int pos = 0; pos < 1349999; pos++) {
19+
index_to_plaintext_ntlm9(index, charset, plaintext);
20+
index = hash_to_index_ntlm9(hash_ntlm9(plaintext), pos);
21+
}
22+
23+
g_indices[get_global_id(0)] = index;
24+
return;
25+
}

0 commit comments

Comments
 (0)