Book Image

Kali Linux Network Scanning Cookbook - Second Edition

By : Michael Hixon, Justin Hutchens
Book Image

Kali Linux Network Scanning Cookbook - Second Edition

By: Michael Hixon, Justin Hutchens

Overview of this book

With the ever-increasing amount of data flowing in today’s world, information security has become vital to any application. This is where Kali Linux comes in. Kali Linux focuses mainly on security auditing and penetration testing. This step-by-step cookbook on network scanning trains you in important scanning concepts based on version 2016.2. It will enable you to conquer any network environment through a range of network scanning techniques and will also equip you to script your very own tools. Starting with the fundamentals of installing and managing Kali Linux, this book will help you map your target with a wide range of network scanning tasks, including discovery, port scanning, fingerprinting, and more. You will learn how to utilize the arsenal of tools available in Kali Linux to conquer any network environment. The book offers expanded coverage of the popular Burp Suite and has new and updated scripts for automating scanning and target exploitation. You will also be shown how to identify remote services, how to assess security risks, and how various attacks are performed. You will cover the latest features of Kali Linux 2016.2, which includes the enhanced Sparta tool and many other exciting updates. This immersive guide will also encourage the creation of personally scripted tools and the skills required to create them.
Table of Contents (13 chapters)

Managing Kali services

Having certain services start automatically can be useful in Kali Linux. For example, let's say I want to be able to SSH (covered in the Configuring and using SSH recipe) to my Kali Linux distribution. By default, the SSH server does not start in Kali, so I would need to log in to the virtual machine, open a Terminal, and run the command to start the service.

Getting ready

Prior to modifying the Kali Linux configuration, you will need to have installed the operating system on a virtual machine. If you have not already done this, refer to the Installing Kali Linux recipe.

How to do it...

Working with Kali Linux:

  1. We begin by logging in to our Kali Linux distribution and opening a Terminal window. Type in the following command:
  1. More than likely, it is already installed, and you will see a message like this:
  1. So now that we know it is installed, let us see whether the service is running. From the Terminal, type this:
  1. If the SSH server is not running, you will see something like this:
  1. Type Ctrl + C to get back to the prompt. Now let's start the service and check the status again by typing the following command:
  1. You should now see something like the following:
  1. So now, the service is running. Great, but if we reboot, we will see that the service does not start automatically. To get the service to start every time we boot, we need to make a few configuration changes. Kali Linux puts in extra measures to make sure you do not have services starting automatically. Specifically, it has a service whitelist and blacklist file. So to get SSH to start at boot, we will need to remove the SSH service from the blacklist. To do this, open a Terminal window and type the following command:
  1. Navigate down to the section labeled List of blacklisted init scripts and find ssh. Now, we will just add a # symbol to the beginning of that line, save the file, and exit. The file should look similar to the following screenshot:
  1. Now that we have removed the blacklist policy, all we need to do is enable SSH at boot. To do this, run the following commands from your Terminal:

That's it! Now when you reboot, the service will begin automatically. You can use this same procedure to start other services automatically at boot time.

How it works...

The rc.local file is executed after all the normal Linux services have started. It can be used to start services you want available after you boot your machine.