How to triplicate a word or pattern - OpenCL error when 'M 'in rules
#1
I want to do something similar to doubling in a rule using 'd' (doubles the word), I want to triplicate it.
Now I thought this could be achieved by putting the word in memory (M), doubling the word (d) and appending the word from memory (4), so
## rule to triplicate
Md4

However, when I try this rule or the example rule from the rules tutorial 'lMuX084', in each case I get the error:

Cannot convert rule for use on OpenCL device in file rules/0_test.rule on line 1: M6
Cannot convert rule for use on OpenCL device in file rules/0_test.rule on line 2: lMuX084

Does anyone have a suggestion on how to triplicate words using rules without M, or to circumvent the OpenCL device error?
Reply
#2
how about rule pN? right below rule d in the examples

Duplicate N
pN
Append duplicated word N times
p2
p@ssW0rd
p@ssW0rdp@ssW0rdp@ssW0rd

regarding your error-message

your rule is marked + so it only works in hahscat-legacy

+ Indicates that this rule is implemented in hashcat-legacy (non-OpenCL CPU) only.
Reply
#3
Thanks @Snoopy, using hashcat-legacy would indeed work.
After sleeping on the problem I came up with two even better solutions for my case since it allows me to keep using the hashcat OCL (GPU) version, which allows me to efficiently combine triplicates list with ending rules like the clem9669_small.rule
Below two other solutions, paste worked fastest

SED solution, surprisingly slow with a large list:

cat words.txt | sed -e "s/.*/& &/"

Using paste, fastest solution found:

paste -d '' words.txt words.txt words.txt

In this way I could pipe the triplicates directly in hashcat using attack mode 0, example when running on subsystem for Linux:

paste -d '' words.txt words.txt words.txt |  ./hashcat.exe -m 16300 -a 0 hash.txt -r /rules/clem9669_small.rule --status --status-timer=10 -w3

The only issue I have left is that I do not know how to use a pipe in attack mode 1, so combinator attack since I also have lists of endings that I would like to append.
Any suggestions on how to use piping with attack mode 1, our should I make that into a separate question?
Reply
#4
erm why you dont use plain hahscat 6.2.5 which will use your gpu by default?
words.txt
Code:
12345
pass
test


endings.txt
Code:
end1
end2
end3


Code:
hashcat -a1 --stdout words.txt endings.txt -j p2

resulting in
Code:
123451234512345end1
123451234512345end2
123451234512345end3
passpasspassend1
passpasspassend2
passpasspassend3
testtesttestend1
testtesttestend2
testtesttestend3
Reply
#5
Tongue 
Lol, I never used combinator attack with rules, so the possibility slipped my mind.
I somehow overlooked the paste rule, so yes that is by far the easiest solution.
Reply