January 2015

How to install Virtualbox on Kali Linux

If you want to play around with different systems through the help of virtual machines or if you simply want to create your own pentesting virtual-lab for free, installing virtualbox is one of the best options for linux. Before installing virtualbox, you'll need to make sure that the below dependencies are added to your sources.list file:
## Regular repositories
deb http://http.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free
## Source repositories
deb-src http://http.kali.org/kali kali main non-free contrib
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free
These can be added manually through editing the sources.list file or by running the following command:
leafpad /etc/apt/sources.list
The above command will open one of the available text editors, LeafPad, and will edit your sources file that can be found in the /etc/apt/  location. Save the file after editing and close it. Now, open a terminal window and run:
apt-get update
apt-get upgrade
apt-get dist-upgrade
Once these commands are completed run the following command:
apt-get install linux-headers-$(uname -r)
And then:
wget download.virtualbox.org/virtualbox/4.2.14/virtualbox-4.2_4.2.14-86644~Debian~wheezy_i386.deb
dpkg -i virtualbox-4.2_4.2.14-86644~Debian~wheezy_i386.deb
installation-of-virtualbox-in-kali-linux

wget will download the mentioned version of virtualbox to your home/user folder and dpkg –i will unzip (de-package) your file and install it (through the use of the –i command).

If you need to test the successful installation simply type virtualbox in the terminal.

virtualbox-in-kali-linux

Now you can easily create your own pentesting lab in Kali Linux, but this will be covered in another post.

Create your first script - automatically update and upgrade your Kali Linux installation

Creating scripts is easy in Linux distributions, you just need access to any text editor - Linux has plenty available (gedit or gvim, to name just a few examples) and to some available neurons. In this example we'll use the update and upgrade commands and we'll create ourselves a script that once executed will automatically run the commands for us - this is the easiest example I came-up with.

Open your text editor. At the first line write
#!/bin/bash
Press enter and below this line type:
apt-get clean && apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
Save it as "update.sh" - or any other name you would prefer.

Kali-update-script

Right click your script and on the "Permissions" tab set a checkmark near Execute - allow executing file as a program.

allow-executing-file-as-program

Now every time you boot-up your Kali, instead of typing the whole thing into a terminal, just run your script.
run-in-terminal-window




Contact Form

Name

Email *

Message *

Powered by Blogger.