March 17, 2020, 10:34 p.m.

Hashcat with AMD CPU

I am trying to use hashcat in my HP Thin Client T610. I can’t install the AMD Crimson driver for Windows 10, and the ROCm for GNU/Linux, this means that I cannot use the GPU part. I can still use the CPU for cracking hashes but hashcat complains about MESA:

[user@hp_t610 ~]$ hashcat -I
hashcat (v5.1.0) starting...

Mesa (Gallium) OpenCL platform detected!

The Mesa platform can cause errors that are often mistaken for bugs in hashcat.
You are STRONGLY encouraged to use the drivers listed in docs/readme.txt.
You can use --force to override this, but do not report related errors.
You can also use --opencl-platforms to skip the Mesa platform(s).

We just need to remove the package mesa-opencl-icd from our Debian Installation.

$ sudo apt remove mesa-opencl-icd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libclang-common-7-dev libclc-amdgcn libclc-dev libclc-r600
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  binfmt-support clang-6.0 libclang-common-6.0-dev libobjc-8-dev libomp-7-dev libomp-dev libomp5-7 libpocl2 libpocl2-common
  llvm-6.0 llvm-6.0-dev llvm-6.0-runtime pocl-opencl-icd
Suggested packages:
  gnustep gnustep-devel clang-6.0-doc libomp-7-doc llvm-6.0-doc
The following packages will be REMOVED:
  mesa-opencl-icd
The following NEW packages will be installed:
  binfmt-support clang-6.0 libclang-common-6.0-dev libobjc-8-dev libomp-7-dev libomp-dev libomp5-7 libpocl2 libpocl2-common
  llvm-6.0 llvm-6.0-dev llvm-6.0-runtime pocl-opencl-icd
0 upgraded, 13 newly installed, 1 to remove and 0 not upgraded.
Need to get 57.4 MB/57.6 MB of archives.
After this operation, 319 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://httpredir.debian.org/debian buster/main amd64 libclang-common-6.0-dev amd64 1:6.0.1-10 [3,024 kB]
Get:2 http://httpredir.debian.org/debian buster/main amd64 clang-6.0 amd64 1:6.0.1-10 [9,150 kB]
Get:3 http://httpredir.debian.org/debian buster/main amd64 libpocl2 amd64 1.2-5 [16.6 MB]
Get:4 http://httpredir.debian.org/debian buster/main amd64 pocl-opencl-icd amd64 1.2-5 [18.2 kB]                                    
Get:5 http://httpredir.debian.org/debian buster/main amd64 binfmt-support amd64 2.2.0-2 [70.0 kB]                                   
Get:6 http://httpredir.debian.org/debian buster/main amd64 libomp5-7 amd64 1:7.0.1-8 [319 kB]                                       
Get:7 http://httpredir.debian.org/debian buster/main amd64 libomp-7-dev amd64 1:7.0.1-8 [57.6 kB]                                   
Get:8 http://httpredir.debian.org/debian buster/main amd64 libomp-dev amd64 1:7.0-47 [7,036 B]                                      
Get:9 http://httpredir.debian.org/debian buster/main amd64 llvm-6.0-runtime amd64 1:6.0.1-10 [215 kB]                               
Get:10 http://httpredir.debian.org/debian buster/main amd64 llvm-6.0 amd64 1:6.0.1-10 [4,767 kB]                                    
Get:11 http://httpredir.debian.org/debian buster/main amd64 llvm-6.0-dev amd64 1:6.0.1-10 [23.2 MB]                                 
Fetched 57.2 MB in 42s (1,346 kB/s)                                                                                                 
Selecting previously unselected package libpocl2-common.
(Reading database ... 538311 files and directories currently installed.)
Preparing to unpack .../0-libpocl2-common_1.2-5_all.deb ...
Unpacking libpocl2-common (1.2-5) ...
Selecting previously unselected package libobjc-8-dev:amd64.
Preparing to unpack .../1-libobjc-8-dev_8.3.0-6_amd64.deb ...
Unpacking libobjc-8-dev:amd64 (8.3.0-6) ...
Selecting previously unselected package libclang-common-6.0-dev.
Preparing to unpack .../2-libclang-common-6.0-dev_1%3a6.0.1-10_amd64.deb ...
Unpacking libclang-common-6.0-dev (1:6.0.1-10) ...
Selecting previously unselected package clang-6.0.
Preparing to unpack .../3-clang-6.0_1%3a6.0.1-10_amd64.deb ...
Unpacking clang-6.0 (1:6.0.1-10) ...
Selecting previously unselected package libpocl2:amd64.
Preparing to unpack .../4-libpocl2_1.2-5_amd64.deb ...
Unpacking libpocl2:amd64 (1.2-5) ...
Selecting previously unselected package pocl-opencl-icd:amd64.
Preparing to unpack .../5-pocl-opencl-icd_1.2-5_amd64.deb ...
Unpacking pocl-opencl-icd:amd64 (1.2-5) ...
dpkg: mesa-opencl-icd:amd64: dependency problems, but removing anyway as you requested:
 hashcat depends on pocl-opencl-icd | opencl-icd; however:
  Package pocl-opencl-icd:amd64 is not configured yet.
  Package opencl-icd is not installed.
  Package pocl-opencl-icd:amd64 which provides opencl-icd is not configured yet.
  Package mesa-opencl-icd:amd64 which provides opencl-icd is to be removed.

(Reading database ... 538732 files and directories currently installed.)
Removing mesa-opencl-icd:amd64 (18.3.6-2+deb10u1) ...
Selecting previously unselected package binfmt-support.
(Reading database ... 538717 files and directories currently installed.)
Preparing to unpack .../0-binfmt-support_2.2.0-2_amd64.deb ...
Unpacking binfmt-support (2.2.0-2) ...
Selecting previously unselected package libomp5-7:amd64.
Preparing to unpack .../1-libomp5-7_1%3a7.0.1-8_amd64.deb ...
Unpacking libomp5-7:amd64 (1:7.0.1-8) ...
Selecting previously unselected package libomp-7-dev.
Preparing to unpack .../2-libomp-7-dev_1%3a7.0.1-8_amd64.deb ...
Unpacking libomp-7-dev (1:7.0.1-8) ...
Selecting previously unselected package libomp-dev.
Preparing to unpack .../3-libomp-dev_1%3a7.0-47_amd64.deb ...
Unpacking libomp-dev (1:7.0-47) ...
Selecting previously unselected package llvm-6.0-runtime.
Preparing to unpack .../4-llvm-6.0-runtime_1%3a6.0.1-10_amd64.deb ...
Unpacking llvm-6.0-runtime (1:6.0.1-10) ...
Selecting previously unselected package llvm-6.0.
Preparing to unpack .../5-llvm-6.0_1%3a6.0.1-10_amd64.deb ...
Unpacking llvm-6.0 (1:6.0.1-10) ...
Selecting previously unselected package llvm-6.0-dev.
Preparing to unpack .../6-llvm-6.0-dev_1%3a6.0.1-10_amd64.deb ...
Unpacking llvm-6.0-dev (1:6.0.1-10) ...
Setting up libclang-common-6.0-dev (1:6.0.1-10) ...
Setting up libobjc-8-dev:amd64 (8.3.0-6) ...
Setting up libpocl2-common (1.2-5) ...
Setting up libomp5-7:amd64 (1:7.0.1-8) ...
Setting up binfmt-support (2.2.0-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/binfmt-support.service → /lib/systemd/system/binfmt-support.service.
Setting up llvm-6.0-runtime (1:6.0.1-10) ...
Setting up clang-6.0 (1:6.0.1-10) ...
Setting up llvm-6.0 (1:6.0.1-10) ...
Setting up libomp-7-dev (1:7.0.1-8) ...
Setting up llvm-6.0-dev (1:6.0.1-10) ...
Setting up libpocl2:amd64 (1.2-5) ...
Setting up libomp-dev (1:7.0-47) ...
Setting up pocl-opencl-icd:amd64 (1.2-5) ...
Processing triggers for systemd (241-7~deb10u3) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...

This will auto install an alternative to mesa package: pocl-opencl-icd
Hashcat now runs in CPU mode after I removed the mesa package:

[user@hp_t610 ~]$ hashcat -I
hashcat (v5.1.0) starting...

OpenCL Info:

Platform ID #1
  Vendor  : The pocl project
  Name    : Portable Computing Language
  Version : OpenCL 1.2 pocl 1.2 None+Asserts, LLVM 6.0.1, SLEEF, DISTRO, POCL_DEBUG

  Device ID #1
    Type           : CPU
    Vendor ID      : 1
    Vendor         : AuthenticAMD
    Name           : pthread-AMD G-T56N Processor
    Version        : OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-btver1
    Processor(s)   : 2
    Clock          : 1650
    Memory         : 1024/2744 MB allocatable
    OpenCL Version : OpenCL C 1.2 pocl
    Driver Version : 1.2

[user@hp_t610 ~]$ hashcat -b
hashcat (v5.1.0) 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.

OpenCL Platform #1: The pocl project
====================================
* Device #1: pthread-AMD G-T56N Processor, 1024/2744 MB allocatable, 2MCU

Benchmark relevant options:
===========================
* --optimized-kernel-enable

Hashmode: 0 - MD5

Speed.#1.........:  4405.6 kH/s (58.43ms) @ Accel:512 Loops:256 Thr:1 Vec:4

Hashmode: 100 - SHA1

Speed.#1.........:  1126.4 kH/s (57.32ms) @ Accel:256 Loops:128 Thr:1 Vec:4

Hashmode: 1400 - SHA2-256

Speed.#1.........:   398.2 kH/s (81.18ms) @ Accel:256 Loops:64 Thr:1 Vec:4

Hashmode: 1700 - SHA2-512

Speed.#1.........:   246.9 kH/s (65.24ms) @ Accel:128 Loops:64 Thr:1 Vec:2

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

Speed.#1.........:       52 H/s (76.11ms) @ Accel:128 Loops:64 Thr:1 Vec:4

Hashmode: 1000 - NTLM

Speed.#1.........:  7157.1 kH/s (72.22ms) @ Accel:1024 Loops:256 Thr:1 Vec:4

Hashmode: 3000 - LM

^C

As you can see, cracking WPA EAPOL hash is very slooooow: 47 Hash per second!!
I really need to figure out on installing drivers for Windows or ROCm for GNU/Linux, in order for me to use GPU.

I just used aircrack-ng, it can do a 180 keys/second ~ 200 keys/second.