Cuda для kali linux

Взлом паролей из облака с помощью CUDA GPU

В связи с возрастающей популярностью взломов паролей из облака, мы решили сфокусировать наши усилия на оптимизации Kali . Мы заметили, что Amazon ’ s AWS P 2- Series и Microsoft ’ s Azure NC — Series в основном сосредоточены на Windows и Ubuntu и решили устранить этот пробел.

Это заинтересует вас:

Необходимые ресурсы для взлома паролей из облака

Сначала, вы должны убедиться в том, что ваша система полностью обновлена и что ваша карта поддерживает CUDA .

Примечание: GPU с CUDA вычислительной мощностью > 5.0 рекомендуется, но GPU с меньшей мощностью также будет работать.

Как только вы обновите свою систему, вам нужно проверить наличие nouveau kernel modules , если таковые имеются, занесите их в черный список.

После изменения параметров ядра, нужно будет обновить наш initramfs , и затем перезагрузиться.

Установка на локальном компьютере

После того как мы перезагрузились, и определили, что nouveau modules не загружены, мы можем приступить к установке OpenCL ICD Loader , Drivers , и CUDA toolkit .

Во время установки драйверов система создает новые модули ядра, поэтому потребуется еще одна перезагрузка.

Проверка установки драйвера

Теперь, когда наша система готова к работе, мы должны проверить, что драйвера загрузились должным образом. Мы можем быстро проверить это, запустив nvidia — smi инструмент.

После того, как мы убедились, что наши драйвера и GPU отображаются на выходе должным образом, теперь можно с чистой совестью окунуться в процесс взлома паролей. Пока мы не ушли вперед, давайте проверим дважды, чтобы убедиться, что sure hashcat и CUDA работают вместе.

Примечание: Если у вас произошла следующая ошибка c lGetDeviceIDs (): CL _ DEVICE _ NOT _ FOUND с ID платформы, маркированной как Vendor : Mesa выполните:

Сейчас все должно работать, идем дальше и запустим эталонный тест.

Эталонное тестирование

Взлом паролей из облака

Теперь давайте взломаем некоторые хэши. Мы собираемся использовать пример NetNTLMv 2 хэш, найденный на hashcat wiki .

Успех! Мы взломали хэш из примера и доказали, что наша инсталляция является рабочей. Существует множество различных конфигураций, не упомянутых в этой статье, для увеличения скорости взлома. Однако, мы настоятельно рекомендуем вам ознакомиться с hashcat документацией для особых случаев.

Запуск GPU на AWS

Мы зарегистрировали новую CUDA , которая делает доступной Kali Rolling images with Amazon , и отлично работает с P 2 AWS образами. Без необходимости дополнительной виртуальной установки вы можете получить и начать работать с Kali GPU менее чем за 30 секунд. Все что вам нужно — это выбрать экземпляр P 2, и вы готовы начинать взлом!

2 thoughts to “Взлом паролей из облака с помощью CUDA GPU”

Добрый день всем, хочу поделится небольшим опытом как я установил драйвера NVIDIA и CUDA на Kali Linux 2016.2 с ядром 4.9.0 .

Инструкция написанная выше к сожалению не помогла мне,возможно на других компах и идет но мне не помогла,после выполнения всех вышеизложенных шагов у меня после перезагрузки вываливался белый экран с надписью : oh no something has gone wrong…. и на этом все,как исправить это я не нашел,поэтому приходилось переустанавливать все заново,и вот после нескольких дней поиска решений мне все таки удалось подружить свою видеокарту с Kali.

Да,и кстати хочу дать один совет небольшой ,но очень хороший,после того как вы установили систему и обновили,сделайте полный бэкап системы, Акронисом или любым другим,так вы сэкономите кучу времени и нервов на случай если что то пойдет не так).

Читайте также:  Fdisk linux arch linux

У меня ноутбук с двумя видеокартами, Intel и Geforce GT 520MX.
И так ,вот что я сделал,установку выполнял в два этапа:
Я буду писать своими словами,поэтому прошу прощения за неточности.

Этап 1 установка драйвера NVIDIA.

1. обновляем полностью систему командой : sudo apt-get update && apt-get upgrade && apt-get dist-upgrade
2. обязательно перезагружаемся чтобы обновилось ядро и все остальное : reboot
3. делаем анализ системы командой: lspci -v | egrep -i ‘vga|3d|nvidia’ | grep -i ‘nvidia’ эта команда выдаст всю информацию о имеющихся у вас видеокартах.
4. далее проверяем загружен ли драйвер nouveau и модуль vga_switcheroo
lsmod | grep -i ‘nouveau’
lsmod | grep -i ‘vga_switcheroo’
5. выгружаем драйвер nouveau и модуль vga_switcheroo
sudo modprobe -r nouveau
sudo modprobe -r vga_switcheroo
6. далее поочередно выполняем следующие команды,каких либо ошибок не должно выбивать:
6.1. apt-get install gcc make linux-headers-$(uname -r)
6.2. apt-get install dkms bbswitch-dkms
6.3. modprobe bbswitch load_state=0
7. далее нам необходимо занести драйвер nouveau в черный список,делается это так:
nano /etc/modprobe.d/nouveau-blacklist.conf и пишем с новой строки «blacklist nouveau» без кавычек.
нажимаем Ctrl+X и сохраняем нажав Y потом нажимаем Enter.
8. далее добавляем следующую команду
nano /etc/modules
и вводим значение «bbswitch load_state=0» с новой строки.
9. Установка / Запуск этих команд в последовательном порядке:
apt-get install nvidia-kernel-dkms nvidia-xconfig nvidia-settings
apt-get install nvidia-vdpau-driver vdpau-va-driver mesa-utils
apt-get install bumblebee-nvidia
sudo dpkg -i /root/Downloads/virtualgl_2.5_amd64.deb
service bumblebeed restart
apt-get install devscripts
apt-get build-dep bumblebee
apt-get source bumblebee
sed -i ‘s/»Xorg»/»\/usr\/lib\/xorg\/Xorg»/’ bumblebee-3.2.1/src/bbsecondary.h
cd bumblebee-3.2.1/
dpkg-buildpackage -us -uc -nc
dpkg -i ../bumblebee_3.2.1-10_amd64.deb
service bumblebeed restart
reboot
10. далее вводим следующую команду:
n ano /etc/bumblebee/xorg.conf.nvidia
нам нужно раскомментировать строчку BusID «PCI: 01: 00: 0» и заменить 1 с номером, который вы получаете от утилиты lspci.
11. далее поочередно вводим следующие команды :
service bumblebeed restart
optirun -v -b virtualgl -c jpeg glxgears (должно появится окошко с вращающимеся шестеренками,если это произошло ,значит драйвер Nvidia установился правильно)
apt-get install freeglut3-dev libxmu-dev libpcap-dev
На этом установка драйвера от Nvidia завершена,делаем перезагрузку и приступаем к второму этапу.

Этап 2. Установка драйвера CUDA.

Собственно только одна команда:
apt-get install -y ocl-icd-libopencl1 nvidia-driver nvidia-cuda-toolkit
и после того как все скачается и установится делаем перезагрузку.
Теперь можем проверить что драйвера работают корректно ,вводим nvidia-smi и смотрим табличку с информацией о видеокарте.
Далее можем проверить корректность установки драйверов CUDA командой hashcat -I и смотрим информацию.
Кстати заметил что если теперь ввести команду : optirun -v -b virtualgl -c jpeg glxgears то окошко с шестеренками не появляется и выдает ошибку,лечится это двумя командами:
systemctl enable bumblebeed
systemctl start bumblebeed
И напоследок можно сделать бенчмарк следующей командой hashcat -b и наблюдать сколько паролей в секунду может подбирать ваша видеокарта.
И пару скриншотов нашей работы:

На этом все,благодарю за внимание,надеюсь я кому то помогу.

Источник

How to install Nvidia Cuda Toolkit on Kali Linux

Written by Vincent Verloop on January 25, 2015 . Posted in Security.

Following the official documentation for installing Nvidia driver on Kali 2.0 didn’t work for me. I installed nvidia-kernel-dkms, disabled nouveau driver, and rebooted. Then I had an error saying Something went wrong.. and presented with only a logout button. I was unable to login to the graphical interface. So I dug every bit of information in the internet and finally installed NVIDIA driver (340.98) on Kali (kernel 4.0.0).

Step 1: Download the driver for your GPU.
To know which driver to download, run lspci | grep -E «VGA|3D» command. It will show the GPU you currently have. Mine is GeForce 9800GTX. Then look for the appropriate driver for your GPU at Nvidia website. Here are the archives for 64 bit and 32 bit system. After downloading the driver, place it somewhere in your home folder – we will be needing it later. Make it executable chmod +x

Читайте также:  Kafka tool mac os

Step 2: Install Kali linux Kernel headers

**If you have installed nvidia-kernel-dkms earlier, remove it and all nvidia packages by apt-get remove nvidia* –purge.

Step 3: Stop X server

We need to stop the X server so we can run the Nvidia installer. Kali2.0 uses gdm by default. You can stop the X server by stopping gdm systemctl stop gdm . Another way is to hit Ctrl+Alt+Backspace. You can also try the methods suggested here in case previous methods don’t work.

Step 4: Install Nvidia Driver
Now, cd into the directory where the installer is located. Then run the installer ./NVIDIAxxxx.run -a . Just accept whatever the installer asks. For 64 bit systems, you might encounter a question about 32bit libs, just ignore it.

ATTENTION: When normal installation not works, try the following and follow instructions:

Todo: add screenshot here.

Find the right package name:

Install the driver:

Als de installer klaar is, herstart je je machine.

Als het systeem is herstart, zie je een NVIDIA splash screen, wat aangeeft dat de drivers correct zijn geïnstalleerd, alhoewel, dit niet altijd het geval is. Om er zeker van te zijn, dat de drivers correct werken, geef het volgende commando:

After the installation completes, we need to disable the nouveau driver and configure the X server.

Step 5: Configure X server (OPTIONAL)
Then, configure xorg.conf. You will need to know the PCI address of the NVIDIA card, which you can find by issuing lspci | grep -E «VGA|3D» . The PCI address is the first 7 characters of the line that mentions NVIDIA. It will look something like 01:00.0 . In the xorg.conf, you will need to format it as #:#:# ; e.g. 01:00.0 would be formatted as 1:0:0 .

In my case, the bus id for my GPU was 04:00.0 .

Edit/create the file /etc/X11/xorg.conf and add the following lines:

Then create a file /usr/share/gdm/greeter/autostart/display_setup.desktop and paste the following lines:

Reboot and you should be good to go.

Step 6: Install Nvidia Cuda Toolkit

First stop gdm. We need to stop the X server so we can run the Nvidia Cuda Toolkit installer. Kali 2.0 uses gdm by default. You can stop the X server by stopping gdm systemctl stop gdm . Another way is to hit Ctrl+Alt+Backspace.

Installing Prerequisites

If your system does not include necessary dependencies, you might encounter following error when installing CUDA toolkit.

You need to install additional libraries which installs above dependencies as follows:

Check if your GPU is ready for Cuda:
http://www.geforce.com/hardware/technology/cuda/supported-gpus

Legacy GPU’s:
https://stackoverflow.com/questions/29241538/which-cuda-toolkit-version-for-older-nvidia-driver
https://developer.nvidia.com/cuda-legacy-gpus

For legacy GPU’s, install Nvidia Cuda Toolkit v6.5:
https://developer.nvidia.com/cuda-toolkit-archive

chmod +x cuda_6.5.14_linux_64.run
./cuda_6.5.14_linux_64.run

If you get the following error:
Unsupported compiler 4... Use –override to override this check

it says that your gcc compiler is incompatible with the installation. To prevent this error, you need to change the installation step as,
sudo ./cuda_6.5.14_linux_64.run —override compiler

You can then accept the EULA, and at the next step, do not install nvidia accellerated graphics driver(select no to when asking to install the driver), since we already have installed a proprietery driver.

At the end of the installation copy the file xorg.conf first edited in the folder /etc/X11/

Step 2: Install Cuda dependencies

Читайте также:  Не могу установить windows пишет версия этого файла несовместима с используемой версией windows

Step 4: Give permissions to the script running nvidia (valid command if discharged in the root directory)

Step 5: Blacklist Nouveau Driver update grub and reboot system

step 6: Edit file xorg.conf (it is for nvidia geforce gt 630)

Open Leafpad and copy and paste this, where necessary re-edit according to your screen, or graphics card:

Save the file in the root folder with name calling xorg.conf

Step 7: Install Cuda

Second press ctrl+alt+f1 on keyboard and re-login in the system

Third run nvidia script

Accept the EULA, accept the installation etc and install in the default folder

Fourth at the end of the installation copy the file xorg.conf first edited in the folder etc/X11/

Step 8. setting Cuda for install Pyrit

Create symbolic links in for the correct installation of Pyrit

First create symbolic link Cuda folders in /opt

Second create symbolic link to nvcc /usr/bin

Try if it works nvcc

Step 9 Download Pyrit and Cpyrit

Step 10: Extract, and install Pyrit and Cpyrit

Try if it works Pyrit

[:en]Step 1. Install Kali linux Kernel headers

aptitude update && aptitude install -y linux-headers-$(uname -r)

Step 2. Install Cuda dependencies

aptitude install libpcap-dev python2.7-dev libcr-dev mpich2 mpich2-doc libglu1-mesa-dev libglu1-mesa libglui-dev libxmu-dev libxi-dev build-essential binutils gcc-4.6 g++-4.6 freeglut3-dev libx11-dev libgl1-mesa-glx

Step 3. Download last Nvidia Cuda driver whit official site here

I preferred to download drivers for Ubuntu 10.04 64bit(i have kali 64 bit)

Step.4 Give permissions to the script running nvidia (valid command if discharged in the root directory)

chmod 755 cuda_5.5.22_linux_32.run

Step 5. Blacklist Nouveau Driver update grub and reboot system

sed ‘s/quiet/quiet nouveau.modeset=0/g’ -i /etc/default/grub

step 6. edit file xorg.conf (it is for nvidia geforce gt 630)

open leafpad and copy and paste this,where necessary re-edit according to your screen, or graphics card

Section «ServerLayout» Identifier «Layout0» Screen 0 «Screen0» 0 0 InputDevice «Keyboard0» «CoreKeyboard» InputDevice «Mouse0» «CorePointer» EndSection Section «Files» EndSection Section «InputDevice» # generated from default Identifier «Mouse0» Driver «mouse» Option «Protocol» «auto» Option «Device» «/dev/psaux» Option «Emulate3Buttons» «yes» Option «ZAxisMapping» «4 5» EndSection Section «InputDevice» # generated from default Identifier «Keyboard0» Driver «kbd» EndSection Section «Monitor» Identifier «Monitor0» VendorName «Unknown» ModelName «CRT-1» HorizSync 30.0 — 80.0 #if you need to change the parameters for your main domain display VertRefresh 55.0 — 75.0 #if you need to change the parameters for your main domain display Option «DPMS» EndSection Section «Device» Identifier «Device0» Driver «nvidia» VendorName «NVIDIA Corporation» BoardName «GeForce GT 630» #if you need to change the parameters for your card EndSection Section «Module» Load «glx» EndSection Section «Screen» Identifier «Screen0» Device «Device0» Monitor «Monitor0» DefaultDepth 24 SubSection «Display» Depth 24 EndSubSection EndSection

Save the file in the root folder with name calling xorg.conf

Step 7. Install cuda

service gdm3 stop

second press ctrl+alt+f1 on keyboard and re-login in the system

third run nvidia script

accept the eula accept the installation etc and install in the default folder

fourth at the end of the installation copy the file xorg.conf first edited in the folder etc/X11/

cp xorg.conf /etc/X11/

Step 8. setting Cuda for install Pyrit

Create symbolic links in for the correct installation of Pyrit

First create symbolic link Cuda folders in /opt

ln -s /usr/local/cuda /opt

Second create symbolic link to nvcc /usr/bin

ln -s /usr/local/cuda-5.5/bin/nvcc /usr/bin/

Try if it works nvcc

Step 9. Download Pyrit and Cpyrit

Step 10. Extract, and install Pyrit and Cpyrit

Источник

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