mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #380] Mask mode should honour --min-len and --max-len #117
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#117
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @magnumripper on GitHub (Sep 30, 2013).
Original GitHub issue: https://github.com/openwall/john/issues/380
Originally assigned to: @sayan1an on GitHub.
For example, using
--mask=?l?l?l?l?l?l?l?l -min-len=1should exhaust ?l then exhaust ?l?l and so on.If --max-len is longer than mask, eg. using
--mask=?l?d --max-len=7I think we can repeat the mask (either whole, effectively?l?d?l?d?l?d?l- or just repeat last mask as in?l?d?d?d?d?d?d) and default to a --min-len of 2 because that's the length of original mask.This way we can brute force from 1 to 8 chars just using
--mask=?a --max-len=8@magnumripper commented on GitHub (Sep 30, 2013):
Not sure how to handle cases like
--mask=pass?d?dword?d?d --min-len=10 --max-len=14though.At length 10, we'd probably want "pass?d?dword"
At length 11, we'd probably want "pass?d?dword?d"
At length 13, we could produce "pass?d?d?dword?d?d" or "pass?d?dword?d?d?d" - or both! But a simpler approach to handle --max-len exceeding mask input length is to simply disallow it.
@ukasz commented on GitHub (Sep 30, 2013):
You're trying to suggest something similar to --incremental option of hashcat:
http://hashcat.net/wiki/doku.php?id=mask_attack#password_length_increment
@magnumripper commented on GitHub (Jan 11, 2014):
The very minimum fix before releasing Jumbo-1 would be to bug out if min or max length is requested with mask mode.
@magnumripper commented on GitHub (Feb 6, 2014):
Reopening for future enhancement (with revised tags/milestone)
@magnumripper commented on GitHub (Oct 24, 2014):
@Sayantan2048 do you think you could have a go at this too? Or will you proceed with GPU first?
The behavior we wish is:
--max-lenoption is rejected (never sent to crk_process_key) but in Mask mode, it better not even be generated.--min-lenoption is rejected/never generated in a similar way.For mask mode this is trickier than all other modes. Or maybe not? Also, like I said in OP above, a command line like
-mask=?l?l?l?l?l?l?l?l?l?l -min-len=4 -max-len=6should loop in do_mask_crack() and produce the same result as three separate sessions of ?l?l?l?l, ?l?l?l?l?l and ?l?l?l?l?l?l.@sayan1an commented on GitHub (Oct 25, 2014):
On Sat, Oct 25, 2014 at 5:14 AM, magnum notifications@github.com wrote:
For hybrid modes, I'm assuming we'll check max-len, min-length in both the
parent mode and mask mode. For max-length restriction, an early reject in
parent mode shouldn't be a problem. However for min-length, the parent mode
might reject the candidate due to short length which could have ended up
being transformed into an optimal sized key after addition of mask.
So, for hybrid modes, I think we should disable min-length check while keep
the max-length check intact in the parent mode. We'll check for both
max-length and min-length in mask mode though.