✅
Penetration Testing
  • Introduction
  • Methodology
  • Port Scanning
    • Ports and Associated Service
    • Nmap Port States
    • Nmap Scanning
  • Service Enumeration
    • SMB
    • HTTP 80,443
      • Sub-Domain Enumeration
      • Authentication Bypassing
      • Directory Busting
  • Reverse Shells
    • Reverse shell Cheatsheets
    • Msfvenom to get Reverse Shell
    • Spawning Shells - TTY Shells
    • Listener Setup
    • Python pty shells
    • Stabilizing shell
  • Linux Privilege Escalation
    • Enumeration
    • Automated Enumeration Tools
    • Kernel Exploits
    • Weak File Permissions
    • Sudo
    • Cron Job
    • SUID /SGID
    • Passwords and Keys
    • NFS
  • PENETRATION TESTING REPORT RESOURCES
    • Resources
  • OSCP Like Machines Walkthrough
    • HACKTHEBOX
      • Linux
      • Windows
      • Harder than OSCP
Powered by GitBook
On this page
  1. Reverse Shells

Spawning Shells - TTY Shells

  • python -c 'import pty; pty.spawn("/bin/sh")'

  • echo os.system('/bin/bash')

  • /bin/sh -i

  • script -qc /bin/bash /dev/null

  • perl -e 'exec "/bin/sh";'

  • perl: exec "/bin/sh";

  • ruby: exec "/bin/sh"

  • lua: os.execute('/bin/sh')

  • IRB: exec "/bin/sh"

  • vi: :!bash

  • vi: :set shell=/bin/bash:shell

  • nmap: !sh

PreviousMsfvenom to get Reverse ShellNextListener Setup

Last updated 2 years ago