Welcome to Kali Linux (Part 2 of 3)

In the last guide, I gave you a sweeping overview of the powerful digital forensic toolset known as Kali Linux.  In this guide, I’m going to show you how to install Kali Linux in VirtualBox so you can have a test computer to stage your attacks.

Let’s dive in.

Setting up Kali Linux in VirtualBox

A decade or so ago I used to work at Hardees Fast Food in Myrtle Beach South Carolina.  I was the cook.  So I responsible for flipping burgers and making sure they were done and prepared for pickup.  My manager was a short wizen woman with a pronounced Boston accent.

I remember one day I wasn’t assembling the burgers fast enough so she hurried in the kitchen and starting grating my nerves.

Speed it up, you’re not fast enough, speed it up Vonnie!

Picture a little old lady with a raspy Boston accent flinging grease in my face as fanned her hands motioning me to hurry up. There was seriously nothing more grating than that little troll woman’s voice.

Ugh… just thinking about it makes my hair bristle.

Thankfully, when it comes to installing Kali Linux the process isn’t grating at all.

I think it goes without saying that to setup Kali Linux in VirtualBox you’ll need to things:

  • VirtualBox
  • Kali Linux

Haha, excuse the sardonic comment but sometimes the obvious isn’t obvious.

Once we install VirtualBox, we’ll boot Kali, install it on our virtual hard drive, login as root and start using Kali Linux. We won’t get into any hacking stuff today though.  I just want to walk you through setting up your test environment so you have everything you need to get started.

Go to virtualbox.org and download the latest copy of VirtualBox to your computer.  I’m doing this on my Mac OS X Yosemite Host machine but you can download the version for Windows too.  Either one works.  I won’t go into details setting up VirtualBox because it’s self evident.  Just click Next all the way through until you hit the Finish line.

Next, download Kali Linux.  You can either download the ISO or VirtualBox image.  Either option will get you what you want.  I’ using the later because it will save me a setup step later.

Configuring VirtualBox for Kali Linux

Bust open VirtualBox and click the blue spikey New icon.

Name it “Kali Linux”.  The type should say Linux and the version should show Linux 2.6/3.x (64 bit) (assuming you downloaded the 64 bit version).

Next, move the slider to set your RAM limit.  Remember this is how much physical RAM will be allocated to your virtual machine. So if you have a 8 gigs of RAM and drag the slider to 4096 that means half of all your RAM will be apportioned to your Kali Linux guest  machine.  This isn’t really a good idea because your host machine might lock up or drag to a crawl.  1024MB (1GB) is more than enough memory so I would set it there.  Then under the hard drive section, choose Use an existing virtual hard drive file and browse to the .vmdk file you downloaded.  It’s probably compressed as a .7z file.

Conversely, if you opted for the ISO, you can choose Create a Virtual Hard Drive now.  This will create a blank Virtual Hard Drive, then we can go to Settings and browse to the ISO file later. (your virtual CD)

Installing VirtualBox in Kali Linux

Click Create and you should see Kali Linux sitting in VirtualBox!

Kali Linux in VirtualBox

Now select Kali Linux in the main VirtualBox manage screen press Command + s (or Ctrl + s in Windows) to open the Settings screen.

I know you’re feeling impetuous and you just want to startup the virtual machine but first we need to configure a few things.

Click the System Tab and choose the Motherboard section so you can remove your virtual floppy drive from the boot order!  No one uses a floppy these days so there’s no reason to leave this checked lol.

Kali Linux Remove Floppy

Click on the Display tab and crank the Video Memory all the way up to 128MB.

Also I like to check Enable 3D Acceleration because if you host computer can handle it why not use it?

VirtualBox Display Settings for Kali LInux

Now let’s check out the Storage tab.  If you’re booting from an ISO (not the VirtualBox image file) then you would select the Empty CD icon under the Storage Tree in the left pane and then click the tiny CD icon in the right pane so you can choose your virtual disk file.  You’ll have the opportunity to browse to the ISO and add it here.  This is analogous to placing a CD in a CD-ROM tray in a real computer.

Incidentally, don’t click the “Live CD/DVD” option or you won’t be able to eject the ISO later.

Browse to the Kali Linux ISO

If you’re using the VirtualBox image file, select the Kali-Linux file name under the Controller: SATA section and make sure everything looks good here.  Since I have a Solid State drive (SSD) in my Macbook Air I checked off Solid State but it’s not required.

Using a Virtual Solid state drive with Kali Linux

Alright, we’re making progress.  Skip over to the Network tab for a moment.

Under the Adapter 1 tab we need to change which adapter we attach to Kali Linux.  By default it’s set to NAT (Network Address Translation) but that won’t really work for our purposes.

Choose Bridged Adapter and then under Name make sure it’s set to your Wi-Fi adapter.

Now expand Advanced and set the Promiscuous Mode to Allow All.

I know that sounds like a sultry setting but I promise you it has nothing to do with debauchery.

Setting Promiscuous Mode to Allow All means VirtualBox will see network traffic from all hosts, including your Host machine.  So it’s a way to get a full capture and that’s exactly what you want.

You can also change the MAC Address to an easy to remember value.  That way when you do your packet captures it’ll be super obvious which captures are originating from your Virtual Machine.

Kali Linux Network Adapter Settings

Alright now we have one last thing to consider.

We’re going to use Kali Linux to do some serious penetration testing so you might want to use a beefy Wi-Fi antenna to do this.  I highly recommend coughing up $40 bucks and buying an external USB antenna with amped up range that way you’ll see more Wi-Fi networks and you can connect to them from an even further range.

The Alfa AWUS036H 1000mW 1W 802.11b/g USB Wireless WiFi network Adapter is a good one to get started.  If you don’t have a such a device don’t worry about it.  You can still use Kali Linux but if you do, click the Ports tab and add the USB antenna here.

Adding the Alpha Wi-Fi adapter in VirtualBox

This effectively lets you use to network interfaces with Kali Linux.  Your integrated Wi-Fi adapter will be seen as a “virtual wired” adapter and your USB Wi-Fi adapter will be seen as a “virtual wi-fi” adapter.  Again this isn’t required but it will give you more flexibility in network forensics with Kali.

Virtualbox Setup is Complete!

Okay the VirtualBox setup is done.  In the next and final part of this series, I’m going to show you how to setup the Kali Linux installation in VirtualBox.

We’ll boot up the VM, configure the toolkit and get everything ready for your first hack.

About

Connect with Vonnie on Twitter

Posted in Linux, Security Tagged with: , , , , ,
  • Pedro Nater

    Hi Vonnie, to me it doesn’t look that simple. I’ve got Kali-Linux 1.1.0. installed in VMWare Fusion on a MBP mid-June 2009, running OSX 10.9.5. I bought exactly the WiFi-Adapter you suggested. I first installed the Mac Drivers. While it works fine with the MacBook I have, however, problems connecting it to Linux. Do I have to install the drivers on Linux, too, which I think I have to. But let me ask you first some basics:
    While working with KL do I/can I let keep running Airport or not?
    In Kali-Linux Configuration I select Bridged with 802.11n NIC or 802.11n WLAN
    In UBS Adapters I selct Realtek 802.11n NIC.
    I’d appreciate your help!
    Peter

  • Mike Ross

    I bought alfa awus036nha and it does not work on my mac yosemite 10.10.4 .. Any recommendations on which usb wirelless card I should buy that will work on my mac ?