Skip to content

Commit e609606

Browse files
author
atom
committed
Initial commit
1 parent 2561573 commit e609606

File tree

5 files changed

+1103
-1
lines changed

5 files changed

+1103
-1
lines changed

CHANGES

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
* v0.72 -> v0.73:
2+
3+
- Open Source the project
4+
- License is MIT
5+
- Moved repository to github: https://github.com/jsteube/maskprocessor
6+
- Added CHANGES
7+
- Added LICENSE
8+
- Added README.md

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Jens Steube
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 110 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,111 @@
1-
# maskprocessor
1+
maskprocessor
2+
==============
3+
24
High-Performance word generator with a per-position configureable charset
5+
6+
Mask attack
7+
--------------
8+
9+
Try all combinations from a given keyspace just like in Brute-Force attack, but more specific.
10+
11+
Advantage over Brute-Force
12+
--------------
13+
14+
The reason for doing this and not to stick to the traditional Brute-Force is that we want to reduce the password candidate keyspace to a more efficient one.
15+
16+
Here is a single example. We want to crack the password: Julia1984
17+
18+
In traditional Brute-Force attack we require a charset that contains all upper-case letters, all lower-case letters and all digits (aka “mixalpha-numeric”). The Password length is 9, so we have to iterate through 62^9 (13.537.086.546.263.552) combinations. Lets say we crack with a rate of 100M/s, this requires more than 4 years to complete.
19+
20+
In Mask attack we know about humans and how they design passwords. The above password matches a simple but common pattern. A name and year appended to it. We can also configure the attack to try the upper-case letters only on the first position. It is very uncommon to see an upper-case letter only in the second or the third position. To make it short, with Mask attack we can reduce the keyspace to 52*26*26*26*26*10*10*10*10 (237.627.520.000) combinations. With the same cracking rate of 100M/s, this requires just 40 minutes to complete.
21+
22+
Disadvantage compared to Brute-Force
23+
--------------
24+
25+
There is none. One can argue that the above example is very specific but this does not matter. Even in mask attack we can configure our mask to use exactly the same keyspace as the Brute-Force attack does. The thing is just that this cannot work vice versa.
26+
27+
Masks
28+
--------------
29+
30+
For each position of the generated password candidates we need to configure a placeholder. If a password we want to crack has the length 8, our mask must consist of 8 placeholders.
31+
32+
A mask is a simple string that configures the keyspace of the password candidate engine using placeholders.
33+
A placeholder can be either a custom charset variable, a built-in charset variable or a static letter.
34+
A variable is indicated by the ? letter followed by one of the built-in charset (l, u, d, s, a) or one of the custom charset variable names (1, 2, 3, 4).
35+
A static letter is not indicated by a letter. An exception is if we want the static letter ? itself, which must be written as ??.
36+
37+
Built-in charsets
38+
--------------
39+
40+
?l = abcdefghijklmnopqrstuvwxyz
41+
?u = ABCDEFGHIJKLMNOPQRSTUVWXYZ
42+
?d = 0123456789
43+
?s = «space»!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
44+
?a = ?l?u?d?s
45+
?b = 0x00 - 0xff
46+
47+
Custom charsets
48+
--------------
49+
50+
There are four commandline-parameters to configure four custom charsets.
51+
52+
--custom-charset1=CS
53+
--custom-charset2=CS
54+
--custom-charset3=CS
55+
--custom-charset4=CS
56+
57+
These commandline-parameters have four analogue shortcuts called -1, -2, -3 and -4. You can specify the chars directly on the command line.
58+
59+
Password length increment
60+
--------------
61+
62+
A Mask attack is always specific to a password length. For example, if we use the mask ”?l?l?l?l?l?l?l?l” we can only crack a password of the length 8. But if the password we try to crack has the length 7 we will not find it. Thats why we have to repeat the attack several times, each time with one placeholder added to the mask. This is transparently automated by using the ”--increment” flag.
63+
64+
?l
65+
?l?l
66+
?l?l?l
67+
?l?l?l?l
68+
?l?l?l?l?l
69+
?l?l?l?l?l?l
70+
?l?l?l?l?l?l?l
71+
?l?l?l?l?l?l?l?l
72+
73+
Performance
74+
--------------
75+
76+
Currently, it is the world's fastest word generator. Here are some stats:
77+
78+
AMD Athlon™ 64 X2 Dual Core Processor 3800+: 75.80 M/s (per core)
79+
AMD FX™-6100 Six-Core Processor: 138.20 M/s (per core)
80+
Intel(R) Xeon(R) CPU X5650 @ 2.67GHz: 97.42 M/s (per core)
81+
Intel(R) i7-920: 71.50 M/s (per core)
82+
83+
To avoid irregularities while testing, all output went into /dev/null.
84+
85+
Example
86+
--------------
87+
88+
The following commands creates the following password candidates:
89+
90+
command: ?l?l?l?l?l?l?l?l
91+
keyspace: aaaaaaaa - zzzzzzzz
92+
command: -1 ?l?d ?1?1?1?1?1
93+
keyspace: aaaaa - 99999
94+
command: password?d
95+
keyspace: password0 - password9
96+
command: -1 ?l?u ?1?l?l?l?l?l19?d?d
97+
keyspace: aaaaaa1900 - Zzzzzz1999
98+
command: -1 ?dabcdef -2 ?l?u ?1?1?2?2?2?2?2
99+
keyspace: 00aaaaa - ffZZZZZ
100+
command: -1 efghijklmnop ?1?1?1
101+
keyspace: eee - ppp
102+
103+
Compile
104+
--------------
105+
106+
Simply run make
107+
108+
Binary distribution
109+
--------------
110+
111+
Binaries for Linux, Windows and OSX: https://github.com/jsteube/maskprocessor/releases

src/Makefile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
##
2+
## Makefile for mp
3+
##
4+
5+
CFLAGS = -W -Wall -std=c99 -O2 -s
6+
#CFLAGS = -W -Wall -std=c99 -g
7+
8+
#CC_LINUX32 = /opt/hashcat-toolchain/linux32/bin/i686-hashcat-linux-gnu-gcc
9+
#CC_LINUX64 = /opt/hashcat-toolchain/linux64/bin/x86_64-hashcat-linux-gnu-gcc
10+
CC_LINUX32 = gcc
11+
CC_LINUX64 = gcc
12+
CC_WINDOWS32 = /usr/bin/i686-w64-mingw32-gcc
13+
CC_WINDOWS64 = /usr/bin/x86_64-w64-mingw32-gcc
14+
CC_OSX32 = /usr/bin/i686-apple-darwin10-gcc
15+
CC_OSX64 = /usr/bin/i686-apple-darwin10-gcc
16+
17+
CFLAGS_LINUX32 = $(CFLAGS) -m32 -DLINUX
18+
CFLAGS_LINUX64 = $(CFLAGS) -m64 -DLINUX
19+
CFLAGS_WINDOWS32 = $(CFLAGS) -m32 -DWINDOWS
20+
CFLAGS_WINDOWS64 = $(CFLAGS) -m64 -DWINDOWS
21+
CFLAGS_OSX32 = $(CFLAGS) -m32 -DOSX
22+
CFLAGS_OSX64 = $(CFLAGS) -m64 -DOSX
23+
24+
all: mp64.bin
25+
26+
mp32: mp32.bin mp32.exe mp32.app
27+
mp64: mp64.bin mp64.exe mp64.app
28+
29+
clean:
30+
rm -f mp32.bin mp64.bin mp32.exe mp64.exe mp32.app mp64.app
31+
32+
mp32.bin: mp.c
33+
$(CC_LINUX32) $(CFLAGS_LINUX32) -o $@ $^
34+
35+
mp64.bin: mp.c
36+
$(CC_LINUX64) $(CFLAGS_LINUX64) -o $@ $^
37+
38+
mp32.exe: mp.c
39+
$(CC_WINDOWS32) $(CFLAGS_WINDOWS32) -o $@ $^
40+
41+
mp64.exe: mp.c
42+
$(CC_WINDOWS64) $(CFLAGS_WINDOWS64) -o $@ $^
43+
44+
mp32.app: mp.c
45+
$(CC_OSX32) $(CFLAGS_OSX32) -o $@ $^
46+
47+
mp64.app: mp.c
48+
$(CC_OSX64) $(CFLAGS_OSX64) -o $@ $^

0 commit comments

Comments
 (0)