hashcat Forum
Rules for Left and Right Dictionary - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Deprecated; Ancient Versions (https://hashcat.net/forum/forum-46.html)
+--- Forum: Very old oclHashcat-plus Support (https://hashcat.net/forum/forum-23.html)
+--- Thread: Rules for Left and Right Dictionary (/thread-1272.html)



Rules for Left and Right Dictionary - NeonFlash - 06-11-2012

Is there a way to apply some simple rules to left and right dictionary during a combined dictionary attack (-a 1)?

There were options like -j and -k or --rule-left and --rule-right in oclhashcat previous version.

This feature is useful and it can be used to apply rules to both or either one of the left and right dictionary. Is there a workaround for this in oclhashcat-plus?

For instance, for a password like, 1boy2girls

it becomes very easy to crack if we can apply rules to both left and right dictionary.

prefix the words in both dictionaries with a single digit, something like ^?d

and run

something like this:

oclhashcat -m 0 -n 400 -j ^?d -k ^?d hashes.txt left_wl.txt right_wl.txt

So, if left_wl.txt has the word, boy and right_wl.txt has the word girls, this word can be cracked really easily.

Would it be possible to implement this or is there already a way to do it?

Note: I don't want to use a utility which allows me to generate such word combinations by running a combinator. I do not think that is an efficient method, its better to generate such words on the fly than first run a dictionary through a combinator and again use it in a combined dictionary attack. It is both time and disk space consuming.

Thanks.


RE: Rules for Left and Right Dictionary - atom - 06-11-2012

In theory its possible, but not so easy to implement. If there is more demand I will reconsider.


RE: Rules for Left and Right Dictionary - NeonFlash - 06-11-2012

Thanks atom. I think it would be worth considering. I have noticed such a password pattern being used quite often. And there seems to be no other efficient way of attacking such a pattern other than applying rules to either one or both the left and right dictionaries at the same time.

I can understand that this will not be so easy to implement. I am not sure of the limitations, but I feel, GPU utilization should be good since a lot of workload will be generated in this attack pattern.


RE: Rules for Left and Right Dictionary - fizikalac - 06-11-2012

I would also like to see such a feature (again). People like to use some delimiter in their passwords which could be cracked with dict1 - rule - dict2.


RE: Rules for Left and Right Dictionary - NeonFlash - 06-11-2012

Ok, good news Smile

yes, this is indeed a commonly observed password pattern but there is not yet an easy way to attack such passwords.


RE: Rules for Left and Right Dictionary - mastercracker - 06-13-2012

I agree too. To possibly keep it simpler for you, Atom, just having the possibility to add rules that will modify each word combination would be useful (instead of modifying the left word and/or the right word).

Note to NeonFlash, there is a way to currently do what you want but it requires some initial work from you. You have to make a rule file from your second wordlist of the combination attack. For example if the second dictionary have the words:
Girl
girl
beauty
mascara

then you create a rule file like this:
$G$i$r$l
$g$i$r$l
$b$e$a$u$t$y
$m$a$s$c$a$r$a

I wrote a little macro in excel file that does this because I am not a good programmer but maybe someone could wrote a real script that does that. Anyway, once you have that file, everything is possible. You just use the attack mode 0 to have the possibility to have rules with your first dictionary. After that, the way you order the rules will guide what your result will look like. Let's consider the following rule files:

dic2.rule is the one you generated with your second wordlist.
app1num.rule appends 1 num
pre1num.rule prepends 1 num

Here's examples of variation of the rule file order that you can do:

dic2-app1num will give words like BoyGirl1
dic2-app1num-pre1num will give words like 2BoyGirl1
app1num-pre1num-dic2 will give words like 2Boy1Girl
app1num-pre1num-dic2-app1num will give words like 2Boy1Girl3
app1num-app1num-dic2 will give words like Boy21Girl

Basically you can do everything you want.


RE: Rules for Left and Right Dictionary - M@LIK - 06-13-2012

mastercracker Wrote: ...
Girl
girl
beauty
mascara
...

LOL... What were you thinking dude??


To do the dict-to-rule thing, using sed:
Code:
sed 's/\(.\)/$\1/g' [dict_file]
Code:
type dict
Girl
girl
beauty
mascara
xD

sed 's/\(.\)/\$\1/g' dict
$G$i$r$l
$g$i$r$l
$b$e$a$u$t$y
$m$a$s$c$a$r$a
$x$D



RE: Rules for Left and Right Dictionary - atom - 06-13-2012

If generating a temporary dictionary is an option you should use hashcat-cpu in --stdout mode