Opened 13 months ago
Closed 4 months ago
#68483 closed defect (fixed)
hashcat @6.2.5_0: "No devices found/left" message on Apple M1 Max chip
Reported by: | JDLH (Jim DeLaHunt) | Owned by: | gaming-hacker (G Alexander) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Cc: | ||
Port: | hashcat |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
hashcat is a tool designed to run on GPUs, not CPUs. It has a range of code to detect available GPUs. It appears to be unable to use the GPU of the Apple M1 Max chip on my mac.
To reproduce: Perform any crack attempt, e.g. the one described in their example0.sh:
% hashcat -m 0 -t 32 -a 7 /opt/local/share/doc/hashcat/example0.hash '?a?a?a?a' /opt/local/share/doc/hashcat/example.dict
Observed behaviour:
% hashcat -m 0 -t 32 -a 7 /opt/local/share/doc/hashcat/example0.hash '?a?a?a?a' /opt/local/share/doc/hashcat/example.dict hashcat (v6.2.5) starting No devices found/left. Started: Sun Oct 15 18:21:43 2023 Stopped: Sun Oct 15 18:21:43 2023
The message "No devices found/left" seems to say that hashcat was unable to find the M1 Max GPU, so gave up.
Expected behaviour: No error message, "No devices found/left".
Hashcat successfully cracks the example password.
Discussion:
My Mac is a MacBookPro18,2, with an Apple M1 Max chip having 10 cores (8 performance and 2 efficiency). This is what Hashcat detects for my GPUs:
% hashcat -I hashcat (v6.2.5) starting in backend information mode OpenCL Info: ============ OpenCL Platform ID #1 Vendor..: Apple Name....: Apple Version.: OpenCL 1.2 (Aug 17 2023 05:46:52) Backend Device ID #1 Type...........: GPU Vendor.ID......: 2 Vendor.........: Apple Name...........: Apple M1 Max Version........: OpenCL 1.2 Processor(s)...: 32 Clock..........: 1000 Memory.Total...: 49152 MB (limited to 4608 MB allocatable in one block) Memory.Free....: 24512 MB OpenCL.Version.: OpenCL C 1.2 Driver.Version.: 1.2 1.0
The -D 2
option apparently forces hashcat to choose a GPU over a CPU to use for its work. When I include that option, I get a runtime error:
% hashcat -D 2 -m 0 -t 32 -a 7 /opt/local/share/doc/hashcat/example0.hash '?a?a?a?a' /opt/local/share/doc/hashcat/example.dict hashcat (v6.2.5) starting * Device #1: Apple's OpenCL drivers (GPU) are known to be unreliable. You have been warned. OpenCL API (OpenCL 1.2 (Aug 17 2023 05:46:52)) - Platform #1 [Apple] ==================================================================== * Device #1: Apple M1 Max, 24512/49152 MB (4608 MB allocatable), 32MCU Minimum password length supported by kernel: 0 Maximum password length supported by kernel: 256 Dictionary cache built: * Filename..: /opt/local/share/doc/hashcat/example.dict * Passwords.: 128416 * Bytes.....: 1069601 * Keyspace..: 128416 * Runtime...: 0 secs Hashes: 6494 digests; 6494 unique digests, 1 unique salts Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates Optimizers applied: * Zero-Byte * Early-Skip * Not-Salted * Not-Iterated * Single-Salt * Raw-Hash ATTENTION! Pure (unoptimized) backend kernels selected. Pure kernels can crack longer passwords, but drastically reduce performance. If you want to switch to optimized kernels, append -O to your commandline. See the above message to find out about the exact limits. Watchdog: Hardware monitoring interface not found on your system. Watchdog: Temperature abort trigger disabled. Initializing backend runtime for device #1. Please be patient...UNSUPPORTED (log once): buildComputeProgram: cl2Metal failed clBuildProgram(): CL_BUILD_PROGRAM_FAILURE Compilation failed: program_source:7:10: fatal error: 'inc_vendor.h' file not found #include "inc_vendor.h" ^~~~~~~~~~~~~~ * Device #1: Kernel /opt/local/share/hashcat/OpenCL/shared.cl build failed. Started: Sun Oct 15 18:30:21 2023 Stopped: Sun Oct 15 18:30:25 2023
Adding the -O
option does not change the end result: failure, with the same message.
The Hashcat project's installation FAQ mentions Windows and Linux, but not macOS. It mentions OpenCL, AMD, and nVidia, but not Apple or Apple's Metal framework. Their Supported GPUs FAQ similarly does not mention Apple or Apple Silicon or M1. It is interesting that the error message does mention "metal", however.
Change History (4)
comment:1 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|
comment:2 Changed 10 months ago by grr
Apparently this was resolved upstream in the 6.2.6 release: https://github.com/hashcat/hashcat/issues/3032
comment:3 Changed 10 months ago by JDLH (Jim DeLaHunt)
Thank you for noticing the new version, @grr ! Requested a port update in #69011.
comment:4 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
MacPorts distributes software made by other developers; we don't develop that software. If you want hashcat to support Apple Silicon GPUs, file a bug report / enhancement request with its developers.