Digg Del.icio.us Reddit Facebook Stumble Upon Twitter
 

Using maskprocessor to generate rules

maskprocessor is a powerful tool and can be used in various ways, in this case: creating rules working with hashcat or oclHashcat-plus.

Creating rules

Let's suppose you want to make a rule which add 3 digits after the words of your dict and save it as “append_3_digits.rule”.

By hand

$ vi append_3_digits.rule
$0 $0 $0
$0 $0 $1
$0 $0 $2
$0 $0 $3
$0 $0 $4
$0 $0 $5
$0 $0 $6
$0 $0 $7
$0 $0 $8
$0 $0 $9
$0 $1 $0
$0 $1 $1
and so on...

As you can see creating rules by hand could be very boring and time-consuming :p

Using maskprocessor

$ ./mp64.bin -o append_3_digits.rule '$?d $?d $?d'

maskprocessor allows you to easily and quickly generate rule files

Syntax:

  • $ is the function to append a char
  • ?d is the digits charset

Example Commands

Here are some example commands to enable you to generate common rules locally on your own computer.

  • Copy the appropriate set of commands for your operating system (32/64) bit.
32 Bit

mp32.exe -1 0123456789 "^?1^?1^?1" -o Prefix-0-999.rule
mp32.exe -1 0123456789 "l^?1^?1^?1" -o Lower-All-Prefix-0-999.rule
mp32.exe -1 0123456789 "c^?1^?1^?1" -o Upper-First-Prefix-0-999.rule
mp32.exe -1 0123456789 "u^?1^?1^?1" -o Upper-All-Prefix-0-999.rule
mp32.exe -1 0123456789 "d^?1^?1^?1" -o Double-Word-Prefix-0-999.rule

mp32.exe -1 0123456789 "$?1$?1$?1" -o Suffix-0-999.rule
mp32.exe -1 0123456789 "l$?1$?1$?1" -o Lower-All-Suffix-0-999.rule
mp32.exe -1 0123456789 "c$?1$?1$?1" -o Upper-First-Suffix-0-999.rule
mp32.exe -1 0123456789 "u$?1$?1$?1" -o Upper-All-Suffix-0-999.rule
mp32.exe -1 0123456789 "d$?1$?1$?1" -o Double-Word-Suffix-0-999.rule

mp32.exe -1 0123456789 "^?1^?1^?1^?1" -o Prefix-0-9999.rule
mp32.exe -1 0123456789 "l^?1^?1^?1^?1" -o Lower-All-Prefix-0-9999.rule
mp32.exe -1 0123456789 "c^?1^?1^?1^?1" -o Upper-First-Prefix-0-9999.rule
mp32.exe -1 0123456789 "u^?1^?1^?1^?1" -o Upper-All-Prefix-0-9999.rule
mp32.exe -1 0123456789 "d^?1^?1^?1^?1" -o Double-Word-Prefix-0-9999.rule

mp32.exe -1 0123456789 "$?1$?1$?1$?1" -o Suffix-0-9999.rule
mp32.exe -1 0123456789 "l$?1$?1$?1$?1" -o Lower-All-Suffix-0-9999.rule
mp32.exe -1 0123456789 "c$?1$?1$?1$?1" -o Upper-First-Suffix-0-9999.rule
mp32.exe -1 0123456789 "u$?1$?1$?1$?1" -o Upper-All-Suffix-0-9999.rule
mp32.exe -1 0123456789 "d$?1$?1$?1$?1" -o Double-Word-Suffix-0-9999.rule



64 Bit

mp64.exe -1 0123456789 "^?1^?1^?1" -o Prefix-0-999.rule
mp64.exe -1 0123456789 "l^?1^?1^?1" -o Lower-All-Prefix-0-999.rule
mp64.exe -1 0123456789 "c^?1^?1^?1" -o Upper-First-Prefix-0-999.rule
mp64.exe -1 0123456789 "u^?1^?1^?1" -o Upper-All-Prefix-0-999.rule
mp64.exe -1 0123456789 "d^?1^?1^?1" -o Double-Word-Prefix-0-999.rule

mp64.exe -1 0123456789 "$?1$?1$?1" -o Suffix-0-999.rule
mp64.exe -1 0123456789 "l$?1$?1$?1" -o Lower-All-Suffix-0-999.rule
mp64.exe -1 0123456789 "c$?1$?1$?1" -o Upper-First-Suffix-0-999.rule
mp64.exe -1 0123456789 "u$?1$?1$?1" -o Upper-All-Suffix-0-999.rule
mp64.exe -1 0123456789 "d$?1$?1$?1" -o Double-Word-Suffix-0-999.rule

mp64.exe -1 0123456789 "^?1^?1^?1^?1" -o Prefix-0-9999.rule
mp64.exe -1 0123456789 "l^?1^?1^?1^?1" -o Lower-All-Prefix-0-9999.rule
mp64.exe -1 0123456789 "c^?1^?1^?1^?1" -o Upper-First-Prefix-0-9999.rule
mp64.exe -1 0123456789 "u^?1^?1^?1^?1" -o Upper-All-Prefix-0-9999.rule
mp64.exe -1 0123456789 "d^?1^?1^?1^?1" -o Double-Word-Prefix-0-9999.rule

mp64.exe -1 0123456789 "$?1$?1$?1$?1" -o Suffix-0-9999.rule
mp64.exe -1 0123456789 "l$?1$?1$?1$?1" -o Lower-All-Suffix-0-9999.rule
mp64.exe -1 0123456789 "c$?1$?1$?1$?1" -o Upper-First-Suffix-0-9999.rule
mp64.exe -1 0123456789 "u$?1$?1$?1$?1" -o Upper-All-Suffix-0-9999.rule
mp64.exe -1 0123456789 "d$?1$?1$?1$?1" -o Double-Word-Suffix-0-9999.rule
  • Paste them in to a text file and name it “Hashcat Rule Generator.cmd”.
  • Place this new file in the same directory as mask-processor and double left click it.

You should very quickly be presented with a group of commonly used password modifications. Each rule file is individually named to help you understand its function.

Limitation

When trying to inset the ^ character enclose it in quotes as it is an escape character in windows command shell and therefore will not be printed unless quoted.

Example.

mp32.exe -1 0123456789 "^"?1"^"?1"^"?1 -o "Prefix 0-999.rule"

NOT

mp32.exe -1 0123456789  ^?1^?1^?1 -o "Prefix 0-999.rule"