🐻
CTF Notes
  • Home
  • General
    • Hints
    • Formats
    • Links
    • Reversing
  • Binary
    • Basics
    • Vectors
    • Evasion
    • Payloads
    • Heap
    • Tools
  • Web
    • Web
    • Javascript
    • PHP
  • System
    • Escape
    • Escalation
    • Shells
  • Crypto
    • Hints
Powered by GitBook
On this page
  • Reverse Shells
  • Upgrade a simple shell to a proper one
  1. System

Shells

Reverse Shells

Generator

Upgrade a simple shell to a proper one

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

$ su - oracle
su: must be run from a terminal
$ /usr/bin/script -qc /bin/bash /dev/null
www-data@funbox7:/$ su - oracle
su - oracle
Password:

Every so often, that trick fails to work. Here are some other ones:

Source

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

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

/bin/sh -i

perl —e 'exec "/bin/sh";'

perl: exec "/bin/sh";

ruby: exec "/bin/sh"

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

Last updated 3 years ago