Book Image

Kali Linux Intrusion and Exploitation Cookbook

By : Dhruv Shah, Ishan Girdhar
Book Image

Kali Linux Intrusion and Exploitation Cookbook

By: Dhruv Shah, Ishan Girdhar

Overview of this book

With the increasing threats of breaches and attacks on critical infrastructure, system administrators and architects can use Kali Linux 2.0 to ensure their infrastructure is secure by finding out known vulnerabilities and safeguarding their infrastructure against unknown vulnerabilities. This practical cookbook-style guide contains chapters carefully structured in three phases – information gathering, vulnerability assessment, and penetration testing for the web, and wired and wireless networks. It's an ideal reference guide if you’re looking for a solution to a specific problem or learning how to use a tool. We provide hands-on examples of powerful tools/scripts designed for exploitation. In the final section, we cover various tools you can use during testing, and we help you create in-depth reports to impress management. We provide system engineers with steps to reproduce issues and fix them.
Table of Contents (18 chapters)
Title Page
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface

Customizing Kali Linux for faster package updates


Kali contains more than 300 security tools and system binaries. After installing Kali Linux, first thing you would need to do is update the Linux to get the latest collection of security tools and features. Since Kali is based on Debian Linux, you can use the apt-get update command to update the repositories for the binaries and tools.

However, at times while updating Kali Linux, you will notice that updates can be slow regardless of your Internet speed and bandwidth. In this recipe, we will show you how you can update your source file, which your package manager refers to, for faster package updates:

Getting ready

For this recipe, you will need a connection to the Internet with a valid IP address.

How to do it...

Perform the following steps for this recipe:

  1. Open the terminal and use an editor to open the sources.list file:
      vim /etc/apt/sources.list
  1. The default sources.list file looks like:
      #deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot i386 
      LIVE/INSTALL Binary 20140721-23:20]/ kali contrib main non-free


      deb http://http.kali.org/kali kali main non-free contrib

      deb-src http://http.kali.org/kali kali main non-free contrib

      ## Security updates
      deb http://security.kali.org/kali-security kali/updates main 
      contrib non-free

All you need to do is to change http to repo as shown in the following code:

      #deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot i386 
      LIVE/INSTALL Binary 20140721-23:20]/ kali contrib main non-free

      deb http://repo.kali.org/kali kali main non-free contrib
      deb-src http://repo.kali.org/kali kali main non-free contrib

      ## Security updates
      deb http://security.kali.org/kali-security kali/updates main 
      contrib non-free
  1. Make the following changes, save the file, and exit the editor by pressing the Esc key and then type wq! and press Enter .
  2. Now, update and upgrade your Kali using the following command; you will notice the difference in speed:
      apt-get update && apt-get upgrade

How it works...

Kali Linux has multiple different mirrors around the world. Based on your IP address location, it automatically selects the mirror closest to your location. Due to various reasons, these mirrors may become slow over a period of time. You can find the list of mirrors closest to your location at http://http.kali.org/README.mirrorlist . The apt-get command takes the list of update servers from /etc/apt/sources.list. Changes made to the sources.list files ensures that our Kali connects to the correct servers and gets served with faster updates.