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,