Hashcat 3.0 on a 32-bit Linux VM

One issue I've had with the new hashcat 3 is the ability to run it within 32-bit linux VM's. Intel doesn't make 32-bit OpenCL drivers. IBM made some back in 2011 apparently (PDF link), but they never did work for me. No video card means Nvidia and AMD wouldn't work. If I've missed something here, let me know, but asking on IRC only got me suggestions to run it on a non-32-bit platform, or a physical one with a card.

So I started playing around with different libraries. I got really close with POCL (Portable Computing Language library), but it has errors if you install it from repo. After a couple days on and off experimenting with the correct libraries, I present to you "How to run hashcat 3 on a 32-bit VM... mostly..."

Starting with 32-bit Kali 2016.1 Rolling, updated as of 2 July 2016.

Remove clang and llvm versions versions 3.6 and 3.7. I'm not sure why, but in my experimenting, pocl seemed very picky about the versions of these libraries.

apt remove clang*
apt remove llvm*
apt-get autoremove -y

Add the correct versions and path clang (which is in llvm's bin folder)

apt install clang-3.8
apt install libclang-3.8-dev
vim .bashrc -> Add clang to path "PATH=$PATH:/usr/lib/llvm-3.8/bin"
	Open a new terminal and test with "clang --version", should return 3.8

Install a few more dependencies

apt install libhwloc-dev
apt install ocl-icd-dev
apt install ocl-icd-opencl-dev

These dependencies that should already be there, make sure though

apt install pkg-config
apt install autotools-dev
apt install cmake
apt install make
apt install libltdl3-dev

Git pocl, make, install

git clone https://github.com/pocl/pocl
cd pocl
./autogen.sh
./configure
make
make install

Now, you'll have to use --force, or you get warnings that you are not using a native Intel OpenCL runtime

root@kali:~/Desktop/hashcat-3.00# ./hashcat32.bin -b
hashcat (v3.00-1-g67a8d97) starting in benchmark-mode...

OpenCL Platform #1: The pocl project

  • Device #1: WARNING: Not a native Intel OpenCL runtime, expect massive speed loss
    You can use --force to override this but do not post error
    reports if you do so
  • Device #1: pthread-Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz, skipped

ERROR: No devices found/left

but if you do, everything should work... mostly...

root@kali:~/Desktop/hashcat-3.00# ./hashcat32.bin --force -b
hashcat (v3.00-1-g67a8d97) starting in benchmark-mode...

OpenCL Platform #1: The pocl project

  • Device #1: pthread-Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz, 1513/1513 MB allocatable, 1MCU

Hashtype: MD4

Speed.Dev.#1.: 15532.5 kH/s (109.65ms)

[... SNIP ...]

Hashtype: Juniper IVE

Speed.Dev.#1.: 6841 H/s (98.83ms)

error: Explicit gep type does not match pointee type of pointer operand
(Producer: 'LLVM3.8.0' Reader: 'LLVM 3.8.0')

To Do: Come back and add some of the error messages I encountered along the way, and see if I can fix that last issue.