Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Practical Web Penetration Testing

You're reading from  Practical Web Penetration Testing

Product type Book
Published in Jun 2018
Publisher Packt
ISBN-13 9781788624039
Pages 294 pages
Edition 1st Edition
Languages
Author (1):
Gus Khawaja Gus Khawaja
Profile icon Gus Khawaja

Table of Contents (18) Chapters

Preface 1. Building a Vulnerable Web Application Lab 2. Kali Linux Installation 3. Delving Deep into the Usage of Kali Linux 4. All About Using Burp Suite 5. Understanding Web Application Vulnerabilities 6. Application Security Pre-Engagement 7. Application Threat Modeling 8. Source Code Review 9. Network Penetration Testing 10. Web Intrusion Tests 11. Pentest Automation Using Python 12. Nmap Cheat Sheet 13. Metasploit Cheat Sheet 14. Netcat Cheat Sheet 15. Networking Reference Section 16. Python Quick Reference 17. Other Books You May Enjoy

Kali Linux Installation

So, you are new to the Kali Linux world, right? (If you have ever installed Kali Linux before, you can skip this chapter.) Welcome to the toy of hackers: Kali Linux. Are you excited? You haven't seen anything yet! This amazing operating system will take you to a higher level of security achievements.

By the end of this chapter, you will know how to install Kali Linux; in the next chapter, you will delve deeply into using the operating system.

We have already created the victim machine (Mutillidae host), so now it's time to create the attacking machine. In this chapter, we will cover:

  • An introduction to Kali Linux
  • How to install Kali Linux from scratch
  • How to install Kali on VMware
  • How to install Kali on VirtualBox

Introducing Kali Linux

What exactly is Kali Linux?

Kali Linux (previously called BackTrack) is a free, open source, Debian-based Linux distribution. This operating system has hundreds of applications installed, which can help us to conduct a successful penetration test.

And, guess what? Kali Linux is used by bad hackers (also known as black hat hackers), too. This means that we (security professionals) will have more accurate results, because we are using the same tools that the bad guys use to compromise systems.

You can install this beast on any virtualization host (VMware, VirtualBox, or HyperV). Also, you can install it on an ARM processor-based computer, like the Raspberry Pi.

Finally, you need to know that Kali Linux is developed, funded, and maintained by Offensive Security, and you can visit their site at https://www.Kali.org.

...

Installing Kali Linux from scratch

Let's suppose that you have a laptop or a dedicated host, and you want to install Kali Linux. Follow the steps in this section, and you can install this monster on your machine. Also, you can install a fresh copy on a virtual machine (if you want to learn the details of the installation process yourself), but Kali Linux offers pre-built VMs, which we will learn about later in this chapter:

  1. First, you need to download Kali. Simply browse to https://www.kali.org/downloads, and you will land on the download page for this operating system (OS).
  2. I will choose the 2018.1 64 bit version, and will click on the HTTP link to download it directly to my machine. After the download has completed, you will need to copy the ISO file to a bootable USB drive. You're probably asking yourself this question: how do I make my USB bootable? There is a Windows...

Installing Kali on VMware

If you have VMware and you want to install Kali Linux on it, then this section is for you. In the previous section, you saw how to install Kali from scratch, but you don't need to do that if you have VMware. All you need to do is download the image file and import it into VMware, and you're good to go:

  1. To download the VMware image file, go to https://www.kali.org/downloads and scroll down a little bit, until you see the following section:
  1. Follow the link to the Offensive Security Download Page. On this page, you will see a table that contains the virtual image copies of VMware:
  1. Choose either the 32- or 64-bit version, and download it locally to your machine. Then, you will need to import it into VMware, so locate the File menu (click on it) and then click on Open:
  1. A dialog window will show up, and you should select your downloaded...

Installing Kali on VirtualBox

VirtualBox is a very popular virtualization product, because it's free and it offers professional features. You will probably use VirtualBox for your virtualization environment. My base machine is either Windows or macOS, and I have VirtualBox installed on top of it, so I can use Kali Linux for my penetration testing tasks.

Kali offers us pre-built images for VirtualBox, so all we need to do is import them and start using Kali right away. Amazing, right? See the following steps:

  1. To download the VirtualBox image file, go to https://www.kali.org/downloads and scroll down a little bit, until you see the following section:
  1. Follow the link to the Offensive Security Download page. On that page, you will see a table that contains the virtual image copies for VirtualBox:
  1. Choose either the 32- or the 64-bit version, and download it locally to your...

Bridged versus NAT versus Internal Network

People are totally confused regarding how the network configurations in VirtualBox and VMware work. The three most popular configurations are Bridged, NAT, and Internal Network.

Let's start with the easiest option, which is the Bridged network. This architecture will let your Kali Linux connect directly to your network (LAN), and will get an automatic IP address from your home router. So, if your network is 192.168.0.0, then your Kali IP address will be something like 192.168.0.x (for example, 192.168.0.101). Now, you can interact with the machines on your network by using Kali Linux:

Some people are afraid of connecting Kali to the network, because it's open to personal computers. If you're anxious about it, you can choose NAT or NAT Network (on VirtualBox). If you're using VirtualBox, then use an NAT Network instead...

Updating Kali Linux

Before you start using your Kali Linux machine, you need to make sure that you're up to date. The command to update Kali Linux is straightforward, and you will get used to it, since you will have to execute it at least once a week, or before installing any new application:

apt-get update
apt-get upgrade -y
reboot

The -y in the upgrade command will accept the prompts automatically. You will not need to press the letter Y every time the upgrade asks you a question.

You are probably curious to know where the configuration file for the update repositories is located in Kali. The path to the configuration file is /etc/apt/sources.list (the # at the beginning of a line means it's commented):

Summary

At this stage, you're ready to start using Kali Linux. In the next chapter, you will take your skills to the next level by starting to master the use of this operating system.

I like to keep the summary short and not bore you with useless details. I hope that you enjoyed this chapter, and that you learned how to download and install Kali Linux from scratch. I'm assuming that you learned how to install Kali on VMware, or VirtualBox; don't forget to install the additional tools for both.

As a final note, don't forget to update your Kali Linux host before moving onto the next chapter.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Practical Web Penetration Testing
Published in: Jun 2018 Publisher: Packt ISBN-13: 9781788624039
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}