Discussion:
[john-users] Does Johnny support gpg symmetrically encrypted files?
Piotr Dobrogost
2018-03-03 11:52:44 UTC
Permalink
Hi!

Per http://www.openwall.com/lists/john-users/2015/11/17/1 JtR supports gpg
symmetrically encrypted files.
Both
$ gpg2john --format=gpg test.txt.gpg > hash
and
$ gpg2john --format=gpg-opencl test.txt.gpg > hash
work without problem.
However when I choose "Open password file | Open other file format
(*2john)", choose "gpg" as format, select test.txt.gpg in "GPG Secret Key
File(s)" and click "Convert" I see "Converstion crashed" text in
"Conversion report" field.

Why does this work with JtR but not with Johnny?

Regards,
Piotr
Solar Designer
2018-03-03 14:25:55 UTC
Permalink
Post by Piotr Dobrogost
Per http://www.openwall.com/lists/john-users/2015/11/17/1 JtR supports gpg
symmetrically encrypted files.
Yes.
Post by Piotr Dobrogost
Both
$ gpg2john --format=gpg test.txt.gpg > hash
and
$ gpg2john --format=gpg-opencl test.txt.gpg > hash
work without problem.
gpg2john doesn't accept nor need the "--format" option. If you're using
a recent enough version of gpg2john, then it should print a warning that
it can't read the file named "--format=gpg" (or whatever you specify,
which it will think is a filename), but yes it'll work fine for the
other/real file regardless.
Post by Piotr Dobrogost
However when I choose "Open password file | Open other file format
(*2john)", choose "gpg" as format, select test.txt.gpg in "GPG Secret Key
File(s)" and click "Convert" I see "Converstion crashed" text in
"Conversion report" field.
Why does this work with JtR but not with Johnny?
I don't know, and I've never used Johnny except for testing (maybe
someone who actually uses Johnny will reply), but my guess right now is
that maybe gpg2john somehow returns a non-zero exit code in your case,
which you simply don't notice when you run it from the command line. Or
maybe Johnny is configured to use a different version of JtR tree you
have on your system than the one you run the gpg2john command from.

So please make sure it's the same version of gpg2john being used either
way, and please try this command:

gpg2john test.txt.gpg > hash; echo $?

What does it print?

Alexander
Piotr Dobrogost
2018-03-03 14:48:05 UTC
Permalink
Post by Solar Designer
gpg2john doesn't accept nor need the "--format" option. If you're using
a recent enough version of gpg2john, then it should print a warning that
it can't read the file named "--format=gpg" (or whatever you specify,
which it will think is a filename), but yes it'll work fine for the
other/real file regardless.
True.
Post by Solar Designer
I don't know, and I've never used Johnny except for testing (maybe
someone who actually uses Johnny will reply), but my guess right now is
that maybe gpg2john somehow returns a non-zero exit code in your case,
which you simply don't notice when you run it from the command line. Or
maybe Johnny is configured to use a different version of JtR tree you
have on your system than the one you run the gpg2john command from.
The reason was that I had a symlink to john binary in ~/.local/bin and I
configured
Johnny with this symlink instead the real thing
 As a result $JOHN was set
to the
directory of symlink instead of directory with binary and john.conf file
couldn't be opened.

I think JtR should follow symlinks when finding out directory to put in
$JOHN.

Regards,
Piotr

Loading...