Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Kali Linux Network Scanning Cookbook

You're reading from   Kali Linux Network Scanning Cookbook A Step-by-Step Guide leveraging Custom Scripts and Integrated Tools in Kali Linux

Arrow left icon
Product type Paperback
Published in May 2017
Publisher
ISBN-13 9781787287907
Length 634 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Michael Hixon Michael Hixon
Author Profile Icon Michael Hixon
Michael Hixon
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Getting Started FREE CHAPTER 2. Reconnaissance 3. Discovery 4. Port Scanning 5. Fingerprinting 6. Vulnerability Scanning 7. Denial of Service 8. Working with Burp Suite 9. Web Application Scanning 10. Attacking the Browser with BeEF 11. Working with Sparta 12. Automating Kali Tools

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.

You have been reading a chapter from
Kali Linux Network Scanning Cookbook - Second Edition
Published in: May 2017
Publisher:
ISBN-13: 9781787287907
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 $19.99/month. Cancel anytime
Banner background image