Драйвера nvidia для кали линукс

Устанавливаем драйвер NVIDIA на Kali Linux

Несмотря на то, что Kali Linux базируется на дистрибутиве Debian, у них совершенно разная философия и разные репозитории. Если вы когда-то устанавливали драйвера в Debian, в частности драйвер на видеокарту Nvidia, то в Kali Linux способ установки данного драйвера немного отличается. Тем не менее, установить драйвер на видеокарту все же рекомендуется, так как если вы будете использовать к примеру такой инструмент как Hashcat, то в разы ускорите брутфорс. Дело в том, что Hashcat использует ресурсы вашей видеокарты для подобной атаки, и стоит признать тот факт, что весьма успешно. Но, как говорилось выше, установка драйвера в Kali Linux для видеокарт Nvidia отличается, но, перед тем как мы произведем установку, давайте сначала разберемся с репозиториями.

Репозитории Kali Linux

Что бы не затягивать статью, быстренько пробежимся по репозиториям которые имеются в Kali Linux. После установки операционной системы необходимо отредактировать файл “sources.list”, в этом файле находятся репозитории откуда система получает обновления, а так же происходит установка программного обеспечения. По умолчанию в файле “sources.list” имеется один репозиторий:

Данный репозиторий часто обновляется и соответственно имеет самое новое программное обеспечение. Второй же репозиторий который вы можете добававить в файл “sources.list”, это:

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

Третий репозиторий как вы можете догадаться, это эксперементальй репозиторий, и соответственно, в нем находятся пакеты который еще толком не прошли проверку и могут содержать какие то ошибки. И как не сложно догадаться, возможны глюки, а так же не стабильная работа, в том числе и всей операционной системы.

Установка драйвера Nvidia

Теперь когда разобрались с репозиториями, давайте перейдем к установке драйвера на видеокарту Nvidia. Предварительно конечно обновив систему командами:

Давайте определим какие графические процессоры у нас имеются, я буду показывать на своем ноутбуке, у вас же данные показатели соответственно будут отличаться, вводим команду:

Как видно на скриншоте, у меня первый графический процессор, или иными словами, видеокарта AMD, а вторая Nvidia. Теперь переходим к установке драйвера и утилиты nvidia-cuda-toolkit:

Когда установка драйвера завершиться, можно проверить правильно ли все установилось выполнив команду:

Как вы можете увидеть на скриншоте, установился видеодрайвер версии 455, так же можно запустить все ту же утилиту Hashcat с опцией “-I”:

Заключение

Сама же Kali Linux мало подходит для повседневного использования, тем не менее, использовать данную систему предварительно установив ее на ноутбук или стационарный компьютер можно, но в тех случаях, когда необходим ее специфический функционал. А соответственно, ее необходимо предварительно настроить, и установить необходимое программное обеспечение, в данном же случае драйвер на видеокарту Nvidia. И только после этого можно приступать к работе с уверенностью что ваша система сможет работать в полную силу.

Читайте также:  Асус как загрузить с флешки windows

А на этом сегодня все. Надеюсь данная статья будет вам полезна.
Журнал Cyber-X

Источник

Драйвера nvidia для кали линукс

After spending few days on how-tos and debugging the black screen issue on boot after insalling the nvidia drivers, I was finally able to find a solution to all my problems. The main reason I’m writing this post is to let you know that the tutorial found on Kali’s official website is broken as of date 11 April 2018. According to he mentioned in their website you might be able to successfully install the packages — ocl-icd-libopencl1, nvidia-driver, nvidia-cuda-toolkit but you might encounter issues during the reboot. You might get a black screen and won’t be able to login via the GUI.

So lets get started-

First of all let me tell you the specifications of my system-

CPU — Intel® Core™ i5-8250U CPU @ 1.60GHz × 8

GPU #1- Intel® UHD Graphics 620

GPU #2- Nvidia GeForce MX150

Before we begin, a couple of notes:

USE AT YOUR OWN RISK

This tutorial is for official NVIDIA Driver

Tutorial found on official Kali website is BROKEN! It never works for optimus/hybrid Graphics enabled laptop

Step 1: Verify you have hybrid graphics

Step 2: Disable nouveau

Step 3: System will reboot and nouveau should be disabled. Verify if nouveau is disabled:

If shows nothing,means nouveau successfully disabled.

Step 4: Install nvidia driver from kali repo:

You can also download latest .run file from Nvidia’s website. Execute and procceed with installation. Whether its from Kali’s repo or Nvidia’s website, procedure is same. Code to install the .run file:

Step 5: Now we have to find bus id of our nvidia card:

it should show something like this:

This is our Bus ID.

Step 6: Now we generate /etc/X11/xorg.conf file with this bus ID according to Nvidia’s guide:

Replace the string inside ** ** with your Bus ID and save it to /etc/X11/xorg.conf

Step 7: Now we have to create some scripts according to our display manager.Since im using default Kali linux which is GDM,i created two files: /usr/share/gdm/greeter/autostart/optimus.desktop /etc/xdg/autostart/optimus.desktop with the following content:

Step 8: Now reboot and you should be using Nvidia Driver. Verify if everything is ok: install mesa-utils if not previously installed.

Step 9: Now you can install the cuda toolkits and drivers. The package nvidia-cuda-toolkit has been deprecated. You can install hashcat-nvidia package as an alternative.

Step 10: Now that our system should be ready to go, we need to verify the drivers have been loaded correctly. We can quickly verify this by running the nvidia-smi tool.

FIXING SCREEN TEARING ISSUE: After you successfully boot up with Nvidia Driver, you most probably would be experiencing screen tearing issue eg: glitches while playing videos in VLC, Youtube videos on Chrome/Firefox etc. Luckily, we can fix this by enabling PRIME Sync.

1. Verify if PRIME is disabled

it should output something like this:

First one is our connected display.So PRIME sync is disabled.

2. Edit /etc/default/grub and append nvidia-drm.modeset=1 in GRUB_CMDLINE_LINUX_DEFAULT after quiet.Like the following:

3. Save the changes and update grub using the command:

4. Reboot your system.

5. Verify if PRIME is enabled:

Now it should output:

Читайте также:  Windows phone смарт часы

If it still shows 0 for you,then there is probably something wrong with your system config/kernel. Since this is still an experimental feature from Nvidia,you are out of luck.

IF YOU STUCK IN BOOT SCREEN

Revert what we have done so far:

Press CTRL+ALT+F2 or CTRL+ALT+F3, login with your password.

Remove those display manager files we created earlier (for GDM):

Now reboot. You should be able get back to your old system.

If any issues exist please post it in Kali’s forum.

My sincere thanks to TiGER511 who did all the hard-work.

I’ll soon update this repo on how to switch between your Intel Graphics and Nvidia Graphic card.

About

Install Nvidia drivers on Kali Linux safely in 10 easy steps.

Источник

Драйвера nvidia для кали линукс

Do not attempt this in a VM. It is possible in theory, however this likely will not work and we do not recommend that users attempt this.

This document explains how to install NVIDIA GPU drivers and CUDA support, allowing integration with popular penetration testing tools.

This guide is also for a dedicated card (desktops users), not Optimus (notebook users). We do not have the hardware in order to write up the guide. So we are looking for community contribution to help out. If you have the hardware, and expertise, please edit this guide!

Prerequisites

First, you’ll need to ensure that your card supports CUDA.

GPUs with a CUDA compute capability > 5.0 are recommended, but GPUs with less will still work.

Let’s determine the exact GPU installed, and check the kernel modules it’s using:

Notice how Kernel driver in use & Kernel modules are using nouveau? This is the open source driver for nVidia. This guide covers installing the close source, from NVIDIA.

There is a package called nvidia-detect which will fail to detect the driver due to Kali being a rolling distribution and requires a stable release.

Installation

Once the system has rebooted from doing an OS upgrade, we will proceed to install the Drivers, and the CUDA toolkit (allowing for tool to take advantage of the GPU).

During installation of the drivers the system created new kernel modules, so a reboot is required:

DPI/PPI

Upon Kali starting back up, certain things may appear different than what is expected.

  • If certain things are smaller, this could because of HiDPI.
  • However, if certain things are larger, this could because the DPI is incorrect.

Verify Driver Installation

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

You can see our hardware has been detected we are using nvidia rather than nouveau drive now.

Hashcat

With the output displaying our driver and GPU correctly, we can now dive into benchmarking (using the CUDA toolkit). Before we get too far ahead, let’s double check to make sure hashcat and CUDA are working together.

It appears everything is working, let’s go ahead and run hashcat’s inbuilt benchmark test.

Benchmarking

There are a multitude of configurations to improve cracking speed, not mentioned in this guide. However, we encourage you to take a look at the hashcat documentation for your specific cases.

Читайте также:  Зависает mac os при запуске

Troubleshooting

In the event setup isn’t going as planned, we’ll install clinfo for detailed troubleshooting information.

OpenCL Loaders

It may be necessary to check for additional packages that may be conflicting with our setup. Let’s first check to see what OpenCL Loader we have installed. The NVIDIA OpenCL Loader and the generic OpenCL Loader will both work for our system.

If mesa-opencl-icd is installed, we should remove it:

Since we have determined that we have a compatible ICD loader installed, we can easily determine which loader is currently being used.

As expected, our setup is using the open source loader that was installed earlier. Now, let’s get some detailed information about the system.

Querying GPU Information

We’ll use nvidia-smi once again, but with a much more verbose output.

It looks like our GPU is being recognized correctly, so let’s use glxinfo to determine if 3D Rendering is enabled.

The combination of these tools should assist the troubleshooting process greatly. If you still experience issues, we recommend searching for similar setups and any nuances that may affect your specific system.

Updated on: 2021-Sep-27
Author: g0tmi1k

Источник

HackWare.ru

Этичный хакинг и тестирование на проникновение, информационная безопасность

Взлом с CUDA GPU в Kali Linux в облаке и на ПК

Запуск GPU инстанса AWS с Kali Linux

Авторы Kali Linux опубликовали новость, что они зарегистрировали новые образы Kali Rolling с поддержкой CUDA в Amazon (ссылка на новость выше). Они работают из коробки с образами P2 AWS. Вроде бы как, не требуется дополнительная настройка, вы можете получить работающий экземпляр Kali GPU менее чем за 30 секунд. Вам нужно выбрать P2 инстанс и вы готовых для взлома!

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

Установка проприетарного драйвера Nvidia на Kali Linux Rolling

Инструкция переведена «как есть» — без проверки, поскольку у меня отсутствует соответствующее железо.

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

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

После того, как мы обновили систему, нужно проверить модули ядра nouveau (свободные драйвера Nvidia, они будут конфликтовать с проприетарными) и если они включены, добавить их в чёрный список.

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

После перезагрузки и проверки, что модули nouveau не загружены, мы переходим к установке загрузчика OpenCL ICD, драйверов и набора инструментов CUDA.

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

Проверка установленных драйверов

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

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

Если вы получили ошибку clGetDeviceIDs(): CL_DEVICE_NOT_FOUND с отметкой Platform ID Vendor: Mesa, то запустите:

Судя по всему, всё работает, продолжим запуском теста производительности.

Бенчмарк

Взлом хеша пароля

А теперь давайте взломаем какие-нибудь хеши:

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

Источник

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