From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds80T-0002Ln-5a for guix-patches@gnu.org; Wed, 13 Sep 2017 09:47:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ds80M-0004Nn-23 for guix-patches@gnu.org; Wed, 13 Sep 2017 09:47:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:56909) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ds80L-0004Ne-Ts for guix-patches@gnu.org; Wed, 13 Sep 2017 09:47:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ds80L-0005k0-NN for guix-patches@gnu.org; Wed, 13 Sep 2017 09:47:01 -0400 Subject: [bug#28429] [PATCH] gnu: Add John the Ripper. Resent-Message-ID: Date: Wed, 13 Sep 2017 08:46:27 -0500 From: Eric Bavier Message-ID: <20170913084627.535c4ec5@centurylink.net> In-Reply-To: <87vakn3tog.fsf@gnu.org> References: <20170912025014.27269-1-bavier@member.fsf.org> <87vakn3tog.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_//THHqK8pVkVwYWDy/HAzecN" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 28429@debbugs.gnu.org --MP_//THHqK8pVkVwYWDy/HAzecN Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wed, 13 Sep 2017 10:10:39 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > Hi Eric, >=20 > Eric Bavier skribis: >=20 > > * gnu/packages/password-utils.scm (john-the-ripper-jumbo): New variable= . =20 >=20 > [...] >=20 > > + `(#:configure-flags > > + (list (string-append > > + "CFLAGS=3D" =20 >=20 > Is this to clear CFLAGS? We should make sure to get =E2=80=9C-O2 -g=E2= =80=9D. The macro definitions below must be put in CFLAGS, but yes, -O2 should be included. >=20 > > + "-DJOHN_SYSTEMWIDE=3D1 " > > + "-DJOHN_SYSTEMWIDE_EXEC=3D'\"" %output "/libexec/john\= "' " > > + "-DJOHN_SYSTEMWIDE_HOME=3D'\"" %output "/share/john\"'= ") > > + "--disable-native-tests" > > + "--disable-native-macro") =20 >=20 > 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=3Dnative" flag and instruction set discovery during 'configure'. >=20 > > + #:tests? #f ;tests assume /etc/passwd has a pw_dir for the bu= ild user =20 >=20 > /etc/passwd in the build environment has this line (see > nix/libstore/build.cc:1859): >=20 > nixbld:x:%1%:%2%:Nix build user:/:/noshell >=20 > Isn=E2=80=99t it sufficient to have =E2=80=9C/=E2=80=9D as the home direc= tory? It seems the build user noes not have sufficient permissions to create a directory there? The tests want to create "~/.john" (specifically "//.john"). >=20 > > + (description "John the Ripper is a fast password cracker. Its p= rimary > > +purpose is to detect weak Unix passwords. Besides several crypt(3) pa= ssword =20 >=20 > Rather @code{crypt}. ok. >=20 > Otherwise LGTM, thank you! Thanks, updated patch attached, `~Eric --MP_//THHqK8pVkVwYWDy/HAzecN Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0001-gnu-Add-John-the-Ripper.patch =46rom dd9795e5d63beaf06f2e3c76944e82a5564dc87d Mon Sep 17 00:00:00 2001 From: Eric Bavier 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. --- gnu/packages/password-utils.scm | 98 +++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 98 insertions(+) diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.= scm index bde1ea854..52689a71d 100644 --- a/gnu/packages/password-utils.scm +++ b/gnu/packages/password-utils.scm @@ -11,6 +11,7 @@ ;;; Copyright =C2=A9 2017 Cl=C3=A9ment Lassieur ;;; Copyright =C2=A9 2017 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2017 Jelle Licht +;;; Copyright =C2=A9 2017 Eric Bavier ;;; ;;; 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,97 @@ use pass, the standard unix password manager, as the c= redential 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 ".ta= r.xz")) + (sha256 + (base32 + "08q92sfdvkz47rx6qjn7qv57cmlpy7i7rgddapq5384mb413vjds")) + (patches + (list (origin + (method url-fetch) + (uri (string-append "https://github.com/magnumripper/" + "JohnTheRipper/commit/" + "e2e868db3e153b3f959e119a51703d4afb9= 9c624.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/" + "480e95b0e449863be3e1a5b0bc634a67df2= 8b618.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=3D-O2 -g " + "-DJOHN_SYSTEMWIDE=3D1 " + "-DJOHN_SYSTEMWIDE_EXEC=3D'\"" %output "/libexec/john\"' " + "-DJOHN_SYSTEMWIDE_HOME=3D'\"" %output "/share/john\"'") + ;; For now, do not test for instruction set in configure, a= nd + ;; do not pass '-march=3Dnative' to gcc: + "--disable-native-tests" + "--disable-native-macro") + #:tests? #f ;tests try to create '.john' in the build user's $HOME + #: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 "/" (basenam= e 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 prima= ry +purpose is to detect weak Unix passwords. Besides several @code{crypt} +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+)))) --=20 2.14.1 --MP_//THHqK8pVkVwYWDy/HAzecN--