Skip to main content

How to install Google Chrome on Kali Linux

Download the deb package from www.google.com/chrome.

dpkg -i google-chrome-stable_current_i386.deb

 

When then trying to run Chrome from the menu, an error message pops up advising:
unable to run as root
and that to run as root you must specify an alternate –user-data-dir for storage of profile information.

 

So let’s do that, browse to:

 

File System -> opt -> google -> chrome

cd /opt/google/chrome

 

Open the file google-chrome with a text editor:

nano google-chrome

 

And on the last line:

 

exec -a "$0" "$HERE/chrome"  "$@"

 

Add the below text:

--user-data-dir

 

Do it like this:

exec -a "$0" "$HERE/chrome"  "$@" --user-data-dir

How to setup Android Emulator on Kali Linux

Option 1:

  1. Download SDK/Bundle From:http://developer.android.com/sdk/inde…(or use the SDK in /usr/share/android-sdk ).
  2. Extract the tar.gz File (tar -xf nameOfFile.tar.gz).
  3. Open Terminal change directory to the SDK Path.
  4. Change directory in the subfolder Tools.
  5. List all available devices ./android list.
  6. Select and id and create the device ./android create avd -n NAME -t ID
  7. Change Settings ./android avd
  8. Start Emulator ./emulator -avd NAME

ln -s /usr/lib/i386-linux-gnu/libGL.so.1 #SDK-PATH#/tools/lib/libGL.so

 

Option 2:


From the Terminal, do the following:

  • Android avd
  • Go to Tools – Manage SDK.
  • Install the needed packages.
  • Create a new Virtual Device.
  • Start the Virtual Device.

 

How to use Dradis on Kali Linux

What is Dradis?

 

Dradis is an open source framework to enable you to work efficiently by gathering information from different tools and presenting it in a variety of formats. We currently support:

 

  • Burp Scanner
  • Mediawiki
  • Nessus (v1, v2)
  • NeXpose
  • Nikto
  • Nmap
  • OpenVAS

 

  • OSVDB
  • Retina
  • SureCheck
  • VulnDB HQ
  • w3af
  • wXf
  • Zed Attack Proxy

Dradis is a self-contained web application that provides a centralised repository of information to keep track of what has been done so far, and what is still ahead. It’s the best way for teams to collaborate.

How to install Nexpose on Kali Linux

Download Nexpose from Rapid7.com.

chmod +x NeXposeSetup-Linux64.bin

./NeXposeSetup-Linux64.bin

 

To start Nexpose Services:

cd /opt/rapid7/nexpose/nsc/
./nsc.sh

 

To get Metasploit and NeXpose working together:

The reason is both Metasploit and Nexpose uses two separate PostreSQL databases and if one DB starts at port 5432 the other will fail. The solution is edit the system postgreSQL configuration file at /etc/postgresql/9.1/main/postgresql.conf. Look for the line:

port = 5432

and change it to anything else other than this default port number. For example:

port = 5433

 

Then go to the <Metasploit installation directory>/apps/pro/ui/config/database.yml and change the PostgreSQL port there to the one you configured in the postgresql.conf file. If you don’t have a database.yml file but have a database.yml.example file, just rename it to database.yml and then edit it. It should be like:

development:

  adapter: postgresql

  database: <db-name>

  username: <username>

  password: <password>

  host: <hostname>

  port: 54321

  pool: 5

  timeout:5

 

Then start postgre and metasploit service. It should run fine.

/etc/init.d/posgresql start

/etc/init.d/metasploit start

 

When you have first installed Metasploit and second Nexpose, then follow the following steps:

Remove the installed metasploit packages and place them on hold:

Code:
apt-get remove metasploit && metasploit-framework
echo "metasploit"|dpkg --set-selections
echo "metasploit-framework"|dpkg --set-selections

You must remove all metasploit folders

Code:
updatedb && locate metasploit
rm -rf /usr/share/metasploit-framework/ && rm -rf /usr/share/doc/metasploit/ && rm -rf /usr/share/doc/metasploit-framework/
apt-get purge metasploit -y

 
Now download neXpose and Metasploit from the rapid7 site and make them executable:
http://www.rapid7.com/products/nexpo…-downloads.jsp
http://www.rapid7.com/products/metasploit/download.jsp

64-Bit Kali Example:

Code:
cd /tmp
wget http://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run
chmod 755 metasploit-latest-linux-x64-installer.run
wget http://download2.rapid7.com/download/NeXpose-v4/NeXposeSetup-Linux64.bin
chmod 755 NeXposeSetup-Linux64.bin

Then simply run the packages one at a time to install:

Code:
./metasploit-latest-linux-x64-installer.run

then

Code:
./NeXposeSetup-Linux64.bin

After that everything should be working as expected and you can run both neXpose and Metasploit at the same time.

 
(Optional)
If you want that Metasploit starts with Kali.
 
Code:
update-rc.d postgreSQL enable

update-rc.d metasploit enable


If you want also to install Armitage to the following:

Code:

 

apt-get install armitage

How to install Nvidia Cuda Toolkit on Kali Linux

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 ~/Downloads/NVIDIAxxxx.run.

Step 2: Install Kali linux Kernel headers

apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
apt-get install -y linux-headers-$(uname -r)

**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:

apt-get install nvidia-legacy-check

Todo: add screenshot here.

Find the right package name:

apt-cache search nvidia-*

Install the driver:

apt-get install nvidia-legacy-340xx-driver

Als de installer klaar is, herstart je je machine.

reboot

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:


root@kali:~# glxinfo | grep -i "direct rendering"
direct rendering: Yes

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:


Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "4:0:0"
    Option "AllowEmptyInitialConfiguration"
EndSection

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


[Desktop Entry]
Type=Application
Name=Display setup
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"
NoDisplay=true
X-GNOME-AutoRestart=true

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.


Missing recommended library: libGLU.so
Missing recommended library: libXi.so
Missing recommended library: libXmu.so
Missing recommended library: libGL.so

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

sudo apt-get install libglu1-mesa libxi-dev libxmu-dev
apt-get install nvidia-cuda-toolkit

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

https://devtalk.nvidia.com/default/topic/796269/cuda-setup-and-installation/most-recent-cuda-version-for-a-legacy-card/

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.

https://devtalk.nvidia.com/default/topic/968656/cuda-8-0-on-debian/
https://perlmaven.com/how-to-change-inc-to-find-perl-modules-in-non-standard-locations

apt-get install libnvidia-legacy-240xx-cudal

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

cp xorg.conf /etc/X11/

Reboot system

reboot

OLD STUFF:

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 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
update-grub
reboot

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

First stop gdm

service gdm3 stop

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

Third run nvidia script

sh cuda_5.5.22_linux_32.run

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/

Reboot system

reboot

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

nvcc -V

Step 9 Download Pyrit and Cpyrit

wget http://pyrit.googlecode.com/files/pyrit-0.4.0.tar.gz
wget http://pyrit.googlecode.com/files/cpyrit-cuda-0.4.0.tar.gz

Step 10: Extract, and install Pyrit and Cpyrit

tar -xvzf pyrit-0.4.0.tar.gz
tar -xvzf cpyrit-cuda-0.4.0.tar.gz
cd /root/cpyrit-cuda-0.4.0
python setup.py build
python setup.py install
cd /root/pyrit-0.4.0
python setup.py build
python setup.py install

Try if it works Pyrit

pyrit list_cores
pyrit benchmark

[: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

https://developer.nvidia.com/cuda-downloads

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

 

update-grub

 

reboot

 

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

 

first stop gdm

 

service gdm3 stop

 

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

 

third run nvidia script

 

sh cuda_5.5.22_linux_32.run

 

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/

 

reboot system

 

reboot

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

nvcc -V

Step 9. Download Pyrit and Cpyrit

wget http://pyrit.googlecode.com/files/pyrit-0.4.0.tar.gz

wget http://pyrit.googlecode.com/files/cpyrit-cuda-0.4.0.tar.gz

Step 10. Extract, and install Pyrit and Cpyrit

tar -xvzf pyrit-0.4.0.tar.gz

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

cd /root/cpyrit-cuda-0.4.0

python setup.py build

python setup.py install

cd /root/pyrit-0.4.0

python setup.py build

python setup.py install

Try if it works Pyrit

pyrit list_cores

pyrit benchmark

How to use Arachni and Metasploit

Arachni provides advanced exploitation techniques via the:

  • ArachniMetareport, an Arachni report specifically designed to provide WebApp context to the Metasploit framework.
  • Arachni plug-in for the Metasploit framework, used to load the ArachniMetareport in order to provide advanced automated and manual exploitation of WebApp vulnerabilities.
  • Advanced generic WebApp exploit modules for the Metasploit framework, utilized either manually or automatically by the Arachni MSF plug-in.

Please be warned that at the moment Metasploit integration is here as a proof-of-concept and is not officially supported nor a high priority.

How to use Metasploit on Kali Linux

Kali Linux doesn’t start any application services by default to shorten the boot up time and reduce the attack surface to a minimum.

  1. To start Metasploit’s services immediately, open a terminal window and enter service postgresql start && service metasploit start
  2. To start Metasploit’s services on each boot time (but not immediately), open a terminal window and update-rc.d postgresql enable && update-rc.d metasploit enable