GNU bug report logs - #32332
[PATCH 1/4] gnu: Add hashcat.

Previous Next

Package: guix-patches;

Reported by: Pierre Neidhardt <ambrevar <at> gmail.com>

Date: Tue, 31 Jul 2018 10:15:02 UTC

Severity: normal

Tags: patch

Done: Pierre Neidhardt <ambrevar <at> gmail.com>

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 32332 in the body.
You can then email your comments to 32332 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#32332; Package guix-patches. (Tue, 31 Jul 2018 10:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pierre Neidhardt <ambrevar <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 31 Jul 2018 10:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <ambrevar <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH 1/4] gnu: Add hashcat.
Date: Tue, 31 Jul 2018 12:14:35 +0200
* gnu/packages/password-utils.scm (hashcat): New variable.
---
 gnu/packages/password-utils.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 9ac30420b..91eb6d83f 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -19,6 +19,7 @@
 ;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen <at> fastmail.net>
 ;;; Copyright © 2018 Thomas Sigurdsen <tonton <at> riseup.net>
 ;;; Copyright © 2018 Arun Isaac <arunisaac <at> systemreboot.net>
+;;; Copyright © 2018 Pierre Neidhardt <ambrevar <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -61,6 +62,7 @@
   #:use-module (gnu packages man)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages opencl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-web)
@@ -697,3 +699,33 @@ rotating passwords on various web services.  It makes it easier to rotate your
 passwords, one at a time or in bulk, when security events or routine upkeep of
 your online accounts makes it necessary.")
     (license license:expat)))
+
+(define-public hashcat
+  (package
+    (name "hashcat")
+    (version "4.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://hashcat.net/files/hashcat-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "170i2y32ykgzb1qf1wz3klwn31c09bviz4x3bnrwia65adqrj8xx"))))
+    (native-inputs
+     `(("opencl-headers" ,opencl-headers)))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f                      ;no tests
+       #:make-flags (list (string-append "PREFIX=" %output))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (home-page "https://hashcat.net/hashcat/")
+    (synopsis "Advanced password recovery utility")
+    (description "Hashcat is an advanced password recovery utility, supporting
+five unique modes of attack for over 200 highly-optimized hashing algorithms.
+Hashcat currently supports CPUs, GPUs, and other hardware accelerators on
+Linux, Windows, and macOS, and has facilities to help enable distributed
+password cracking.")
+    (license license:expat)))
-- 
2.18.0





Information forwarded to guix-patches <at> gnu.org:
bug#32332; Package guix-patches. (Tue, 31 Jul 2018 10:18:02 GMT) Full text and rfc822 format available.

Message #8 received at 32332 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <ambrevar <at> gmail.com>
To: 32332 <at> debbugs.gnu.org
Subject: [PATCH 2/4] gnu: Add hashcat-utils.
Date: Tue, 31 Jul 2018 12:17:21 +0200
* gnu/packages/password-utils.scm (hashcat-utils): New variable.
---
 gnu/packages/password-utils.scm | 52 +++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 91eb6d83f..4179792bb 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -63,6 +63,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages opencl)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-web)
@@ -729,3 +730,54 @@ Hashcat currently supports CPUs, GPUs, and other hardware accelerators on
 Linux, Windows, and macOS, and has facilities to help enable distributed
 password cracking.")
     (license license:expat)))
+
+(define-public hashcat-utils
+  (package
+    (name "hashcat-utils")
+    (version "1.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/hashcat/hashcat-utils/releases/download/v"
+                           version "/hashcat-utils-1.8.7z"))
+       (sha256
+        (base32
+         "1x80rngjz7gkhwplhw1iqr0wzb6hjkrjfld2kz9kmgp5dr9nys1p"))))
+    (native-inputs
+     `(("p7zip" ,p7zip)))
+    (inputs
+     `(("perl" ,perl)))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ;no tests
+       #:make-flags (list "CC=gcc"
+                          ;; Upstream bug(?): "make all" seems to remove the
+                          ;; Perl scripts from the source.
+                          "native")
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'unpack
+           (lambda* (#:key source #:allow-other-keys)
+             (invoke "7z" "x" source)
+             (chdir (string-append "hashcat-utils-" ,version "/src"))
+             #t))
+         (delete 'configure)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (string-append (assoc-ref outputs "out") "/bin")))
+               (mkdir-p out)
+               (for-each (lambda (file)
+                           (copy-file file (string-append out "/" (basename file ".bin"))))
+                         (find-files "." "\\.bin$"))
+               (for-each (lambda (file)
+                           (copy-file file (string-append out "/" (basename file ".pl"))))
+                         (find-files "../bin" "\\.pl$"))
+               #t))))))
+    (home-page "https://github.com/hashcat/hashcat-utils/")
+    (synopsis "Small utilities that are useful in advanced password cracking")
+    (description "Hashcat-utils are a set of small utilities that are useful
+in advanced password cracking.  They all are packed into multiple stand-alone
+binaries.  All of these utils are designed to execute only one specific
+function.  Since they all work with @code{STDIN} and @code{STDOUT} you can
+group them into chains.")
+    (license license:expat)))
-- 
2.18.0





Information forwarded to guix-patches <at> gnu.org:
bug#32332; Package guix-patches. (Tue, 31 Jul 2018 10:18:02 GMT) Full text and rfc822 format available.

Message #11 received at 32332 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <ambrevar <at> gmail.com>
To: 32332 <at> debbugs.gnu.org
Subject: [PATCH 4/4] gnu: Add hcxdumptool.
Date: Tue, 31 Jul 2018 12:17:23 +0200
* gnu/packages/networking.scm (hcxdumptool): New variable.
---
 gnu/packages/networking.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index c72c27137..7b4e8a896 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -2013,3 +2013,32 @@ Features:
        "This package contains a small set of tools to capture and convert
 packets from wireless devices for use with hashcat or John the Ripper.")
       (license license:expat))))
+
+(define-public hcxdumptool
+  (let* ((commit "f4799b5da82c5b030a6d99b02d1c1b9dc838ad36"))
+    (package
+      (name "hcxdumptool")
+      (version (git-version "0.0.0" "1" commit))
+      (home-page "https://github.com/ZerBea/hcxdumptool")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url home-page)
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "0qlsin0rws9sshn12faq4spmd0ffzssal36s71vhv6gkhhga7abl"))
+                (file-name (git-file-name name version))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:make-flags (list "CC=gcc"
+                            (string-append "INSTALLDIR=" (assoc-ref %outputs "out") "/bin"))
+         #:tests? #f                    ;no tests
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure))))
+      (synopsis "Capture wlan traffic to hashcat and John the Ripper")
+      (description
+       "This package contains a small set of tools to capture and convert
+packets from wireless devices for use with hashcat or John the Ripper.")
+      (license license:expat))))
-- 
2.18.0





Information forwarded to guix-patches <at> gnu.org:
bug#32332; Package guix-patches. (Tue, 31 Jul 2018 10:18:03 GMT) Full text and rfc822 format available.

Message #14 received at 32332 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <ambrevar <at> gmail.com>
To: 32332 <at> debbugs.gnu.org
Subject: [PATCH 3/4] gnu: Add hcxtools.
Date: Tue, 31 Jul 2018 12:17:22 +0200
* gnu/packages/networking.scm (hcxtools): New variable.
---
 gnu/packages/networking.scm | 48 +++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 90967b9b1..c72c27137 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -23,6 +23,7 @@
 ;;; Copyright © 2018 Tonton <tonton <at> riseup.net>
 ;;; Copyright © 2018 Clément Lassieur <clement <at> lassieur.org>
 ;;; Copyright © 2018 Theodoros Foradis <theodoros <at> foradis.org>
+;;; Copyright © 2018 Pierre Neidhardt <ambrevar <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1965,3 +1966,50 @@ Features:
 @item Destination IP blacklist
 @end itemize")
       (license license:asl2.0))))
+
+(define-public hcxtools
+  (let* ((commit "2ecfc9a06c2028c47522ea566ccd82b2c1f94647"))
+    (package
+      (name "hcxtools")
+      (version (git-version "0.0.0" "1" commit))
+      (home-page "https://github.com/ZerBea/hcxtools")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url home-page)
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "1hzwrpmxjxl674if0pp5iq06mdi24k7ni7bh1h20isp4s40201n3"))
+                (file-name (git-file-name name version))))
+      (build-system gnu-build-system)
+      (inputs
+       `(("curl" ,curl)
+         ("libpcap" ,libpcap)
+         ("openssl" ,openssl)
+         ("zlib" ,zlib)))
+      (arguments
+       `(#:make-flags (list "CC=gcc"
+                            (string-append "INSTALLDIR=" (assoc-ref %outputs "out") "/bin"))
+         #:tests? #f                    ;no tests
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (add-after 'unpack 'set-environment
+             (lambda* (#:key inputs #:allow-other-keys)
+               (setenv "C_INCLUDE_PATH"
+                     (string-append (assoc-ref inputs "curl")
+                                    "/include:"
+                                    (assoc-ref inputs "libpcap")
+                                    "/include:"
+                                    (assoc-ref inputs "openssl")
+                                    "/include:"
+                                    (assoc-ref inputs "zlib")
+                                    "/include:"
+                                    (getenv "C_INCLUDE_PATH")))
+             #t)))))
+      (synopsis "Capture wlan traffic to hashcat and John the Ripper")
+      (description
+       "This package contains a small set of tools to capture and convert
+packets from wireless devices for use with hashcat or John the Ripper.")
+      (license license:expat))))
-- 
2.18.0





Information forwarded to guix-patches <at> gnu.org:
bug#32332; Package guix-patches. (Tue, 31 Jul 2018 10:23:02 GMT) Full text and rfc822 format available.

Message #17 received at 32332 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <ambrevar <at> gmail.com>
To: 32332 <at> debbugs.gnu.org
Subject: Re: bug#32332: Acknowledgement ([PATCH 1/4] gnu: Add hashcat.)
Date: Tue, 31 Jul 2018 12:22:05 +0200
[Message part 1 (text/plain, inline)]
I've packaged hashcat, hashcat-utils and hcxtools.

I don't have access to OpenCL-compatible hardware at the moment, so I
can't really test hashcat.  Anyone?

Also I'm not so sure about hashcat-utils and hcxtools: the code quality
seems rather low at first glance.

hashcat-utils seems to be necessary, e.g. to convert pcap files to the
hccapx format used by hashcat.

aircrack-ng can used in stead of hcxtools.  See
https://hashcat.net/wiki/doku.php?id=cracking_wpawpa2.

While the hashcat community recommends hcxtools, I am under the
impression that aircrack-ng is a much more polished tool suite.

What do you think?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#32332; Package guix-patches. (Mon, 13 Aug 2018 15:01:02 GMT) Full text and rfc822 format available.

Message #20 received at 32332 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Pierre Neidhardt <ambrevar <at> gmail.com>
Cc: 32332 <at> debbugs.gnu.org
Subject: Re: [bug#32332] Acknowledgement ([PATCH 1/4] gnu: Add hashcat.)
Date: Mon, 13 Aug 2018 10:59:59 -0400
[Message part 1 (text/plain, inline)]
On Tue, Jul 31, 2018 at 12:22:05PM +0200, Pierre Neidhardt wrote:
> I've packaged hashcat, hashcat-utils and hcxtools.
> 
> I don't have access to OpenCL-compatible hardware at the moment, so I
> can't really test hashcat.  Anyone?
> 
> Also I'm not so sure about hashcat-utils and hcxtools: the code quality
> seems rather low at first glance.
> 
> hashcat-utils seems to be necessary, e.g. to convert pcap files to the
> hccapx format used by hashcat.
> 
> aircrack-ng can used in stead of hcxtools.  See
> https://hashcat.net/wiki/doku.php?id=cracking_wpawpa2.
> 
> While the hashcat community recommends hcxtools, I am under the
> impression that aircrack-ng is a much more polished tool suite.
> 
> What do you think?

I think it's up to your judgement. We package software with a wide
variety of quality. Unless there are known exploitable bugs in these
packages, I think we should go ahead and add the packages.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#32332; Package guix-patches. (Mon, 13 Aug 2018 15:02:01 GMT) Full text and rfc822 format available.

Message #23 received at 32332 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Pierre Neidhardt <ambrevar <at> gmail.com>
Cc: 32332 <at> debbugs.gnu.org
Subject: Re: [bug#32332] [PATCH 1/4] gnu: Add hashcat.
Date: Mon, 13 Aug 2018 11:01:35 -0400
[Message part 1 (text/plain, inline)]
On Tue, Jul 31, 2018 at 12:14:35PM +0200, Pierre Neidhardt wrote:
> * gnu/packages/password-utils.scm (hashcat): New variable.

Overall LGTM!

> +    (synopsis "Advanced password recovery utility")
> +    (description "Hashcat is an advanced password recovery utility, supporting
> +five unique modes of attack for over 200 highly-optimized hashing algorithms.
> +Hashcat currently supports CPUs, GPUs, and other hardware accelerators on
> +Linux, Windows, and macOS, and has facilities to help enable distributed
> +password cracking.")

We can drop the word "advanced" here. The documentation on Synopses and
Descriptions specifically requests that we omit "marketing phrases".
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#32332; Package guix-patches. (Mon, 13 Aug 2018 15:03:02 GMT) Full text and rfc822 format available.

Message #26 received at 32332 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Pierre Neidhardt <ambrevar <at> gmail.com>
Cc: 32332 <at> debbugs.gnu.org
Subject: Re: [bug#32332] [PATCH 4/4] gnu: Add hcxdumptool.
Date: Mon, 13 Aug 2018 11:02:56 -0400
[Message part 1 (text/plain, inline)]
On Tue, Jul 31, 2018 at 12:17:23PM +0200, Pierre Neidhardt wrote:
> * gnu/packages/networking.scm (hcxdumptool): New variable.

> +      (synopsis "Capture wlan traffic to hashcat and John the Ripper")
> +      (description
> +       "This package contains a small set of tools to capture and convert
> +packets from wireless devices for use with hashcat or John the Ripper.")

Is it correct that the packages in patches 3 and 4 have the same
descriptions?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#32332; Package guix-patches. (Mon, 13 Aug 2018 15:08:01 GMT) Full text and rfc822 format available.

Message #29 received at 32332 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <ambrevar <at> gmail.com>
To: Leo Famulari <leo <at> famulari.name>
Cc: 32332 <at> debbugs.gnu.org
Subject: Re: [bug#32332] [PATCH 4/4] gnu: Add hcxdumptool.
Date: Mon, 13 Aug 2018 17:07:12 +0200
[Message part 1 (text/plain, inline)]
Nope :p  Thanks for the catch.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#32332; Package guix-patches. (Tue, 14 Aug 2018 10:02:02 GMT) Full text and rfc822 format available.

Message #32 received at 32332 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <ambrevar <at> gmail.com>
To: Leo Famulari <leo <at> famulari.name>
Cc: 32332 <at> debbugs.gnu.org
Subject: Re: [bug#32332] [PATCH 4/4] gnu: Add hcxdumptool.
Date: Tue, 14 Aug 2018 12:00:58 +0200
[Message part 1 (text/plain, inline)]
Merged.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Reply sent to Pierre Neidhardt <ambrevar <at> gmail.com>:
You have taken responsibility. (Tue, 14 Aug 2018 10:03:02 GMT) Full text and rfc822 format available.

Notification sent to Pierre Neidhardt <ambrevar <at> gmail.com>:
bug acknowledged by developer. (Tue, 14 Aug 2018 10:03:02 GMT) Full text and rfc822 format available.

Message #37 received at 32332-done <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <ambrevar <at> gmail.com>
To: 32332-done <at> debbugs.gnu.org
Subject: [PATCH 1/4] gnu: Add hashcat.
Date: Tue, 14 Aug 2018 12:02:09 +0200
[Message part 1 (text/plain, inline)]
Merged.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 11 Sep 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 287 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.