GNU bug report logs -
#28429
[PATCH] gnu: Add John the Ripper.
Previous Next
Reported by: Eric Bavier <bavier <at> member.fsf.org>
Date: Tue, 12 Sep 2017 02:52:02 UTC
Severity: normal
Tags: patch
Done: Eric Bavier <ericbavier <at> centurylink.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28429 in the body.
You can then email your comments to 28429 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#28429
; Package
guix-patches
.
(Tue, 12 Sep 2017 02:52:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Eric Bavier <bavier <at> member.fsf.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 12 Sep 2017 02:52:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/password-utils.scm (john-the-ripper-jumbo): New variable.
---
gnu/packages/password-utils.scm | 96 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 96 insertions(+)
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index bde1ea854..97e20e7eb 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2017 Clément Lassieur <clement <at> lassieur.org>
;;; Copyright © 2017 Tobias Geerinckx-Rice <me <at> tobias.gr>
;;; Copyright © 2017 Jelle Licht <jlicht <at> fsfe.org>
+;;; Copyright © 2017 Eric Bavier <bavier <at> member.fsf.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -41,10 +42,13 @@
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnupg)
+ #:use-module (gnu packages gnuzilla)
#:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
+ #:use-module (gnu packages kerberos)
#:use-module (gnu packages linux)
#:use-module (gnu packages man)
+ #:use-module (gnu packages multiprecision)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@@ -480,3 +484,95 @@ use pass, the standard unix password manager, as the credential backend for
your git repositories. This is achieved by explicitly defining mappings
between hosts and entries in the password store.")
(license license:lgpl3+)))
+
+(define-public john-the-ripper-jumbo
+ (let ((official-version "1.8.0")
+ (jumbo-version "1"))
+ (package
+ (name "john-the-ripper-jumbo")
+ (version (string-append official-version "-" jumbo-version))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://www.openwall.com/john/j/john-"
+ official-version "-jumbo-" jumbo-version ".tar.xz"))
+ (sha256
+ (base32
+ "08q92sfdvkz47rx6qjn7qv57cmlpy7i7rgddapq5384mb413vjds"))
+ (patches
+ (list (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/magnumripper/"
+ "JohnTheRipper/commit/"
+ "e2e868db3e153b3f959e119a51703d4afb99c624.patch"))
+ (file-name "john-the-ripper-jumbo-gcc5-inline.patch")
+ (sha256
+ (base32
+ "1shvcf1y2097115mxhzdkm64dr106a8zr6pqjqyh171q5ng5vfra")))
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/magnumripper/"
+ "JohnTheRipper/commit/"
+ "480e95b0e449863be3e1a5b0bc634a67df28b618.patch"))
+ (file-name "john-the-ripper-jumbo-non-x86.patch")
+ (sha256
+ (base32
+ "1ffd9dvhk0sb6ss8dv5yalh01lz30i7rilqilf2xv68gax2hyjqx")))))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("gmp" ,gmp)
+ ("krb5" ,mit-krb5)
+ ("libpcap" ,libpcap)
+ ("nss" ,nss)
+ ("openssl" ,openssl)
+ ("zlib" ,zlib)))
+ (arguments
+ `(#:configure-flags
+ (list (string-append
+ "CFLAGS="
+ "-DJOHN_SYSTEMWIDE=1 "
+ "-DJOHN_SYSTEMWIDE_EXEC='\"" %output "/libexec/john\"' "
+ "-DJOHN_SYSTEMWIDE_HOME='\"" %output "/share/john\"'")
+ "--disable-native-tests"
+ "--disable-native-macro")
+ #:tests? #f ;tests assume /etc/passwd has a pw_dir for the build user
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir-src
+ (lambda _ (chdir "src")))
+ (replace 'install
+ (lambda _
+ (let ((bindir (string-append %output "/bin"))
+ (docdir (string-append %output "/share/doc/john"))
+ (execdir (string-append %output "/libexec/john"))
+ (homedir (string-append %output "/share/john"))
+ (install-file-to (lambda (dir)
+ (lambda (f) (install-file f dir))))
+ (symlink? (lambda (_ s) (eq? (stat:type s) 'symlink))))
+ (with-directory-excursion "../run"
+ (for-each (install-file-to execdir)
+ (cons* "mailer" "benchmark-unify"
+ (find-files "." ".*\\.(py|rb|pl)")))
+ (for-each (install-file-to homedir)
+ (append (find-files "." "(stats|dictionary.*)")
+ (find-files "." "(.*\\.chr|.*\\.lst)")
+ (find-files "." ".*\\.conf")))
+ (for-each (install-file-to bindir)
+ '("tgtsnarf" "genmkvpwd" "mkvcalcproba"
+ "raw2dyna" "luks2john" "vncpcap2john"
+ "uaf2john" "calc_stat" "wpapcap2john"
+ "cprepair" "relbench" "SIPdump" "john"))
+ (for-each (lambda (f) ;install symlinked aliases
+ (symlink "john"
+ (string-append bindir "/" (basename f))))
+ (find-files "." symlink?)))
+ (copy-recursively "../doc" docdir)
+ #t))))))
+ (home-page "http://www.openwall.com/john/")
+ (synopsis "Password cracker")
+ (description "John the Ripper is a fast password cracker. Its primary
+purpose is to detect weak Unix passwords. Besides several crypt(3) password
+hash types most commonly found on various Unix systems, supported out of the
+box are Windows LM hashes, plus lots of other hashes and ciphers. This is the
+community-enhanced, \"jumbo\" version of John the Ripper.")
+ (license license:gpl2+))))
--
2.14.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#28429
; Package
guix-patches
.
(Wed, 13 Sep 2017 08:11:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 28429 <at> debbugs.gnu.org (full text, mbox):
Hi Eric,
Eric Bavier <bavier <at> member.fsf.org> skribis:
> * gnu/packages/password-utils.scm (john-the-ripper-jumbo): New variable.
[...]
> + `(#:configure-flags
> + (list (string-append
> + "CFLAGS="
Is this to clear CFLAGS? We should make sure to get “-O2 -g”.
> + "-DJOHN_SYSTEMWIDE=1 "
> + "-DJOHN_SYSTEMWIDE_EXEC='\"" %output "/libexec/john\"' "
> + "-DJOHN_SYSTEMWIDE_HOME='\"" %output "/share/john\"'")
> + "--disable-native-tests"
> + "--disable-native-macro")
Perhaps add a comment on these two flags.
> + #:tests? #f ;tests assume /etc/passwd has a pw_dir for the build user
/etc/passwd in the build environment has this line (see
nix/libstore/build.cc:1859):
nixbld:x:%1%:%2%:Nix build user:/:/noshell
Isn’t it sufficient to have “/” as the home directory?
> + (description "John the Ripper is a fast password cracker. Its primary
> +purpose is to detect weak Unix passwords. Besides several crypt(3) password
Rather @code{crypt}.
Otherwise LGTM, thank you!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#28429
; Package
guix-patches
.
(Wed, 13 Sep 2017 13:47:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 28429 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed, 13 Sep 2017 10:10:39 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:
> Hi Eric,
>
> Eric Bavier <bavier <at> member.fsf.org> skribis:
>
> > * gnu/packages/password-utils.scm (john-the-ripper-jumbo): New variable.
>
> [...]
>
> > + `(#:configure-flags
> > + (list (string-append
> > + "CFLAGS="
>
> Is this to clear CFLAGS? We should make sure to get “-O2 -g”.
The macro definitions below must be put in CFLAGS, but yes, -O2 should
be included.
>
> > + "-DJOHN_SYSTEMWIDE=1 "
> > + "-DJOHN_SYSTEMWIDE_EXEC='\"" %output "/libexec/john\"' "
> > + "-DJOHN_SYSTEMWIDE_HOME='\"" %output "/share/john\"'")
> > + "--disable-native-tests"
> > + "--disable-native-macro")
>
> Perhaps add a comment on these two flags.
Sure. John supports a "cpu fallback" feature to match, at runtime, the
current processor with an executable appropriate for its supported
instruction set. This involves configuring and building multiple times
with different optimization flags. I wanted to implement this later
after getting the rest of things working, so these two flags turn off
the "-march=native" flag and instruction set discovery during
'configure'.
>
> > + #:tests? #f ;tests assume /etc/passwd has a pw_dir for the build user
>
> /etc/passwd in the build environment has this line (see
> nix/libstore/build.cc:1859):
>
> nixbld:x:%1%:%2%:Nix build user:/:/noshell
>
> Isn’t it sufficient to have “/” as the home directory?
It seems the build user noes not have sufficient permissions to create a
directory there? The tests want to create "~/.john" (specifically
"//.john").
>
> > + (description "John the Ripper is a fast password cracker. Its primary
> > +purpose is to detect weak Unix passwords. Besides several crypt(3) password
>
> Rather @code{crypt}.
ok.
>
> Otherwise LGTM, thank you!
Thanks, updated patch attached,
`~Eric
[0001-gnu-Add-John-the-Ripper.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#28429
; Package
guix-patches
.
(Wed, 13 Sep 2017 21:23:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 28429 <at> debbugs.gnu.org (full text, mbox):
Heya,
Eric Bavier <ericbavier <at> centurylink.net> skribis:
> On Wed, 13 Sep 2017 10:10:39 +0200
[...]
>>
>> > + `(#:configure-flags
>> > + (list (string-append
>> > + "CFLAGS="
>>
>> Is this to clear CFLAGS? We should make sure to get “-O2 -g”.
>
> The macro definitions below must be put in CFLAGS, but yes, -O2 should
> be included.
OK.
>>
>> > + "-DJOHN_SYSTEMWIDE=1 "
>> > + "-DJOHN_SYSTEMWIDE_EXEC='\"" %output "/libexec/john\"' "
>> > + "-DJOHN_SYSTEMWIDE_HOME='\"" %output "/share/john\"'")
>> > + "--disable-native-tests"
>> > + "--disable-native-macro")
>>
>> Perhaps add a comment on these two flags.
>
> Sure. John supports a "cpu fallback" feature to match, at runtime, the
> current processor with an executable appropriate for its supported
> instruction set. This involves configuring and building multiple times
> with different optimization flags. I wanted to implement this later
> after getting the rest of things working, so these two flags turn off
> the "-march=native" flag and instruction set discovery during
> 'configure'.
Oh, I see. Thanks for explaining.
>> /etc/passwd in the build environment has this line (see
>> nix/libstore/build.cc:1859):
>>
>> nixbld:x:%1%:%2%:Nix build user:/:/noshell
>>
>> Isn’t it sufficient to have “/” as the home directory?
>
> It seems the build user noes not have sufficient permissions to create a
> directory there? The tests want to create "~/.john" (specifically
> "//.john").
And setting ‘HOME’ isn’t enough? (There are several packages where we
do that right before the ‘check’ phase.)
> From dd9795e5d63beaf06f2e3c76944e82a5564dc87d Mon Sep 17 00:00:00 2001
> From: Eric Bavier <bavier <at> member.fsf.org>
> Date: Mon, 11 Sep 2017 21:44:14 -0500
> Subject: [PATCH] gnu: Add John the Ripper.
>
> * gnu/packages/password-utils.scm (john-the-ripper-jumbo): New variable.
Perfect, thanks!
Ludo’.
Reply sent
to
Eric Bavier <ericbavier <at> centurylink.net>
:
You have taken responsibility.
(Thu, 14 Sep 2017 03:21:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Eric Bavier <bavier <at> member.fsf.org>
:
bug acknowledged by developer.
(Thu, 14 Sep 2017 03:21:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 28429-done <at> debbugs.gnu.org (full text, mbox):
On Wed, 13 Sep 2017 23:22:21 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:
> >> /etc/passwd in the build environment has this line (see
> >> nix/libstore/build.cc:1859):
> >>
> >> nixbld:x:%1%:%2%:Nix build user:/:/noshell
> >>
> >> Isn’t it sufficient to have “/” as the home directory?
> >
> > It seems the build user noes not have sufficient permissions to create a
> > directory there? The tests want to create "~/.john" (specifically
> > "//.john").
>
> And setting ‘HOME’ isn’t enough? (There are several packages where we
> do that right before the ‘check’ phase.)
The code accesses 'getpwuid(getuid())->pw_dir', so effectively ignores
'HOME'.
>
> > From dd9795e5d63beaf06f2e3c76944e82a5564dc87d Mon Sep 17 00:00:00 2001
> > From: Eric Bavier <bavier <at> member.fsf.org>
> > Date: Mon, 11 Sep 2017 21:44:14 -0500
> > Subject: [PATCH] gnu: Add John the Ripper.
> >
> > * gnu/packages/password-utils.scm (john-the-ripper-jumbo): New variable.
>
> Perfect, thanks!
Pushed in eb28a777b5ad13e88d5932e9f97c976a079c94ac.
`~Eric
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 12 Oct 2017 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 338 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.