Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 28 Sep 2014 09:01:32 +0530
From: Sayantan Datta <std2048@...il.com>
To: john-dev <john-dev@...ts.openwall.com>
Subject: Re: Restart work on mask mode

On Sun, Sep 28, 2014 at 3:42 AM, magnum <john.magnum@...hmail.com> wrote:

> On 2014-09-27 04:42, Sayantan Datta wrote:
>
>> Before moving on to GPU stuffs, we should add support for wordlist + mask
>> mode. However, I have doubts regarding how to proceed with this. How would
>> we like our hybrid mode to work?
>>
>> like ?d?d?w?a?a?w where 'w' are the word from two wrodlists.
>> or something like -mask=?a?a -pos=N, where the mask would be inserted at
>> the Nth position in the word.
>>
>
> Both approaches are very powerful. Maybe start with ?w.
>
>  Are we also planning to support any other hybrid modes? If yes, is it
>> sufficient to create an interface where we could just plug in the words
>> from other modes in a way discussed above. Should we focus on creating a
>> functions like plug_in_words_into_mask()?
>>
>
> I hope Solar will chime in here with ideas. Adding mask as an "always
> available extra", just like External filters, would be cool but I'm not
> sure how to accomplish that without losing performance, or what options to
> use to control it.
>

It's not unusual to sacrifice some performance in favor of functionality.
Actually, the hybrid mode may increase performance in some cases. For
example in inc + mask, mask being faster, if we have sufficiently long
mask, it would hide the overhead incurred in inc mode. Also in generic
cases where mask is short, if the length of the imported keys do not vary
too frequently(like in inc mode), it might be possible to maintain minimal
impact on performance. However I'm little skeptical about performance in
wordlist + mask, where the length of the imported words would vary randomly.

I think we should follow the external mode technique with this one. In all
modes incremental or wordlist  we should have:

if (do_mask_crack(word))
  if (external_filter(word)) // not executed when mask is active
      crk_process_key(); // not executed when mask is active

The do_mask_crack() will return null when a mask is active and call
crk_process_key() from within. This process necessitates splitting mask
mode into three separate functions:
init_mask(char *mask, db_main *db) - initialize mask
do_ mask_crack() - generates the keys and calls external_filter() and
crk_process_keys().
exit_mask() - for cleanup.

The init_mask() and exit_mask() function should be called during entry(just
after initializing db_main, preferably after initializing a format because
we might need some input from the format parameters as well for GPU
cracking.) and exit from john respectively.
When only mask mode is working, the do_mask_crack() would be used as usual
with a NULL in the argument. However when other modes are active,
do_mask_crack() is called within those modes.


Regards,
Sayantan

Content of type "text/html" skipped

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ