Skip to content

Instantly share code, notes, and snippets.

@chadmayfield
Created June 2, 2017 17:24
Show Gist options
  • Save chadmayfield/600b211e9c309859f2bfb5dddc5de09c to your computer and use it in GitHub Desktop.
Save chadmayfield/600b211e9c309859f2bfb5dddc5de09c to your computer and use it in GitHub Desktop.
Install Hashcat on macOS
#!/bin/bash
git clone https://github.com/hashcat/hashcat.git
mkdir -p hashcat/deps
git clone https://github.com/KhronosGroup/OpenCL-Headers.git hashcat/deps/OpenCL
cd hashcat/ && make
./hashcat --version
./hashcat -b -D 1,2
./example0.sh
@xinyoDeputy
Copy link

you might need make install

@Raks-coder
Copy link

Raks-coder commented Jan 14, 2019

Its not working now please help, it says stdio.h not found in affinity file

@agoston
Copy link

agoston commented Jan 21, 2019

Confirmed working for 5.1 just now, thanks!

@EvilDonkey420
Copy link

yep works great thnx def need sudo make install

@Raks-coder
Copy link

include/types.h:11:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
make: *** [src/Makefile:469: obj/bitops.NATIVE.SHARED.o] Error 1

I am getting this error, please help

@Raks-coder
Copy link

Confirmed working for 5.1 just now, thanks!

Can you please help me with the error

@Flaviusns
Copy link

Confirmed working for 5.1 just now, thanks!

Can you please help me with the error

Try xcode-select --install.

Check this for more info.

@Raks-coder
Copy link

Surprisingly, it didn't work :(

@rhcp011235
Copy link

did not work on Mojave.

ld: warning: ignoring file obj/combined.NATIVE.a, file was built for archive which is not the architecture being linked (x86_64): obj/combined.NATIVE.a ld: warning: ignoring file obj/combined.NATIVE.a, file was built for archive which is not the architecture being linked (x86_64): obj/combined.NATIVE.a ld: warning: ignoring file obj/combined.NATIVE.a, file was built for archive which is not the architecture being linked (x86_64): obj/combined.NATIVE.a ld: warning: ignoring file obj/combined.NATIVE.a, file was built for archive which is not the architecture being linked (x86_64): obj/combined.NATIVE.a ld: warning: ignoring file obj/combined.NATIVE.a, file was built for archive which is not the architecture being linked (x86_64): obj/combined.NATIVE.a ld: warning: ignoring file obj/combined.NATIVE.a, file was built for archive which is not the architecture being linked (x86_64): obj/combined.NATIVE.a Undefined symbols for architecture x86_64: "_hex_to_u32", referenced from: _module_hash_decode in module_00000-fa8109.o "_input_tokenizer", referenced from: _module_hash_decode in module_00000-fa8109.o "_u32_to_hex", referenced from: _module_hash_encode in module_00000-fa8109.o ld: symbol(s) not found for architecture x86_64

@shell3000
Copy link

Works with El Capitan, but not with HighSierra ...

@shell3000
Copy link

Works also in Sierra, but not in Mojave ...
In Summary: 10.11 ✅ 10.12 ✅ 10.13 ❌ 10.14 ❌

@JamPlayz
Copy link

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.

OpenCL Platform #1: Apple

  • Device #1: Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz, 1024/4096 MB allocatable, 4MCU
  • Device #2: HD Graphics 5000, 384/1536 MB allocatable, 40MCU

Benchmark relevant options:

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

Hashmode: 0 - MD5

Speed.#1.........: 73295.5 kH/s (56.85ms) @ Accel:1024 Loops:1024 Thr:1 Vec:4
Speed.#2.........: 212.4 MH/s (96.31ms) @ Accel:256 Loops:128 Thr:16 Vec:1
Speed.#*.........: 285.7 MH/s

Hashmode: 100 - SHA1

Speed.#1.........: 32115.1 kH/s (64.99ms) @ Accel:1024 Loops:512 Thr:1 Vec:4
Speed.#2.........: 69165.6 kH/s (148.39ms) @ Accel:256 Loops:128 Thr:8 Vec:1
Speed.#*.........: 101.3 MH/s

Hashmode: 1400 - SHA2-256

Speed.#1.........: 11977.6 kH/s (87.25ms) @ Accel:1024 Loops:256 Thr:1 Vec:4
Speed.#2.........: 29644.2 kH/s (87.15ms) @ Accel:128 Loops:32 Thr:16 Vec:1
Speed.#*.........: 41621.8 kH/s

Hashmode: 1700 - SHA2-512

Speed.#1.........: 3166.8 kH/s (82.49ms) @ Accel:512 Loops:128 Thr:1 Vec:2
Speed.#2.........: 8414.9 kH/s (75.49ms) @ Accel:64 Loops:32 Thr:8 Vec:1
Speed.#*.........: 11581.8 kH/s

Hashmode: 2500 - WPA-EAPOL-PBKDF2 (Iterations: 4095)

Speed.#1.........: 1436 H/s (88.30ms) @ Accel:512 Loops:256 Thr:1 Vec:4
Speed.#2.........: 4069 H/s (75.42ms) @ Accel:64 Loops:32 Thr:16 Vec:1
Speed.#*.........: 5505 H/s

Hashmode: 1000 - NTLM

Speed.#1.........: 142.1 MH/s (29.22ms) @ Accel:1024 Loops:1024 Thr:1 Vec:4
Speed.#2.........: 363.6 MH/s (111.37ms) @ Accel:512 Loops:128 Thr:16 Vec:1
Speed.#*.........: 505.7 MH/s

Hashmode: 3000 - LM

Speed.#1.........: 22319.2 kH/s (93.14ms) @ Accel:512 Loops:1024 Thr:1 Vec:4
Speed.#2.........: 66640.8 kH/s (74.79ms) @ Accel:16 Loops:1024 Thr:8 Vec:1
Speed.#*.........: 88960.0 kH/s

Hashmode: 5500 - NetNTLMv1 / NetNTLMv1+ESS

Speed.#1.........: 80076.3 kH/s (52.07ms) @ Accel:1024 Loops:1024 Thr:1 Vec:4
Speed.#2.........: 130.9 MH/s (74.21ms) @ Accel:256 Loops:64 Thr:16 Vec:1
Speed.#*.........: 210.9 MH/s

Hashmode: 5600 - NetNTLMv2

Speed.#1.........: 4515.6 kH/s (115.77ms) @ Accel:512 Loops:256 Thr:1 Vec:4
Speed.#2.........: 10480.8 kH/s (113.45ms) @ Accel:64 Loops:32 Thr:16 Vec:1
Speed.#*.........: 14996.3 kH/s

Hashmode: 1500 - descrypt, DES (Unix), Traditional DES

Speed.#1.........: 914.0 kH/s (70.91ms) @ Accel:16 Loops:1024 Thr:1 Vec:4
Speed.#2.........: 2956.3 kH/s (108.03ms) @ Accel:1 Loops:1024 Thr:8 Vec:1
Speed.#*.........: 3870.4 kH/s

Hashmode: 500 - md5crypt, MD5 (Unix), Cisco-IOS $1$ (MD5) (Iterations: 1000)

Speed.#1.........: 12469 H/s (81.13ms) @ Accel:512 Loops:500 Thr:1 Vec:4
Speed.#2.........: 141.8 kH/s (70.89ms) @ Accel:256 Loops:125 Thr:8 Vec:1
Speed.#*.........: 154.2 kH/s

Hashmode: 3200 - bcrypt $2*$, Blowfish (Unix) (Iterations: 32)

clEnqueueNDRangeKernel(): CL_INVALID_WORK_GROUP_SIZE

clEnqueueNDRangeKernel(): CL_INVALID_WORK_GROUP_SIZE

clEnqueueNDRangeKernel(): CL_INVALID_WORK_GROUP_SIZE

clEnqueueNDRangeKernel(): CL_INVALID_WORK_GROUP_SIZE

clEnqueueNDRangeKernel(): CL_INVALID_WORK_GROUP_SIZE

clEnqueueNDRangeKernel(): CL_INVALID_WORK_GROUP_SIZE

clEnqueueNDRangeKernel(): CL_INVALID_WORK_GROUP_SIZE

clEnqueueNDRangeKernel(): CL_INVALID_WORK_GROUP_SIZE

clEnqueueNDRangeKernel(): CL_INVALID_WORK_GROUP_SIZE

clEnqueueNDRangeKernel(): CL_INVALID_WORK_GROUP_SIZE

clEnqueueNDRangeKernel(): CL_INVALID_WORK_GROUP_SIZE

clEnqueueNDRangeKernel(): CL_INVALID_WORK_GROUP_SIZE

clEnqueueNDRangeKernel(): CL_INVALID_WORK_GROUP_SIZE

Speed.#1.........: 893 H/s (69.57ms) @ Accel:32 Loops:16 Thr:1 Vec:4
Speed.#2.........: 0 H/s (0.00ms) @ Accel:256 Loops:125 Thr:8 Vec:1
Speed.#*.........: 893 H/s

Hashmode: 1800 - sha512crypt $6$, SHA512 (Unix) (Iterations: 5000)

Speed.#1.........: 402 H/s (63.00ms) @ Accel:256 Loops:128 Thr:1 Vec:2
Speed.#2.........: 1903 H/s (65.79ms) @ Accel:64 Loops:32 Thr:8 Vec:1
Speed.#*.........: 2304 H/s

Hashmode: 7500 - Kerberos 5, etype 23, AS-REQ Pre-Auth

Speed.#1.........: 1246.1 kH/s (52.34ms) @ Accel:32 Loops:8 Thr:64 Vec:4
Speed.#2.........: 3849.6 kH/s (83.62ms) @ Accel:16 Loops:8 Thr:64 Vec:1
Speed.#*.........: 5095.7 kH/s

Hashmode: 13100 - Kerberos 5, etype 23, TGS-REP

Speed.#1.........: 1035.6 kH/s (63.05ms) @ Accel:32 Loops:8 Thr:64 Vec:4
Speed.#2.........: 4162.5 kH/s (77.20ms) @ Accel:16 Loops:8 Thr:64 Vec:1
Speed.#*.........: 5198.1 kH/s

Hashmode: 15300 - DPAPI masterkey file v1 (Iterations: 23999)

Speed.#1.........: 312 H/s (69.73ms) @ Accel:512 Loops:256 Thr:1 Vec:4
Speed.#2.........: 827 H/s (65.35ms) @ Accel:64 Loops:32 Thr:16 Vec:1
Speed.#*.........: 1139 H/s

Hashmode: 15900 - DPAPI masterkey file v2 (Iterations: 12899)

Speed.#1.........: 133 H/s (76.27ms) @ Accel:256 Loops:128 Thr:1 Vec:2
Speed.#2.........: 323 H/s (77.16ms) @ Accel:64 Loops:16 Thr:8 Vec:1
Speed.#*.........: 455 H/s

Hashmode: 7100 - macOS v10.8+ (PBKDF2-SHA512) (Iterations: 1023)

Is this looking good been waiting for awhile. Thanks for any help.

@Tolsi
Copy link

Tolsi commented Jan 11, 2020

It works on 10.15.2

@Wilker
Copy link

Wilker commented Feb 22, 2020

Works on 10.13.6

@mahlerware
Copy link

Confirmed working on 10.15.3 (Catalina). The script runs as intended. No need for sudo make install or make install.

@z3ndrag0n
Copy link

The reason for the sudo make install is to be found in hashcat/hashcat#2270 (comment)

@ahdkhalid
Copy link

worked on Catalina 10.15. thanks

@spuzzelsnest
Copy link

spuzzelsnest commented Jan 19, 2021

With MacBook Pro (16-inch, 2019) Catalina issue with m03000_a3-pure.cl when running benchmark

./hashcat -b -D 1,2
...
Hashmode: 3000 - LM

clBuildProgram(): CL_BUILD_PROGRAM_FAILURE

CVMS_ERROR_SERVICE_FAILURE: CVMS compiler has crashed or hung managing the service.
* Device #1: Kernel /opt/hashcat/OpenCL/m03000_a3-pure.cl build failed.

My best guess is that OpenCL is now deprecated on MBP and GPU cracking natively will no longer work.

@dianazz52
Copy link

Same here! I've also got issues with m03000_a3-pure.cl with 16-inch Macbook Pro 2019.
How should I still use hashcat? Any suggestions?

@Hanouf
Copy link

Hanouf commented Feb 20, 2021

I have macOS Big Sur Version 11.1 on MacBook Pro 2017.

"Hashmode: 3000 - LM

clBuildProgram(): CL_BUILD_PROGRAM_FAILURE

CVMS_ERROR_SERVICE_FAILURE: CVMS compiler has crashed or hung managing the service.

  • Device #1: Kernel /Users/hanouf/hashcat/OpenCL/m03000_a3-pure.cl build failed."

MD5 works fine. Is this error gonna affect my work on MD5 and SHA1, any ideas?

@InfinityGrip
Copy link

Screen Shot 2021-08-02 at 10 33 52 PM

I am also getting the same error, how do I fix it?

@BlrFox
Copy link

BlrFox commented Nov 23, 2021

Yeah just saying OpenCL by itself wouldn't run, so if it won't work neither will hashcat. :/ :-1:

LifeGoesOn.mp4

@EpicTMC
Copy link

EpicTMC commented Jun 19, 2022

works fine macosx 12.4

git clone https://github.com/hashcat/hashcat.git
mkdir -p hashcat/deps
git clone https://github.com/KhronosGroup/OpenCL-Headers.git hashcat/deps/OpenCL
cd hashcat/ && make
./hashcat --version
./hashcat -b -D 1,2
./hashcat -m 22000 /Users/USER/Downloads/hash.hc22000 /Volumes/BigDics/PasswordFiles/SecLists-master/Passwords/Leaked-Databases/rockyou.txt

image

@asylla117
Copy link

This worked on my macosx 12.2. Thanks!

works fine macosx 12.4

git clone https://github.com/hashcat/hashcat.git mkdir -p hashcat/deps git clone https://github.com/KhronosGroup/OpenCL-Headers.git hashcat/deps/OpenCL cd hashcat/ && make ./hashcat --version ./hashcat -b -D 1,2 ./hashcat -m 22000 /Users/USER/Downloads/hash.hc22000 /Volumes/BigDics/PasswordFiles/SecLists-master/Passwords/Leaked-Databases/rockyou.txt

image

@nitatemic
Copy link

works fine macosx 12.4

git clone https://github.com/hashcat/hashcat.git mkdir -p hashcat/deps git clone https://github.com/KhronosGroup/OpenCL-Headers.git hashcat/deps/OpenCL cd hashcat/ && make ./hashcat --version ./hashcat -b -D 1,2 ./hashcat -m 22000 /Users/USER/Downloads/hash.hc22000 /Volumes/BigDics/PasswordFiles/SecLists-master/Passwords/Leaked-Databases/rockyou.txt

image

That work on 12.5.1. Thank you

@jedai47
Copy link

jedai47 commented Oct 6, 2022

On mac os Catalina 10.15.7 :
On all of the benchmarks
clCompileProgram(): CL_BUILD_PROGRAM_FAILURE

CVMS_ERROR_INVALID_CONNECTION: Invalid connection given.

  • Device #2: Kernel /Users/macpro/hashcat/OpenCL/shared.cl build failed.

@Adam29610jj
Copy link

do I need Xcode?

@arifkyi
Copy link

arifkyi commented Dec 4, 2023

which one better to install, using the git clone etc or using brew for mac for this hashcat ?

@angiemer
Copy link

how can I uninstall it?
I managed to run all the commands except the last one an the one previous had errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment