hashcat Forum
How To: Hashcat 3.0 on a 32-bit Linux VM - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Support (https://hashcat.net/forum/forum-3.html)
+--- Forum: hashcat (https://hashcat.net/forum/forum-45.html)
+--- Thread: How To: Hashcat 3.0 on a 32-bit Linux VM (/thread-5605.html)



How To: Hashcat 3.0 on a 32-bit Linux VM - BeanBagKing - 07-05-2016

As with most of the problems I run into, I'm sure there's a better way.

As soon as I saw the release announcement for hashcat 3, I tried it in my nearest VM, a 32-bit The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali) machine. Lacking OpenCL drivers, I got a segmentation fault. I found that Intel doesn't offer 32-bit linux OpenCL drivers, and since my VM lacked a video card, that was about it. I asked on IRC and got pretty much the same answer; use a 64-bit VM, or a physical machine with a card.

I started looking at what was offered in the repository, and POCL (Portable Computing Language library) seemed to -almost- work. It was distributed with 64-bit libraries though. After a few days on and off of fooling with dependencies, I seem to have it working. I present to you "How to run hashcat 3 on a 32-bit VM... mostly..."

http://www.nullsec.us/hashcat-3-0-on-a-32-bit-linux-vm/

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.

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

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

Code:
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

Code:
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

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


Git pocl, make, install

Code:
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

Code:
root@The-Distribution-Which-Does-Not-Handle-OpenCL-Well (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...
Code:
root@The-Distribution-Which-Does-Not-Handle-OpenCL-Well (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')



RE: How To: Hashcat 3.0 on a 32-bit Linux VM - atom - 07-05-2016

Thanks! About that one error, you should post it to the pocl project. They are pretty good and fast in fixing their own bugs, if it is. Also possible it's a LLVM problem.


RE: How To: Hashcat 3.0 on a 32-bit Linux VM - kali20a - 08-30-2016

Thanks a lot .. but will the same method work on a 64-bit The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali) vm?


RE: How To: Hashcat 3.0 on a 32-bit Linux VM - kiara - 08-30-2016

(07-05-2016, 01:23 AM)BeanBagKing Wrote: As with most of the problems I run into, I'm sure there's a better way.

so i tried it my self with a VM (virtual box) The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali) linux 2, 64bit 

followed the guide and it failed on the "make" command


Code:
pocl_llvm_api.cc:32:41: fatal error: clang/CodeGen/CodeGenAction.h: No such file or directory
compilation terminated.
Makefile:2816: recipe for target 'libpoclllvm_la-pocl_llvm_api.lo' failed
make[5]: *** [libpoclllvm_la-pocl_llvm_api.lo] Error 1
make[5]: Leaving directory '/root/Downloads/pocl/lib/CL'
Makefile:2835: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/root/Downloads/pocl/lib/CL'
Makefile:916: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/root/Downloads/pocl/lib/CL'
Makefile:470: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/root/Downloads/pocl/lib'
Makefile:644: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/Downloads/pocl'
Makefile:530: recipe for target 'all' failed
make: *** [all] Error 2

Code:
clang --version
clang version 3.8.0-2 (tags/RELEASE_380/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-3.8/bin


i am sorry it was my bad, i did not install apt install libclang-3.8-dev so i rapidly do the whole proccess all over again to make sure i did not skip anything
BUT its still not working Big Grin


Code:
/Downloads/hashcat-3.10# ./hashcat64.bin --force -b -d 1
hashcat (v3.10) starting in benchmark-mode...

OpenCL Platform #1: The pocl project
====================================
- Device #1: pthread-Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 2967/2967 MB allocatable, 2MCU

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

Illegal instruction

i am giving 2 cpu cores to my vm [Image: a1bca006fa684250a6f5f64d4cc5a167.png]


RE: How To: Hashcat 3.0 on a 32-bit Linux VM - BeanBagKing - 09-04-2016

kali20a - Regarding The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali) 64, use the Intel OpenCL drivers https://software.intel.com/en-us/articles/opencl-drivers - down near the bottom, look for 16.1.1 for Ubuntu. When you install it, you'll likely get an error about missing dependency (can't remember which one, ignore it).

kiara - Honestly, I got this working because I'm stubborn and encountered a problem. I learned a few things, but it's flaky and kind of a pain. I suggest moving to 64bit or downgrading to HC 2. That said, if you just want to solve the problem for the sake of solving it, HC 3 is recognizing your processor. I would fiddle with the --force, -d and -D flags. I also did all my testing on 2016.1, not The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali) 2 Sana. That might make a difference.


RE: How To: Hashcat 3.0 on a 32-bit Linux VM - kiara - 09-04-2016

(09-04-2016, 04:52 AM)BeanBagKing Wrote: kali20a - Regarding The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali) 64, use the Intel OpenCL drivers https://software.intel.com/en-us/articles/opencl-drivers - down near the bottom, look for 16.1.1 for Ubuntu. When you install it, you'll likely get an error about missing dependency (can't remember which one, ignore it).

kiara - Honestly, I got this working because I'm stubborn and encountered a problem. I learned a few things, but it's flaky and kind of a pain. I suggest moving to 64bit or downgrading to HC 2. That said, if you just want to solve the problem for the sake of solving it, HC 3 is recognizing your processor. I would fiddle with the --force, -d and -D flags. I also did all my testing on 2016.1, not The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali) 2 Sana. That might make a difference.


hmm, i am on a 64 bit.. (unless u ment 32bit) , and i did try --force and -d -D
i think i will stick with the old HC 2 Smile


RE: How To: Hashcat 3.0 on a 32-bit Linux VM - kali20a - 09-18-2016

(09-04-2016, 04:52 AM)BeanBagKing Wrote: kali20a - Regarding The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali) 64, use the Intel OpenCL drivers https://software.intel.com/en-us/articles/opencl-drivers - down near the bottom, look for 16.1.1 for Ubuntu. When you install it, you'll likely get an error about missing dependency (can't remember which one, ignore it).

Thanks a lot BeanBagKing,

Works like a charm ! I upgraded my HC to v3.10 then installed the Intel OpenCL then the pocl .. now HC works fine even without using the --force


RE: How To: Hashcat 3.0 on a 32-bit Linux VM - nim - 05-01-2017

(09-18-2016, 04:08 AM)kali20a Wrote:
(09-04-2016, 04:52 AM)BeanBagKing Wrote: kali20a - Regarding The-Distribution-Which-Does-Not-Handle-OpenCL-Well (The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali)) 64, use the Intel OpenCL drivers https://software.intel.com/en-us/articles/opencl-drivers - down near the bottom, look for 16.1.1 for Ubuntu. When you install it, you'll likely get an error about missing dependency (can't remember which one, ignore it).

Thanks a lot BeanBagKing,

Works like a charm ! I upgraded my HC to v3.10 then installed the Intel OpenCL then the pocl .. now HC works fine even without using the --force

Hey everyone,

This section:

"Git pocl, make, install

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

I think they updated the Git repository, because none of those apply anymore.

Anyone have an idea on what to do? I have been on this for approaching 6 hours.

UPDATE: My host machine is 64 bit The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali), and my VMWare image for The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali) is 32 bit lol, so. I just used it on my 64 bit The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali) and it ran just fine! Still does not solve the update needed for this, but. Still got around it!