Hacking with environment variables
elttam.com
elttam.com
[1]: https://github.com/sudo-project/sudo/blob/master/plugins/sud... [2]: https://www.sudo.ws/repos/sudo/rev/bdf9c9e7f455
I mean, good intentions, should've worked, but a single mistake wasn't discovered among all of the features involved in locking it down as hard as possible.
Security is a fight nobody can win, because it's an N-1 relationship of reassuring your own mistakes vs. finding a single mistake as an opportunity.
I mean look at those variables, this seems like a loosing battle. PERLLIB, PERL5LIB etc. - what if there's a PERL6LIB at some point or a NEWSCRIPTINGLANGUAGELIB variable?
The list is still relevant to this discussion though as a nice "greatest hits" cheat-sheet of fun environment variables to play with here.
I think that the fail-close design (I know them as positive-style branching) should be embraced everywhere possible.
But can this be actually achieved without breaking the ecosystem in the sense of having to start all over again?
Unless you're fuzzing, automated testing could've easily missed this.
Good times.
There are some very interesting ways to load shared objects or read files with environment variables, and we even found ways to leverage common libraries like readline and gconv to pop apps that used them.
Of course some of them are trivial, you don't get any props for showing arbitrary file reading when you can run bash or perl as root. But exploiting readline that way is pretty interesting!
> As for how the antigravity module opens your browser, it uses another module from the standard library called webbrowser. This module checks your PATH for a large variety of browsers, including mosaic, opera, skipstone, konqueror, chrome, chromium, firefox, links, elinks and lynx. It also accepts an environment variable BROWSER that lets you specify which process should be executed.
It was the possibility of security vulnerabilities that made software companies (more specifically Microsoft[0]) eschew easter eggs. Every feature, every line of code potentially increases your attack surface, especially if it interacts with other features.
0. https://docs.microsoft.com/en-us/archive/blogs/larryosterman...
It increases your options, certainly, but it can't do anything dangerous as-is.
You could execute a 'curl` which directly pipes into 'bash -c'.
See https://github.com/python/cpython/blob/master/Lib/webbrowser...
...and yet there are plenty of horror stories about Win10 coming with lots of other "surprises" like Candy Crush installed by default, ads that fetch resources over the Internet, etc. I can almost hear a PM somewhere say "but they're not easter eggs, because they are documented somewhere." I'm sure people would be far less surprised and disgusted by a "real easter egg" that did something simple like developer's credits. Corporate bureaucracy at its worst...
From my reading of this, it allows executing any executable you can put in the BROWSER environment
Are you trying to tell hackers to just not import the module?
NLB still "rocks" tho :)
To be clear, an easter egg is only supposed to be a (pleasant) surprise to the consumer -- not a secret kept from the rest of the team, especially QA. You can and should absolutely test your easter eggs.
Yes, Excel's increasingly elaborate easter eggs[2] would probably find it hard to get past security review these days. But to say that easter eggs are bad because security doesn't make sense. Especially when companies include undocumented features in software all the time -- e.g., typing '=rand()' into newer versions of MS Word produces some random text, probably a lorem ipsum generator-like feature.
[1] https://www.google.com/search?hl=en&source=hp&q=askew&oq=ask...
[2] https://www.youtube.com/watch?v=Xb9AXBowb0E , https://www.youtube.com/watch?v=-gYb5GUs0dM , https://www.youtube.com/watch?v=PGZfuwsvIFQ
Interesting - could the -r option load a .so file with a .ctor section?
$ RUBYOPT="-r/usr/lib64/libpcprofile.so" PCPROFILE_OUTPUT="/tmp/testing" ruby /dev/nullI wonder whether it is still the case nowadays. Is CGI still being used?
For example, a sub-contractor at BigCo., Inc. could use a lot of this knowledge to exfiltrate stuff.
I mean, CGI web servers are still out there - but careful that you don't overlook a wider market for these sploits.
We were also unable to control the contents of a file on disk, and bruteforcing process identifiers (PIDs) and file descriptors found no interesting results, eliminating remote LD_PRELOAD exploitation.> We were also unable to control the contents of a file on disk
From the first and second sentence.
One wouldn't usually file a CVE in these circumstances, if only the client is affected.
Does anyone know what the site's JavaScript doing to cause that?
I don’t get why people use those kind of shitty frameworks for sites that don’t require interactive content.
I'm not saying everyone has to go that minimal but my (and I suspect the GPs) point is that people can get carried away when designing their personal blogs, and in fact sites in general, and miss the point of what their site is actually trying to achieve in the process. If someone feels they need a loading screen to serve a static blog then I suspect they've probably fallen into that trap themselves.
This is one of the two standard failure techniques. (I glom <body style="opacity:0"> and the likes in the same category as this site.) The other category is where the body has no content, and JavaScript injects it. I’m undecided which is worse, but I think that it’s probably this one, because the developer pretty much went out of their way to slow things down in the name of subjective prettiness (and perhaps just because they wrote the rest of the markup/styling/code badly), and thereby broke things. Whereas I can at least understand why you’d do the whole thing in JavaScript, even if it’s not something I’m willing to do.
But I just want to be clear on this reason: it’s a fundamentally bad technique that slows things down and harms accessibility, both of which are far more important than your website potentially appearing slightly imperfectly while it loads, like just >99.4% of websites. (And if you’re doing something that means that your page looks worse than most while loading, you’re probably loading your resources in the wrong way somehow, e.g. putting a critical stylesheet at the end of the document rather than in the head.)
Other reasons for doing this are:
• A splash screen sort of experience. Yeah, there are still some around doing this, though it’s fortunately uncommon. It’s often a precursor to this second reason:
• A misguided desire to animate things into place at the right time (kind of an extension of the FOUC, I guess). Gratuitous animating-in of content as you scroll, which this meshes with, is a horrible thing to do, by the way: although it’s decidedly popular on homepages, most people dislike it (ranging from mild displeasure to rage-quitting the site), because it’s distracting, slows things down and adds nothing. Just don’t do it.
In short, I see no legitimate reason to ever set document opacity to zero or to put a loading spinner on top of everything else, in CSS. (In JavaScript, maybe—there are defensible reasons; but never in CSS.)