Difference between revisions of "Reverse Shells"

From RHS Wiki
Jump to navigation Jump to search
m
Tag: visualeditor
Tag: visualeditor
Line 13: Line 13:
 
$ reset
 
$ reset
 
$ export SHELL=bash
 
$ export SHELL=bash
$ export TERM=xterm256-color
+
$ export TERM=xterm256-color # linux | screen
 
$ stty rows 38 columns 116
 
$ stty rows 38 columns 116
  
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 11:45, 23 January 2020

http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet

https://blog.ropnop.com/upgrading-simple-shells-to-fully-interactive-ttys/

Upgrading nc shell


$ stty -a  # to get rows and columns from your machine
$ nc -lvp 444  # connect from the attacked machine
$ python -c 'import pty; pty.spawn("/bin/bash")'
Ctrl + Z
$ stty raw -echo
$ fg 1
$ reset
$ export SHELL=bash
$ export TERM=xterm256-color  # linux | screen
$ stty rows 38 columns 116