Reader small image

You're reading from  Kali Linux Cookbook - Second Edition

Product typeBook
Published inSep 2017
Publisher
ISBN-139781784390303
Edition2nd Edition
Right arrow
Authors (2):
Corey Schultz
Corey Schultz
author image
Corey Schultz

Corey P. Schultz is a technologist focusing on security research, Internet of Things, and the impact of technology on education and learning. He has over 20 years of experience in the security industry doing security architecture, penetration testing, incident response, and forensic analysis. Corey is currently a technical solutions architect for Cisco Systems Global Security Sales Organization. He works on a daily basis with large environments on designing and architecting secure enterprise networks. You can also find Corey active on Twitter @cschultz0000, where you can also see his schedule of speaking engagements and appearances.
Read more about Corey Schultz

Bob Perciaccante
Bob Perciaccante
author image
Bob Perciaccante

Bob Perciaccante is seasoned information security practitioner who has been in the security field for almost 20 years. Currently, he is a consulting systems engineer for Cisco Systems in Pennsylvania where he has worked for the last 10 years focusing on network and data security, network access control, and secure network architectures. His primary day-to-day responsibilities focus on designing secure network solutions for his customers and working to train customers and partners on security solution implementations and daily operations to get the most out of their infrastructure. When not involved in security activities, Bob enjoys eclectic hobbies such as working on cars, 3D printing, and camping. Collaborating with his Cisco peer, Corey P. Schultz, this book is his first security publication.
Read more about Bob Perciaccante

View More author details
Right arrow

Maintaining Access

In this chapter, we will cover the following topics:

  • Pivoting and expanding access to the network
  • Using persistence to maintain system access
  • Using cymothoa to create a Linux backdoor
  • Protocol spoofing using pingtunnel
  • Protocol spoofing using httptunnel
  • Hiding communications with cryptcat

Introduction

In this chapter, we will explore using multiple methods to maintain access. For best results, multiple hosts and multiple methodologies should be employed. We will also discuss how we cover our tracks to make it easier to hide our activity.

Pivoting and expanding access to the network

In this recipe, we will leverage a host as a beachhead to exploit other hosts.

While this recipe may not sound appropriate for the topic of the chapter, one of the best ways of maintaining access to a target network is to have more hosts exploited that you can use for your communication channel. You can also have them use various forms of methods to reach out, so that if one is discovered you have access to others through different means.

Getting ready

Let's ensure the following prerequisites:

  • Your Kali Linux VM is powered up and you are logged in as root
  • Your Windows XP VM is powered up on the host-only network
...

Using persistence to maintain system access

In this recipe, we will use persistence to maintain access to the system across reboots.

Getting ready

Let's ensure the following prerequisites:

  • Your Kali Linux VM is powered up and you are logged in as root
  • Your Windows XP VM is powered up on the host-only network

How to do it...

In this recipe we will use persistence methods to maintain access to a system:

  1. Validate the IP addresses of your machines before we get started.
  2. We are going to start with an already exploited machine in Armitage, ensure it has elevated privileges...

Using cymothoa to create a Linux backdoor

In this recipe, we will use cymothoa to maintain Linux system access through the use of a backdoor.

Getting ready

Let's ensure the following prerequisites:

  • Your Kali Linux VM is powered up and you are logged in as root
  • Your Metasploitable VM is powered up on the host-only network

How to do it...

To create a backdoor in Linux, we will use the following recipe:

  1. Validate the IP addresses of your machines before we get started.
  2. In this case, we will be starting from a machine that has already been exploited; we will shortcut...

Protocol spoofing using pingtunnel

In this recipe we will use pingtunnel to tunnel communications between two hosts. As most of the time, ICMP communications are allowed through firewalls and rarely inspected for malicious traffic by most companies, it makes it easy to set up a connection that will largely go unnoticed.

Getting ready

Let's ensure the following prerequisites:

  • Your Kali Linux VM is powered up and you are logged in as root
  • Your Ubuntu VM is powered up and you are logged in and on the NAT network and have internet connectivity

How to do it...

To tunnel...

Protocol spoofing using httptunnel

In this recipe we will use httptunnel to tunnel communications between two hosts. As most of the time, HTTP communications are allowed through firewalls with little inspection by most companies, it makes it easy to set up a connection that will largely go unnoticed.

Getting ready

Let's ensure the following prerequisites:

  • Your Kali Linux VM is powered up and you are logged in as root
  • Your Ubuntu VM is powered up and you are logged in and on the NAT network and have internet connectivity

How to do it...

To create a tunnel with httptunnel...

Hiding communications with cryptcat

In this recipe we will use cryptcat to transfer files between two hosts. Although we will use cryptcat for transferring files in this example, it can be used for a wide variety of purposes such as secure chat, shell access, port scanning as well as others.

Getting ready

Let's ensure the following prerequisites:

  • Your Kali Linux VM is powered up and you are logged in as root
  • Your Ubuntu VM is powered up and you are logged in and on the NAT network and have internet connectivity

How to do it...

To use cryptcat to create tunnels to...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Kali Linux Cookbook - Second Edition
Published in: Sep 2017Publisher: ISBN-13: 9781784390303
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Corey Schultz

Corey P. Schultz is a technologist focusing on security research, Internet of Things, and the impact of technology on education and learning. He has over 20 years of experience in the security industry doing security architecture, penetration testing, incident response, and forensic analysis. Corey is currently a technical solutions architect for Cisco Systems Global Security Sales Organization. He works on a daily basis with large environments on designing and architecting secure enterprise networks. You can also find Corey active on Twitter @cschultz0000, where you can also see his schedule of speaking engagements and appearances.
Read more about Corey Schultz

author image
Bob Perciaccante

Bob Perciaccante is seasoned information security practitioner who has been in the security field for almost 20 years. Currently, he is a consulting systems engineer for Cisco Systems in Pennsylvania where he has worked for the last 10 years focusing on network and data security, network access control, and secure network architectures. His primary day-to-day responsibilities focus on designing secure network solutions for his customers and working to train customers and partners on security solution implementations and daily operations to get the most out of their infrastructure. When not involved in security activities, Bob enjoys eclectic hobbies such as working on cars, 3D printing, and camping. Collaborating with his Cisco peer, Corey P. Schultz, this book is his first security publication.
Read more about Bob Perciaccante