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 services using exploit-db scripts


In this recipe we are going to the Windows SMB service ms08_067 using exploit code outside the framework. A pentester often relies on Metasploit for his\her pentesting activities, however it is important to understand that these are custom scripts that are run and take a dynamic input of remote host port to connect to and so on. In this recipe, we will see how to tweak a vulnerability script to match our target and exploit it successfully.

Getting ready

For this recipe, we will need to use the vulnerable windows machine we have been testing, and the rest of the tools and scripts that are available in the Kali machine itself.

How to do it...

  1. Let us first see how to use searchsploit to search for ms08-067 vulnerability in the exploit-db database, using the following command:
searchsploit ms08-067

The output will be as shown in the following screenshot:

  1. We can see that a Python script is available called "Microsoft Windows - 'NetAPI32.dll' Code Execution...