Установка opencl kali linux

Ethical hacking and penetration testing

InfoSec, IT, Kali Linux, BlackArch

How to brute-force passwords using GPU and CPU in Linux

Drivers for graphics card and CPU to brute-force password

If you wonder how to crack passwords with GPU and CPU in Linux than continue reading. This article shows what drivers and programs to install so that hashcat and similar brute-force programs can use a GPU and CPU to crack passwords.

Hashcat uses OpenCL. According to Wikipedia, OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-programmable gate arrays (FPGAs) and other processors or hardware accelerators. OpenCL specifies programming languages (based on C99 and C++11) for programming these devices and application programming interfaces (APIs) to control the platform and execute programs on the compute devices. OpenCL provides a standard interface for parallel computing using task- and data-based parallelism.

OpenCL is an open standard maintained by the non-profit technology consortium Khronos Group. Conformant implementations are available from Altera, AMD, Apple (OpenCL along with OpenGL is deprecated for Apple hardware, in favor of Metal 2), ARM, Creative, IBM, Imagination, Intel, Nvidia, Qualcomm, Samsung, Vivante, Xilinx, and ZiiLABS.

That is, due to such universality of OpenCL, programs for password recovery, including hashcat, can work with any hardware that support OpenCL.

AMD, NVIDIA, and Intel GPU support OpenCL.

Information on supported Intel processors can be found at https://github.com/intel/compute-runtime (support for “Intel Graphics Compute Runtime for oneAPI Level Zero and OpenCL” appeared with Gen8) and https://www.intel.ru /content/www/ru/ru/support/articles/000005524/graphics-drivers.html (OpenCL support by different generations and processor models).

AMD, NVIDIA video cards also mostly support OpenCL, except for very old ones.

OpenCL requires driver installation and tools for interacting with OpenCL. This article will help you to intall OpenCL on Linux. Similar instructions for Windows are given in the article “Hashcat manual: how to use the program for cracking passwords” (see the “Drivers for hashcat” section).

Читайте также:  Xerox 7600i driver linux

So, the requirements for hashcat to work with OpenCL are as follows:

  • For AMD graphics cards, you need: “RadeonOpenCompute (ROCm)” Software Platform (1.6.180 or later)
  • Intel processors require: «OpenCL Runtime for Intel Core and Intel Xeon Processors» (16.1.1 or later)
  • For NVIDIA graphics cards, you must: «NVIDIA Driver» (367.x or later)

For older processors (before Broadwell), the «OpenCL 2.0 GPU Driver Package for Linux» (Iris, Iris Pro) is used.

This article will show you how to install everything you need to use OpenCL on NVIDIA graphics cards and modern Intel processors. Instructions will be given on the example of Kali Linux (should also be suitable for Debian, Linux Mint, Ubuntu and their derivatives) and Arch Linux (BlackArch).

How to enable OpenCL on Kali Linux (Debian, Linux Mint, Ubuntu) for hashcat

Enabling OpenCL for NVIDIA

Start with a full system upgrade and then reboot:

After we updated the system, we need to check the nouveau kernel modules (Open Source Nvidia drivers, they will conflict with proprietary ones)

If the previous command outputed something, for example:

this means that nouveau is in use. Therefore, you must add them to the blacklist:

After changing the kernel parameters, we need to update our initramfs and reboot.

After rebooting and verifying that the nouveau modules are not loaded, we proceed to install the OpenCL ICD bootloader, drivers, and the CUDA toolkit.

During driver installation, the system creates new kernel modules, so another reboot is required.

Checking installed drivers

Now our system should be ready, we need to check that the drivers are loaded correctly. We can quickly verify this by running the nvidia-smi tool.

The output shows that our driver and GPU are fine – we can proceed to crack passwords. Before continuing, let’s check again and make sure hashcat and CUDA work together.

If you get the clGetDeviceIDs(): CL_DEVICE_NOT_FOUND error marked Platform ID Vendor: Mesa, then run:

Enabling OpenCL for Intel

If your CPU supports OpenCL, then install the following packages:

Let’s look at the list of devices again (a new device should be added):

And run the benchmark again:

How to enable OpenCL on Arch Linux (BlackArch) for hashcat

Enabling OpenCL for NVIDIA

Remove xf86-video-nouveau if it’s installed:

Install the NVIDIA Proprietary Driver:

Install the CUDA driver and other necessary packages, as well as hashcat:

Enabling OpenCL for Intel

Now check the list of devices:

Launch the benchmark:

beignet package

beignet is an OpenCL implementation for Intel IvyBridge and Haswell iGPUs. This package is currently deprecated and should be replaced by intel-compute-runtime. I have beignet installed in my system, then an additional OpenCL device appears – like on Kali Linux, where 3 OpenCL devices are also visible. But this device is unstable with Hashcat.

You can test how beignet behaves on your system. Perhaps for older processors this is the only option.

OpenCL for AMD

If you own an AMD card, please share with other readers your experience installing the AMD driver with OpenCL support. Write your commands for installation in the comments and I will add a new section to the article. If possible, take screenshots and/or benchmarks.

Источник

Установка opencl kali linux

Copy raw contents

Kali-rolling with cuda 8 and OpenCl/CPyrit

Tested working on kernels 4.8 through 4.9

I have used the latest weekly build here:

I created the bootable of this iso

Interestingly after the primary install, originally, I was able to boot into the GUI after the reboot but on testing this process again I had the classic screen freeze after login. To get round this I used CTRL + ALT + F2 to get the tty and carried on the process. NOTE: you will need to get to the tty as soon as the login appears, dont get distracted or this will freeze, requiring a reboot again!

Читайте также:  Ноутбук dell операционная система windows

Then the usual lets get it all updated and start the funsies.

apt update && apt -y upgrade && apt -y dist-upgrade

apt install -y linux-headers-$(uname -r)

I tried to test this again and ran into issues that were not present previously. I could not get the bumblebeed install to run so had to temp edit the grub boot config. On the end off the linux line add acpi=off and hit f10. I could then hit the gui and continue.

apt install -y bumblebee-nvidia

After this I was able to reboot into the GUI as normal.

dpkg -i virtualgl_2.5.1_amd64.deb

Grab the latest Cuda run file and export the perl path for the utils

I tried installing the latest version and ran into the following error:

gzip: stdin: invalid compressed data—format violated

Ensure there is enough space in /tmp and that the installation package is not corrupt

Signal caught, cleaning up

So went back to the following:

mv cuda_8.0.44_linux-run cuda_8.0.44_linux.run

chmod +x cuda_8.0.44_linux.run

InstallUtils.pm needs this as perl5 doesn’t include the current directory on Debian

accept the license

select yes for incompatible build

select defaults from there

Install the Nvidia icd

apt install -y nvidia-opencl-icd

Now install the cuda driver

./cuda_8.0.44_linux.run -silent -driver

Post install paths

Get the latest OpenCl

apt install -y nvidia-opencl-dev

Get the opencl tools

You will see an error for device not found.

Get rid of the clover device errors

comment out the .so file

./cl-demo 1000000 10

apt install -y clinfo

glxinfo | grep -i «direct rendering»

As OpenCL is now installed a good addition is CPyrit

apt install -y libz-dev libssl-dev libpcap-dev

Add pyrit from git

Enter directory and build

Do this step as the CPyrit modules need to be installed to be able to build CPyrit_OpenCL, the standard pyrit with Kali does not have these modules.

python setup.py build

python setup.py install

Enter OpenCL directory and build NOTE# cpyrit_cuda wont build unless you use gcc 5, latest kali is version 6

python setup.py build

python setup.py install

Benchmark before CPyrit enabled

Edit the config to disable CPU and enable OpenCL

Источник

cmey / install-intel-opencl-drivers-for-linux.sh

# get OpenCL driver automated installer (installs kernel 4.7)
curl https://software.intel.com/sites/default/files/managed/f6/77/install_OCL_driver.sh_.txt > install_OCL_driver.sh
chmod +x install_OCL_driver.sh
# install OpenCL driver
sudo ./install_OCL_driver.sh install
# check
ls /boot/vmlinuz- * intel *

This comment has been minimized.

Copy link Quote reply

cmey commented Mar 21, 2018 •

This installs linux kernel 4.7 but we want 4.13.0-36-generic

This comment has been minimized.

Copy link Quote reply

cmey commented Mar 24, 2018 •

Test OpenCL status with: Intel System Analyzer

Should see at the bottom:
[ OK ] OpenCL check:platform:Intel(R) OpenCL GPU OK CPU OK

This comment has been minimized.

Copy link Quote reply

cmey commented Mar 24, 2018 •

Manual Intel OpenCL Drivers installation, without installing(and patching) an old kernel (4.7)

Christophe’s previous step before you follow the guide below:

This comment has been minimized.

Copy link Quote reply

cmey commented Mar 24, 2018

Print Ubuntu version:
lsb_release -a
Print kernel version that’s running:
uname -r
Print kernel versions installed:
dpkg —list | grep linux-image

Читайте также:  Образы виртуальных машин линукс

Verify CPU model name is Intel:
grep -m 1 name /proc/cpuinfo , should be:
model name : Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz

Verify GPU is Intel:
lspci -nn | grep VGA , should be:
00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:5927] (rev 06)

This comment has been minimized.

Copy link Quote reply

cmey commented Mar 24, 2018

make sure you add your user to video group by:
sudo usermod -a -G video $LOGNAME

This comment has been minimized.

Copy link Quote reply

cmey commented Apr 5, 2018 •

This comment has been minimized.

Copy link Quote reply

cmey commented May 10, 2018 •

This comment has been minimized.

Copy link Quote reply

cmey commented Aug 24, 2018 •

A new version of the Intel OpenCL driver for Linux is out.
See: https://github.com/intel/compute-runtime/releases

It should now be as simple as:

Note this driver is advertised to only work on Gen8+ hardware.

This comment has been minimized.

Copy link Quote reply

cmey commented Aug 30, 2018 •

MBP 15 Mid 2014, has i7-4980HQ which contains an Iris Pro Graphics 5200 | GT3e

«Crystalwell is the codename of the L4 cache (eDRAM) featured in the Iris Pro-enabled Haswell CPUs. According to Intel, this superior quality memory is responsible for the increased performance of Iris Pro graphics.»
(source)

This comment has been minimized.

Copy link Quote reply

cmey commented Sep 4, 2018 •

MBP 13 touch bar Mid 2017, has i7-7567U which contains an Iris Plus Graphics 650

This comment has been minimized.

Copy link Quote reply

lixiaoquan commented May 27, 2019

This file seems not exist any more

wget http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip
—2019-05-27 15:54:21— http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip
Resolving registrationcenter-download.intel.com (registrationcenter-download.intel.com). 104.124.188.30, 2600:1406:d000:183::b, 2600:1406:d000:1bb::b
Connecting to registrationcenter-download.intel.com (registrationcenter-download.intel.com)|104.124.188.30|:80. connected.
HTTP request sent, awaiting response. 404 Not Found
2019-05-27 15:54:25 ERROR 404: Not Found.

This comment has been minimized.

Copy link Quote reply

LittleSouken commented Nov 24, 2019

marco@mr-pc: $ sudo snap install mailspring
[sudo] senha para marco:
snap «mailspring» is already installed, see ‘snap help refresh’
marco@mr-pc: $ get OpenCL driver automated installer (installs kernel 4.7)
bash: erro de sintaxe próximo ao token inesperado (‘ marco@mr-pc:

$ get OpenCL driver automated installer (installs kernel 4.7) bash: erro de sintaxe próximo ao token inesperado (‘
marco@mr-pc: $ get OpenCL driver automated installer (installs kernel 4.7)
bash: erro de sintaxe próximo ao token inesperado `(‘
marco@mr-pc: $ curl https://software.intel.com/sites/default/files/managed/f6/77/install_OCL_driver.sh_.txt > install_OCL_driver.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 28973 100 28973 0 0 101k 0 —:—:— —:—:— —:—:— 101k
marco@mr-pc: $ chmod +x install_OCL_driver.sh
marco@mr-pc: $ sudo ./install_OCL_driver.sh install
ERROR: this script is supported only on Ubuntu 14.04 and 16.04.

This comment has been minimized.

Copy link Quote reply

daniele777 commented Jun 27, 2020

Hi Guys need help .. i have hp250g4 with intel processor Intel(R) Celeron(R) N3050 @ 1.60GHz x 2
Gpu Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller i recive this error from software

ATTENTION! No OpenCL-compatible or CUDA-compatible platform found.

You are probably missing the OpenCL or CUDA runtime installation.

  • AMD GPUs on Linux require this driver:
    «RadeonOpenCompute (ROCm)» Software Platform (3.1 or later)
  • Intel CPUs require this runtime:
    «OpenCL Runtime for Intel Core and Intel Xeon Processors» (16.1.1 or later)
  • NVIDIA GPUs require this runtime and/or driver (both):
    «NVIDIA Driver» (440.64 or later)
    «CUDA Toolkit» (9.0 or later)

How to install this driver. I have linux debian based «Deepin»»
Thx

Источник

Оцените статью