hashcat Forum
Sanity check: "Must include chars" ruleset - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Support (https://hashcat.net/forum/forum-3.html)
+--- Forum: hashcat (https://hashcat.net/forum/forum-45.html)
+--- Thread: Sanity check: "Must include chars" ruleset (/thread-6959.html)



Sanity check: "Must include chars" ruleset - pluna - 10-26-2017

I lost a blockchain wallet password. I know the beginning (abc) and I am quite sure that it includes certain characters (123), I'm just not sure where those certain characters are located...at all.

I have the known abc + 7 unknown and within that 7 unknown  the chars 1,2,3 must be included.
Is the following the best way to attack this, or is there a better way?

Code:
mp64.bin -1 123 abc?1?1?1?a?a?a?a | hashcat -m 12700 -w3 blockchain.hash swap.rule

swap.rule:
*76
*75
*74
...
*76*65
*76*64
...
*73*56*13*32*41*17*37
...and so on.


I'm thinking if I can find a pattern with rules that will create duplicate outcomes, then I can write a script to remove those entries, but I am also unsure if that's really going to speed things up at all.

Basically, what I need is something similar to the reject rules, but I need it to work without wordlists.


RE: Sanity check: "Must include chars" ruleset - philsmd - 10-26-2017

If you are sure that the password length is just 10 and only 4 "random" chars, you could also use this approach. First, generate a dict (yes, this is normally not advicable, but for very small random dicts it sometimes makes sense):

Code:
mp64.bin ?a?a?a?a > dict.txt

create a new rule file like this one:
Code:
i01 i12 i23 ^c ^b ^a
i11 i22 i33 ^c ^b ^a
i21 i32 i43 ^c ^b ^a
i31 i42 i53 ^c ^b ^a
i41 i52 i63 ^c ^b ^a
(pro tip: you could also use multi rules, e.g. 2 time the "-r" parameter, one time for the insert rules and one time for the prepend rule, but it's small enough here to fit within a few lines)

and run it like this:
Code:
hashcat -m 12700 -a 0 -w3 -r my.rule blockchain.hash dict.txt

(and yes, you could also pipe it... the speed shouldn't change at all, since we are talking about a pretty "slow" hash mode)



update: I just realized that your explanation also could mean that the character 1, the character 2 und the character 3 are positioned not in order and next to each other. It wasn't really clear from your description (examples are always helpful to eliminate these doubts).

Anyways, to have the characters 1, 2 and 3 randomly positioned within the password candidate, you could use this alternative rule file (generated by maskprocessor with mp64.bin -1 01234 -2 012345 -3 0123456 'i?11 i?22 i?33 ^c ^b ^a')
Code:
i01 i02 i03 ^c ^b ^a
i01 i02 i13 ^c ^b ^a
i01 i02 i23 ^c ^b ^a
i01 i02 i33 ^c ^b ^a
i01 i02 i43 ^c ^b ^a
i01 i02 i53 ^c ^b ^a
i01 i02 i63 ^c ^b ^a
i01 i12 i03 ^c ^b ^a
i01 i12 i13 ^c ^b ^a
i01 i12 i23 ^c ^b ^a
i01 i12 i33 ^c ^b ^a
i01 i12 i43 ^c ^b ^a
i01 i12 i53 ^c ^b ^a
i01 i12 i63 ^c ^b ^a
i01 i22 i03 ^c ^b ^a
i01 i22 i13 ^c ^b ^a
i01 i22 i23 ^c ^b ^a
i01 i22 i33 ^c ^b ^a
i01 i22 i43 ^c ^b ^a
i01 i22 i53 ^c ^b ^a
i01 i22 i63 ^c ^b ^a
i01 i32 i03 ^c ^b ^a
i01 i32 i13 ^c ^b ^a
i01 i32 i23 ^c ^b ^a
i01 i32 i33 ^c ^b ^a
i01 i32 i43 ^c ^b ^a
i01 i32 i53 ^c ^b ^a
i01 i32 i63 ^c ^b ^a
i01 i42 i03 ^c ^b ^a
i01 i42 i13 ^c ^b ^a
i01 i42 i23 ^c ^b ^a
i01 i42 i33 ^c ^b ^a
i01 i42 i43 ^c ^b ^a
i01 i42 i53 ^c ^b ^a
i01 i42 i63 ^c ^b ^a
i01 i52 i03 ^c ^b ^a
i01 i52 i13 ^c ^b ^a
i01 i52 i23 ^c ^b ^a
i01 i52 i33 ^c ^b ^a
i01 i52 i43 ^c ^b ^a
i01 i52 i53 ^c ^b ^a
i01 i52 i63 ^c ^b ^a
i11 i02 i03 ^c ^b ^a
i11 i02 i13 ^c ^b ^a
i11 i02 i23 ^c ^b ^a
i11 i02 i33 ^c ^b ^a
i11 i02 i43 ^c ^b ^a
i11 i02 i53 ^c ^b ^a
i11 i02 i63 ^c ^b ^a
i11 i12 i03 ^c ^b ^a
i11 i12 i13 ^c ^b ^a
i11 i12 i23 ^c ^b ^a
i11 i12 i33 ^c ^b ^a
i11 i12 i43 ^c ^b ^a
i11 i12 i53 ^c ^b ^a
i11 i12 i63 ^c ^b ^a
i11 i22 i03 ^c ^b ^a
i11 i22 i13 ^c ^b ^a
i11 i22 i23 ^c ^b ^a
i11 i22 i33 ^c ^b ^a
i11 i22 i43 ^c ^b ^a
i11 i22 i53 ^c ^b ^a
i11 i22 i63 ^c ^b ^a
i11 i32 i03 ^c ^b ^a
i11 i32 i13 ^c ^b ^a
i11 i32 i23 ^c ^b ^a
i11 i32 i33 ^c ^b ^a
i11 i32 i43 ^c ^b ^a
i11 i32 i53 ^c ^b ^a
i11 i32 i63 ^c ^b ^a
i11 i42 i03 ^c ^b ^a
i11 i42 i13 ^c ^b ^a
i11 i42 i23 ^c ^b ^a
i11 i42 i33 ^c ^b ^a
i11 i42 i43 ^c ^b ^a
i11 i42 i53 ^c ^b ^a
i11 i42 i63 ^c ^b ^a
i11 i52 i03 ^c ^b ^a
i11 i52 i13 ^c ^b ^a
i11 i52 i23 ^c ^b ^a
i11 i52 i33 ^c ^b ^a
i11 i52 i43 ^c ^b ^a
i11 i52 i53 ^c ^b ^a
i11 i52 i63 ^c ^b ^a
i21 i02 i03 ^c ^b ^a
i21 i02 i13 ^c ^b ^a
i21 i02 i23 ^c ^b ^a
i21 i02 i33 ^c ^b ^a
i21 i02 i43 ^c ^b ^a
i21 i02 i53 ^c ^b ^a
i21 i02 i63 ^c ^b ^a
i21 i12 i03 ^c ^b ^a
i21 i12 i13 ^c ^b ^a
i21 i12 i23 ^c ^b ^a
i21 i12 i33 ^c ^b ^a
i21 i12 i43 ^c ^b ^a
i21 i12 i53 ^c ^b ^a
i21 i12 i63 ^c ^b ^a
i21 i22 i03 ^c ^b ^a
i21 i22 i13 ^c ^b ^a
i21 i22 i23 ^c ^b ^a
i21 i22 i33 ^c ^b ^a
i21 i22 i43 ^c ^b ^a
i21 i22 i53 ^c ^b ^a
i21 i22 i63 ^c ^b ^a
i21 i32 i03 ^c ^b ^a
i21 i32 i13 ^c ^b ^a
i21 i32 i23 ^c ^b ^a
i21 i32 i33 ^c ^b ^a
i21 i32 i43 ^c ^b ^a
i21 i32 i53 ^c ^b ^a
i21 i32 i63 ^c ^b ^a
i21 i42 i03 ^c ^b ^a
i21 i42 i13 ^c ^b ^a
i21 i42 i23 ^c ^b ^a
i21 i42 i33 ^c ^b ^a
i21 i42 i43 ^c ^b ^a
i21 i42 i53 ^c ^b ^a
i21 i42 i63 ^c ^b ^a
i21 i52 i03 ^c ^b ^a
i21 i52 i13 ^c ^b ^a
i21 i52 i23 ^c ^b ^a
i21 i52 i33 ^c ^b ^a
i21 i52 i43 ^c ^b ^a
i21 i52 i53 ^c ^b ^a
i21 i52 i63 ^c ^b ^a
i31 i02 i03 ^c ^b ^a
i31 i02 i13 ^c ^b ^a
i31 i02 i23 ^c ^b ^a
i31 i02 i33 ^c ^b ^a
i31 i02 i43 ^c ^b ^a
i31 i02 i53 ^c ^b ^a
i31 i02 i63 ^c ^b ^a
i31 i12 i03 ^c ^b ^a
i31 i12 i13 ^c ^b ^a
i31 i12 i23 ^c ^b ^a
i31 i12 i33 ^c ^b ^a
i31 i12 i43 ^c ^b ^a
i31 i12 i53 ^c ^b ^a
i31 i12 i63 ^c ^b ^a
i31 i22 i03 ^c ^b ^a
i31 i22 i13 ^c ^b ^a
i31 i22 i23 ^c ^b ^a
i31 i22 i33 ^c ^b ^a
i31 i22 i43 ^c ^b ^a
i31 i22 i53 ^c ^b ^a
i31 i22 i63 ^c ^b ^a
i31 i32 i03 ^c ^b ^a
i31 i32 i13 ^c ^b ^a
i31 i32 i23 ^c ^b ^a
i31 i32 i33 ^c ^b ^a
i31 i32 i43 ^c ^b ^a
i31 i32 i53 ^c ^b ^a
i31 i32 i63 ^c ^b ^a
i31 i42 i03 ^c ^b ^a
i31 i42 i13 ^c ^b ^a
i31 i42 i23 ^c ^b ^a
i31 i42 i33 ^c ^b ^a
i31 i42 i43 ^c ^b ^a
i31 i42 i53 ^c ^b ^a
i31 i42 i63 ^c ^b ^a
i31 i52 i03 ^c ^b ^a
i31 i52 i13 ^c ^b ^a
i31 i52 i23 ^c ^b ^a
i31 i52 i33 ^c ^b ^a
i31 i52 i43 ^c ^b ^a
i31 i52 i53 ^c ^b ^a
i31 i52 i63 ^c ^b ^a
i41 i02 i03 ^c ^b ^a
i41 i02 i13 ^c ^b ^a
i41 i02 i23 ^c ^b ^a
i41 i02 i33 ^c ^b ^a
i41 i02 i43 ^c ^b ^a
i41 i02 i53 ^c ^b ^a
i41 i02 i63 ^c ^b ^a
i41 i12 i03 ^c ^b ^a
i41 i12 i13 ^c ^b ^a
i41 i12 i23 ^c ^b ^a
i41 i12 i33 ^c ^b ^a
i41 i12 i43 ^c ^b ^a
i41 i12 i53 ^c ^b ^a
i41 i12 i63 ^c ^b ^a
i41 i22 i03 ^c ^b ^a
i41 i22 i13 ^c ^b ^a
i41 i22 i23 ^c ^b ^a
i41 i22 i33 ^c ^b ^a
i41 i22 i43 ^c ^b ^a
i41 i22 i53 ^c ^b ^a
i41 i22 i63 ^c ^b ^a
i41 i32 i03 ^c ^b ^a
i41 i32 i13 ^c ^b ^a
i41 i32 i23 ^c ^b ^a
i41 i32 i33 ^c ^b ^a
i41 i32 i43 ^c ^b ^a
i41 i32 i53 ^c ^b ^a
i41 i32 i63 ^c ^b ^a
i41 i42 i03 ^c ^b ^a
i41 i42 i13 ^c ^b ^a
i41 i42 i23 ^c ^b ^a
i41 i42 i33 ^c ^b ^a
i41 i42 i43 ^c ^b ^a
i41 i42 i53 ^c ^b ^a
i41 i42 i63 ^c ^b ^a
i41 i52 i03 ^c ^b ^a
i41 i52 i13 ^c ^b ^a
i41 i52 i23 ^c ^b ^a
i41 i52 i33 ^c ^b ^a
i41 i52 i43 ^c ^b ^a
i41 i52 i53 ^c ^b ^a
i41 i52 i63 ^c ^b ^a