Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 16 May 2023 07:08:56 -0700
From: jeff <>
Subject: Re: rule for password with control characters

On 5/16/2023 04:50, Solar Designer wrote:
> On Mon, May 15, 2023 at 08:19:31PM -0700, jeff wrote:
>> I have a password that I can't crack. I know it is no more than 8
>> characters, and I have tried all printable characters.
>> I would like to include control characters.
>> I made a rule for this, but it isn't working.
>> Here is the rule:
>> [List.Rules:ins_control_1]
>> # jtd truncate to 7, insert at pos x with control
>> '7i0[^$][\x7f\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]
>> I want to truncate my wordlist to 7 characters and insert a control
>> character.
>> I would like to include x7f and x01..x1f
> Your rule line above is wrong.  You can try these instead:
> [List.Rules:ins_control_1]
> '7 i[0-7][\x7f\x01-\x1f]
> [List.Rules:rep_control_1]
> '8 o[0-7][\x7f\x01-\x1f]
> or better yet, optimized versions that produce fewer duplicates (skip
> trying to insert or overstrike way beyond input word length):
> [List.Rules:ins_control_1]
>> \r[00-6] '7 i\p[0-7][\x7f\x01-\x1f]
> [List.Rules:rep_control_1]
>> [0-7] '8 o\0[\x7f\x01-\x1f]
> Since you're cracking descrypt hashes, you may also want to include
> \x80, which gets processed by descrypt as NUL:
> [List.Rules:ins_control_1]
>> \r[00-6] '7 i\p[0-7][\x7f\x80\x01-\x1f]
> [List.Rules:rep_control_1]
>> [0-7] '8 o\0[\x7f\x80\x01-\x1f]
> You don't strictly need those truncations at '7 or '8 when running
> against descrypt - the resulting string will be truncated anyway.
>> K:\password-cracking\john-1.9.0-jumbo-1-win64_xxx\run>john-avx.exe
> When using our Windows builds of JtR, we recommend that you run the
> generic john.exe program so that it can transparently run the right
> fallback program for your CPU if needed.  By directly running
> john-avx.exe, you might be missing opportunity to get e.g. AVX2 code
> running on your CPU (if supported).
>> Invalid rule in (null) at line 4017: Unknown command '7i0^???
> We have a bug in the error reporting there, causing this "in (null)" in
> place of "in john.conf" or such.  We ought to fix that.
> Line 4017 suggests you probably had this in john.conf.  You can instead
> create the file john-local.conf and put your local additions in there -
> should be easier to edit.
>> Any advice would be appreciated.
> We made some relevant improvements since the 1.9.0-jumbo-1 release,
> including faster descrypt on CPU with OpenMP.  You can try a newer build
> linked from the "Download Windows Build" badge in at
> Alexander

I found the issue with the syntax of my rules.

I tried using your better rules.

\r[00-6] '7 i\p[0-7][\x7f\x80\x01-\x1f]

[0-7] '8 o\0[\x7f\x80\x01-\x1f]

When I tried ins_control_1
I got the error:
Invalid rule in (null) at line 4028: Unknown command 0 '7 i0⌂

When I tried rep_control_1
I got the error:
No "rep_control_1" mode rules found in john.conf

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.