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

Using Weevely for file upload vulnerability


In this recipe, we will use to exploit file upload vulnerabilities. Weevely is a stealth PHP web shell that a telnet-like connection. It is very handy when you need to create a web shell to exploit file upload vulnerability. It works so well that you don't need to look for any tool or shell. Let's get started.

Getting ready

To step through this recipe, you will need Kali Linux running in Oracle Virtualbox and an Internet connection. No other prerequisites are required.

How to do it...

For this recipe, you need to perform the following steps:

  1. Open the target application file upload page, as shown in the following screenshot:

  1. Open the terminal and type Weevely; it will display the sample syntax for use, as shown in the following screenshot:

  1. Now we will need to generate a shell in PHP, which we can do using the following command:
      Weevely generate <password-to-connect> /root/weevely.php
Weevely generate uytutu765iuhkj /root/weevely.php
  1. Type...