|
|
Message-ID: <CABtNtWGm6c3M60V+RixdV4hK652+ZOFiQSgcMi=oFFv+K9p_XQ@mail.gmail.com>
Date: Fri, 14 Aug 2015 10:30:43 +0800
From: Kai Zhao <loverszhao@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: auditing our use of FMT_* flags (was: more robustness)
Hi Alexander,
On Fri, Aug 7, 2015 at 2:28 AM, Solar Designer <solar@...nwall.com> wrote:
> On Tue, Aug 04, 2015 at 08:57:29AM +0800, Kai Zhao wrote:
>> 2. FMT_CASE
>>
>> 2.2 formats have set FMT_CASE but all passwords are
>> case-insensitive
>>
>> OpenVMS
>
> In uaf_encode.c: uaf_test_password() we have:
>
> if ( pwd->flags & UAI$M_PWDMIX ) { /* take password verbatim */
> password_dx.dsc$a_pointer = (char *) password;
> } else {
> /*
> * Upcase password.
> */
> password_dx.dsc$a_pointer = uc_password;
> if ( password_dx.dsc$w_length > sizeof(uc_password) )
> password_dx.dsc$w_length = sizeof(uc_password);
> for ( i = 0; i < password_dx.dsc$w_length; i++ )
> uc_password[i] = toupper ( ARCH_INDEX(password[i]) );
> }
>
> So it's not that simple. Can you try to come up with and add test
> vectors that would exercise the "else" code path?
>
The current test vectors DO go through the "else" code path. Do you
want me to test the "if" code path ?
I add one test vector for vms which goes through the "if" code path.
https://github.com/magnumripper/JohnTheRipper/pull/1661/files
#define MAX_KEYS_PER_CRYPT 1
static struct fmt_tests tests[] = {
+ {"$V$S44zI913bBx-UJrcFSC------D", "President#44"},
{"$V$9AYXUd5LfDy-aj48Vj54P-----", "USER"},
{"$V$p1UQjRZKulr-Z25g5lJ-------", "service"},
{NULL}
The old test vectors go through the "else" code path, so I thought
it should not set FMT_CASE, the new test vector goes through
the "if" code path, and it does case-sensitive. So vms should set
FMT_CASE, no need to change.
Thanks,
Kai
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.