[<prev] [next>] [day] [month] [year] [list]
Date: Thu, 15 Jul 2010 10:22:25 +0400
From: Solar Designer <solar@...nwall.com>
To: john-users@...ts.openwall.com
Subject: 1.7.6-jumbo-5
Hi,
I've just released 1.7.6-jumbo-5, available at the usual place:
http://www.openwall.com/john/#contrib
This includes only two changes since -jumbo-4. One is to "--show"
behavior with LM and NTLM hashes. It's the same patch I posted here:
http://www.openwall.com/lists/john-users/2010/07/15/1
The other is a fix for the only bug in JtR 1.7.6 that was reported to me
so far. The bug existed since 1.7.4.2. It is a segfault (NULL pointer
dereference) in "single crack" mode that may be triggered when some
entries in the input file(s) have usernames, but some don't (that is, a
line starts with a colon or lacks colons at all - includes only a hash).
I've attached a patch with a fix for this bug only. By distributing the
patch like this and including it in the jumbo patch, I hope to get this
fix tested a bit more before I release a new version of JtR. Please
note that if you apply this patch to an existing JtR build tree, you
must "make clean" before you do a new build.
Alexander
diff -urp john-1.7.6.orig/src/loader.h john-1.7.6/src/loader.h
--- john-1.7.6.orig/src/loader.h 2010-01-18 05:19:40 +0000
+++ john-1.7.6/src/loader.h 2010-07-12 01:45:56 +0000
@@ -74,6 +74,11 @@ struct db_keys {
/* Number of keys currently in the buffer */
int count;
+/* Whether we have words to base candidate passwords on or not.
+ * Even if not, we need this keys buffer anyway to hold other salts' successful
+ * guesses for testing against this salt's hashes. */
+ int have_words;
+
/* Number of last processed rule */
int rule;
diff -urp john-1.7.6.orig/src/single.c john-1.7.6/src/single.c
--- john-1.7.6.orig/src/single.c 2010-01-18 06:17:13 +0000
+++ john-1.7.6/src/single.c 2010-07-12 02:05:28 +0000
@@ -70,6 +70,7 @@ static void single_alloc_keys(struct db_
(*keys)->count = 0;
(*keys)->ptr = (*keys)->buffer;
+ (*keys)->have_words = 1; /* assume yes; we'll see for real later */
(*keys)->rule = rule_number;
(*keys)->lock = 0;
memset((*keys)->hash, -1, hash_size);
@@ -332,8 +333,9 @@ static int single_process_salt(struct db
int status, have_words = 0;
keys = salt->keys;
- if (!keys)
- return 0;
+
+ if (!keys->have_words)
+ goto no_own_words;
last = &salt->list;
pw = *last;
@@ -365,8 +367,9 @@ next:
if (!keys->count) keys->rule = rule_number;
if (!have_words) {
+ keys->have_words = 0;
+no_own_words:
if (keys->count && single_process_buffer(salt)) return 1;
- salt->keys = NULL;
}
return 0;
@@ -408,7 +411,7 @@ static void single_run(void)
do {
if (!salt->list) continue;
if (single_process_salt(salt, rule)) return;
- if (!salt->keys) continue;
+ if (!salt->keys->have_words) continue;
have_words = 1;
if (salt->keys->rule < min)
min = salt->keys->rule;
@@ -435,7 +438,7 @@ static void single_done(void)
"candidate passwords, if any");
do {
- if (!salt->list || !salt->keys) continue;
+ if (!salt->list) continue;
if (salt->keys->count)
if (single_process_buffer(salt)) break;
} while ((salt = salt->next));
Powered by blists - more mailing lists
Powered by Openwall GNU/*/Linux -
Powered by OpenVZ