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

Exploiting vulnerable services (Unix)


In this recipe, we will the vulnerabilities at the network level. These vulnerabilities are software-level vulnerabilities. When we talk about software, we are explicitly speaking about software/packages that make use of networks/ports to function. For example, FTP server, SSH server, HTTP, and so on. This recipe will cover a few vulnerabilities of two flavors, Unix and Windows. Let's start with UNIX exploitation.

Getting ready

We will make use of Metasploit in this module; make sure you start PostgreSQL before initializing Metasploit. We will quickly recap the vulnerabilities we found in Metasploitable2 when we performed the vulnerability scan:

Note

The IP is different as the author has changed the VLAN of the internal network.

The vulnerability scan output would look like this:

A prerequisite to this recipe is to know your IP address, since it will be used to set the Lhost in Metasploit. Let us take a few of the vulnerabilities from here to understand...