Install Hashcat in AMD and using only CPU power
#1
Question 
Hello everyone,
 
 
I got some issues installing hashcat in my new server. I’m trying to install hashcat V6.1.1 and follow instructions to install it, but after installation I got this error message when I try to run a "hashcat -b":

Code:
hashcat (v6.1.1) 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.

* Device #1: Outdated POCL OpenCL driver detected!

This OpenCL driver has been marked as likely to fail kernel compilation or to produce false negatives.
You can use --force to override this, but do not report related errors.

No devices found/left.

Started: Wed May  5 11:54:17 2021
Stopped: Wed May  5 11:54:17 2021

 
Trying to force the command to avoid warnings, I got this:

Code:
Do not report hashcat issues encountered when using --force.
OpenCL API (OpenCL 1.2 pocl 1.4, None+Asserts, LLVM 9.0.1, RELOC, SLEEF, DISTRO, POCL_DEBUG) - Platform #1 [The pocl project]
=============================================================================================================================
* Device #1: pthread-AMD Ryzen 5 5600X 6-Core Processor, 62183/62247 MB (16384 MB allocatable), 12MCU

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

Hashmode: 0 - MD5

clBuildProgram(): CL_BUILD_PROGRAM_FAILURE

error: unknown target CPU 'generic'

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

Started: Wed May  5 11:55:36 2021
Stopped: Wed May  5 11:55:37 2021

I installed OpenCL runtime, but still having the issue,  Is there an other procedure to install hashcat in a new AMD server? or I missing something ...?
Any advice will be welcome.

I share with you more information there

The following command "hashcat -I --force" return this:

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

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

  Backend Device ID #1
    Type...........: CPU
    Vendor.ID......: 1
    Vendor.........: AuthenticAMD
    Name...........: pthread-AMD Ryzen 5 5600X 6-Core Processor
    Version........: OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-generic
    Processor(s)...: 12
    Clock..........: 3700
    Memory.Total...: 62247 MB (limited to 16384 MB allocatable in one block)
    Memory.Free....: 62183 MB
    OpenCL.Version.: OpenCL C 1.2 pocl
    Driver.Version.: 1.4


The goal for me now is to install hashcat on this server and use only CPU for the moment (I’m waiting for the GPU).
I put below the CPU information:

Code:
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                  48 bits physical, 48 bits virtual
CPU(s):                          12
On-line CPU(s) list:            0-11
Thread(s) per core:              2
Core(s) per socket:              6
Socket(s):                      1
NUMA node(s):                    1
Vendor ID:                      AuthenticAMD
CPU family:                      25
Model:                          33
Model name:                      AMD Ryzen 5 5600X 6-Core Processor
Stepping:                        0
Frequency boost:                enabled
CPU MHz:                        2194.871
CPU max MHz:                    3700.0000
CPU min MHz:                    2200.0000
BogoMIPS:                        7399.82
Virtualization:                  AMD-V
L1d cache:                      192 KiB
L1i cache:                      192 KiB
L2 cache:                        3 MiB
L3 cache:                        32 MiB
NUMA node0 CPU(s):              0-11
Vulnerability Itlb multihit:    Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:              Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Full AMD retpoline, IBPB conditional, IBRS_FW, STIBP always-on, RSB filling
Vulnerability Srbds:            Not affected
Vulnerability Tsx async abort:  Not affected


And the clinfo:

Code:
Number of platforms                              1
  Platform Name                                  Portable Computing Language
  Platform Vendor                                The pocl project
  Platform Version                                OpenCL 1.2 pocl 1.4, None+Asserts, LLVM 9.0.1, RELOC, SLEEF, DISTRO, POCL_DEBUG
  Platform Profile                                FULL_PROFILE
  Platform Extensions                            cl_khr_icd
  Platform Extensions function suffix            POCL

  Platform Name                                  Portable Computing Language
Number of devices                                1
  Device Name                                    pthread-AMD Ryzen 5 5600X 6-Core Processor
  Device Vendor                                  AuthenticAMD
  Device Vendor ID                                0x6c636f70
  Device Version                                  OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-generic
  Driver Version                                  1.4
  Device OpenCL C Version                        OpenCL C 1.2 pocl
  Device Type                                    CPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                              12
  Max clock frequency                            3700MHz
  Device Partition                                (core)
    Max number of sub-devices                    12
    Supported partition types                    equally, by counts
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                            4096x4096x4096
  Max work group size                            4096
=== CL_PROGRAM_BUILD_LOG ===
error: unknown target CPU 'generic'
  Preferred work group size multiple              <getWGsizes:1200: create kernel : error -45>
  Preferred / native vector sizes               
    char                                                16 / 16     
    short                                              16 / 16     
    int                                                  8 / 8     
    long                                                4 / 4     
    half                                                0 / 0        (n/a)
    float                                                8 / 8     
    double                                              4 / 4        (cl_khr_fp64)
  Half-precision Floating-point support          (n/a)
  Single-precision Floating-point support        (core)
    Denormals                                    Yes
    Infinity and NANs                            Yes
    Round to nearest                              Yes
    Round to zero                                Yes
    Round to infinity                            Yes
    IEEE754-2008 fused multiply-add              Yes
    Support is emulated in software              No
    Correctly-rounded divide and sqrt operations  Yes
  Double-precision Floating-point support        (cl_khr_fp64)
    Denormals                                    Yes
    Infinity and NANs                            Yes
    Round to nearest                              Yes
    Round to zero                                Yes
    Round to infinity                            Yes
    IEEE754-2008 fused multiply-add              Yes
    Support is emulated in software              No
  Address bits                                    64, Little-Endian
  Global memory size                              65271406592 (60.79GiB)
  Error Correction support                        No
  Max memory allocation                          17179869184 (16GiB)
  Unified memory for Host and Device              Yes
  Minimum alignment for any data type            128 bytes
  Alignment of base address                      1024 bits (128 bytes)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        33554432 (32MiB)
  Global Memory cache line size                  64 bytes
  Image support                                  Yes
    Max number of samplers per kernel            16
    Max size for 1D images from buffer            1073741824 pixels
    Max 1D or 2D image array size                2048 images
    Max 2D image size                            32768x32768 pixels
    Max 3D image size                            2048x2048x2048 pixels
    Max number of read image args                128
    Max number of write image args                128
  Local memory type                              Global
  Local memory size                              16777216 (16MiB)
  Max number of constant args                    8
  Max constant buffer size                        16777216 (16MiB)
  Max size of kernel argument                    1024
  Queue properties                               
    Out-of-order execution                        Yes
    Profiling                                    Yes
  Prefer user sync for interop                    Yes
  Profiling timer resolution                      1ns
  Execution capabilities                         
    Run OpenCL kernels                            Yes
    Run native kernels                            Yes
  printf() buffer size                            16777216 (16MiB)
  Built-in kernels                                (n/a)
  Device Extensions                              cl_khr_byte_addressable_store cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_3d_image_writes cl_khr_fp64 cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp64

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Portable Computing Language
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)  Success [POCL]
  clCreateContext(NULL, ...) [default]            Success [POCL]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                Portable Computing Language
    Device Name                                  pthread-AMD Ryzen 5 5600X 6-Core Processor
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  Success (1)
    Platform Name                                Portable Computing Language
    Device Name                                  pthread-AMD Ryzen 5 5600X 6-Core Processor
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                Portable Computing Language
    Device Name                                  pthread-AMD Ryzen 5 5600X 6-Core Processor

ICD loader properties
  ICD loader Name                                OpenCL ICD Loader
  ICD loader Vendor                              OCL Icd free software
  ICD loader Version                              2.2.11
  ICD loader Profile                              OpenCL 2.1



Thank you for your help.

Regards,
Reply
#2
For AMD CPU you need to install Intel OpenCL runtime (now called intel one api). See https://software.intel.com/content/www/u...s/apt.html and select intel-oneapi-runtime-opencl package.

Make sure to uninstall pocl otherwise it will conflict.
Reply
#3
(05-05-2021, 12:25 PM)atom Wrote: For AMD CPU you need to install Intel OpenCL runtime (now called intel one api). See https://software.intel.com/content/www/u...s/apt.html and select intel-oneapi-runtime-opencl  package.

Make sure to uninstall pocl otherwise it will conflict.

Hello Atom,

Thank you for this makor information. That solved my problem indeed. I will check the documentation on this lib in order to understand how does it work.

Cheers guys
Reply
#4
I have a similar problem on my computer
cpu: i5 10400
gpu: amd 6600



PS F:\other\hashcat-6.2.5> .\hashcat.exe -b
hashcat (v6.2.5) 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.

PS F:\other\hashcat-6.2.5> .\hashcat.exe -I
hashcat (v6.2.5) starting in backend information mode

PS F:\other\hashcat-6.2.5>
Reply