openwall / openwall/john

Smarter mask mode

Open
#4,121 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement new cracking mode RFC / discussion
Dominant language
C
Stars
13.6k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

As I understand, hashcat's mask mode uses Markov chains. We can't put that into ours without revising on-device code (OpenCL, FPGA), but we can enhance ours, without changes to on-device code, to an extent where it's similar to JtR 1.0's incremental mode.

Basically, incremental mode would incrementally expand the charset size to include less likely characters. It'd fix the character in one position, then in another, and so on, and eventually expand the charset to include an extra character, which would then be the character to fix in each position (to ensure all password candidates do contain this extra character and thus don't overlap with whatever was tested previously).

Incremental mode would also switch lengths and charsets back and forth, so that the number of candidate passwords per {length, charset} pair would steadily increase. We may or may not do the same with mask.

Later revisions of incremental mode expanded the table of {length, charset} pairs to also include the fixed character index (now in triplets of these numbers), and sorted this larger table for decreasing estimated probability of success per candidate tested, based on a training set. Again, we may or may not do the same with mask.

All of these things amount to splitting one initial mask into many intermediate masks, which would have one of the placeholders replaced with a fixed character and the rest maybe with relatively more limited placeholders as appropriate for the smart mask mode's current step.

Even further revisions of incremental mode (still in 1990s) effectively started using Markov chains, but that is clearly beyond what our on-device code is currently capable of and beyond the scope of this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. First map the existing mask-mode implementation and its boundary with the on-device code; the work is done when one initial mask can be split into progressively ordered intermediate masks without changing that on-device code.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.