Installing Kali Linux

Throughout this book, we're going to use a number of penetration testing tools. You can go ahead and install each of these tools manually, or you can do what most pen testers, including myself, do—save time and effort by using an operating system designed for hacking. We're going to use an operating system called Kali Linux, a flavor of Linux based on Debian. It comes with all of the programs and applications that we need to use, preinstalled and preconfigured. This means that we can just install the operating system and start to learn hacking.

There are two options for installing Kali: install it as a virtual machine inside the current operating system or install it in the main machine as the main operating system. Throughout this book, we are actually going to be using it as a virtual machine, because using it as a virtual machine works exactly the same as using it as the main machine; it will be completely isolated from our computer running inside VirtualBox. If we break it, or mess things up, it would be very easy to fix. It's very easy to go back to other snapshots or configurations, and we won't lose any functionality by using it as a virtual machine. That is why we always use it this way.

The steps are exactly the same, regardless of what operating system you use, whether you're on Windows, Linux, or OS X.

The steps for installing Kali Linux are as follows:

  1. Download the VirtualBox version for your computer.
  2. After setting up VirtualBox, download Kali Linux, available at https://www.offensive-security.com/kali-linux-vm-vmware-virtualbox-hyperv-image-download/.
  3. Scroll down, making sure to click on the Kali Linux VirtualBox Images, not on the VMware; then, download the version of Kali that's compatible with your system. So, if you have a 64-bit computer, download the 64-bit, and if you have a 32-bit computer, download the 32-bit.
  4. After downloading it, you should get a file with a .ova extension; you will have the name followed by the .ova extension, as shown here:
  1. To install this in VirtualBox, all we have to do is double-click on the file. You will see a window that will allow you to import the virtual machine. We're going to keep everything the same for now and we're just going to click on the Import button. That's it; the virtual machine is ready to be used:
  1. Before we start, we will look at how to modify some of the settings. We're going to click on the Kali-Linux tab, which can be seen on the left side of the window. Then, we're going to click on the Settings. The first thing that we are going to do here is go to System and modify the amount of RAM it has. Depending on how much RAM you have on your computer, you can give this a 2, but 1 GB is enough for Kali. Usually, I leave it at 2, because I have 16 GB of RAM.
  1. Also, when you click on the Processors tab, you'll see that, by default, we have two processors assigned to it. Again, I have 8 CPUs, so 2 is not going to cause too much pressure on my computer; but 1 CPU is also enough for Kali.
  2. Now, we're going to go to the Network settings, and we're going to set this to use a NAT network. Sometimes, when we set this to a NAT Network, we won't see a network name in here; for that, please check out the link https://www.youtube.com/watch?v=y0PMFg-oAEs and it will show how to create a NAT Network. This setting is basically going to create a virtual network that our host machine will be the router for, and then all of the virtual machines are going to be clients connected to this network. So, they're going to get internet connection from the host machine and, at the same time, all of my virtual machines will be connected to a virtual network. This is very handy, because my virtual machines will be able to communicate with each other; we can use one of them to hack into another, and we can use it to test network attacks, and much more.

This will allow my virtual machines to have internet connection, and it will also allow them to communicate with each other, all of this will be done through a virtual network. It will not use any of your wireless adapters or any of the wireless cards; it will create a virtual Ethernet network, so as far as the virtual machines are concerned, they're connected to a network through an Ethernet cable.

  1. We can now click on OK and start our virtual machine.
  2. Now, to start it, all we have to do is click on the Start button. Then, click inside the virtual machine, and hit Enter; now we are inside the virtual machine:
  1. Now it's asking us for the username, and the default username is root, and then it's asking us for the password, and the default password is the reverse of that, which is toor. Since we installed this using the ready image, we can just click on the green button, or we can go to View | Full-screen; the screen will automatically resize to the size of our screen.
  2. Now, note that top-right hand side of the screen, we should actually see a network icon, because we set this machine to use a NAT network. If we don't have a network icon, it means that the machine isn't connected to the NAT network, so if we open the browser, we will see that it's not connected to the internet.
  1. To fix this issue, we just have to go to the top of the screen, and it will display menus. Going to Devices | Network, we can click on Connect Network Adapter as shown in the following screenshot:

We only have to do this once, and then the virtual machine will automatically connect to the NAT network. Once this is done, in just a few seconds, we will have a network icon appear, and if we click on it, we will get connected to a wired network.

  1. As we can see in the following screenshot, it says Wired Connected, so Kali thinks it's connected to a wired network:

Now, if we just click Try Again in the browser, we will see internet working. 

Don't be intimidated by this new operating system; we're going to go through the basics, and we're going to use it a lot. It's actually going to become very easy for you to use.

Also, like I said, you won't lose any functionality when you install Kali Linux as a virtual machine. It's actually better to install it as a virtual machine, because it's completely isolated from your computer, and it will be very easy to fix if things go wrong.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.180.244