openwall / openwall/john

Effectively-duplicate rule suppression

Open
#5,698 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
13.6k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

We already have suppression of literally duplicate wordlist rules (although there may be bugs with it, see #5011), however we do not yet suppress rules that look different but are effectively duplicate (redundant).

https://github.com/mhasbini/duprule is one external project that does this, so we could consider their approach (vs. or as well as other ideas):

How does it works ?

TL;DR: Each rule change is mapped, and a unique id is generated for each rule with functions count.

The mechanism is like this:

    A blank map is created with N ( from 1 to 36 ) slots.
    Each rule change will be applied to the map. Example rule: 'u', will change all characters cases from '?' ( unknown ) to 'u' ( upper case ). 'sab', will add {'a' -> 'b'} to the map. And same logic apply for the other rules.
    An id is generated from the map.
    The ids are compared to detect duplicate rules.
    The rule with the least functions count will be selected.

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

Start by reading the existing duplicate-rule suppression and the linked duprule project to understand how rule changes and function counts are represented. Define which differently written rules count as equivalent and how the least costly rule is selected. Done should include agreed behavior and tests covering effectively duplicate rules, but the issue does not name relevant files or test entry points.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.