Book Image

Kali Linux Cookbook - Second Edition

By : Corey P. Schultz, Bob Perciaccante
Book Image

Kali Linux Cookbook - Second Edition

By: Corey P. Schultz, Bob Perciaccante

Overview of this book

Kali Linux is a Linux distribution designed for penetration testing and security auditing. It is the successor to BackTrack, the world’s most popular penetration testing distribution. Kali Linux is the most widely used platform and toolkit for penetration testing. Security is currently the hottest field in technology with a projected need for millions of security professionals. This book focuses on enhancing your knowledge in Kali Linux for security by expanding your skills with toolkits and frameworks that can increase your value as a security professional. Kali Linux Cookbook, Second Edition starts by helping you install Kali Linux on different options available. You will also be able to understand the lab architecture and install a Windows host for use in the lab. Next, you will understand the concept of vulnerability analysis and look at the different types of exploits. The book will introduce you to the concept and psychology of Social Engineering and password cracking. You will then be able to use these skills to expand the scope of any breaches you create. Finally, the book will guide you in exploiting specific technologies and gaining access to other systems in the environment. By the end of this book, you will have gained the core knowledge and concepts of the penetration testing process.
Table of Contents (11 chapters)

Understanding the advanced customization and optimization of Kali

Now that we have our Kali Linux virtual machine installed and updated, let's do a bit of customization.

Getting ready

Before you start, ensure the following prerequisites:

  • Your computer is connected to the internet
  • Your installation of Kali is running
  • You are logged in as root

How to do it...

There are several customization and advanced settings that we can perform.

Upgrading the Linux kernel

To update the Linux kernel, you will do the following:

  1. Open a terminal window by selecting its icon on the left tool bar, and enter the following:
       apt-get dist-upgrade
  1. Follow the prompts to complete the installation, and reboot the virtual machine when complete.

Removing unneeded packages

To remove unneeded packages, we will do the following:

  1. Open a terminal window by selecting its icon on the left tool bar, and enter the following:
 apt autoremove 
exit

Adjusting or disabling the screen lock

During the use of this book, you may find yourself leaving your system to run commands or in between sections. During this time, the screen may lock and force you to login in more frequently than you would prefer. To change this behavior, do the following:

  1. In the upper right-hand corner of the screen, click on the down arrow, which will provide various pieces of information about the current state of the computer. In the lower left-hand corner of that box, click on the settings icon:
System status box
  1. From the All Settings screen, click on the purple privacy icon in the first row to display the privacy dialog box, then select the Screen Lock entry:
Privacy box
  1. Adjust the settings as desired; in the following example I have set the timer to 1 hour:
Screen Lock
  1. Finish by clicking on the Xs at the top until you are back at the main screen.

Correcting the Ethernet interface configuration

Since only one interface can be on at a time, we will set up networking as follows:

  1. In the upper right-hand corner of the screen, click on the down arrow, which will provide various pieces of information about the current state of the computer. In the lower left-hand corner of that box, click on the settings icon:
System status box
  1. Next to one of the interfaces, select the arrow icon, which will expose another level of menus. Click on Wired Settings:
System status box
  1. Select Add Profile from the bottom:
Network window
  1. From the New Profile window, select Identity on the left; and for Name, enter Host-Only Network:
New Profile window
  1. In the left column, click on IPv4 and scroll all the way to the bottom and put a check in the box labeled Use this connection only for resources on its network, and then click on Add:
New Profile window
  1. Assign eth1 to the host-only network that we just created by clicking on eth1 to highlight it. Click on host-only network. Verify that eth0 is assigned to the wired connection network by clicking on eth1. You should now be able to have both interfaces enabled simultaneously:
Network window

Connecting and disconnecting Ethernet interfaces

Kali Linux makes it easy to manage network connections using network manager. This is how you will connect and disconnect network interfaces:

  1. In the upper right-hand corner of the screen, click on the down arrow, which will provide various pieces of information about the current state of the computer:
System status box
  1. You will see entries for both your eth0 and eth1 interfaces. If you have followed our guide, the eth0 network is connected to the NAT network and allows access to the internet and networks outside of your virtual machine. The eth1 interface is the host-only network, which connects to your test machine. You can toggle these on and off as required.