How To Use hashcat On CPU Only

By | 2017/01/31

No fancy GPU? No problem. One can use hashcat on a CPU only. Here is a quick how-to for Debian Linux and an Intel CPU!


1. First, download the latest version of hashcat from: https://hashcat.net/hashcat/

Run hashcat with tack capital I to show detected opencl devices.

In this example, hashcat sees a GPU, but no CPU. :/

$ ./hashcat64.bin -I
hashcat (v3.30) starting...

OpenCL Info:

Platform ID #1
  Vendor  : NVIDIA Corporation
  Name    : NVIDIA CUDA
  Version : OpenCL 1.2 CUDA 8.0.0

  Device ID #1
    Type           : GPU
    Vendor ID      : 32
    Vendor         : NVIDIA Corporation
    Name           : GeForce GTX 970
    Version        : OpenCL 1.2 CUDA
    Processor(s)   : 13
    Clock          : 1342
    Memory         : 1009/4036 MB allocatable
    OpenCL Version : OpenCL C 1.2 
    Driver Version : 375.26

For Intel CPU support, one must install OpenCL Drivers from intel.com (and not from distro repositories as beignet).

Debian Linux quick how-to:

2. Remove any beignet drivers, should any be present:

sudo apt remove --purge beignet*


3. Install lsb-compat to make the installer happy with Debian:

sudo apt install lsb-compat


4. Download latest OpenCL Drivers and Runtimes for CPU:

https://software.intel.com/en-us/articles/opencl-drivers#latest_CPU_runtime

Latest release (16.1.1) – at time of writing

For Debian, select ‘OpenCL™ Runtime 16.1.1 for Intel® Core™ and Intel® Xeon® Processors for Ubuntu* (64-bit)’

Extract the download, then run the installer via: sudo ./install.sh

A graphical installer will walk through installing the software to /opt/intel/


Now hashcat will detect and use your CPU!

$ ./hashcat64.bin -I
hashcat (v3.30) starting...

OpenCL Info:

Platform ID #1
  Vendor  : NVIDIA Corporation
  Name    : NVIDIA CUDA
  Version : OpenCL 1.2 CUDA 8.0.0

  Device ID #1
    Type           : GPU
    Vendor ID      : 32
    Vendor         : NVIDIA Corporation
    Name           : GeForce GTX 970
    Version        : OpenCL 1.2 CUDA
    Processor(s)   : 13
    Clock          : 1342
    Memory         : 1009/4036 MB allocatable
    OpenCL Version : OpenCL C 1.2 
    Driver Version : 375.26

Platform ID #2
  Vendor  : Intel(R) Corporation
  Name    : Intel(R) OpenCL
  Version : OpenCL 1.2 LINUX

  Device ID #2
    Type           : CPU
    Vendor ID      : 8
    Vendor         : Intel(R) Corporation
    Name           : Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
    Version        : OpenCL 1.2 (Build 25)
    Processor(s)   : 4
    Clock          : 3300
    Memory         : 2047/32122 MB allocatable
    OpenCL Version : OpenCL C 1.2 
    Driver Version : 1.2.0.25

Rock on,

8 thoughts on “How To Use hashcat On CPU Only

  1. Jx

    The instruction is good. I managed to install OpenCL for my Intel CPU. However running hashcat benchmarking still skip the Intel CPU.

    Reply
  2. Zdilto

    please help i get this error after installing latest OpenCL Drivers and Runtimes for My CPU in windows 10.

    OpenCL Platform #1: Intel(R) Corporation
    ========================================
    * Device #1: Celeron(R) Dual-Core CPU T3500 @ 2.10GHz, 511/511 MB allocatable, 2MCU

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

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

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

    clCreateContext(): CL_DEVICE_NOT_AVAILABLE <<<< this is the error i got

    Started: Sat Jun 03 14:35:02 2017
    Stopped: Sat Jun 03 14:35:03 2017

    Reply
    1. Scott Miller Post author

      That error means that the CPU doesn’t support Intel opencl. It’s either too old or missing some instruction sets required.

      Reply
  3. Brian

    Thank you very much for this write-up. Used this on an Intel i7 with built-in intel GPU on a Kali install. worked flawlessly.

    Reply
  4. Steve

    I also recieve the error but my CPU supports OpenCL
    “clCreateContext(): CL_DEVICE_NOT_AVAILABLE”

    Type : CPU
    Vendor ID : 8
    Vendor : Intel(R) Corporation
    Name : Intel(R) Xeon(R) CPU E5405 @ 2.00GHz
    Version : OpenCL 1.2 (Build 25)
    Processor(s) : 1
    Clock : 2000
    Memory : 128/490 MB allocatable
    OpenCL Version : OpenCL C 1.2
    Driver Version : 1.2.0.25

    Reply
  5. Ariel

    Tengo el mismo problema para una Atom N455, puede ser que sea incompatible?

    OpenCL Platform #1: Intel(R) Corporation
    ========================================
    * Device #1: Intel(R) Atom(TM) CPU N455 @ 1.66GHz, 509/509 MB allocatable, 2MCU

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

    Applicable Optimizers:
    * Zero-Byte
    * Single-Hash
    * Single-Salt
    * Slow-Hash-SIMD

    Watchdog: Hardware Monitoring Interface not found on your system
    Watchdog: Temperature abort trigger disabled
    Watchdog: Temperature retain trigger disabled

    clCreateContext(): CL_DEVICE_NOT_AVAILABLE

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.