Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel build failed #3060

Closed
olenese opened this issue Dec 15, 2021 · 16 comments
Closed

Kernel build failed #3060

olenese opened this issue Dec 15, 2021 · 16 comments
Labels

Comments

@olenese
Copy link

olenese commented Dec 15, 2021

Describe the bug
Hashcat on Intel MacBook pro 16 does not work when selecting to use GPU cracking with the -D flag.

To Reproduce
Please provide us with all files required to reproduce the bug locally on our development systems. For instance: hash files, wordlists, rule files, ...

Expected behavior
A clear and concise description of what you expected to happen.

Hardware/Compute device (please complete the following information):

  • Compute device name: MacBook Pro 16, AMD Radeon Pro 5300M
  • OpenCL/CUDA driver name: OpenCL
  • OpenCL/CUDA driver version: 1.2
  • OpenCL/CUDA driver source: Apple

Hashcat version (please complete the following information):

  • OS: MacOS
  • Distribution: Monterey 12.1
  • Version: v6.2.5-34-gbf865d8bf

Diagnostic output compute devices:

hashcat (v6.2.5-34-gbf865d8bf) starting in backend information mode

OpenCL Info:
============

OpenCL Platform ID #1
  Vendor..: Apple
  Name....: Apple
  Version.: OpenCL 1.2 (Nov 13 2021 00:45:09)

  Backend Device ID #1
    Type...........: CPU
    Vendor.ID......: 8
    Vendor.........: Intel
    Name...........: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Version........: OpenCL 1.2 
    Processor(s)...: 12
    Clock..........: 2600
    Memory.Total...: 16384 MB (limited to 2048 MB allocatable in one block)
    Memory.Free....: 8160 MB
    OpenCL.Version.: OpenCL C 1.2 
    Driver.Version.: 1.1

  Backend Device ID #2
    Type...........: GPU
    Vendor.ID......: 8
    Vendor.........: Intel Inc.
    Name...........: Intel(R) UHD Graphics 630
    Version........: OpenCL 1.2 
    Processor(s)...: 24
    Clock..........: 1150
    Memory.Total...: 1536 MB (limited to 192 MB allocatable in one block)
    Memory.Free....: 704 MB
    OpenCL.Version.: OpenCL C 1.2 
    Driver.Version.: 1.2(Nov 30 2021 21:37:31)

  Backend Device ID #3
    Type...........: GPU
    Vendor.ID......: 1
    Vendor.........: AMD
    Name...........: AMD Radeon Pro 5300M Compute Engine
    Version........: OpenCL 1.2 
    Processor(s)...: 20
    Clock..........: 95
    Memory.Total...: 4080 MB (limited to 1020 MB allocatable in one block)
    Memory.Free....: 3968 MB
    OpenCL.Version.: OpenCL C 1.2 
    Driver.Version.: 1.2 (Nov 30 2021 21:38:00)




**Additional context**
User@MacBook-Pro-2 hashcat % hashcat -b -O --force -D 2 -O       
hashcat (v6.2.5-34-gbf865d8bf) starting in benchmark mode

Benchmarking uses hand-optimized kernel code by default.
You can use it in your cracking session by setting the -O option.
Note: Using optimized kernel code limits the maximum supported password length.
To disable the optimized kernel code in benchmark mode, use the -w option.

You have enabled --force to bypass dangerous warnings and errors!
This can hide serious problems and should only be done when debugging.
Do not report hashcat issues encountered when using --force.

* Device #2: Apple's OpenCL drivers (GPU) are known to be unreliable.
             You have been warned.

* Device #3: Apple's OpenCL drivers (GPU) are known to be unreliable.
             You have been warned.

OpenCL API (OpenCL 1.2 (Nov 13 2021 00:45:09)) - Platform #1 [Apple]
====================================================================
* Device #1: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, skipped
* Device #2: Intel(R) UHD Graphics 630, 704/1536 MB (192 MB allocatable), 24MCU
* Device #3: AMD Radeon Pro 5300M Compute Engine, 3968/4080 MB (1020 MB allocatable), 20MCU

Benchmark relevant options:
===========================
* --force
* --opencl-device-types=2
* --optimized-kernel-enable

-------------------
* Hash-Mode 0 (MD5)
-------------------

/Users/User/.cache/hashcat/kernels/shared.776e71fc.kernel: No such file or directory

* Device #2: Kernel /usr/local/share/hashcat/OpenCL/shared.cl build failed.

Started: Wed Dec 15 15:44:33 2021
Stopped: Wed Dec 15 15:44:34 2021
@olenese olenese added the bug label Dec 15, 2021
@Chick3nman
Copy link
Contributor

This issue appears to be related to homebrew and the build included with it. Please build from source and it will resolve this issue. Further, Do not report hashcat issues encountered when using --force.

@olenese
Copy link
Author

olenese commented Dec 15, 2021

This issue appears to be related to homebrew and the build included with it. Please build from source and it will resolve this issue. Further, Do not report hashcat issues encountered when using --force.

Cloned from this repo at 14:42 CET, did not use homebrew...

hashcat (v6.2.5-34-gbf865d8bf) starting in backend information mode

@olenese
Copy link
Author

olenese commented Dec 15, 2021

Fully removed the cloned repo, installed it again and still same issue

@Chick3nman
Copy link
Contributor

Hmm, if that's the case then this may be a different problem. Can you provide details and any output from hashcat without throwing --force?

@olenese
Copy link
Author

olenese commented Dec 15, 2021

User@MacBook-Pro-2 hashcat % hashcat -a 0 -m 0 a6da3c93420362e729d2395b0022b8ef -D 2
hashcat (v6.2.5-34-gbf865d8bf) starting

OpenCL API (OpenCL 1.2 (Nov 13 2021 00:45:09)) - Platform #1 [Apple]

Minimum password length supported by kernel: 0
Maximum password length supported by kernel: 256

Hashes: 1 digests; 1 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
Rules: 1

Optimizers applied:

  • Zero-Byte
  • Early-Skip
  • Not-Salted
  • Not-Iterated
  • Single-Hash
  • 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.

/Users/User/.cache/hashcat/kernels/shared.ecea0c34.kernel: No such file or directory

Started: Wed Dec 15 20:40:00 2021
Stopped: Wed Dec 15 20:40:02 2021

It also seem like i cant choose -D 3, is this a device grouping issue?

@Chick3nman
Copy link
Contributor

Use -d 3, not -D 3. Lowercase selects devices, uppercase selects device type.

@jsteube
Copy link
Member

jsteube commented Dec 15, 2021

Side Note: While -d and -D are pretty clear to me, a lot of people seem to struggle with it. We could consider renaming -D to something else.

@Chick3nman
Copy link
Contributor

@jsteube I agree, lets discuss that elsewhere and see if it makes sense to change.

@olenese
Copy link
Author

olenese commented Dec 15, 2021

Use -d 3, not -D 3. Lowercase selects devices, uppercase selects device type.

Tried this but still the same:
User@MacBook-Pro-2 hashcat % hashcat -a 0 -m 0 a6da3c93420362e729d2395b0022b8ef -d 3
hashcat (v6.2.5-34-gbf865d8bf) starting

No devices found/left.

Started: Wed Dec 15 22:07:57 2021
Stopped: Wed Dec 15 22:07:57 2021

Not sure if this problem is linked however so it might be more fitting in another issue?

@Chick3nman
Copy link
Contributor

You have a somewhat special case where you need both -D 2 and -d 3 to select a single GPU because of the instability of the Mac runtime and the way hashcat tries to deal with it by default.

@olenese
Copy link
Author

olenese commented Dec 15, 2021

The -D 2 -d 3 did work with selecting the right GPU, thanks!

The main issue however is still present. Would you like me to add a new issue as this one is closed, or are you able to look at it from here?

User@MacBook-Pro-2 hashcat % hashcat -a 0 -m 0 a6da3c93420362e729d2395b0022b8ef -D 2 -d 3
hashcat (v6.2.5-34-gbf865d8bf) starting

OpenCL API (OpenCL 1.2 (Nov 13 2021 00:45:09)) - Platform #1 [Apple]

Minimum password length supported by kernel: 0
Maximum password length supported by kernel: 256

Hashes: 1 digests; 1 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
Rules: 1

Optimizers applied:

  • Zero-Byte
  • Early-Skip
  • Not-Salted
  • Not-Iterated
  • Single-Hash
  • 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.

/Users/User/.cache/hashcat/kernels/shared.e70049c7.kernel: No such file or directory

Started: Thu Dec 16 00:15:50 2021
Stopped: Thu Dec 16 00:15:53 2021

@steveross1975
Copy link

Hi,

I have the same problem here. My command is:

sudo hashcat -m 22000 -d 2 ../../../Downloads/24392_1647849732.hccap ../../../Downloads/xiaomi.txt

and what I get is:

hashcat (v6.2.5-344-g881d336a7) starting

METAL API (Metal 212.8)
=======================
* Device #1: NVIDIA GeForce GT 750M, skipped

OpenCL API (OpenCL 1.2 (Aug 11 2021 00:46:43)) - Platform #1 [Apple]
====================================================================
* Device #2: Intel(R) Core(TM) i7-4770S CPU @ 3.10GHz, 4064/8192 MB (1024 MB allocatable), 8MCU
* Device #3: GeForce GT 750M, skipped

Minimum password length supported by kernel: 8
Maximum password length supported by kernel: 63

Hashes: 1 digests; 1 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
Rules: 1

Optimizers applied:
* Zero-Byte
* Single-Hash
* Single-Salt
* Slow-Hash-SIMD-LOOP

Watchdog: Temperature abort trigger set to 100c

clCompileProgram(): CL_BUILD_PROGRAM_FAILURE


* Device #2: Kernel /usr/local/share/hashcat/OpenCL/shared.cl build failed.

Started: Mon Mar 21 09:50:46 2022
Stopped: Mon Mar 21 09:50:46 2022

I've cloned hashcat from git and manually installed.

Any hint why do I get the build failed error?

As a side note: it apparently uses my CPU and not my GPU and this happens even when forcing -d 3 option.

@Gor1kGor1k
Copy link

Same problem

(base) polzovatel@MBP-Polzovatel OpenCL % hashcat -b -D 1,2
hashcat (v6.2.5-634-g5fa08a798) starting in benchmark mode

Benchmarking uses hand-optimized kernel code by default.
You can use it in your cracking session by setting the -O option.
Note: Using optimized kernel code limits the maximum supported password length.
To disable the optimized kernel code in benchmark mode, use the -w option.

METAL API (Metal 263.8)

OpenCL API (OpenCL 1.2 (Apr 19 2022 18:44:25)) - Platform #1 [Apple]

Benchmark relevant options:

  • --opencl-device-types=1,2
  • --optimized-kernel-enable

  • Hash-Mode 0 (MD5)

/Users/polzovatel/.cache/hashcat/kernels/shared.27bc589e.kernel: No such file or directory

@FaxWeb7
Copy link

FaxWeb7 commented Apr 2, 2023

Hi, i have a problem here. My command is:

./hashcat -m 2500 -a 3 /var/tmp/myiphonecrack.hccapx "?d?d?d?d?d?d?d?d?d"

And what i get:

hashcat (v6.1.1) starting...

OpenCL API (OpenCL 1.2 (Jun 17 2022 18:58:24)) - Platform #1 [Apple]
====================================================================
* Device #1: Apple M2, 5397/5461 MB (1024 MB allocatable), 8MCU

Minimum password length supported by kernel: 8
Maximum password length supported by kernel: 63

Hashes: 2 digests; 1 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates

Applicable optimizers applied:
* Zero-Byte
* Single-Hash
* Single-Salt
* Brute-Force
* Slow-Hash-SIMD-LOOP

Watchdog: Hardware monitoring interface not found on your system.
Watchdog: Temperature abort trigger disabled.

Initializing backend runtime for device #1...UNSUPPORTED (log once): buildComputeProgram: cl2Metal failed
clBuildProgram(): CL_BUILD_PROGRAM_FAILURE

* Device #1: Kernel /Users/artem/hashcat-6.1.1/OpenCL/shared.cl build failed.

Started: Sun Apr  2 14:27:28 2023
Stopped: Sun Apr  2 14:27:28 2023

@uncreat
Copy link

uncreat commented Apr 4, 2023

i get the same. with just an exmaple one

hashcat -m 1000 -a 0 /Users/base/Desktop/NTLM.txt /Users/base/Downloads/rockyou.txt

hashcat (v6.2.6) starting

METAL API (Metal 306.5.16)

OpenCL API (OpenCL 1.2 (Mar 4 2023 12:44:59)) - Platform #1 [Apple]

Minimum password length supported by kernel: 0
Maximum password length supported by kernel: 256

Hashes: 1 digests; 1 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
Rules: 1

Optimizers applied:

  • Zero-Byte
  • Early-Skip
  • Not-Salted
  • Not-Iterated
  • Single-Hash
  • 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: Temperature abort trigger set to 100c

/Users/base/.cache/hashcat/kernels/shared.833f28d0.kernel: No such file or directory

@Fel1ksPro
Copy link

ashcat -a 0 -m 0 hash.txt passwords.txt
hashcat (v6.2.6-806-gbf04a158a) starting

OpenCL API (OpenCL 3.0 PoCL 4.0+debian Linux, None+Asserts, RELOC, SPIR, LLVM 15.0.7, SLEEF, DISTRO, POCL_DEBUG) - Platform #1 [The pocl project]

  • Device ERROR: cuMemsetD8() 1 #1: cpu-penryn-Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz, 704/1473 MB (256 MB allocatable), 2MCU

Minimum password length supported by kernel: 0
Maximum password length supported by kernel: 256

Hashes: 7378 digests; 7378 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
Rules: 1

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: Temperature abort trigger set to 90c

Initializing backend runtime for device #1. Please be patient...383 errors generated.
clCompileProgram(): CL_COMPILE_PROGRAM_FAILURE

Device #1: Kernel /usr/local/share/hashcat/OpenCL/shared.cl build failed.

Started: Wed Oct 18 08:29:25 2023
Stopped: Wed Oct 18 08:29:26 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants