How to Install Nvidia Kernel Module Cuda and Pyrit in Kali Linux


Install Nvidia Kernel Module Cuda and Pyrit in Kali Linux


UPDATE: 13/03/2014 – Readers should follow these new guides that works flawlessly with Kali 1.0.6. Use this guide as a fallback.

  1. Install proprietary NVIDIA driver on Kali Linux – NVIDIA Accelerated Linux Graphics Driver

  2. Install NVIDIA driver kernel Module CUDA and Pyrit on Kali Linux – CUDA, Pyrit and Cpyrit-cuda


This will guide you through the process on installing Nvidia Cuda and Pyrit in Kali Linux.

Disclaimer: Readers please note that this worked for me without any issues. Depending on your card and how much changes you’ve already made, it might or might not work for you. It seems every installation is slightly different, and depending on you system, you might encounter some issue. I would urge readers to try and follow Official Documentation and Kali Forums first. If all fails, then you can try this method. I got some good feedback on this method when other methods failed, then again I got readers who didn’t manage to make it work.I guess it varies, but you should have some basic knowledge of Linux before you jump in and do something. (isn’t that a given?). I write this blog based on the fact that I’ve encountered similar issues and managed to solve my problem in the following way, your way might be different all-together and I can not always help. Feedback is most welcome, let me know how your installation went via a comment (Anyone can comment, no registration required). If you have a better solution or have a different way of doing things, let me know also. Again, I am happy that you’re in my site and I am able to help some, but for few others, maybe following Official Documentation or asking in Kali Forums might an option.


Download Pyrit and Cpyrit:


Nvidia Cuda Toolkit
I used the Version 5.5 Self Extracting Installer for 64-Bit OS.


Install Linux Kernel Headers:

apt-get upate && apt-get install -y linux-headers-$(uname -r)

Disable the built-in Linux drivers, save the changes to grub and reboot to unload them

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

Once the computer reboots. DO NOT log back into the GDM. Instead press CTRL + ALT + F1 and log into the command prompt.

In order to install the Nvidia drivers, you need to shut down the gdm service by typing this

service gdm3 stop

Now we are ready to install the nVidia driver and Cuda Toolset.

Installing Nvidia driver and Cuda Toolset:

CD to the directory that you downloaded the Nvidia drivers to and type the following commands. (this is for the version that I downloaded. If you have a different version, put the correct file name in for yours)

chmod 755

At this point scroll through the EULA (space to move a page at a time, enter for a line at a time) and Accept the agreement.

You might get a warning that this is not a supported version of Linux, do you want to continue. Type Y and press enter.

I took the defaults for the rest of the options.

Hopefully at this point you should (after a couple minutes) get a message saying that the install was successful. Now reboot.


Once your computer comes back up, you will probably see a blank black screen with a cursor flashing in the top left corner. Don’t worry, it’s not a bad thing, and nothing is gone. Just follow the guide.

Fixing black screen with a cursor problem:

Simply press CTRL + ALT + F1 and login.

Type the following


You should now be able to log in using the gdm GUI.

The hard part is done!

A few more minutes and you will be up and running with pyrit using your GPU’s.!

Installing Pyrit

Open a terminal shell and cd to the directory that you downloaded the pyrit files to.

Type the following to extract them. Remember to change the file name if you have a different version.

tar -xvzf pyrit-0.4.0.tar.gz
tar -xvzf cpyrit-cuda-0.4.0.tar.gz

For the sake of brevity I will just type all of the next steps into a single code box. But just understand that I am adding a couple packages that are necessary to compile / run. Then installing pyrit and cpyrit. These are the commands I used, and the files were in my /root/ directory.

apt-get install python2.7-dev python2.7-libpcap libpcap-dev

cd /pyrit-0.4.0/
python build
python install


cd /cpyrit-cuda-0.4.0/
python build
python install

pyrit list_cores

If all went well, you should have a list of available processors, including your GPU(s)!!

Black Screen Troubleshooting

If you see a blank screen after correctly installing cuda toolkit 5.5 do  CTRL + ALT + F1 and login.. Then:

rm /etc/X11/xorg.conf
vi ~/.bashrc

Change the PATH= and add these lines to the end (after the last fi) so it looks like this:

export PATH

Exit your file editor and save changes.

source /root/.bashrc

See more here in the Kali Official forum.

End of guide How to Install Nvidia Kernel Module Cuda and Pyrit in Kali Linux. Thanks for reading. Please share.



Check Also

How to fix You can’t access this shared folder because your organization’s security policies block unauthenticated guest access error on Windows 11

If you have the following error on Windows 11 “You can’t access this shared folder …

How to unhide menu bar in Virtualbox - blackMORE Ops - 2

How to unhide menu bar in Virtualbox

So I went in and hid the top menu bar and bottom status bar in Virtualbox. After they disappeared, now I cannot find out how to unhide those. Took me a little bit time to figure out, hence this post so that I don't forget it and someone else having the same to unhide menu bar in Virtualbox can find this.


  1. would this same process work in backbox linux?

  2. I have tried your guide but I was not able to install nvidia driver include in toolkit.
    can you help me?

    here is the installer log (nvidia.ko module failed to install)

    Is a freh installed 64-bit system. Do I need additional packages except the kernel-headers?
    Any help would be appreciated!

    thanks in advance

    • Is it because v3.12 kernel is not yet supported by NVIDIA? I'll have to test it myself before I can help. Try posting in, someone might have a solution already.

      • I got it working –
        1) installed nvidia driver 319.82 from nvidia's website
        2) Ctrl + ALT + F1
        3) service gdm3 stop
        4) ./ -silent -driver
        6) reboot
        5) installed cpyrit and pyrit

        • Thanks for letting us know. Everyone with latest kernel will find it really useful.

        • Hi,

          I am facing same problem as you had. After watching your comment i tried to install nvidia driver with file i downloaded from nvidia site. But when i install it i am getting this error

          "unable to build unified memory kernel module" What should i do?

          If there is something please let me know, i already spent 3 days to get this thing working.

  3. Hi there!
    Need some help to pass the “nouveau.modeset=0” parameter on particular kali install (working on a multi-boot install (deb, arch,buntu;win8) with grub loader)
    Cant figure out how to set nouveau.modeset=0 ONLY for kali boot…

    • Modify grub.cfg directly and add parameters to kali. Don’t add it for recovery though. Bit non standard but working solution. For every grub update you have to redo it. (as you want it for Kali Linux only, modifying grub.cfg is the safest option. )

  4. Is a custom build that is geared towards computers with Nvidia hardware possible? There are already some custom Kali Linux builds that are available, but you always have to build them from scratch. It would be nice to have a live CD that is already prepared to use Nvidia graphics cards for use with pyrit or cudaHashcat. In other words, the Nvidia drivers would come preloaded on that live Kali image.

    Theoretically, after you have installed the drivers on a system, you could go through the usual steps to build a live ISO image as documented here:

    • Hi Michael,
      Correct. Each ISO will be system specific and may or may not work for the next person. Let me know if you’ve managed to do it, it could be a great help for the community.

Leave your solution or comment to help others.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from blackMORE Ops

Subscribe now to keep reading and get access to the full archive.

Continue reading

Privacy Policy on Cookies Usage

Some services used in this site uses cookies to tailor user experience or to show ads.