Implementing Reverse Shell and Redirection Techniques

reverse shell n.w
1 / 19
Embed
Share

Explore the concept of reverse shell and understand how redirection works, including redirecting input and output to TCP connections. Learn about file descriptors, standard I/O devices, and the use of /dev/tcp in bash for effective redirection.

  • Reverse Shell
  • Redirection Techniques
  • File Descriptors
  • TCP Connections
  • Bash

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Reverse Shell

  2. Overview File descriptor Standard input and output devices Redirecting standard input and output How reverse shell works

  3. The Idea of Reverse Shell

  4. File Descriptor Execution Result

  5. File Descriptor Table

  6. Standard I/O Devices Execution Result

  7. Redirection An example Redirecting to file Redirecting to file descriptor

  8. How Is Redirection Implemented? Creates a copy of the file descriptor oldfp, and then assign newfd as the new file descriptor.

  9. The Change of File Descriptor Table

  10. Redirecting Output to TCP Connections

  11. Redirecting Input to TCP Connections

  12. Redirecting to TCP from Shell Redirecting Input Redirecting Output Running a TCP server on 10.0.2.5 $ nc l 9090

  13. Note /dev/tcp is not a real folder: it dos not exist It is a built-in virtual file/folder for bash only Redirection to /dev/tcp/ can only be done inside bash

  14. Reverse Shell Overview

  15. Redirecting Standard Output On Attacker Machine (10.0.2.70) On Server Machine

  16. Redirecting Standard Input & Output On Server Machine

  17. Redirecting Standard Error, Input, & Output On Server Machine

  18. Reverse Shell via Code Injection Reverse shell is executed via injected code Can t assume that the target machine runs bash Run bash first:

  19. Summary Reverse shell works by redirecting shell program s input/output Input and output of a program can be redirected to a TCP connection The other end of the TCP connection is attacker It is a widely used technique by attackers

More Related Content