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

Linux privilege escalation


For this recipe, we use a vulnerable OS called Stapler. The image can be downloaded from https://www.vulnhub.com/entry/stapler-1,150/ and loaded on VirtualBox. In the previous chapter, we learned how to perform a vulnerability assessment and gain low-level or high-level access. As part of the exercise, the reader can perform penetration testing and gain a shell on the Stapler OS. We be from the point where we receive a low-privilege shell.

Getting ready

For this recipe, the reader needs to have a low-privilege shell on the vulnerable Stapler OS. In this scenario, we managed to get an SSH connection to one of the users by doing some information gathering and password bruting.

How to do it...

  1. We have logged in to the Stapler machine with the username SHayslett, as shown in the following screenshot:

  1. We will enumerate the OS kernel version of the system. Enter the following command to check the version flavor and kernel details:
uname -a
      cat /etc/lsb-release...