Sunday, November 10, 2013

HOWTO : CUDA on Kali Linux 1.0.5

Step 1 :

Download the CUDA driver from nVidia Official Site.

# 64-bit
wget http://developer.download.nvidia.com/compute/cuda/5_5/rel/installers/cuda_5.5.22_linux_64.run

# 32-bit
wget http://developer.download.nvidia.com/compute/cuda/5_5/rel/installers/cuda_5.5.22_linux_32.run

Step 2 :

Install the CUDA driver. Accept the default values and select to install nVidia display driver also.

# 64-bit
chmod +x cuda_5.5.22_linux_64.run
./cuda_5.5.22_linux_64.run


# 32-bit
chmod +x cuda_5.5.22_linux_32.run
./cuda_5.5.22_linux_32.run


Step 3 :

Create a .bash_profile.

nano /root/.bash_profile

# 64-bit
export PATH=/usr/local/cuda-5.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-5.5/lib64:$LD_LIBRARY_PATH


# 32-bit
export PATH=/usr/local/cuda-5.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-5.5/lib:$LD_LIBRARY_PATH


Step 4 :

Update the boot loader to disable the open source nvidia display driver.

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


Step 5 (Optional) :

To test the CUDA with multiforcer.

# multiforcer for nvidia (example)
cd /usr/share/multiforcer/
multiforcer -h NTLM -c charsets/charsetall -f test_hashes/Hashes-NTLM-Full.txt --noopencl


Step 6 (Optional) :

John the Ripper for CUDA.

# 64-bit
wget http://www.openwall.com/john/g/john-1.7.9-jumbo-7.tar.gz
tar -xvzf john-1.7.9-jumbo-7.tar.gz
cd john-1.7.9-jumbo-7/src
make
make clean linux-x86-64-gpu

cd ../run
./john --help


That's all! See you.