Book Image

Kali Linux Cookbook

Book Image

Kali Linux Cookbook

Overview of this book

In this age, where online information is at its most vulnerable, knowing how to execute the same attacks that hackers use to break into your system or network helps you plug the loopholes before it's too late and can save you countless hours and money. 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. Discover a variety of popular tools of penetration testing, such as information gathering, vulnerability identification, exploitation, privilege escalation, and covering your tracks. Packed with practical recipes, this useful guide begins by covering the installation of Kali Linux and setting up a virtual environment to perform your tests. You will then learn how to eavesdrop and intercept traffic on wireless networks, bypass intrusion detection systems, and attack web applications, as well as checking for open ports, performing data forensics, and much more. The book follows the logical approach of a penetration test from start to finish with many screenshots and illustrations that help to explain each tool in detail. The Kali Linux Cookbook will serve as an excellent source of information for the security professional and novice alike!
Table of Contents (16 chapters)
Kali Linux Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Starting network services


Kali Linux comes with several network services which may be useful in various situations and are disabled by default. In this recipe, we will cover the steps to set up and start each service using various methods.

Getting ready

The following requirement is needed in order to continue:

  • A connection to the network with a valid IP address

How to do it...

Let's begin the process of starting our default service:

  1. Start the Apache server:

    service apache2 start
    

    We can verify the server is running by browsing to the localhost address.

  2. To start the Secure Shell (SSH) service, SSH keys need to be generated for the first time:

    sshd-generate
    
  3. Start the Secure Shell server:

    service ssh start
    
  4. To verify the server is up and listening, use the netstat command:

    netstat -tpan | grep 22
    
  5. Start the FTP server:

    service pure-ftpd start
    
  6. To verify the FTP server, use the following command:

    netstat -ant | grep 21
    

    Note

    You can also use the ps-ef | grep 21 command.

  7. To stop a service, just issue the following command:

    service <servicename> stop
    

    Where <servicename> stands for the network service we want to stop. For example:

    service apache2 stop
    
  8. To enable a service at boot time, use the following command:

    update-rc.d –f <servicename> defaults
    

    Where <servicename> stands for the network service we want at boot time. For example:

    update-rc.d –f ssh defaults
    

    Note

    You can also do this from the Services menu in Kali Linux. From the Start menu, go to Kali Linux | Services.