Follow us on Twitter or via RSS feeds with tweets or complete announcement texts or excerpts
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 29 Jan 2013 04:58:02 +0400
From: Solar Designer <solar@...nwall.com>
To: john-users@...ts.openwall.com
Subject: Re: Password Cracking a DMG...

Hi Jeremiah,

On Mon, Jan 28, 2013 at 04:05:18PM -0800, Jeremiah Grossman wrote:
> When running dmg2john on the DMG the binary segfaults "Segmentation fault:
> 11". This behavior was exhibited not only on my original DMG, but any newly
> created DMGs of 11GB or greater with no data written. So, it appears to me
> with no knowledge of the codebase, this is some kind of filesize issue.
> 
> From what I gather the conversations on Twitter, @gat3way @DhiruKholia
> @solardiz maybe have isolated the problem. I'm waiting a patch to be issued
> so I can try again.

Yes, we think we have isolated this problem, and found a few other bugs
in dmg2john in the process.  Here's the start of the john-dev thread:

http://www.openwall.com/lists/john-dev/2013/01/28/17

> There we some reports of an all zero hash issue on the DMGs, but that might
> have something to do with an on-the-fly patch attempted by @jmgosney. Don't
> know if that's helpful or not.

Maybe, or it may as well be a separate problem.

Can you try the attached patch?

And, what version of JtR are you using?  Latest jumbo release, current
unstable-jumbo from git, or current bleeding-jumbo from git?  (I've been
looking at the latter.)

Thanks,

Alexander

--- dmg2john.c.orig	2013-01-25 02:10:28.200855524 +0000
+++ dmg2john.c	2013-01-29 00:51:44.365180326 +0000
@@ -130,9 +130,9 @@ static void hash_plugin_parse_hash(char
 
 		chunk_size = header2.blocksize;
 		lseek(fd, header2.dataoffset, SEEK_SET);
-		cno = ceil(header2.datasize / 4096.0) - 2;
+		cno = ((header2.datasize + 4095ULL) / 4096) - 2;
 		chunk = (unsigned char *) malloc(header2.datasize);
-		data_size = header2.datasize - cno * 4096;
+		data_size = header2.datasize - cno * 4096ULL;
 		if (data_size < 0) {
 			fprintf(stderr, "File %s is not a valid DMG file!\n", filename);
 			return;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux - Powered by OpenVZ