Book Image

Kali Linux - An Ethical Hacker's Cookbook - Second Edition

By : Himanshu Sharma
Book Image

Kali Linux - An Ethical Hacker's Cookbook - Second Edition

By: Himanshu Sharma

Overview of this book

Many organizations have been affected by recent cyber events. At the current rate of hacking, it has become more important than ever to pentest your environment in order to ensure advanced-level security. This book is packed with practical recipes that will quickly get you started with Kali Linux (version 2018.4 / 2019), in addition to covering the core functionalities. The book will get you off to a strong start by introducing you to the installation and configuration of Kali Linux, which will help you to perform your tests. You will also learn how to plan attack strategies and perform web application exploitation using tools such as Burp and JexBoss. As you progress, you will get to grips with performing network exploitation using Metasploit, Sparta, and Wireshark. The book will also help you delve into the technique of carrying out wireless and password attacks using tools such as Patator, John the Ripper, and airoscript-ng. Later chapters will draw focus to the wide range of tools that help in forensics investigations and incident response mechanisms. As you wrap up the concluding chapters, you will learn to create an optimum quality pentest report. By the end of this book, you will be equipped with the knowledge you need to conduct advanced penetration testing, thanks to the book’s crisp and task-oriented recipes.
Table of Contents (15 chapters)

Setting up proxychains

Sometimes, we need to remain untraceable while performing a pentest activity. Proxychains helps us by allowing us to use an intermediary system whose IP can be left in the logs of the system without the worry of it tracing back to us.

Proxychains is a tool that allows any application to follow the connection via proxy, such as SOCKS5 and Tor.

How to do it...

Proxychains is already installed in Kali. However, we need a list of proxies in its configuration file that we want to use:

  1. To do that, we open the config file of proxychains in a text editor with this command:
leafpad /etc/proxychains.conf

The following screenshot shows the output of the preceding command:

We can add all the proxies we want in the place highlighted in the previous screenshot and then save. Proxychains also allows us to use dynamic chain or random chain while connection to proxyservers.

  1. In the config file, uncomment dynamic_chain or random_chain. The following screenshot shows the output of the preceding command:

Using proxychains with Tor

  1. To use proxychains with Tor, we first need to install Tor using the following command:
apt-get install tor
  1. Once it is installed, we run Tor by typing tor in the Terminal.
  2. We then open another Terminal and type the following command to use an application via proxychains:
proxychains toolname –arguments

The following screenshot shows the output of the preceding command:

Now let's have a look at the Routerhunter tool in the next recipe.