9

How can I run hashcat using only the cpu in a virtual machine?

When I try to run hashcat in my Kali 2 VM I receive the following error:

root@kali: hashcat -m 400 -a 0 hash.txt rockyou.txt
hashcat (v3.10) starting...

OpenCL Platform #1: Mesa, skipped! No OpenCL compatible devices found

ERROR: No devices found/left

I realize the newer version of hashcat wants to access a video card. This is a Virtual Machine and I'd prefer to use the CPU for these labs.

Version info for Kali:

root@kali:~/Desktop/data/target# uname -a
Linux kali 4.6.0-kali1-686 #1 SMP Debian 4.6.4-1kali1 (2016-07-21) i686 GNU/Linux

root@kali:~/Desktop/data/target# lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description:    Kali GNU/Linux Rolling
Release:    kali-rolling
Codename:   kali-rolling
Shrout1
  • 365
  • 1
  • 5
  • 11

4 Answers4

12

You must install some stuff. The same happened to me. But you can work with new hashcat 3.x and CPU in your vm, no problem on that:

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

And

apt-get install pocl-opencl-icd

This worked for me. I found it here. What I suggested It's a little different because you can install pocl with apt-get instead of downloading from git like that link suggests... Is the solution worked on my Kali vm.

OscarAkaElvis
  • 5,185
  • 3
  • 17
  • 48
  • 2
    Awesome! After an `apt-get upgrade` on 64 bit kali and using the `--force` flag, this worked like a champ! It won't run on 32 bit Kali without a lot of massaging apparently, but at least I have a viable option! [This article](http://www.nullsec.us/hashcat-3-0-on-a-32-bit-linux-vm/) discusses running hashcat in a 32 bit vm but it seemed a bit involved... – Shrout1 Jan 05 '17 at 21:16
  • It still works this way with hashcat 6.2 – M46 May 27 '21 at 08:26
2

You can use hashcat legacy for that, it's built to run on CPUs rather than GPUs.

https://hashcat.net/wiki/doku.php?id=frequently_asked_questions

knipp
  • 589
  • 5
  • 14
0

VM has no GPU, therefore hashcat can't work in it. You can either install legacy hashcat as knipp suggested, run it in your host machine or use Kali as a live OS (f.e. USB)

Mr. E
  • 1,954
  • 9
  • 18
-3

Try hashcat -m 400 -a 0 hash.txt rockyou.txt --force.

Jens Erat
  • 23,446
  • 12
  • 72
  • 96