View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003432 | Kali Linux | Kali Package Bug | public | 2016-07-20 07:55 | 2018-01-29 12:53 |
Reporter | fantomaster | Assigned To | rhertzog | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | suspended | ||
Product Version | 2016.1 | ||||
Summary | 0003432: hashcat v3.00 error | ||||
Description | hashcat v3.00 returns an error when attempting to crack a hash. I've been able to reproduce this on both a VM and physical box, different attack methods, and different hashed | ||||
Steps To Reproduce | apt-cache policy hashcathashcat: echo -n foobar |md5sum |sed 's/ .*//' |tee md5.hash3858f62230ac3c915f300c664312c63f hashcat -a3 -m0 --quiet md5.hash foobar3858f62230ac3c915f300c664312c63f:foobar apt install --only-upgrade hashcat -y -qqqapt-cache policy hashcathashcat: hashcat -a3 -m0 --quiet md5.hash foobarERROR: clGetDeviceIDs() : -1 : CL_DEVICE_NOT_FOUND | ||||
Additional Information | https://hashcat.net/wiki/doku.php?id=troubleshooting_clgetdeviceids_-1 | ||||
Do you have mesa-opencl-icd installed or some other OpenCL implementation? Does the OpenCL implementation that you have match your hardware? From here it looks like a problem with your OpenCL setup more than a problem in hashcat. That said I can reproduce the problem and I don't know what would have to be done to have a working OpenCL setup that can be used by hashcat... |
|
mesa-opencl-icd is installed. Both installations I tested (physical and VM) are fairly new installations and I haven't made any alterations to the system. apt-cache policy mesa-opencl-icdmesa-opencl-icd: |
|
https://hashcat.net/hashcat/ mentions GPU requirements that can't always be fulfilled with freely available packages. For Intel GPUs, we have beignet-opencl-icd version 1.1.2 but that doesn't match the "Intel users require Intel OpenCL Runtime 14.2 or later (recommended 16.2 or later)". So you need to setup your own OpenCL For AMD GPUs, the fglrx-driver was providing the OpenCL implementation, but that package is gone from Debian/Kali as upstream is not keeping up with Xorg releases... For Nvidia GPUs, we have nvidia-opencl-icd version 352.79-10 matching the requirements of hashcat: "NVidia users require NVidia drivers 346.59 or later (recommended 367.27 or later)" That said, further down the page, it says this:
So it should really work with the basic "mesa-opencl-icd" as well. Not sure what's wrong. |
|
After installing beignet-opencl-icd, we're given a much more verbose error (see below), although I'm not if it's of any use. I also did a fresh checkout of their repo and built it but I'm still getting the same errors. root@kali:~# hashcat -b DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument ERROR: clGetDeviceIDs() : -1 : CL_DEVICE_NOT_FOUND |
|
To summarize what I've looked at so far, here are the things that don't work:
root@kali:~# clinfo Platform Name Clover Platform Name Intel Gen OCL Driver Platform Name Clover NULL platform behavior ICD loader properties |
|
This issue is not limited to Kali. I get the same issue with Debian: dookie@debian:~/hashcat-3.00$ ./hashcat64.bin -b ERROR: clGetDeviceIDs() : -1 : CL_DEVICE_NOT_FOUND dookie@debian:~/hashcat-3.00$ uname -a |
|
This is not surprising, we use the same packages as Debian for hashcat and for OpenCL related packages. |
|
Ok i have come up with a solution. You need the OpenCL Intel runtime. The one i used was http://registrationcenter-download.intel.com/akdlm/irc_nas/9019/opencl_runtime_16.1.1_x64_ubuntu_6.4.0.25.tgz. The main page is https://software.intel.com/en-us/articles/opencl-drivers, Just use the Ubuntu version for Kali, It will say its unsupported but will install anyways. and it works!! f0xy@f0xy:~$ clinfo f0xy@f0xy:~$ hashcat -b OpenCL Platform 0000001: Intel(R) Corporation
|
|
As requested on here: https://twitter.com/raphaelhertzog/status/783921727332085760 Installing OpenCL can be kind of tricky. There's mainly two reasons why:
The basic 4 OpenCL components are:
There's some additional special things to know:
As a conclusion, kalilinux should do the following:
|
|
Thanks atom for your feedback. But it's hard to translate your comments into any concrete packaging improvement. First of, let me state that we have hashcat v3.10 in kali-rolling and that we strive to keep it relatively up-to-date. The hashcat package depends on an OpenCL runtime but it cannot depend on the right one for the user's specific hardware, so it depends by default on what seemed like the most generic one and accept that the user installs another one and drop that one by using this dependency “mesa-opencl-icd | opencl-icd”. The other OpenCL runtimes that are available in Debian/Kali are the following: The AMD one used to be available but fglrx-driver not being compatible with latest Xorg releases, it got dropped... The OpenCL ICD loader gets installed through the the "libopencl1" dependency and by default we have ocl-icd-libopencl1: The only other alternative available in Debian/Kali is the one of NVidia: A few questions for you:
Output of clinfo with only mesa-opencl-icd installed: clinfoNumber of platforms 1 Platform Name Clover NULL platform behavior ICD loader properties Output of clinfo with only pocl-opencl-icd loaded: clinfoNumber of platforms 1 Platform Name Portable Computing Language NULL platform behavior ICD loader properties => looks pocl-opencl-icd is doing better than the mesa one on my KVM test VM. The beignet-opencl-icd fails with multiple error messages due to lack of Intel GPU: clinfoDRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument Platform Name Intel Gen OCL Driver NULL platform behavior ICD loader properties I can't test on NVidia (no such hardware). Testing beignet-opencl-icd on a real Intel machine seems to work partly, at least clinfo provides lots of data but the "hashcat -b" call ends up in a beignet one. Platform Name Intel Gen OCL Driver NULL platform behavior ICD loader properties OpenCL Platform 0000001: Intel
Hashtype: MD4 Speed.Dev.0000001.: 317.6 MH/s (96.86ms) Hashtype: MD5 Speed.Dev.0000001.: 205.2 MH/s (93.17ms) Hashtype: Half MD5 Speed.Dev.0000001.: 132.8 MH/s (98.09ms) Hashtype: SHA1 Speed.Dev.0000001.: 65315.6 kH/s (97.45ms) Hashtype: SHA256 Speed.Dev.0000001.: 26587.3 kH/s (94.53ms) ASSERTION FAILED: !(ctx->getErrCode() == OUT_OF_RANGE_IF_ENDIF && ctx->getIFENDIFFix()) I note that you make it hard to use the pocl opencl ICD: OpenCL Platform 0000001: The pocl project
ERROR: No devices found/left But with --force I get decent performances (approximately 50% compared to beignet-opencl-icd) so is this really warranted? |
|
BTW, can you provide links to the other special-purpose OpenCL runtime that you mentioned (for AMD and Intel)? Maybe we should consider packaging them in Debian/Kali. |
|
That's too bad. They way it's currently done is far from being useable. The users usually don't want to struggle in how to install OpenCL correctly. They just want it to work magically out of the box. So they install all packages that include the substring "opencl". That's what breaks it because of the incompatibility of the packages to each other.
It's important to understand, those are not runtimes. The ICD loader is a layer above the runtimes. In theorey, they should do all the same, because they do not include any vendor specific features.
All of those 3 quotes are related basically the same question. And yes, that's the correct one. So the first thing you could do would be to drop the other ICD loader:
You can't have them installed in parallel anyway as there can be only one libOpenCL.so. However, the latest AMD for example can't handle quotes in the clBuild..() parameters, which then breaks compiling OpenCL kernel on paths with a space in installation folder.
I could, but hashcat is just using OpenCL, not installing it. It's the wrong place to keep this. Also, those stuff changes very fast because each vendor, whenever he releases a new driver, could have changed something related to OpenCL. That happens almost all the time for AMD drivers and often for NV drivers. Anyway we should update our hashcat-on-server-install wiki page as it's still refering to Ubuntu server 14.04 while it runs pretty good on Ubuntu server 16.04. You can find it here: https://hashcat.net/wiki/doku.php?id=linux_server_howto
Absolutely. For example if you have an Intel CPU. There's at least 3 OpenCL runtimes supporting this device type, but there's only one that should be used. The Intel one. But the device is supported by pocl and by AMD opencl runtime as well (Yes really, AMD runs Intel CPU). The thing is that they don't handle AVX2 at all, so the performance is only the half compared to the Intel OpenCL runtime. When it comes to high-speed password cracking we typically spend alot of energy to find the ideal solution because no one likes to waste power.
MESA is completely useless. You absolutely need to drop it. pocl is "ok", even if the performance is only half of what's possible with the correct runtime. However even pocl fails to compile on some of the kernels. Just run "hashcat -b" and sooner or later you will hit a kernel that wont compile. Do it again with Intel OpenCL runtime and it will work with full speed and without kernel compiler errors. Even the unit tests will run 100% through. |
|
Note that the beignet opencl runtime is not the Intel opencl runtime I'm talking about. There's multiple different opencl runtime from Intel for their different devices types. |
|
Tried @atom and @thefox's suggestions on a fresh Kali 2 ISO build on a new VMware installation, intending to get the OpenCL CPU (not GPU) functionality going on an underlying host Intel CPU. Thought I'd present this back in case it's a useful summary to anyone else. Initial packages:
This setup did not work with the beignet package (and beignet must be removed before installing the Intel package). As suggested by @atom, and as per @thefox's instructions above, I installed the Intel Open CL drivers from: https://software.intel.com/en-us/articles/opencl-drivers. The specific package was: "OpenCL™ Runtime 16.1.1 for Intel® Core™ and Intel® Xeon® Processors for Ubuntu* (64-bit)". Download the package, extract it and run the install.sh script it contains (skip the warnings about unsupported os and missing lsb-core). Once this was done, hashcat appears to work correctly (although it is still presenting an error about the mesa package not having compatible devices, and will continue to until it's removed as a dependency, or it is manually removed). Running hashcat --benchmark returns the following:hashcat (v3.10) starting in benchmark-mode... OpenCL Platform 0000001: Mesa, skipped! No OpenCL compatible devices found OpenCL Platform #2: Intel(R) Corporation
Hashtype: MD4 Speed.Dev.0000001.: 125.0 MH/s (8.32ms) etc. |
|
Due to the age of the OS (Kali Moto [v1], Kali Safi [v2], Kali Rolling 2016.x), these legacy versions are no longer supported. Please could you see if you are able to replicate this issue with the latest version of Kali Linux - https://www.kali.org/downloads/)? If you are still facing the same problem, feel free to re-open the ticket. If you choose to do this, could you provide more information to the issue you are facing,and also give information about your setup? |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2016-07-20 07:55 | fantomaster | New Issue | |
2016-07-20 08:52 | rhertzog | Note Added: 0005557 | |
2016-07-20 09:01 | fantomaster | Note Added: 0005558 | |
2016-07-20 09:10 | rhertzog | Note Added: 0005559 | |
2016-07-20 20:13 | dookie | Note Added: 0005563 | |
2016-07-20 21:46 | dookie | Note Added: 0005564 | |
2016-07-21 07:03 | dookie | Note Added: 0005567 | |
2016-07-21 11:58 | rhertzog | Note Added: 0005569 | |
2016-07-21 18:52 | rhertzog | Assigned To | => rhertzog |
2016-07-21 18:52 | rhertzog | Status | new => assigned |
2016-09-11 21:05 | thefox | Note Added: 0005826 | |
2016-10-07 08:08 | atom | Note Added: 0006036 | |
2016-10-11 08:39 | rhertzog | Note Added: 0006045 | |
2016-10-11 08:40 | rhertzog | Note Edited: 0006045 | |
2016-10-11 08:41 | rhertzog | Note Edited: 0006045 | |
2016-10-11 08:44 | rhertzog | Note Edited: 0006045 | |
2016-10-11 08:48 | rhertzog | Note Added: 0006046 | |
2016-10-11 08:51 | rhertzog | Note Edited: 0006045 | |
2016-10-11 08:51 | rhertzog | Note Edited: 0006045 | |
2016-10-15 16:10 | atom | Note Added: 0006060 | |
2016-10-15 16:13 | atom | Note Added: 0006061 | |
2016-10-19 13:32 | morgan2 | Note Added: 0006062 | |
2018-01-29 12:53 | g0tmi1k | Status | assigned => closed |
2018-01-29 12:53 | g0tmi1k | Resolution | open => suspended |
2018-01-29 12:53 | g0tmi1k | Note Added: 0008249 |