06. Reverse Shell - tandihansvin/EthicalHacking GitHub Wiki

Introduction

What is shell ?

Shell can basically be defined as an environment which is utilized to run shell scripts, run a program, or command execution on a device.

What is reverse shell ?

Reverse shell is a type of shell where the target computer communicate back to the attacker computer. Usually, the attacker computer will open a port so called listener port which will receive connection communication from the target computer.

reverse shell

Prerequisite

In this tutorial, we will demonstrate how to set up reverse shell by using Netcat tool. If you are not familiar with Netcat. I recommend to read the my previous blog first (Netcat and some example usage).

Demonstration

Description

state Attacker IP: 188.166.247.59 Listener Port: 9999 Target IP: 206.189.85.141

Process

Here's some step to do reverse shell:

1. Set up listener port on attacker computer

set up listener port on attacker computer

2. Establish connection from target computer to attacker computer

establish connection -e means to execute a program after connect. So far, the attacker already have full control over the target computer and this is what we called reverse shell. In this case the root user initiated the shell which means we have root privileges on the target host.

3. Issue commands on the target host

issued a command